优化excel导入提示的样式

This commit is contained in:
季圣华
2022-05-13 18:24:51 +08:00
parent f5ec0c4767
commit 7ea99431dd

View File

@@ -311,6 +311,7 @@ export const JeecgListMixin = {
}, },
/* 导入 */ /* 导入 */
handleImportExcel(info){ handleImportExcel(info){
this.loading = true
if (info.file.status !== 'uploading') { if (info.file.status !== 'uploading') {
console.log(info.file, info.fileList); console.log(info.file, info.fileList);
} }
@@ -323,11 +324,14 @@ export const JeecgListMixin = {
this.$message.warning(info.file.response.data) this.$message.warning(info.file.response.data)
} }
this.loadData() this.loadData()
this.loading = false
} else { } else {
this.$message.error(`${info.file.name} ${info.file.response.data}.`); this.$message.error(`${info.file.name} ${info.file.response.data}.`);
this.loading = false
} }
} else if (info.file.status === 'error') { } else if (info.file.status === 'error') {
this.$message.error(`文件上传失败: ${info.file.msg} `); this.$message.error(`文件上传失败: ${info.file.msg} `)
this.loading = false
} }
}, },
/* 图片预览 */ /* 图片预览 */