Skip to content

Commit c6b8370

Browse files
committed
feat: 用户导入新增验证提示
1 parent e24962c commit c6b8370

File tree

1 file changed

+5
-0
lines changed
  • ruoyi-fastapi-frontend/src/views/system/user

1 file changed

+5
-0
lines changed

ruoyi-fastapi-frontend/src/views/system/user/index.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,11 @@ export default {
690690
},
691691
// 提交上传文件
692692
submitFileForm() {
693+
const file = this.$refs.upload.uploadFiles
694+
if (!file || file.length === 0 || !file[0].name.toLowerCase().endsWith('.xls') && !file[0].name.toLowerCase().endsWith('.xlsx')) {
695+
this.$modal.msgError("请选择后缀为 “xls”或“xlsx”的文件。")
696+
return
697+
}
693698
this.$refs.upload.submit();
694699
}
695700
}

0 commit comments

Comments
 (0)