|
|
@@ -71,11 +71,11 @@
|
|
|
const isPNG = file.type === 'image/png';
|
|
|
const isLt2M = file.size / 1024 / 1024 < 2;
|
|
|
if (!isJPG && !isPNG) {
|
|
|
- this.$message.error('上传头像图片只能是 JPG/PNG 格式!');
|
|
|
+ this._toast('上传头像图片只能是 JPG/PNG 格式!', 'error');
|
|
|
return
|
|
|
}
|
|
|
if (!isLt2M) {
|
|
|
- this.$message.error('上传头像图片大小不能超过 2MB!');
|
|
|
+ this._toast('上传头像图片大小不能超过 2MB!', 'error');
|
|
|
return
|
|
|
}
|
|
|
const formData = new FormData();
|