mirror of
https://gitee.com/gz-yami/mall4v.git
synced 2026-03-22 08:07:17 +08:00
修复上传文件控制台报错的问题&修改版本号
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||||
<script>
|
<script>
|
||||||
console.log('mall4j.v230320')
|
console.log('mall4j.v230327')
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -49,7 +49,10 @@
|
|||||||
// 图片上传
|
// 图片上传
|
||||||
handleUploadSuccess (response, file, fileList) {
|
handleUploadSuccess (response, file, fileList) {
|
||||||
let pics = fileList.map(file => {
|
let pics = fileList.map(file => {
|
||||||
return file.response
|
if (typeof file.response === 'string') {
|
||||||
|
return file.response
|
||||||
|
}
|
||||||
|
return file.response.data
|
||||||
}).join(',')
|
}).join(',')
|
||||||
this.$emit('input', pics)
|
this.$emit('input', pics)
|
||||||
},
|
},
|
||||||
@@ -67,7 +70,10 @@
|
|||||||
},
|
},
|
||||||
handleRemove (file, fileList) {
|
handleRemove (file, fileList) {
|
||||||
let pics = fileList.map(file => {
|
let pics = fileList.map(file => {
|
||||||
return file.response
|
if (typeof file.response === 'string') {
|
||||||
|
return file.response
|
||||||
|
}
|
||||||
|
return file.response.data
|
||||||
}).join(',')
|
}).join(',')
|
||||||
this.$emit('input', pics)
|
this.$emit('input', pics)
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
methods: {
|
methods: {
|
||||||
// 图片上传
|
// 图片上传
|
||||||
handleUploadSuccess (response, file, fileList) {
|
handleUploadSuccess (response, file, fileList) {
|
||||||
this.$emit('input', file.response)
|
this.$emit('input', file.response.data)
|
||||||
},
|
},
|
||||||
// 限制图片上传大小
|
// 限制图片上传大小
|
||||||
beforeAvatarUpload (file) {
|
beforeAvatarUpload (file) {
|
||||||
|
|||||||
Reference in New Issue
Block a user