|
@@ -573,24 +573,24 @@ export default {
|
|
|
this.changeHandle(file)
|
|
|
},
|
|
|
uploadGifBefore(file) {
|
|
|
- const isJPGPNG = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/gif'
|
|
|
- const isLtM = file.size / 1024 / 1024 < 30
|
|
|
+ const isJPGPNG = file.type.toLowerCase() === 'image/jpeg' || file.type.toLowerCase().toLowerCase() === 'image/png' || file.type.toLowerCase() === 'image/gif'
|
|
|
+ const isLtM = file.size / 1024 / 1024 < 500
|
|
|
if (!isJPGPNG) {
|
|
|
this.$message.error('上传图片只能是 JPG PNG GIF 格式!')
|
|
|
}
|
|
|
if (!isLtM) {
|
|
|
- this.$message.error('上传图片大小不能超过 30M!')
|
|
|
+ this.$message.error('上传图片大小不能超过 500M!')
|
|
|
}
|
|
|
return isJPGPNG && isLtM
|
|
|
},
|
|
|
uploadBefore(file) {
|
|
|
- const isJPGPNG = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/gif'
|
|
|
- const isLtM = file.size / 1024 / 1024 < 10
|
|
|
+ const isJPGPNG = file.type.toLowerCase() === 'image/jpeg' || file.type.toLowerCase() === 'image/png' || file.type.toLowerCase() === 'image/gif'
|
|
|
+ const isLtM = file.size / 1024 / 1024 < 500
|
|
|
if (!isJPGPNG) {
|
|
|
this.$message.error('上传图片只能是 JPG PNG GIF 格式!')
|
|
|
}
|
|
|
if (!isLtM) {
|
|
|
- this.$message.error('上传图片大小不能超过 10M!')
|
|
|
+ this.$message.error('上传图片大小不能超过 500M!')
|
|
|
}
|
|
|
return isJPGPNG && isLtM
|
|
|
},
|