lh-ui-next 0.2.0-beta.2 → 0.2.0-beta.3
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 +1 -1
- package/lib/lh-ui-next.mjs +16 -3
- package/lib/lh-ui-next.umd.js +1 -1
- package/package.json +1 -1
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.9",
|
|
8
|
-
## test version : "0.2.0-beta.
|
|
8
|
+
## test version : "0.2.0-beta.3,
|
|
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
|
@@ -4635,16 +4635,27 @@ const ps = {
|
|
|
4635
4635
|
size: {
|
|
4636
4636
|
type: String,
|
|
4637
4637
|
default: ""
|
|
4638
|
+
},
|
|
4639
|
+
clickPreFuction: {
|
|
4640
|
+
type: [Function],
|
|
4641
|
+
// default: 'menuClick',
|
|
4642
|
+
required: !0
|
|
4638
4643
|
}
|
|
4639
4644
|
},
|
|
4640
4645
|
emits: ["input", "check-change", "update:modelValue"],
|
|
4641
4646
|
data() {
|
|
4642
4647
|
return {
|
|
4643
4648
|
list: [],
|
|
4644
|
-
checkedStatus: !1
|
|
4649
|
+
checkedStatus: !1,
|
|
4650
|
+
inputDisabled: !0
|
|
4645
4651
|
};
|
|
4646
4652
|
},
|
|
4647
4653
|
methods: {
|
|
4654
|
+
switchClick() {
|
|
4655
|
+
typeof this.clickPreFuction == "function" ? this.clickPreFuction() && setTimeout(() => {
|
|
4656
|
+
this.inputDisabled = !1, this.changed({ target: { checked: !this.$refs.myInput.checked } });
|
|
4657
|
+
}, 0) : this.inputDisabled = !1;
|
|
4658
|
+
},
|
|
4648
4659
|
changed(e) {
|
|
4649
4660
|
if (this.disabled)
|
|
4650
4661
|
return !1;
|
|
@@ -4663,17 +4674,19 @@ const ps = {
|
|
|
4663
4674
|
}, gs = /* @__PURE__ */ h("span", { class: "lh-switch-core" }, null, -1), bs = ["name", "disabled"];
|
|
4664
4675
|
function ys(e, t, i, s, l, n) {
|
|
4665
4676
|
return r(), c("span", {
|
|
4666
|
-
class: f(["lh-switch", [i.size]])
|
|
4677
|
+
class: f(["lh-switch", [i.size]]),
|
|
4678
|
+
onClick: t[2] || (t[2] = (...a) => n.switchClick && n.switchClick(...a))
|
|
4667
4679
|
}, [
|
|
4668
4680
|
h("label", {
|
|
4669
4681
|
class: f([i.disabled ? "lh-switch-disabled" : "", l.checkedStatus ? "lh-switch-checked" : ""])
|
|
4670
4682
|
}, [
|
|
4671
4683
|
gs,
|
|
4672
4684
|
x(h("input", {
|
|
4685
|
+
ref: "myInput",
|
|
4673
4686
|
type: "checkbox",
|
|
4674
4687
|
name: i.name,
|
|
4675
4688
|
class: "lh-switch-input",
|
|
4676
|
-
disabled:
|
|
4689
|
+
disabled: l.inputDisabled,
|
|
4677
4690
|
"onUpdate:modelValue": t[0] || (t[0] = (a) => l.checkedStatus = a),
|
|
4678
4691
|
onChange: t[1] || (t[1] = (...a) => n.changed && n.changed(...a))
|
|
4679
4692
|
}, null, 40, bs), [
|