@solar-taro/ui-sun 2.8.9 → 2.8.11
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 +8 -0
- package/fab/fab.vue.d.ts +5 -1
- package/fab/index.scss +47 -0
- package/index.js +17 -17
- package/index10.js +19 -25
- package/index11.js +24 -33
- package/index12.js +33 -75
- package/index13.js +75 -19
- package/index14.js +19 -49
- package/index15.js +46 -141
- package/index16.js +142 -27
- package/index17.js +29 -21
- package/index18.js +20 -42
- package/index19.js +42 -23
- package/index20.js +21 -9
- package/index21.js +10 -27
- package/index22.js +29 -18
- package/index23.js +17 -118
- package/index24.js +123 -14
- package/index26.js +1 -1
- package/index27.js +1 -1
- package/index28.js +1 -1
- package/index29.js +1 -1
- package/index30.js +1 -1
- package/index31.js +1 -1
- package/index32.js +1 -1
- package/index33.js +1 -1
- package/index34.js +1 -1
- package/index35.js +1 -1
- package/index36.js +2 -7
- package/index37.js +1 -1
- package/index38.js +7 -2
- package/index39.js +1 -1
- package/index40.js +1 -1
- package/index41.js +1 -1
- package/index42.js +1 -1
- package/index43.js +1 -1
- package/index44.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 +2 -66
- package/index50.js +2 -12
- package/index51.js +2 -25
- package/index52.js +2 -14
- package/index53.js +2 -526
- package/index55.js +66 -2
- package/index56.js +12 -2
- package/index57.js +25 -2
- package/index58.js +14 -2
- package/index59.js +1 -1
- package/index60.js +524 -24
- package/index61.js +26 -2
- package/index62.js +2 -506
- package/index63.js +481 -54
- package/index64.js +72 -63
- package/index65.js +64 -63
- package/index66.js +46 -520
- package/index67.js +543 -2
- package/index69.js +2 -2
- package/index70.js +2 -4
- package/index71.js +4 -2
- package/index72.js +2 -4
- package/index73.js +4 -2
- package/index77.js +3 -3
- package/index78.js +3 -3
- package/index79.js +2 -2
- package/index8.js +16 -30
- package/index80.js +2 -2
- package/index82.js +4 -0
- package/index9.js +29 -17
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## 2.8.10 (2026-07-01)
|
|
2
|
+
|
|
3
|
+
This was a version bump only for ui-sun to align it with other projects, there were no code changes.
|
|
4
|
+
|
|
5
|
+
## 2.8.9 (2026-06-30)
|
|
6
|
+
|
|
7
|
+
This was a version bump only for ui-sun to align it with other projects, there were no code changes.
|
|
8
|
+
|
|
1
9
|
## 2.8.8 (2026-06-30)
|
|
2
10
|
|
|
3
11
|
This was a version bump only for ui-sun to align it with other projects, there were no code changes.
|
package/fab/fab.vue.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import { Color } from '../typing';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
color: Color;
|
|
4
|
+
};
|
|
1
5
|
declare function __VLS_template(): {
|
|
2
6
|
attrs: Partial<{}>;
|
|
3
7
|
slots: {
|
|
@@ -7,7 +11,7 @@ declare function __VLS_template(): {
|
|
|
7
11
|
rootEl: SVGViewElement;
|
|
8
12
|
};
|
|
9
13
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
-
declare const __VLS_component: import('vue').DefineComponent<
|
|
14
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, SVGViewElement>;
|
|
11
15
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
12
16
|
export default _default;
|
|
13
17
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
package/fab/index.scss
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
width: 56px;
|
|
7
7
|
height: 56px;
|
|
8
8
|
border-radius: 18px;
|
|
9
|
+
color: var(--color);
|
|
10
|
+
background: var(--background);
|
|
9
11
|
box-shadow:
|
|
10
12
|
0 10px 15px -3px rgb(0 0 0 / 0.1),
|
|
11
13
|
0 4px 6px -4px rgb(0 0 0 / 0.1);
|
|
@@ -19,6 +21,51 @@
|
|
|
19
21
|
transform: scale(1.1);
|
|
20
22
|
}
|
|
21
23
|
|
|
24
|
+
&-primary {
|
|
25
|
+
--color: var(--color-primary-contrast);
|
|
26
|
+
--background: var(--color-primary);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&-secondary {
|
|
30
|
+
--color: var(--color-secondary-contrast);
|
|
31
|
+
--background: var(--color-secondary);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&-danger {
|
|
35
|
+
--color: var(--color-danger-contrast);
|
|
36
|
+
--background: var(--color-danger);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&-success {
|
|
40
|
+
--color: var(--color-success-contrast);
|
|
41
|
+
--background: var(--color-success);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&-warning {
|
|
45
|
+
--color: var(--color-warning-contrast);
|
|
46
|
+
--background: var(--color-warning);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&-info {
|
|
50
|
+
--color: var(--color-info-contrast);
|
|
51
|
+
--background: var(--color-info);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&-light {
|
|
55
|
+
--color: var(--color-light-contrast);
|
|
56
|
+
--background: var(--color-light);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&-dark {
|
|
60
|
+
--color: var(--color-dark-contrast);
|
|
61
|
+
--background: var(--color-dark);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&-medium {
|
|
65
|
+
--color: var(--color-medium-contrast);
|
|
66
|
+
--background: var(--color-medium);
|
|
67
|
+
}
|
|
68
|
+
|
|
22
69
|
&-group {
|
|
23
70
|
position: fixed;
|
|
24
71
|
right: calc(15px + var(--safe-right));
|
package/index.js
CHANGED
|
@@ -33,28 +33,28 @@ export {
|
|
|
33
33
|
f as SunBackButton,
|
|
34
34
|
l as SunChip,
|
|
35
35
|
d as SunCircularProgress,
|
|
36
|
-
|
|
36
|
+
x as SunFab,
|
|
37
37
|
m as SunFabGroup,
|
|
38
38
|
W as SunIcon,
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
c as SunItem,
|
|
40
|
+
T as SunLazyRender,
|
|
41
41
|
Y as SunListHeader,
|
|
42
|
-
|
|
42
|
+
k as SunNavbar,
|
|
43
43
|
_ as SunPageHeader,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
B as SunPopover,
|
|
45
|
+
P as SunQrcode,
|
|
46
|
+
H as SunSegment,
|
|
47
|
+
v as SunSegmentBtn,
|
|
48
48
|
ee as SunSkeleton,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
R as SunSliderCaptcha,
|
|
50
|
+
y as SunSpinner,
|
|
51
|
+
A as SunSudoku,
|
|
52
52
|
ae as SunSudokuItem,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
N as SunTabbar,
|
|
54
|
+
K as SunTag,
|
|
55
|
+
E as SunTb,
|
|
56
|
+
V as SunTbCell,
|
|
57
|
+
q as SunTbRow,
|
|
58
58
|
te as SunTitle,
|
|
59
|
-
|
|
59
|
+
O as SunVirtualScroll
|
|
60
60
|
};
|
package/index10.js
CHANGED
|
@@ -1,30 +1,24 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
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({
|
|
1
|
+
import { defineComponent as c, ref as d, onActivated as s, onDeactivated as i, renderSlot as l, createCommentVNode as f } from "vue";
|
|
2
|
+
const m = l, u = f, v = /* @__PURE__ */ c({
|
|
5
3
|
__name: "index",
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
a(n.$slots, "center")
|
|
23
|
-
])
|
|
24
|
-
])
|
|
25
|
-
]));
|
|
4
|
+
props: {
|
|
5
|
+
hook: { default: "activated" }
|
|
6
|
+
},
|
|
7
|
+
setup(a) {
|
|
8
|
+
const n = a, e = d(!1);
|
|
9
|
+
let t;
|
|
10
|
+
function o() {
|
|
11
|
+
t = requestAnimationFrame(() => {
|
|
12
|
+
e.value = !0;
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
return n.hook === "created" && o(), s(() => {
|
|
16
|
+
o();
|
|
17
|
+
}), i(() => {
|
|
18
|
+
e.value = !1, t && cancelAnimationFrame(t);
|
|
19
|
+
}), (r, p) => e.value ? m(r.$slots, "default", { key: 0 }) : u("", !0);
|
|
26
20
|
}
|
|
27
21
|
});
|
|
28
22
|
export {
|
|
29
|
-
|
|
23
|
+
v as default
|
|
30
24
|
};
|
package/index11.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/index12.js
CHANGED
|
@@ -1,81 +1,39 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
3
|
-
import { QrCode as U, QrCodeEcc as a } from "./index53.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/index13.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 "./index60.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/index14.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 "./index54.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
|
};
|