From e375efb695e34fd2cac017f4da85ae9b81cd7dd9 Mon Sep 17 00:00:00 2001 From: lizhenwei Date: Mon, 8 May 2023 17:56:39 +0800 Subject: [PATCH] =?UTF-8?q?perf:(OSS)=20=E5=A2=9E=E5=8A=A0=E5=B8=B8?= =?UTF-8?q?=E7=94=A8=E6=96=87=E4=BB=B6=E5=92=8C=E5=9B=BE=E7=89=87=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E7=9A=84=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/components/FileUpload/index.vue | 13 +++++++++++-- ruoyi-ui/src/components/ImageUpload/index.vue | 4 ++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ruoyi-ui/src/components/FileUpload/index.vue b/ruoyi-ui/src/components/FileUpload/index.vue index 2e33c1b77..0d080ba90 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","tar.gz" + ], }, // 是否显示提示 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..3c0886534 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"], }, // 是否显示提示 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) : ""; } } };