parent
bf7387a6ba
commit
550875da40
|
@ -501,7 +501,7 @@ export default {
|
|||
beforeUpload(file) {
|
||||
const isJPG = file.type === 'image/jpeg' || file.type === 'image/jpg' || file.type === 'image/png'
|
||||
if (!isJPG) {
|
||||
this.$message.error('上传头像图片只能是 jpg/jpeg/png 格式!')
|
||||
this.$message.error('上传图片只能是 jpg/jpeg/png 格式!')
|
||||
}
|
||||
// 文件上传前的校验逻辑
|
||||
const isLt2M = file.size / 1024 / 1024 < 2
|
||||
|
|
Loading…
Reference in New Issue