Skip to content

Commit

Permalink
修复上传文件控制台报错的问题&修改版本号
Browse files Browse the repository at this point in the history
  • Loading branch information
wyy committed Mar 27, 2023
1 parent ed49c56 commit 05f54a0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions mall4v/src/components/mul-pic-upload/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@
// 图片上传
handleUploadSuccess (response, file, fileList) {
let pics = fileList.map(file => {
return file.response
if (typeof file.response === 'string') {
return file.response
}
return file.response.data
}).join(',')
this.$emit('input', pics)
},
Expand All @@ -67,7 +70,10 @@
},
handleRemove (file, fileList) {
let pics = fileList.map(file => {
return file.response
if (typeof file.response === 'string') {
return file.response
}
return file.response.data
}).join(',')
this.$emit('input', pics)
},
Expand Down
2 changes: 1 addition & 1 deletion mall4v/src/components/pic-upload/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
methods: {
// 图片上传
handleUploadSuccess (response, file, fileList) {
this.$emit('input', file.response)
this.$emit('input', file.response.data)
},
// 限制图片上传大小
beforeAvatarUpload (file) {
Expand Down

0 comments on commit 05f54a0

Please sign in to comment.