Tree: add setChecked method. (#1434)

This commit is contained in:
FuryBean
2016-11-28 18:57:09 +08:00
committed by cinwell.li
parent 2e79e4af63
commit d3b3d865e8
6 changed files with 26 additions and 1 deletions

View File

@@ -225,4 +225,12 @@ export default class TreeStore {
if (node) node.expand(null, this.autoExpandParent);
});
}
setChecked(data, checked, deep) {
const node = this.getNode(data);
if (node) {
node.setChecked(!!checked, deep);
}
}
};