mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-17 23:06:47 +08:00
导出文件限制
This commit is contained in:
@@ -192,10 +192,19 @@ import {getCookieForName} from "@/api/method";
|
|||||||
state.fileList = [];
|
state.fileList = [];
|
||||||
state.uploadpercent = -1;
|
state.uploadpercent = -1;
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.error("请上传正确的文件格式");
|
message.error("请按模板格式上传文件");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
let isLt1M = info.file.size < 512000000;
|
||||||
|
console.log(info.file.size, isLt1M)
|
||||||
|
if (!isLt1M) {
|
||||||
|
state.fileList = [];
|
||||||
|
state.uploadpercent = -1;
|
||||||
|
message.destroy();
|
||||||
|
message.error("图片不能超过500KB! 请重新上传");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
state.addLoading = true;
|
state.addLoading = true;
|
||||||
state.uploadpercent = parseInt(info.file.percent);
|
state.uploadpercent = parseInt(info.file.percent);
|
||||||
|
|||||||
Reference in New Issue
Block a user