lh-ui-next 0.1.8-beta.7 → 0.1.8-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,7 +5,7 @@ alpha version is use to self-test; beta version is use to public survey.for exam
5
5
  1.0.0-alpha.1
6
6
  1.0.0-test.2
7
7
  ## Official version : "0.1.7",
8
- ## test version : "0.1.8-beta.7,
8
+ ## test version : "0.1.8-beta.8,
9
9
  ## npmmirror
10
10
  When cnpm sync execution is unsuccessful,you can go the website(http://www.npmmirror.com/package/lh-ui-next) and press sync button to
11
11
  manual trigger the sync event
@@ -3798,13 +3798,17 @@ const Jl = {
3798
3798
  },
3799
3799
  //根据key值选中单个节点和节点下的所有子孙级。
3800
3800
  setCheckedKeyAndChildren(e) {
3801
- let t = this.findNodeByKey(e), i = [e], s = (l) => {
3802
- for (let n = 0; n < l.children.length; n++) {
3803
- let a = l.children[n];
3804
- i.push(a.key), a.isLeaf || s(a);
3805
- }
3806
- };
3807
- t.isLeaf || s(t), this.setCheckedKeys(i);
3801
+ let t = this.findNodeByKey(e);
3802
+ if (t) {
3803
+ let i = [e], s = (l) => {
3804
+ for (let n = 0; n < l.children.length; n++) {
3805
+ let a = l.children[n];
3806
+ i.push(a.key), a.isLeaf || s(a);
3807
+ }
3808
+ };
3809
+ t.isLeaf || s(t), this.setCheckedKeys(i);
3810
+ } else
3811
+ console.warn("输入了一个不存在的key值" + e);
3808
3812
  },
3809
3813
  //隐藏其他
3810
3814
  hideOthers() {