feat: tree selectedKeys & selectedKeys support `.sync` modifier
parent
af361f7123
commit
6373ce8e92
|
@ -144,6 +144,7 @@ export default {
|
|||
}
|
||||
newState._selectedKeys = newSelectedKeys
|
||||
|
||||
this.$emit('update:selectedKeys', newSelectedKeys)
|
||||
this.$emit('select', newSelectedKeys, event)
|
||||
|
||||
this.setUncontrolledState(newState)
|
||||
|
@ -188,7 +189,7 @@ export default {
|
|||
ref: 'tree',
|
||||
class: `${prefixCls}-directory`,
|
||||
on: {
|
||||
...this.$listeners,
|
||||
...omit(this.$listeners, ['update:selectedKeys']),
|
||||
select: this.onSelect,
|
||||
click: this.onClick,
|
||||
doubleclick: this.onDoubleClick,
|
||||
|
|
|
@ -395,6 +395,7 @@ const Tree = {
|
|||
selectedNodes,
|
||||
nativeEvent: e,
|
||||
}
|
||||
this.__emit('update:selectedKeys', selectedKeys)
|
||||
this.__emit('select', selectedKeys, eventObj)
|
||||
},
|
||||
onNodeCheck (e, treeNode, checked) {
|
||||
|
@ -516,6 +517,7 @@ const Tree = {
|
|||
expanded: targetExpanded,
|
||||
nativeEvent: e,
|
||||
})
|
||||
this.__emit('update:expandedKeys', expandedKeys)
|
||||
|
||||
// Async Load data
|
||||
if (targetExpanded && loadData) {
|
||||
|
|
Loading…
Reference in New Issue