Commit ad47808b authored by wcmoon's avatar wcmoon

fix: 上传头像超过 5M 添加提示

parent 2e1b7199
......@@ -188,4 +188,4 @@ const configModules = {
}
}
};
exports.model = configModules[process.env.VUE_APP_CURRENTMODE]
\ No newline at end of file
exports.model = configModules[process.env.VUE_APP_CURRENTMODE]
......@@ -170,6 +170,10 @@ export default {
this.option.img = " ";
const file = e.target.files[0];
this.restart = true;
if (file?.size > 1000 * 1000 * 5) {
this.$message.error('大小不超过5M');
return;
}
if (file) this.option.img = URL.createObjectURL(file);
},
// 上传图片
......@@ -325,4 +329,4 @@ export default {
}
}
}
</style>
\ No newline at end of file
</style>
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