Преглед на файлове

feat: 上传成功后才validateFields

gemercheung преди 1 година
родител
ревизия
189b817f6c
променени са 1 файла, в които са добавени 6 реда и са изтрити 3 реда
  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';
           }
         });