lh-ui-next 0.1.7-beta.45 → 0.1.7-beta.47

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
@@ -4,8 +4,8 @@
4
4
  alpha version is use to self-test; beta version is use to public survey.for example:
5
5
  1.0.0-alpha.1
6
6
  1.0.0-test.2
7
- ## Official version : "0.1.7-beta.45",
8
- ## test version : "0.1.7-beta.45",
7
+ ## Official version : "0.1.7-beta.47",
8
+ ## test version : "0.1.7-beta.47",
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
@@ -3467,20 +3467,26 @@ const Jl = {
3467
3467
  this.fourthChecked = i[0], this.fourthIndeterminate = i[1];
3468
3468
  }
3469
3469
  },
3470
- nodeCheckChange(e) {
3471
- this.oneNodeClickCallback(e), this.calSecondChecked1Status(e), this.checkChanged();
3470
+ nodeCheckChange(e, t = !1) {
3471
+ this.oneNodeClickCallback(e, t), this.calSecondChecked1Status(e), this.checkChanged();
3472
3472
  },
3473
- oneNodeClickCallback(e) {
3473
+ oneNodeClickCallback(e, t = !1) {
3474
3474
  if (e.level == 0) {
3475
- let t = this.calCheckedStatus(this.store.data);
3476
- this.firstChecked = t[0], this.firstIndeterminate = t[1];
3475
+ let i = this.calCheckedStatus(this.store.data);
3476
+ this.firstChecked = i[0], this.firstIndeterminate = i[1];
3477
3477
  } else {
3478
- let t = this.findNodeByKey(e.parentMirror.key);
3479
- e.checked ? t.childSelectedCount++ : t.childSelectedCount--;
3480
- let i = this.calCheckedStatus(t.children);
3481
- e.level == 1 ? (this.secondChecked2 = i[0], this.secondIndeterminate2 = i[1]) : e.level == 2 ? (this.thirdChecked = i[0], this.thirdIndeterminate = i[1]) : e.level == 3 && (this.fourthChecked = i[0], this.fourthIndeterminate = i[1]);
3478
+ let i = this.findNodeByKey(e.parentMirror.key);
3479
+ e.checked ? i.childSelectedCount++ : i.childSelectedCount--;
3480
+ let s = this.calCheckedStatus(i.children);
3481
+ e.level == 1 ? t ? this.nodeInList(e, this.secondList) ? (this.secondChecked2 = s[0], this.secondIndeterminate2 = s[1]) : (this.secondChecked2 = !1, this.secondIndeterminate2 = !1) : (this.secondChecked2 = s[0], this.secondIndeterminate2 = s[1]) : e.level == 2 ? t ? this.nodeInList(e, this.thirdList) ? (this.thirdChecked = s[0], this.thirdIndeterminate = s[1]) : (this.thirdChecked = !1, this.thirdIndeterminate = !1) : (this.thirdChecked = s[0], this.thirdIndeterminate = s[1]) : e.level == 3 && (t ? this.nodeInList(e, this.fourthList) ? (this.fourthChecked = s[0], this.fourthIndeterminate = s[1]) : (this.fourthChecked = !1, this.fourthIndeterminate = !1) : (this.fourthChecked = s[0], this.fourthIndeterminate = s[1]));
3482
3482
  }
3483
3483
  },
3484
+ nodeInList(e, t) {
3485
+ for (let i = 0; i < t.length; i++)
3486
+ if (t[i].key == e.key)
3487
+ return !0;
3488
+ return !1;
3489
+ },
3484
3490
  calCheckedStatus(e) {
3485
3491
  let t = 0, i = 0, s = !1, l = !1;
3486
3492
  for (let n = 0; n < e.length; n++) {
@@ -3557,14 +3563,17 @@ const Jl = {
3557
3563
  let t = e;
3558
3564
  for (; t.parentMirror; )
3559
3565
  t = this.findNodeByKey(t.parentMirror.key);
3560
- let i = 0, s = 0, l = (n) => {
3561
- if (i = i + n.children.length, s = s + n.childSelectedCount, !n.isLeaf)
3562
- for (let a = 0; a < n.children.length; a++) {
3563
- let o = n.children[a];
3564
- l(o);
3565
- }
3566
- };
3567
- l(t), s == 0 ? (this.secondChecked1 = !1, this.secondIndeterminate1 = !1) : s > 0 && s == i ? (this.secondChecked1 = !0, this.secondIndeterminate1 = !1) : s > 0 && s < i && (this.secondChecked1 = !1, this.secondIndeterminate1 = !0);
3566
+ if (t.key == this.clickedFisrtNode.key) {
3567
+ let i = 0, s = 0, l = (n) => {
3568
+ if (i = i + n.children.length, s = s + n.childSelectedCount, !n.isLeaf)
3569
+ for (let a = 0; a < n.children.length; a++) {
3570
+ let o = n.children[a];
3571
+ l(o);
3572
+ }
3573
+ };
3574
+ l(t), s == 0 ? (this.secondChecked1 = !1, this.secondIndeterminate1 = !1) : s > 0 && s == i ? (this.secondChecked1 = !0, this.secondIndeterminate1 = !1) : s > 0 && s < i && (this.secondChecked1 = !1, this.secondIndeterminate1 = !0);
3575
+ } else
3576
+ this.secondChecked1 = !1, this.secondIndeterminate1 = !1;
3568
3577
  },
3569
3578
  allSelect() {
3570
3579
  let e = (t) => {
@@ -3631,7 +3640,7 @@ const Jl = {
3631
3640
  this.clearSelect();
3632
3641
  for (let t = 0; t < e.length; t++) {
3633
3642
  let i = e[t], s = this.findNodeByKey(i);
3634
- s ? (s.checked = !0, this.oneNodeClickCallback(s)) : console.warn("\u8F93\u5165\u4E86\u4E00\u4E2A\u4E0D\u5B58\u5728\u7684key\u503C" + i);
3643
+ s ? (s.checked = !0, this.nodeCheckChange(s, !0)) : console.warn("\u8F93\u5165\u4E86\u4E00\u4E2A\u4E0D\u5B58\u5728\u7684key\u503C" + i);
3635
3644
  }
3636
3645
  }
3637
3646
  this.checkChanged();