Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
levy committed Feb 11, 2020
2 parents 6dcb44a + f5ab26b commit f940f5d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/upload-to-ali.vue
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,15 @@ export default {
return [].concat(this.value).filter(v => !!v)
},
set(list) {
/**
* 仅能在 Windows OS 存在
* 当组件本身已经存在图片的时候,
* 再把一张图片拖进来会将当前的数据格式变更为 `Array`, 即使是没有开启 `multiple` 的情况下,
* 因此在单张图片的情况禁止 `v-model` 同步行为, 防止触发上面的 `get` 变更为数组
*
* 单张图片不依靠此值来更新值, 在 `async upload()` 那里会触发更新.
*/
if (!this.multiple) return
this.$emit('input', list)
}
},
Expand Down

0 comments on commit f940f5d

Please sign in to comment.