Commit 8d3dfa05a60ac943e823c9830379ff296a0e8e54
1 parent
e9c21d9a
Exists in
master
and in
1 other branch
多图上传增加response格式化
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
packages/Image-upload/multiple.vue
| ... | ... | @@ -134,6 +134,7 @@ export default { |
| 134 | 134 | type: Boolean, |
| 135 | 135 | default: false |
| 136 | 136 | }, |
| 137 | + responseFormat: Function, | |
| 137 | 138 | limit: { |
| 138 | 139 | type: Number, |
| 139 | 140 | default: 3 |
| ... | ... | @@ -177,8 +178,7 @@ export default { |
| 177 | 178 | this.$emit('input', result.join(',')); |
| 178 | 179 | }, |
| 179 | 180 | handleSuccess(response = {}, filename) { |
| 180 | - const { result = [] } = response; | |
| 181 | - const url = result[0]; | |
| 181 | + const url = this.responseFormat(response); | |
| 182 | 182 | this.fileList.push({ url, name: filename }); |
| 183 | 183 | this.rowFileNameList.push({ url, filename }); |
| 184 | 184 | this.rowFileNameList = this.rowFileNameList.sort((a, b) => { | ... | ... |