Browse Source

feat: 上传成功后才validateFields

gemercheung 1 year ago
parent
commit
189b817f6c
1 changed files with 6 additions and 3 deletions
  1. 6 3
      src/views/feedback/pcSubmit.vue

+ 6 - 3
src/views/feedback/pcSubmit.vue

@@ -251,8 +251,11 @@
       return Promise.reject(rule.message);
     }
   }
-  function fileChange() {
-    formRef.value.validateFields(['problemDesc', 'solution']);
+  function fileChange({ file }) {
+    if (file.status === 'done') {
+      console.log('上传成功');
+      formRef.value.validateFields(['problemDesc', 'solution']);
+    }
   }
   const countryOption = countryList.map((ele) => {
     return {
@@ -340,7 +343,7 @@
       if (val.problemDescImgs.length > 0) {
         val.problemDescImgs.forEach((item) => {
           if ((item.type = 'video/mp4') && item.status == 'done' && item.thumbUrl == '') {
-            console.error('problemDescImgs', item);
+            // console.error('problemDescImgs', item);
             //   item.thumbUrl = item.response.data + '?x-oss-process=video/snapshot,t_0,f_jpg,w_1000,m_fast,ar_auto';
           }
         });