Commit 9f5a643a16e08aa5b002186d5c9b670b949044fe
1 parent
84a4a95d
fixed #2019
Showing
2 changed files
with
6 additions
and
0 deletions
Show diff stats
src/components/transfer/list.vue
| ... | ... | @@ -111,6 +111,7 @@ |
| 111 | 111 | if (item.disabled) return; |
| 112 | 112 | const index = this.checkedKeys.indexOf(item.key); |
| 113 | 113 | index > -1 ? this.checkedKeys.splice(index, 1) : this.checkedKeys.push(item.key); |
| 114 | + this.$parent.handleCheckedKeys(); | |
| 114 | 115 | }, |
| 115 | 116 | updateFilteredData () { |
| 116 | 117 | this.showItems = this.data; | ... | ... |
src/components/transfer/transfer.vue
| ... | ... | @@ -238,6 +238,11 @@ |
| 238 | 238 | }, |
| 239 | 239 | handleRightCheckedKeysChange (keys) { |
| 240 | 240 | this.rightCheckedKeys = keys; |
| 241 | + }, | |
| 242 | + handleCheckedKeys () { | |
| 243 | + const sourceSelectedKeys = this.getValidKeys('left'); | |
| 244 | + const targetSelectedKeys = this.getValidKeys('right'); | |
| 245 | + this.$emit('on-selected-change', sourceSelectedKeys, targetSelectedKeys); | |
| 241 | 246 | } |
| 242 | 247 | }, |
| 243 | 248 | watch: { | ... | ... |