This commit is contained in:
shijing 2022-04-28 10:39:04 +08:00
parent 1986621d4c
commit 87d004b60c
2 changed files with 5 additions and 5 deletions

View File

@ -126,7 +126,7 @@
},
created() {
this.getUP();
localStorage.setItem('tolerance','0.42');
localStorage.setItem('tolerance','0.36');
},
watch: {
$route: {

View File

@ -333,9 +333,9 @@ export default {
this.user.avatar = res.data.path;
},
beforeAvatarUpload(file) {
const isLt2M = file.size / 1024 / 1024 < 5;
const isLt2M = file.size / 1024 / 1024 < 10;
if (!isLt2M) {
this.$message.error("上传头像图片大小不能超过 5MB!");
this.$message.error("上传头像图片大小不能超过 10MB!");
}
return isLt2M;
},
@ -344,9 +344,9 @@ export default {
return data.label.indexOf(value) !== -1;
},
beforeUpload(file) {
const isLt1M = file.size / 1024 / 1024 < 5;
const isLt1M = file.size / 1024 / 1024 < 10;
if (!isLt1M) {
this.$message.error("上传头像图片大小不能超过 5MB!");
this.$message.error("上传头像图片大小不能超过 10MB!");
}
return isLt1M;
},