集成百度鹰眼服务AK
This commit is contained in:
@@ -137,15 +137,15 @@ const handleRemove = (file, fileList, type) => {
|
||||
|
||||
const beforeAvatarUpload = (file) => {
|
||||
const isImage = file.type.startsWith('image/');
|
||||
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||
const isLt10M = file.size / 1024 / 1024 < 10;
|
||||
|
||||
if (!isImage) {
|
||||
ElMessage.error('上传文件只能是图片格式!');
|
||||
}
|
||||
if (!isLt2M) {
|
||||
ElMessage.error('上传图片大小不能超过 2MB!');
|
||||
if (!isLt10M) {
|
||||
ElMessage.error('上传图片大小不能超过 10MB!');
|
||||
}
|
||||
return isImage && isLt2M;
|
||||
return isImage && isLt10M;
|
||||
};
|
||||
|
||||
const handleExceed = (number) => {
|
||||
|
||||
Reference in New Issue
Block a user