This commit is contained in:
SelfRidicule 2024-03-26 10:57:21 +08:00
commit e715e75809

View File

@ -326,9 +326,9 @@ export default {
if (!isJpgOrPng) {
this.$message.error('You can only upload JPG file!')
}
const isLt2M = file.size / 1024 < 500
const isLt2M = file.size / 1024 < 5000
if (!isLt2M) {
this.$message.error('图片必须小于 500kb!')
this.$message.error('图片必须小于 5M!')
}
return isJpgOrPng && isLt2M
},