Tree: add getCheckedKeys & setCheckedKeys API.

This commit is contained in:
Furybean
2016-11-21 21:53:55 +08:00
committed by 杨奕
parent 71b0606823
commit 2c764d13fa
5 changed files with 74 additions and 11 deletions

View File

@@ -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);
}
}
};