lh-ui-next 0.1.7-beta.40 → 0.1.7-beta.42
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 +2 -2
- package/lib/lh-ui-next.mjs +52 -51
- package/lib/lh-ui-next.umd.js +1 -1
- package/package.json +1 -1
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.
|
|
8
|
-
## test version : "0.1.7-beta.
|
|
7
|
+
## Official version : "0.1.7-beta.42",
|
|
8
|
+
## test version : "0.1.7-beta.42",
|
|
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
|
package/lib/lh-ui-next.mjs
CHANGED
|
@@ -3332,7 +3332,7 @@ const Jl = {
|
|
|
3332
3332
|
components: {
|
|
3333
3333
|
lhCheckbox: q
|
|
3334
3334
|
},
|
|
3335
|
-
emits: ["check-change", "init-finished"],
|
|
3335
|
+
emits: ["check-change", "init-finished", "levelShowCount-change"],
|
|
3336
3336
|
props: {
|
|
3337
3337
|
data: {
|
|
3338
3338
|
type: Array,
|
|
@@ -3387,6 +3387,13 @@ const Jl = {
|
|
|
3387
3387
|
let t = JSON.parse(JSON.stringify(e));
|
|
3388
3388
|
this.initData(t);
|
|
3389
3389
|
}
|
|
3390
|
+
},
|
|
3391
|
+
levelShowCount: {
|
|
3392
|
+
immediate: !1,
|
|
3393
|
+
deep: !0,
|
|
3394
|
+
handler: function(e) {
|
|
3395
|
+
this.$emit("levelShowCount-change", e);
|
|
3396
|
+
}
|
|
3390
3397
|
}
|
|
3391
3398
|
},
|
|
3392
3399
|
computed: {
|
|
@@ -3395,6 +3402,10 @@ const Jl = {
|
|
|
3395
3402
|
},
|
|
3396
3403
|
KeyFieldName() {
|
|
3397
3404
|
return typeof this.props.KeyFieldName > "u" ? "value" : this.props.KeyFieldName;
|
|
3405
|
+
},
|
|
3406
|
+
levelShowCount() {
|
|
3407
|
+
let e = 1, t = this.secondList.length > 0 ? 1 : 0, i = this.thirdList.length > 0 ? 1 : 0, s = this.fourthList.length > 0 ? 1 : 0;
|
|
3408
|
+
return e + t + i + s;
|
|
3398
3409
|
}
|
|
3399
3410
|
},
|
|
3400
3411
|
methods: {
|
|
@@ -3517,34 +3528,6 @@ const Jl = {
|
|
|
3517
3528
|
nodeCheckChangeAll() {
|
|
3518
3529
|
this.allChecked ? this.allSelect() : this.clearSelect(), this.checkChanged();
|
|
3519
3530
|
},
|
|
3520
|
-
allSelect() {
|
|
3521
|
-
let e = (t) => {
|
|
3522
|
-
if (t.checked = !0, t.indeterminate = !1, t.childSelectedCount = (t.children || []).length, !t.isLeaf)
|
|
3523
|
-
for (let i = 0; i < t.children.length; i++) {
|
|
3524
|
-
let s = t.children[i];
|
|
3525
|
-
e(s);
|
|
3526
|
-
}
|
|
3527
|
-
};
|
|
3528
|
-
for (let t = 0; t < this.store.data.length; t++) {
|
|
3529
|
-
let i = this.store.data[t];
|
|
3530
|
-
e(i);
|
|
3531
|
-
}
|
|
3532
|
-
this.firstChecked = !0, this.firstIndeterminate = !1, this.secondChecked1 = !0, this.secondIndeterminate1 = !1, this.secondChecked2 = !0, this.secondIndeterminate2 = !1, this.thirdChecked = !0, this.thirdIndeterminate = !1, this.fourthChecked = !0, this.fourthIndeterminate = !1;
|
|
3533
|
-
},
|
|
3534
|
-
clearSelect() {
|
|
3535
|
-
let e = (t) => {
|
|
3536
|
-
if (t.checked = !1, t.indeterminate = !1, t.childSelectedCount = 0, !t.isLeaf)
|
|
3537
|
-
for (let i = 0; i < t.children.length; i++) {
|
|
3538
|
-
let s = t.children[i];
|
|
3539
|
-
e(s);
|
|
3540
|
-
}
|
|
3541
|
-
};
|
|
3542
|
-
for (let t = 0; t < this.store.data.length; t++) {
|
|
3543
|
-
let i = this.store.data[t];
|
|
3544
|
-
e(i);
|
|
3545
|
-
}
|
|
3546
|
-
this.firstChecked = !1, this.firstIndeterminate = !1, this.secondChecked1 = !1, this.secondIndeterminate1 = !1, this.secondChecked2 = !1, this.secondIndeterminate2 = !1, this.thirdChecked = !1, this.thirdIndeterminate = !1, this.fourthChecked = !1, this.fourthIndeterminate = !1;
|
|
3547
|
-
},
|
|
3548
3531
|
nodeCheckChange3() {
|
|
3549
3532
|
for (let t = 0; t < this.thirdList.length; t++) {
|
|
3550
3533
|
let i = this.thirdList[t];
|
|
@@ -3578,6 +3561,34 @@ const Jl = {
|
|
|
3578
3561
|
};
|
|
3579
3562
|
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);
|
|
3580
3563
|
},
|
|
3564
|
+
allSelect() {
|
|
3565
|
+
let e = (t) => {
|
|
3566
|
+
if (t.checked = !0, t.indeterminate = !1, t.childSelectedCount = (t.children || []).length, !t.isLeaf)
|
|
3567
|
+
for (let i = 0; i < t.children.length; i++) {
|
|
3568
|
+
let s = t.children[i];
|
|
3569
|
+
e(s);
|
|
3570
|
+
}
|
|
3571
|
+
};
|
|
3572
|
+
for (let t = 0; t < this.store.data.length; t++) {
|
|
3573
|
+
let i = this.store.data[t];
|
|
3574
|
+
e(i);
|
|
3575
|
+
}
|
|
3576
|
+
this.firstChecked = !0, this.firstIndeterminate = !1, this.secondChecked1 = !0, this.secondIndeterminate1 = !1, this.secondChecked2 = !0, this.secondIndeterminate2 = !1, this.thirdChecked = !0, this.thirdIndeterminate = !1, this.fourthChecked = !0, this.fourthIndeterminate = !1;
|
|
3577
|
+
},
|
|
3578
|
+
clearSelect() {
|
|
3579
|
+
let e = (t) => {
|
|
3580
|
+
if (t.checked = !1, t.indeterminate = !1, t.childSelectedCount = 0, !t.isLeaf)
|
|
3581
|
+
for (let i = 0; i < t.children.length; i++) {
|
|
3582
|
+
let s = t.children[i];
|
|
3583
|
+
e(s);
|
|
3584
|
+
}
|
|
3585
|
+
};
|
|
3586
|
+
for (let t = 0; t < this.store.data.length; t++) {
|
|
3587
|
+
let i = this.store.data[t];
|
|
3588
|
+
e(i);
|
|
3589
|
+
}
|
|
3590
|
+
this.firstChecked = !1, this.firstIndeterminate = !1, this.secondChecked1 = !1, this.secondIndeterminate1 = !1, this.secondChecked2 = !1, this.secondIndeterminate2 = !1, this.thirdChecked = !1, this.thirdIndeterminate = !1, this.fourthChecked = !1, this.fourthIndeterminate = !1;
|
|
3591
|
+
},
|
|
3581
3592
|
getCheckedKeys() {
|
|
3582
3593
|
let e = [], t = (i) => {
|
|
3583
3594
|
if (!i.isLeaf)
|
|
@@ -3620,6 +3631,10 @@ const Jl = {
|
|
|
3620
3631
|
}
|
|
3621
3632
|
this.checkChanged();
|
|
3622
3633
|
},
|
|
3634
|
+
clickNodeByKey(e) {
|
|
3635
|
+
let t = this.findNodeByKey(e);
|
|
3636
|
+
t && (t.checked = !t.checked, this.oneNodeClickCallback(t), this.checkChanged());
|
|
3637
|
+
},
|
|
3623
3638
|
hideOthers() {
|
|
3624
3639
|
this.secondList = [], this.thirdList = [], this.fourthList = [], this.clickedFisrtNode = {};
|
|
3625
3640
|
}
|
|
@@ -3855,7 +3870,7 @@ Se.install = function(e) {
|
|
|
3855
3870
|
const Bn = {
|
|
3856
3871
|
name: "lhTreeSpecialSelect",
|
|
3857
3872
|
componentName: "lhTreeSpecialSelect",
|
|
3858
|
-
emits: ["update:modelValue"],
|
|
3873
|
+
emits: ["update:modelValue", "clearCallback"],
|
|
3859
3874
|
props: {
|
|
3860
3875
|
modelValue: {
|
|
3861
3876
|
type: [Array, String],
|
|
@@ -3905,7 +3920,7 @@ const Bn = {
|
|
|
3905
3920
|
data() {
|
|
3906
3921
|
return {
|
|
3907
3922
|
showList: [],
|
|
3908
|
-
pWidth:
|
|
3923
|
+
pWidth: 160,
|
|
3909
3924
|
searchText: "",
|
|
3910
3925
|
innerChangeFlag: !1,
|
|
3911
3926
|
storeKeyList: [],
|
|
@@ -3946,30 +3961,14 @@ const Bn = {
|
|
|
3946
3961
|
}
|
|
3947
3962
|
},
|
|
3948
3963
|
methods: {
|
|
3949
|
-
debounce: function(e, t) {
|
|
3950
|
-
this.fun !== null && clearTimeout(this.fun), this.fun = setTimeout(e, t);
|
|
3951
|
-
},
|
|
3952
|
-
listenResize() {
|
|
3953
|
-
this.debounce(this.changeWidth, 500);
|
|
3954
|
-
},
|
|
3955
3964
|
handleResizeCallback() {
|
|
3956
3965
|
this.$refs.myPopover.setRefClient();
|
|
3957
3966
|
},
|
|
3958
|
-
changeWidth() {
|
|
3959
|
-
if (this.popoverContentWidth) {
|
|
3960
|
-
this.pWidth = this.popoverContentWidth;
|
|
3961
|
-
return;
|
|
3962
|
-
}
|
|
3963
|
-
let e = this.$refs.myPopover.$el;
|
|
3964
|
-
if (e.style.width) {
|
|
3965
|
-
let i = e.offsetWidth;
|
|
3966
|
-
i < 200 && (i = 200), this.pWidth = i;
|
|
3967
|
-
}
|
|
3968
|
-
},
|
|
3969
3967
|
hideOthers() {
|
|
3970
3968
|
this.$refs.myTree.hideOthers();
|
|
3971
3969
|
},
|
|
3972
3970
|
buttonFuc1() {
|
|
3971
|
+
this.$emit("clearCallback", 1);
|
|
3973
3972
|
},
|
|
3974
3973
|
search() {
|
|
3975
3974
|
this.$refs.myTree && this.$refs.myTree.search(this.searchText);
|
|
@@ -3989,6 +3988,9 @@ const Bn = {
|
|
|
3989
3988
|
},
|
|
3990
3989
|
initFinished(e) {
|
|
3991
3990
|
this.arrayLenth = e;
|
|
3991
|
+
},
|
|
3992
|
+
levelShowCountChange(e) {
|
|
3993
|
+
this.pWidth = e * 160;
|
|
3992
3994
|
}
|
|
3993
3995
|
},
|
|
3994
3996
|
computed: {
|
|
@@ -4000,10 +4002,8 @@ const Bn = {
|
|
|
4000
4002
|
}
|
|
4001
4003
|
},
|
|
4002
4004
|
mounted() {
|
|
4003
|
-
this.changeWidth(), window.addEventListener("resize", this.listenResize);
|
|
4004
4005
|
},
|
|
4005
4006
|
beforeUnmount() {
|
|
4006
|
-
window.removeEventListener("resize", this.listenResize);
|
|
4007
4007
|
}
|
|
4008
4008
|
}, Rn = { class: "lh-treeS-select-div" }, Wn = { class: "treeS-select-div-header" }, On = { class: "treeS-select-div-content-wapper" }, Hn = { class: "treeS-select-div-footer" }, An = { class: "count-text pull-left" }, Un = { class: "pull-right" }, jn = ["innerHTML"], Kn = ["title"], Yn = ["innerHTML"], Jn = {
|
|
4009
4009
|
key: 0,
|
|
@@ -4076,8 +4076,9 @@ function Xn(e, t, i, s, l, n) {
|
|
|
4076
4076
|
props: i.treeProps,
|
|
4077
4077
|
onCheckChange: n.checkChangeCallback,
|
|
4078
4078
|
onInitFinished: n.initFinished,
|
|
4079
|
+
onLevelShowCountChange: n.levelShowCountChange,
|
|
4079
4080
|
ref: "myTree"
|
|
4080
|
-
}, null, 8, ["data", "props", "onCheckChange", "onInitFinished"])
|
|
4081
|
+
}, null, 8, ["data", "props", "onCheckChange", "onInitFinished", "onLevelShowCountChange"])
|
|
4081
4082
|
]),
|
|
4082
4083
|
h("div", Hn, [
|
|
4083
4084
|
h("span", An, b(l.showList.length) + "/" + b(l.arrayLenth), 1),
|