|
@@ -342,11 +342,13 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
beforeUpload(file) {
|
|
|
+ console.log(file.type)
|
|
|
const isPic =
|
|
|
file.type === 'image/jpeg' ||
|
|
|
file.type === 'image/png' ||
|
|
|
file.type === 'image/gif' ||
|
|
|
- file.type === 'image/jpg'
|
|
|
+ file.type === 'image/jpg' ||
|
|
|
+ file.type === 'audio/mpeg'
|
|
|
const isLt2M = file.size / 1024 / 1024 < 2
|
|
|
if (!isPic) {
|
|
|
this.$message.error('上传图片只能是 JPG、JPEG、PNG、GIF 格式!')
|