瀏覽代碼

渠道客诉填写任务增加上传照片功能

zhujindu 11 月之前
父節點
當前提交
d356a944e9
共有 1 個文件被更改,包括 7 次插入4 次删除
  1. 7 4
      src/components/uploadImgVStorec.vue

+ 7 - 4
src/components/uploadImgVStorec.vue

@@ -52,7 +52,8 @@ export default {
       type: Object,
       default: {},
     },
-    required: {
+    isRequired: {
+      // 是否开启拍照前校验
       type: Boolean,
       default: true,
     },
@@ -68,9 +69,11 @@ export default {
       ImagePreview([val]);
     },
     uploadImg() {
-      if (required && localStorage.getItem('chainName') == null) {
-        this.$toast('请输入名称!');
-        return;
+      if (this.required) {
+        if (localStorage.getItem('chainName') == null) {
+          this.$toast('请输入名称!');
+          return;
+        }
       }
       let url = window.location.href;
       let that = this;