Commit 0bc49a14 by Kyle_Li

验证修改

parent 0cdcc061
......@@ -345,10 +345,9 @@ export default {
beforeUpload(file) {
// let _this = this;
const isLt2M = file.size / 1024 / 1024 < 1;
const types = file.name.split(".")[1];
const fileType = ["xlsx", "xlc", "xlm", "xls", "xlt", "xlw", "csv"].some(
item => item === types
);
const types = file.name.split(".");
const type = types[types.length - 1];
const fileType = ["xlsx", "xlc", "xlm", "xls", "xlt", "xlw", "csv"].some(item => item === type);
if (!fileType) {
this.$message.warning("请上传excel表格");
return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment