【修改】增加加载中

This commit is contained in:
zhoulingpo
2023-05-25 17:21:54 +08:00
parent 56ec05c8c1
commit cdc0e26d5c
@@ -581,7 +581,7 @@ export default {
},
// 上传文件前
beforeUploadFile(file) {
this.table_loading=true
let realFileType = file.name.split('.')[file.name.split('.').length - 1];
const isType = (
file.type === fileType.pdf || file.type === fileType.ppt || file.type === fileType.pptx || file.type === fileType.xlsx||
@@ -590,10 +590,18 @@ export default {
);
const isSize = file.size / 1024 / 1024 < 200;
if (!isType) {
this.$message.error('仅能上传 pdfpptpptx 格式文件');
setTimeout(()=>{
this.$message.error('仅能上传 pdfpptpptx 格式文件');
})
}
if (!isSize) {
this.$message.error('您最大可上传200M文件');
setTimeout(()=> {
this.$message.error('您最大可上传200M文件');
})
}
if(isType && isSize){
this.table_loading=true
}
return isType && isSize;
},