|
@@ -83,9 +83,10 @@ export default {
|
|
|
);
|
|
);
|
|
|
},
|
|
},
|
|
|
handleBefore(file) {
|
|
handleBefore(file) {
|
|
|
- console.log(file);
|
|
|
|
|
|
|
+ // console.log(file);
|
|
|
const isLt = file.size / 1024 / 1024 < this.size;
|
|
const isLt = file.size / 1024 / 1024 < this.size;
|
|
|
- const isJPG = file.type === 'image/jpg' || file.type === 'image/png';
|
|
|
|
|
|
|
+ const isJPG = file.type === 'image/jpg' || file.type === 'image/png' || file.type === 'image/jpeg';
|
|
|
|
|
+ // console.log(isJPG);
|
|
|
if (!isJPG) {
|
|
if (!isJPG) {
|
|
|
this.$message.error('上传图片只能是JPG、PNG格式');
|
|
this.$message.error('上传图片只能是JPG、PNG格式');
|
|
|
}
|
|
}
|