Selaa lähdekoodia

formcreate的上传组件增加可以上传图片格式的

xiongxing 1 viikko sitten
vanhempi
commit
bf675cb30f
1 muutettua tiedostoa jossa 10 lisäystä ja 2 poistoa
  1. 10 2
      src/components/FormCreate/src/config/useUploadFileRule.ts

+ 10 - 2
src/components/FormCreate/src/config/useUploadFileRule.ts

@@ -24,13 +24,21 @@ export const useUploadFileRule = () => {
           type: 'select',
           field: 'fileType',
           title: '文件类型',
-          value: ['doc', 'xls', 'ppt', 'txt', 'pdf'],
+          value: ['doc', 'xls', 'ppt', 'txt', 'pdf', 'png', 'jpg', 'jpeg', 'gif', 'webp'],
           options: [
             { label: 'doc', value: 'doc' },
             { label: 'xls', value: 'xls' },
             { label: 'ppt', value: 'ppt' },
             { label: 'txt', value: 'txt' },
-            { label: 'pdf', value: 'pdf' }
+            { label: 'pdf', value: 'pdf' },
+            { label: 'png', value: 'png' },
+            { label: 'jpg', value: 'jpg' },
+            { label: 'jpeg', value: 'jpeg' },
+            { label: 'gif', value: 'gif' },
+            { label: 'webp', value: 'webp' },
+            { label: 'svg', value: 'svg' },
+            { label: 'bmp', value: 'bmp' },
+            { label: 'ico', value: 'ico' }
           ],
           props: {
             multiple: true