提交 b2d98c81 编写于 作者: chendeli's avatar chendeli

提示文案

上级 3fa26b03
......@@ -933,7 +933,7 @@
}
if (!isLt200k) {
return vm.$message.error("图片大小请控制在200k以内");
return vm.$message.error("图片大小不符合规范,请根据规范上传图片");
}
let _img = new FileReader();
_img.readAsDataURL(file);
......@@ -1001,15 +1001,15 @@
let vm = this;
const isJPG = file.type === "image/jpeg";
const isPNG = file.type === "image/png";
const isLt2M = file.size / 1024 / 1024 < fileLimit.size;
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isJPG && !isPNG) {
vm.$message.error("图片格式不符合规范,请根据规范上传图片");
// return;
}
// if (!isLt2M) {
// vm.$message.error("图片大小不符合规范,请根据规范上传图片 ");
// return;
// }
if (!isLt2M) {
vm.$message.error("图片大小不符合规范,请根据规范上传图片 ");
return;
}
let _img = new FileReader();
_img.readAsDataURL(file);
_img.onload = function (theFile) {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册