From 1594d736d74b9a958b882593c86126332bb691a9 Mon Sep 17 00:00:00 2001 From: tangchengming <445785772@qq.com> Date: Thu, 13 Feb 2025 17:15:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/uploadFile.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/uploadFile.vue b/src/components/uploadFile.vue index 6bc8ebf..94157dd 100644 --- a/src/components/uploadFile.vue +++ b/src/components/uploadFile.vue @@ -260,7 +260,11 @@ this.$message({message: `请上传大小需在${this.fileSize}MB以内的文件`, type: 'warning'}); return } - + // 文件名称不能包含特殊字符 + if (!this.$verify.specialChar(param.file.name)) { + this.$message.error('文件名称包含非法字符,请重新上传!') + return + } try { // let formData = new FormData() // formData.append('file', param.file)