mirror of
https://github.com/ElemeFE/element.git
synced 2025-12-19 12:04:02 +08:00
Tree: add getCheckedKeys & setCheckedKeys API.
This commit is contained in:
@@ -112,9 +112,16 @@
|
||||
getCheckedNodes(leafOnly) {
|
||||
return this.tree.getCheckedNodes(leafOnly);
|
||||
},
|
||||
setCheckedNodes(nodes) {
|
||||
getCheckedKeys(leafOnly) {
|
||||
return this.tree.getCheckedKeys(leafOnly);
|
||||
},
|
||||
setCheckedNodes(nodes, leafOnly) {
|
||||
if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in setCheckedNodes');
|
||||
this.tree.setCheckedNodes(nodes);
|
||||
this.tree.setCheckedNodes(nodes, leafOnly);
|
||||
},
|
||||
setCheckedKeys(keys, leafOnly) {
|
||||
if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in setCheckedNodes');
|
||||
this.tree.setCheckedKeys(keys, leafOnly);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user