Update tree.vue
This commit is contained in:
parent
076310a789
commit
8301bf1e7e
1 changed files with 2 additions and 2 deletions
|
@ -171,7 +171,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleSelect (nodeKey) {
|
handleSelect (nodeKey) {
|
||||||
if (!this.flatState[nodeKey]) return
|
if (!this.flatState[nodeKey]) return;
|
||||||
const node = this.flatState[nodeKey].node;
|
const node = this.flatState[nodeKey].node;
|
||||||
if (!this.multiple){ // reset previously selected node
|
if (!this.multiple){ // reset previously selected node
|
||||||
const currentSelectedKey = this.flatState.findIndex(obj => obj.node.selected);
|
const currentSelectedKey = this.flatState.findIndex(obj => obj.node.selected);
|
||||||
|
@ -182,7 +182,7 @@
|
||||||
this.$emit('on-select-change', this.getSelectedNodes(), node);
|
this.$emit('on-select-change', this.getSelectedNodes(), node);
|
||||||
},
|
},
|
||||||
handleCheck({ checked, nodeKey }) {
|
handleCheck({ checked, nodeKey }) {
|
||||||
if (!this.flatState[nodeKey]) return
|
if (!this.flatState[nodeKey]) return;
|
||||||
const node = this.flatState[nodeKey].node;
|
const node = this.flatState[nodeKey].node;
|
||||||
this.$set(node, 'checked', checked);
|
this.$set(node, 'checked', checked);
|
||||||
this.$set(node, 'indeterminate', false);
|
this.$set(node, 'indeterminate', false);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue