소스 검색

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';
           }
         });