This commit is contained in:
yixu
2025-09-15 14:33:33 +08:00
parent f5f9d7c1a1
commit 718997a7f0

View File

@@ -27,9 +27,9 @@ const beforeUpload = (file) => {
ElMessage.error('只能上传JPG或PNG格式的图片!'); ElMessage.error('只能上传JPG或PNG格式的图片!');
return false; return false;
} }
const isLt2M = file.size / 1024 / 1024 < 2; const isLt2M = file.size / 1024 / 1024 < 5;
if (!isLt2M) { if (!isLt2M) {
ElMessage.error('图片大小不能超过2MB!'); ElMessage.error('图片大小不能超过5MB!');
return false; return false;
} }
return true; return true;