@solar-taro/ui-sun 3.1.0 → 3.2.0
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/CHANGELOG.md +20 -0
- package/_color.scss +2 -2
- package/card/card-content.vue.d.ts +17 -0
- package/card/card-header.vue.d.ts +17 -0
- package/card/card-subtitle.vue.d.ts +17 -0
- package/card/card-title.vue.d.ts +17 -0
- package/card/card.vue.d.ts +23 -0
- package/card/index.d.ts +5 -0
- package/card/index.scss +90 -0
- package/chip/index.scss +5 -0
- package/index.d.ts +1 -0
- package/index.js +56 -46
- package/index10.js +16 -30
- package/index11.js +29 -17
- package/index12.js +17 -79
- package/index13.js +80 -24
- package/index14.js +24 -33
- package/index15.js +33 -75
- package/index16.js +75 -19
- package/index17.js +19 -49
- package/index18.js +46 -141
- package/index19.js +142 -27
- package/index20.js +28 -74
- package/index21.js +86 -23
- package/index22.js +20 -42
- package/index23.js +42 -23
- package/index24.js +21 -9
- package/index25.js +10 -27
- package/index26.js +29 -18
- package/index27.js +18 -30
- package/index28.js +30 -119
- package/index29.js +118 -9
- package/index30.js +6 -7
- package/index31.js +7 -8
- package/index32.js +5 -6
- package/index33.js +8 -6
- package/index34.js +14 -10
- package/index35.js +8 -7
- package/index36.js +11 -2
- package/index37.js +11 -2
- package/index38.js +8 -2
- package/index39.js +10 -2
- package/index4.js +1 -1
- package/index40.js +10 -2
- package/index41.js +1 -1
- package/index43.js +1 -1
- package/index45.js +1 -1
- package/index46.js +1 -1
- package/index47.js +1 -1
- package/index48.js +1 -1
- package/index49.js +1 -1
- package/index5.js +11 -14
- package/index50.js +1 -1
- package/index51.js +1 -1
- package/index53.js +1 -1
- package/index54.js +1 -1
- package/index55.js +1 -1
- package/index56.js +1 -1
- package/index57.js +1 -1
- package/index58.js +1 -1
- package/index59.js +1 -1
- package/index6.js +16 -23
- package/index60.js +1 -1
- package/index61.js +1 -1
- package/index62.js +1 -1
- package/index63.js +1 -1
- package/index64.js +2 -3
- package/index65.js +2 -526
- package/index66.js +2 -66
- package/index67.js +2 -12
- package/index68.js +2 -25
- package/index69.js +2 -14
- package/index7.js +26 -17
- package/index70.js +3 -26
- package/index71.js +526 -2
- package/index72.js +63 -503
- package/index73.js +12 -79
- package/index74.js +23 -68
- package/index75.js +14 -69
- package/index76.js +24 -541
- package/index78.js +506 -2
- package/index79.js +79 -2
- package/index8.js +18 -17
- package/index80.js +69 -3
- package/index81.js +69 -2
- package/index82.js +543 -4
- package/index85.js +2 -2
- package/index86.js +3 -47
- package/index87.js +2 -82
- package/index88.js +4 -2
- package/index89.js +2 -2
- package/index9.js +13 -14
- package/index90.js +2 -2
- package/index91.js +2 -2
- package/index92.js +4 -0
- package/index93.js +50 -0
- package/index94.js +84 -0
- package/index95.js +4 -0
- package/index96.js +4 -0
- package/index97.js +4 -0
- package/item/index.scss +5 -2
- package/package.json +1 -1
- package/stepper/index.scss +34 -16
- package/stepper/index.vue.d.ts +4 -0
- package/toggle/index.scss +35 -23
package/index13.js
CHANGED
|
@@ -1,30 +1,86 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as c, renderSlot as m, toDisplayString as y, createTextVNode as w, unref as p, withCtx as x, openBlock as v, createBlock as B, createVNode as S, vShow as k, createElementVNode as b, withDirectives as N, mergeProps as V, createElementBlock as E } from "vue";
|
|
2
|
+
import { vibrator as $ } from "@solar-taro/core";
|
|
3
|
+
import { SunSpinner as a, SunEmpty as D } from "@solar-taro/ui-sun";
|
|
4
|
+
const s = m, T = y, C = w, r = p, z = x, i = v, P = B, d = S, f = k, n = b, h = N, j = V, A = E, L = ["enable-flex", "refresher-enabled", "refresher-triggered", "refresher-background"], R = {
|
|
5
|
+
class: "sun-list-placeholder",
|
|
6
|
+
style: { display: "flex", "justify-content": "center", "align-items": "center", height: "85%" }
|
|
7
|
+
}, q = {
|
|
8
|
+
class: "sun-list-loading-wrapper",
|
|
9
|
+
style: { "text-align": "center", padding: "6px" }
|
|
10
|
+
}, I = /* @__PURE__ */ c({
|
|
5
11
|
__name: "index",
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
12
|
+
props: {
|
|
13
|
+
refreshing: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: !1
|
|
16
|
+
},
|
|
17
|
+
flex: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: !1
|
|
20
|
+
},
|
|
21
|
+
loading: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: !1
|
|
24
|
+
},
|
|
25
|
+
loadingText: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: "Loading"
|
|
28
|
+
},
|
|
29
|
+
data: {
|
|
30
|
+
type: Array,
|
|
31
|
+
default: []
|
|
32
|
+
},
|
|
33
|
+
refresher: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: !0
|
|
36
|
+
},
|
|
37
|
+
refresherBg: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: "transparent"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
emits: ["refresh", "lower"],
|
|
43
|
+
setup(e, { emit: g }) {
|
|
44
|
+
const o = g;
|
|
45
|
+
return (l, t) => (i(), A("scroll-view", j(l.$attrs, {
|
|
46
|
+
class: "sun-list",
|
|
47
|
+
enhanced: !0,
|
|
48
|
+
"scroll-y": !0,
|
|
49
|
+
"lower-threshold": 300,
|
|
50
|
+
"enable-flex": e.flex,
|
|
51
|
+
"refresher-enabled": e.refresher,
|
|
52
|
+
"refresher-triggered": e.refreshing,
|
|
53
|
+
"refresher-background": e.refresherBg,
|
|
54
|
+
onRefresherrefresh: t[0] || (t[0] = (u) => {
|
|
55
|
+
r($).short("light"), o("refresh");
|
|
56
|
+
}),
|
|
57
|
+
onScrolltolower: t[1] || (t[1] = (u) => o("lower"))
|
|
58
|
+
}), [
|
|
59
|
+
s(l.$slots, "default"),
|
|
60
|
+
h(n("view", R, [
|
|
61
|
+
e.loading ? (i(), P(r(a), {
|
|
62
|
+
key: 0,
|
|
63
|
+
size: "large"
|
|
64
|
+
}, {
|
|
65
|
+
default: z(() => [
|
|
66
|
+
C(T(e.loadingText), 1)
|
|
67
|
+
]),
|
|
68
|
+
_: 1
|
|
69
|
+
})) : s(l.$slots, "empty", { key: 1 }, () => [
|
|
70
|
+
d(r(D))
|
|
23
71
|
])
|
|
24
|
-
])
|
|
25
|
-
|
|
72
|
+
], 512), [
|
|
73
|
+
[f, !e.data.length]
|
|
74
|
+
]),
|
|
75
|
+
h(n("view", q, [
|
|
76
|
+
d(r(a), { size: "small" })
|
|
77
|
+
], 512), [
|
|
78
|
+
[f, e.data.length && e.loading && !e.refreshing]
|
|
79
|
+
]),
|
|
80
|
+
t[2] || (t[2] = n("view", { style: { position: "absolute", height: "1px", width: "1px", overflow: "hidden" } }, null, -1))
|
|
81
|
+
], 16, L));
|
|
26
82
|
}
|
|
27
83
|
});
|
|
28
84
|
export {
|
|
29
|
-
|
|
85
|
+
I as default
|
|
30
86
|
};
|
package/index14.js
CHANGED
|
@@ -1,39 +1,30 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
1
|
+
import { defineComponent as i, renderSlot as d, createElementVNode as s, openBlock as c, createElementBlock as l } from "vue";
|
|
2
|
+
import { withPixel as t } from "@solar-kit/core";
|
|
3
|
+
import { getNavbarRect as p } from "@solar-taro/core";
|
|
4
|
+
const a = d, o = s, g = c, m = l, v = { class: "sun-navbar-inner" }, b = { class: "sun-navbar-center" }, k = /* @__PURE__ */ i({
|
|
3
5
|
__name: "index",
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return (e, s) => (C(), N("view", {
|
|
17
|
-
class: E(["sun-popover", [{ "sun-popover-show": l.value }, `sun-popover-x-${e.placement[0]}`, `sun-popover-y-${e.placement[1]}`]]),
|
|
18
|
-
style: S({ "--popover-x-offset": f.value, "--popover-y-offset": i.value, "--popover-background": e.background }),
|
|
19
|
-
onTap: z((c) => !1, ["stop"])
|
|
6
|
+
setup(_) {
|
|
7
|
+
const e = p(), r = {
|
|
8
|
+
"--navbar-height": t(e.height),
|
|
9
|
+
"--navbar-content-height": t(e.buttonHeight),
|
|
10
|
+
"--navbar-padding-top": t(e.paddingTop),
|
|
11
|
+
"--navbar-padding-bottom": t(e.paddingBottom),
|
|
12
|
+
"--navbar-padding-left": t(e.paddingLeft),
|
|
13
|
+
"--navbar-padding-right": t(e.paddingRight)
|
|
14
|
+
};
|
|
15
|
+
return (n, h) => (g(), m("view", {
|
|
16
|
+
class: "sun-navbar",
|
|
17
|
+
style: r
|
|
20
18
|
}, [
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
]
|
|
27
|
-
|
|
28
|
-
class: "sun-popover-container",
|
|
29
|
-
style: { color: e.color }
|
|
30
|
-
}), [
|
|
31
|
-
s[1] || (s[1] = n("view", { class: "sun-popover-arrow" }, null, -1)),
|
|
32
|
-
p(e.$slots, "content")
|
|
33
|
-
], 16)
|
|
34
|
-
], 38));
|
|
19
|
+
o("view", v, [
|
|
20
|
+
a(n.$slots, "default"),
|
|
21
|
+
o("view", b, [
|
|
22
|
+
a(n.$slots, "center")
|
|
23
|
+
])
|
|
24
|
+
])
|
|
25
|
+
]));
|
|
35
26
|
}
|
|
36
27
|
});
|
|
37
28
|
export {
|
|
38
|
-
|
|
29
|
+
k as default
|
|
39
30
|
};
|
package/index15.js
CHANGED
|
@@ -1,81 +1,39 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
3
|
-
import { QrCode as U, QrCodeEcc as a } from "./index65.js";
|
|
4
|
-
const h = k, A = w, B = z, D = R;
|
|
5
|
-
let T = 1;
|
|
6
|
-
const N = /* @__PURE__ */ C({
|
|
1
|
+
import { defineComponent as m, mergeModels as d, useModel as v, computed as t, renderSlot as w, createElementVNode as g, mergeProps as k, withModifiers as y, normalizeClass as $, normalizeStyle as h, openBlock as b, createElementBlock as B } from "vue";
|
|
2
|
+
const p = w, n = g, M = k, z = y, E = $, S = h, C = b, N = B, T = /* @__PURE__ */ m({
|
|
7
3
|
__name: "index",
|
|
8
|
-
props: {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
},
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
getDataURL: p
|
|
25
|
-
});
|
|
26
|
-
function d() {
|
|
27
|
-
setTimeout(() => {
|
|
28
|
-
y().select(`#${u}`).fields({ node: !0, size: !0 }).exec(([{ node: t, width: e, height: r }]) => {
|
|
29
|
-
if (s) return;
|
|
30
|
-
if (!r || !e)
|
|
31
|
-
return d();
|
|
32
|
-
const o = Q().pixelRatio;
|
|
33
|
-
n = t, l = n.getContext("2d"), i = e, n.width = e * o, n.height = r * o, l.scale(o, o), f();
|
|
34
|
-
});
|
|
35
|
-
}, 50);
|
|
36
|
-
}
|
|
37
|
-
function f() {
|
|
38
|
-
const t = U.encodeText(c.value, x[c.level]), e = i / (t.size + 2);
|
|
39
|
-
l.fillStyle = c.backgroundColor, l.fillRect(0, 0, n.width, n.height), l.fillStyle = c.color;
|
|
40
|
-
for (let r = 0; r < t.size; r++)
|
|
41
|
-
for (let o = 0; o < t.size; o++)
|
|
42
|
-
t.getModule(o, r) && l.fillRect(
|
|
43
|
-
o * e + e,
|
|
44
|
-
// +moduleSize 留出边距
|
|
45
|
-
r * e + e,
|
|
46
|
-
e,
|
|
47
|
-
e
|
|
48
|
-
);
|
|
49
|
-
_("rendered");
|
|
50
|
-
}
|
|
51
|
-
function p() {
|
|
52
|
-
return n.toDataURL("image/png", 1);
|
|
53
|
-
}
|
|
54
|
-
function E() {
|
|
55
|
-
const t = p();
|
|
56
|
-
S({
|
|
57
|
-
current: t,
|
|
58
|
-
urls: [t]
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
return I(() => c.value, () => {
|
|
62
|
-
l && f();
|
|
63
|
-
}), L(() => {
|
|
64
|
-
d();
|
|
65
|
-
}), M(() => {
|
|
66
|
-
s = !0;
|
|
67
|
-
}), (t, e) => (B(), D("view", {
|
|
68
|
-
class: "sun-qrcode",
|
|
69
|
-
onTap: e[0] || (e[0] = (r) => A(n) && E())
|
|
4
|
+
props: /* @__PURE__ */ d({
|
|
5
|
+
placement: {},
|
|
6
|
+
offset: { default: "6px" },
|
|
7
|
+
background: { default: "rgba(0, 0, 0, 0.5)" },
|
|
8
|
+
color: { default: "#fff" }
|
|
9
|
+
}, {
|
|
10
|
+
show: { type: Boolean },
|
|
11
|
+
showModifiers: {}
|
|
12
|
+
}),
|
|
13
|
+
emits: ["update:show"],
|
|
14
|
+
setup(r) {
|
|
15
|
+
const o = r, l = v(r, "show"), a = t(() => ["left", "right"].includes(o.placement[0])), u = t(() => ["top", "bottom"].includes(o.placement[1])), f = t(() => a.value ? o.offset : "0px"), i = t(() => u.value ? o.offset : "0px");
|
|
16
|
+
return (e, s) => (C(), N("view", {
|
|
17
|
+
class: E(["sun-popover", [{ "sun-popover-show": l.value }, `sun-popover-x-${e.placement[0]}`, `sun-popover-y-${e.placement[1]}`]]),
|
|
18
|
+
style: S({ "--popover-x-offset": f.value, "--popover-y-offset": i.value, "--popover-background": e.background }),
|
|
19
|
+
onTap: z((c) => !1, ["stop"])
|
|
70
20
|
}, [
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
21
|
+
n("view", {
|
|
22
|
+
class: "sun-popover-trigger",
|
|
23
|
+
onTap: s[0] || (s[0] = (c) => l.value = !l.value)
|
|
24
|
+
}, [
|
|
25
|
+
p(e.$slots, "default")
|
|
26
|
+
], 32),
|
|
27
|
+
n("view", M(e.$attrs, {
|
|
28
|
+
class: "sun-popover-container",
|
|
29
|
+
style: { color: e.color }
|
|
30
|
+
}), [
|
|
31
|
+
s[1] || (s[1] = n("view", { class: "sun-popover-arrow" }, null, -1)),
|
|
32
|
+
p(e.$slots, "content")
|
|
33
|
+
], 16)
|
|
34
|
+
], 38));
|
|
77
35
|
}
|
|
78
36
|
});
|
|
79
37
|
export {
|
|
80
|
-
|
|
38
|
+
T as default
|
|
81
39
|
};
|
package/index16.js
CHANGED
|
@@ -1,25 +1,81 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { defineComponent as C, watch as I, onMounted as L, onUnmounted as M, createElementVNode as k, unref as w, openBlock as z, createElementBlock as R } from "vue";
|
|
2
|
+
import { createSelectorQuery as y, getWindowInfo as Q, previewImage as S } from "@tarojs/taro";
|
|
3
|
+
import { QrCode as U, QrCodeEcc as a } from "./index71.js";
|
|
4
|
+
const h = k, A = w, B = z, D = R;
|
|
5
|
+
let T = 1;
|
|
6
|
+
const N = /* @__PURE__ */ C({
|
|
7
|
+
__name: "index",
|
|
5
8
|
props: {
|
|
6
|
-
value: {}
|
|
9
|
+
value: {},
|
|
10
|
+
color: { default: "#000000" },
|
|
11
|
+
backgroundColor: { default: "transparent" },
|
|
12
|
+
level: { default: "M" }
|
|
7
13
|
},
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
emits: ["rendered"],
|
|
15
|
+
setup(m, { expose: v, emit: g }) {
|
|
16
|
+
let n, i, l, s = !1;
|
|
17
|
+
const u = `sun-qrcode-captcha-${T++}`, x = {
|
|
18
|
+
L: a.LOW,
|
|
19
|
+
M: a.MEDIUM,
|
|
20
|
+
Q: a.QUARTILE,
|
|
21
|
+
H: a.HIGH
|
|
22
|
+
}, _ = g, c = m;
|
|
23
|
+
v({
|
|
24
|
+
getDataURL: p
|
|
25
|
+
});
|
|
26
|
+
function d() {
|
|
27
|
+
setTimeout(() => {
|
|
28
|
+
y().select(`#${u}`).fields({ node: !0, size: !0 }).exec(([{ node: t, width: e, height: r }]) => {
|
|
29
|
+
if (s) return;
|
|
30
|
+
if (!r || !e)
|
|
31
|
+
return d();
|
|
32
|
+
const o = Q().pixelRatio;
|
|
33
|
+
n = t, l = n.getContext("2d"), i = e, n.width = e * o, n.height = r * o, l.scale(o, o), f();
|
|
34
|
+
});
|
|
35
|
+
}, 50);
|
|
36
|
+
}
|
|
37
|
+
function f() {
|
|
38
|
+
const t = U.encodeText(c.value, x[c.level]), e = i / (t.size + 2);
|
|
39
|
+
l.fillStyle = c.backgroundColor, l.fillRect(0, 0, n.width, n.height), l.fillStyle = c.color;
|
|
40
|
+
for (let r = 0; r < t.size; r++)
|
|
41
|
+
for (let o = 0; o < t.size; o++)
|
|
42
|
+
t.getModule(o, r) && l.fillRect(
|
|
43
|
+
o * e + e,
|
|
44
|
+
// +moduleSize 留出边距
|
|
45
|
+
r * e + e,
|
|
46
|
+
e,
|
|
47
|
+
e
|
|
48
|
+
);
|
|
49
|
+
_("rendered");
|
|
50
|
+
}
|
|
51
|
+
function p() {
|
|
52
|
+
return n.toDataURL("image/png", 1);
|
|
53
|
+
}
|
|
54
|
+
function E() {
|
|
55
|
+
const t = p();
|
|
56
|
+
S({
|
|
57
|
+
current: t,
|
|
58
|
+
urls: [t]
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
return I(() => c.value, () => {
|
|
62
|
+
l && f();
|
|
63
|
+
}), L(() => {
|
|
64
|
+
d();
|
|
65
|
+
}), M(() => {
|
|
66
|
+
s = !0;
|
|
67
|
+
}), (t, e) => (B(), D("view", {
|
|
68
|
+
class: "sun-qrcode",
|
|
69
|
+
onTap: e[0] || (e[0] = (r) => A(n) && E())
|
|
70
|
+
}, [
|
|
71
|
+
h("canvas", {
|
|
72
|
+
id: u,
|
|
73
|
+
type: "2d",
|
|
74
|
+
class: "sun-slider-captcha-canvas"
|
|
75
|
+
})
|
|
76
|
+
], 32));
|
|
21
77
|
}
|
|
22
78
|
});
|
|
23
79
|
export {
|
|
24
|
-
|
|
80
|
+
N as default
|
|
25
81
|
};
|
package/index17.js
CHANGED
|
@@ -1,55 +1,25 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ACTIVE_CHILD as
|
|
3
|
-
const
|
|
4
|
-
__name: "segment",
|
|
1
|
+
import { defineComponent as p, inject as a, getCurrentInstance as c, onUnmounted as m, unref as u, renderSlot as i, mergeProps as _, openBlock as f, createElementBlock as v } from "vue";
|
|
2
|
+
import { ACTIVE_CHILD as d, PARENT as g } from "./index70.js";
|
|
3
|
+
const o = u, k = i, C = _, B = f, E = v, $ = /* @__PURE__ */ p({
|
|
4
|
+
__name: "segment-btn",
|
|
5
5
|
props: {
|
|
6
|
-
|
|
6
|
+
value: {}
|
|
7
7
|
},
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
unlink: (e) => {
|
|
23
|
-
t.slice(t.indexOf(e), 1);
|
|
24
|
-
},
|
|
25
|
-
active: (e) => {
|
|
26
|
-
r("change", {
|
|
27
|
-
value: e.props.value,
|
|
28
|
-
index: d.value
|
|
29
|
-
}), r("update:modelValue", e.props.value), o.value = e;
|
|
30
|
-
}
|
|
31
|
-
}), C(() => c.modelValue, (e) => {
|
|
32
|
-
o.value = t.find((n) => n.props.value === e);
|
|
33
|
-
});
|
|
34
|
-
function u() {
|
|
35
|
-
return m.subTree.children[0].children[0].children.filter((e) => typeof e.type != "symbol");
|
|
36
|
-
}
|
|
37
|
-
return w(() => {
|
|
38
|
-
const e = u();
|
|
39
|
-
t.forEach((n) => {
|
|
40
|
-
const s = e.findIndex((l) => l === n.vnode);
|
|
41
|
-
n.props.value === void 0 && (n.props.value = s), n.props.value === c.modelValue && (o.value = n);
|
|
42
|
-
});
|
|
43
|
-
}), (e, n) => (L(), S("view", b(e.$attrs, {
|
|
44
|
-
class: "sun-segment",
|
|
45
|
-
style: g.value
|
|
46
|
-
}), [
|
|
47
|
-
T("view", $, [
|
|
48
|
-
R(e.$slots, "default")
|
|
49
|
-
])
|
|
50
|
-
], 16));
|
|
8
|
+
setup(b) {
|
|
9
|
+
const l = a(d), e = a(g), n = c();
|
|
10
|
+
return m(() => {
|
|
11
|
+
e.unlink(n);
|
|
12
|
+
}), e.link(n), (t, r) => {
|
|
13
|
+
var s;
|
|
14
|
+
return B(), E("view", C(t.$attrs, {
|
|
15
|
+
class: ["sun-segment-btn", { "sun-segment-btn-active": ((s = o(l)) == null ? void 0 : s.props.value) === t.value }],
|
|
16
|
+
onTap: r[0] || (r[0] = (I) => o(e).active(o(n)))
|
|
17
|
+
}), [
|
|
18
|
+
k(t.$slots, "default")
|
|
19
|
+
], 16);
|
|
20
|
+
};
|
|
51
21
|
}
|
|
52
22
|
});
|
|
53
23
|
export {
|
|
54
|
-
|
|
24
|
+
$ as default
|
|
55
25
|
};
|