diff --git a/ruoyi-ui/src/components/FileUpload/index.vue b/ruoyi-ui/src/components/FileUpload/index.vue index 2e33c1b77..60af47da8 100644 --- a/ruoyi-ui/src/components/FileUpload/index.vue +++ b/ruoyi-ui/src/components/FileUpload/index.vue @@ -61,7 +61,16 @@ export default { // 文件类型, 例如['png', 'jpg', 'jpeg'] fileType: { type: Array, - default: () => ["doc", "xls", "ppt", "txt", "pdf"], + default: () => [ + "txt", + "doc", "docx", + "pdf", + "xls", "xlsx", + "md", + "mp3", "wav", "wma", "flac", + "mp4", "avi", "wmv", "mov", "flv", + "zip", "rar","gzip" + ], }, // 是否显示提示 isShowTip: { @@ -199,7 +208,7 @@ export default { for (let i in list) { strs += list[i].ossId + separator; } - return strs != "" ? strs.substr(0, strs.length - 1) : ""; + return strs !== "" ? strs.substr(0, strs.length - 1) : ""; }, }, }; diff --git a/ruoyi-ui/src/components/ImageUpload/index.vue b/ruoyi-ui/src/components/ImageUpload/index.vue index 9c92e86bc..37b75c39f 100644 --- a/ruoyi-ui/src/components/ImageUpload/index.vue +++ b/ruoyi-ui/src/components/ImageUpload/index.vue @@ -62,7 +62,7 @@ export default { // 文件类型, 例如['png', 'jpg', 'jpeg'] fileType: { type: Array, - default: () => ["png", "jpg", "jpeg"], + default: () => ["png", "jpg", "jpeg","gif","svg"], }, // 是否显示提示 isShowTip: { @@ -207,7 +207,7 @@ export default { strs += list[i].ossId + separator; } } - return strs != "" ? strs.substr(0, strs.length - 1) : ""; + return strs !== "" ? strs.substr(0, strs.length - 1) : ""; } } };