修改了图片的大小

This commit is contained in:
chendaze 2024-03-26 10:49:32 +08:00
parent fa1409fbe5
commit 720d8bfa4a

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
},