Commit a12eaf1b authored by liqin's avatar liqin 💬

bug fixed

parent 436b90c8
......@@ -79,6 +79,8 @@ export default {
this.filedata.append('file', file.file)
},
beforeAvatarUpload(file) {
alert(file.size);
alert(file.size / 1024);
const isLt5M = file.size / 1024 < 1;
if (!isLt5M) {
this.$message.error("上传文件大小不能超过 1GB!");
......
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