Commit 99ef0c6f by 无尘

fix: 修改上传判断

parent 6ec7cc3d
......@@ -160,7 +160,7 @@ export default {
if (!isLt2M) {
that.$message.error('上传图片大小不能超过 2MB!');
}
return isLt2M && new Promise(function(resolve, reject) {
return isJPG && isLt2M && new Promise(function(resolve, reject) {
let reader = new FileReader();
reader.onload = function(event) {
let image = new Image();
......
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