From b1b60bc30959957281e6160bbb58ca90e89ce1db Mon Sep 17 00:00:00 2001 From: jacky Date: Sat, 11 May 2024 22:50:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AA=92=E4=BD=93=E5=BA=93=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=8A=E4=BC=A0=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/upload/common.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/upload/common.vue b/src/components/upload/common.vue index 7b2ae83..5436ba9 100644 --- a/src/components/upload/common.vue +++ b/src/components/upload/common.vue @@ -30,6 +30,7 @@ const uploadData = ref({ category: props.category }) const beforeUpload = (file) => { + console.log('file.type', file.type) const isDocument = isDocumentMime(file.type) const isZip = isZipMime(file.type) const isLt500K = file.size / 1024 / 1024 < 0.5 // 500K, @todo 应支持在项目中设置 @@ -39,7 +40,7 @@ const beforeUpload = (file) => { const isImage = isImageMime(file.type) if (!isVideo && !isImage && !isDocument && !isZip) { - ElMessage.error('上传图片只能是 jpg,png,svg,webp 格式, 上传视频只能是 mp4,webm 格式,上传文件只能是 txt,pdf,doc,docx,xls,xlsx,ppt,pptx,zip,rar!') + ElMessage.error('上传图片只能是 jpg,png,svg,webp 格式, 上传视频只能是 mp4,webm 格式,上传文件只能是 txt,pdf,doc,docx,xls,xlsx,ppt,pptx,wps,et,dps,zip,rar!') return false } if (isDocument && !isLt20M) {