Przeglądaj źródła

fix(bugs): 修改上传文件的限制

tangning 3 lat temu
rodzic
commit
a2a450d2b5

+ 1 - 1
src/components/Upload/src/UploadModal.vue

@@ -126,7 +126,7 @@
         const { size, name } = file;
         const { size, name } = file;
         const { maxSize, accept } = props;
         const { maxSize, accept } = props;
         const type = name.split('.').pop() || '';
         const type = name.split('.').pop() || '';
-        if (accept && !accept.includes(type.toLowerCase())) {
+        if (accept && accept.length > 0 && !accept.includes(type.toLowerCase())) {
           createMessage.error(t('component.upload.accept', [accept.join(',')]));
           createMessage.error(t('component.upload.accept', [accept.join(',')]));
           return false;
           return false;
         }
         }

+ 2 - 2
src/views/corporation/detailsModal.vue

@@ -118,7 +118,7 @@
           field: 'area',
           field: 'area',
           label: t('routes.corporation.area'),
           label: t('routes.corporation.area'),
           slot: 'text',
           slot: 'text',
-          ifShow: false,
+          // ifShow: false,
           component: 'Input',
           component: 'Input',
         },
         },
         {
         {
@@ -131,7 +131,7 @@
           field: 'website',
           field: 'website',
           label: t('routes.corporation.website'),
           label: t('routes.corporation.website'),
           slot: 'text',
           slot: 'text',
-          ifShow: false,
+          // ifShow: false,
           component: 'Input',
           component: 'Input',
         },
         },
         {
         {