Compare commits
No commits in common. "e6c1599cb2b887738ed3dd1bcd9f3a7da7967e9d" and "129cdcfd0c2f7fda36a3e8c2d7df175df61bc2c0" have entirely different histories.
e6c1599cb2
...
129cdcfd0c
@ -83,13 +83,13 @@
|
||||
/**
|
||||
* 上传文件之前验证
|
||||
*/
|
||||
const beforeUpload = (rawFile) => {
|
||||
const isLt2M = rawFile.file.file.size / 1024 / 1024 < 200;
|
||||
const beforeUpload = (file) => {
|
||||
const isLt2M = file.size / 1024 / 1024 < 200;
|
||||
if (!isLt2M) {
|
||||
message.warning('大小不能超过200MB!');
|
||||
return false;
|
||||
}
|
||||
if (!/\.(xlsx|xls|XLSX|XLS)$/.test(rawFile.file.name)) {
|
||||
if (!/\.(xlsx|xls|XLSX|XLS)$/.test(file.name)) {
|
||||
message.warning('请上传.xlsx .xls');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -84,13 +84,13 @@
|
||||
/**
|
||||
* 上传文件之前验证
|
||||
*/
|
||||
const beforeUpload = (rawFile) => {
|
||||
const isLt2M = rawFile.file.file.size / 1024 / 1024 < 200;
|
||||
const beforeUpload = (file) => {
|
||||
const isLt2M = file.size / 1024 / 1024 < 200;
|
||||
if (!isLt2M) {
|
||||
message.warning('大小不能超过200MB!');
|
||||
return false;
|
||||
}
|
||||
if (!/\.(xlsx|xls|XLSX|XLS)$/.test(rawFile.file.name)) {
|
||||
if (!/\.(xlsx|xls|XLSX|XLS)$/.test(file.name)) {
|
||||
message.warning('请上传.xlsx .xls');
|
||||
return false;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user