tangning před 8 měsíci
rodič
revize
d514523aaa
1 změnil soubory, kde provedl 2 přidání a 3 odebrání
  1. 2 3
      src/views/mediaLibrary/modal/uploadModal.vue

+ 2 - 3
src/views/mediaLibrary/modal/uploadModal.vue

@@ -62,7 +62,6 @@
   import { useI18n } from '/@/hooks/web/useI18n';
   import type { UploadProps } from 'ant-design-vue';
   import { debounce } from 'lodash-es';
-
   const { t } = useI18n();
   export default defineComponent({
     components: { BasicModal, BasicForm, Upload },
@@ -210,13 +209,13 @@
         if (!isExcel) {
           createMessage.error('支持jpg、png、jpeg、mp4、wav、mp3 、shp、zip格式文件上传');
           fileList.value = [];
-          return false;
+          return Upload.LIST_IGNORE;
         }
         const isLt10M = file.size / 1024 / 1024 < 2000;
         if (!isLt10M) {
           fileList.value = [];
           createMessage.error('上传文件不能超过 2G!');
-          return false;
+          return Upload.LIST_IGNORE;
         }
         fileList.value = [file];
         return false;