From 5f11fed41bed1cd3fea531f32848769516b9eeac Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sat, 23 Aug 2025 11:13:51 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=AF=BC=E5=85=A5=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E9=AA=8C=E8=AF=81=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/system/user/index.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ruoyi-ui/src/views/system/user/index.vue b/ruoyi-ui/src/views/system/user/index.vue index c7a3c1d91..9d6e61c53 100644 --- a/ruoyi-ui/src/views/system/user/index.vue +++ b/ruoyi-ui/src/views/system/user/index.vue @@ -546,6 +546,11 @@ export default { }, // 提交上传文件 submitFileForm() { + const file = this.$refs.upload.uploadFiles + if (!file || file.length === 0 || !file[0].name.toLowerCase().endsWith('.xls') && !file[0].name.toLowerCase().endsWith('.xlsx')) { + this.$modal.msgError("请选择后缀为 “xls”或“xlsx”的文件。") + return + } this.$refs.upload.submit() } }