用户导入添加验证提示

pull/433/head
RuoYi 4 weeks ago
parent 3503005f9d
commit 7919af54da

@ -546,6 +546,11 @@ export default {
}, },
// //
submitFileForm() { 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() this.$refs.upload.submit()
} }
} }

Loading…
Cancel
Save