@solar-taro/ui-sun 1.1.1 → 1.1.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/CHANGELOG.md +23 -0
- package/chip/index.vue.d.ts +4 -2
- package/circular-progress/index.d.ts +1 -0
- package/circular-progress/index.scss +47 -0
- package/circular-progress/index.vue.d.ts +37 -0
- package/index.d.ts +1 -0
- package/index.js +27 -25
- package/index10.js +55 -18
- package/index11.js +19 -50
- package/index12.js +49 -28
- package/index13.js +29 -21
- package/index14.js +18 -19
- package/index15.js +20 -10
- package/index16.js +10 -27
- package/index17.js +27 -112
- package/index18.js +118 -10
- package/index19.js +7 -7
- package/index20.js +10 -2
- package/index21.js +1 -1
- package/index22.js +1 -1
- package/index25.js +1 -1
- 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/index33.js +1 -1
- package/index34.js +1 -1
- package/index35.js +1 -1
- package/index36.js +2 -3
- package/index37.js +4 -0
- package/index38.js +5 -0
- package/index5.js +20 -15
- package/index6.js +15 -12
- package/index7.js +11 -18
- package/index8.js +20 -25
- package/index9.js +23 -55
- package/package.json +1 -1
- package/typing.d.ts +1 -0
package/index17.js
CHANGED
|
@@ -1,120 +1,35 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { createSelectorQuery as G } from "@tarojs/taro";
|
|
5
|
-
import H from "./index12.js";
|
|
6
|
-
const J = P, U = I, a = E, u = L, w = D, p = M, Z = A, ee = K, te = R, k = j, re = q, le = O, b = Q, oe = W, ne = ["id", "refresher-enabled", "refresher-triggered", "refresher-background", "scroll-x", "scroll-y"], ie = {
|
|
7
|
-
key: 0,
|
|
8
|
-
class: "sun-virtual-scroll-placeholder",
|
|
9
|
-
style: { display: "flex", "justify-content": "center", "align-items": "center", height: "85%" }
|
|
10
|
-
};
|
|
11
|
-
let se = 1;
|
|
12
|
-
const de = /* @__PURE__ */ F({
|
|
13
|
-
__name: "index",
|
|
1
|
+
import { defineComponent as a, computed as t, renderSlot as l, normalizeClass as u, createElementVNode as d, mergeProps as b, openBlock as c, createElementBlock as p } from "vue";
|
|
2
|
+
const m = l, i = u, B = d, _ = b, z = c, y = p, k = /* @__PURE__ */ a({
|
|
3
|
+
__name: "table",
|
|
14
4
|
props: {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
itemKey: {},
|
|
22
|
-
id: { default: () => `sun-virtual-scroll-${se++}` },
|
|
23
|
-
bottomSpace: { default: 0 },
|
|
24
|
-
loading: { type: Boolean },
|
|
25
|
-
loadingText: { default: "Loading" }
|
|
5
|
+
rounded: { type: Boolean, default: !0 },
|
|
6
|
+
bordered: { type: Boolean },
|
|
7
|
+
outerBordered: { type: Boolean, default: !0 },
|
|
8
|
+
zebra: { type: Boolean },
|
|
9
|
+
size: {},
|
|
10
|
+
layout: {}
|
|
26
11
|
},
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
[l.value ? "height" : "width"]: S(n.value)
|
|
40
|
-
})), V = i(
|
|
41
|
-
() => r.items.slice(
|
|
42
|
-
Math.max(m.value - s.value, 0),
|
|
43
|
-
m.value + s.value * 2
|
|
44
|
-
)
|
|
45
|
-
);
|
|
46
|
-
function T({ detail: e }) {
|
|
47
|
-
c && cancelAnimationFrame(c), c = requestAnimationFrame(() => {
|
|
48
|
-
const t = l.value ? e.scrollTop : e.scrollLeft;
|
|
49
|
-
m.value = ~~(t / n.value), m.value > s.value - 1 ? d.value = t - n.value * s.value - t % n.value : d.value = t - t % (n.value * s.value), c = 0;
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
function g() {
|
|
53
|
-
setTimeout(() => {
|
|
54
|
-
G().select(`#${r.id}`).boundingClientRect((e) => {
|
|
55
|
-
if (!e)
|
|
56
|
-
return g();
|
|
57
|
-
const { height: t, width: o } = e, v = l.value ? t : o;
|
|
58
|
-
s.value = Math.ceil(v / n.value);
|
|
59
|
-
}).exec();
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
return N(() => {
|
|
63
|
-
g();
|
|
64
|
-
}), (e, t) => (a(), u("scroll-view", oe(e.$attrs, {
|
|
65
|
-
id: e.id,
|
|
66
|
-
class: "sun-virtual-scroll",
|
|
67
|
-
"refresher-enabled": e.refresher,
|
|
68
|
-
"refresher-triggered": e.refreshing,
|
|
69
|
-
"refresher-background": e.refresherBg,
|
|
70
|
-
"scroll-x": !l.value,
|
|
71
|
-
"scroll-y": l.value,
|
|
72
|
-
enhanced: !0,
|
|
73
|
-
"enable-passive": !0,
|
|
74
|
-
"lower-threshold": 300,
|
|
75
|
-
onScrollPassive: t[0] || (t[0] = (o) => T(o)),
|
|
76
|
-
onRefresherrefresh: t[1] || (t[1] = (o) => {
|
|
77
|
-
k(Y).short("light"), h("refresh");
|
|
78
|
-
}),
|
|
79
|
-
onScrolltolower: t[2] || (t[2] = (o) => h("lower"))
|
|
12
|
+
setup(r) {
|
|
13
|
+
const e = r, n = t(() => ({
|
|
14
|
+
"sun-tb-rounded": e.rounded,
|
|
15
|
+
"sun-tb-bordered": e.bordered,
|
|
16
|
+
"sun-tb-outer-bordered": e.outerBordered,
|
|
17
|
+
[`sun-tb-size-${e.size}`]: e.size
|
|
18
|
+
})), s = t(() => ({
|
|
19
|
+
"sun-tb-zebra": e.zebra,
|
|
20
|
+
[`sun-tb-layout-${e.layout}`]: e.layout
|
|
21
|
+
}));
|
|
22
|
+
return (o, f) => (z(), y("view", _(o.$attrs, {
|
|
23
|
+
class: ["sun-tb", n.value]
|
|
80
24
|
}), [
|
|
81
|
-
|
|
82
|
-
class: "sun-
|
|
83
|
-
style: p($.value)
|
|
25
|
+
B("view", {
|
|
26
|
+
class: i(["sun-tb-inner", s.value])
|
|
84
27
|
}, [
|
|
85
|
-
(
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
key: (y = o[e.itemKey]) != null ? y : v,
|
|
89
|
-
class: "sun-virtual-scroll-item",
|
|
90
|
-
style: p(C.value)
|
|
91
|
-
}, [
|
|
92
|
-
w(e.$slots, "default", {
|
|
93
|
-
item: o,
|
|
94
|
-
index: v
|
|
95
|
-
})
|
|
96
|
-
], 4);
|
|
97
|
-
}), 128))
|
|
98
|
-
], 4),
|
|
99
|
-
e.items.length ? b("", !0) : (a(), u("view", ie, [
|
|
100
|
-
e.loading ? (a(), le(k(H), {
|
|
101
|
-
key: 0,
|
|
102
|
-
spinning: !0
|
|
103
|
-
}, {
|
|
104
|
-
default: re(() => [
|
|
105
|
-
te(ee(e.loadingText), 1)
|
|
106
|
-
]),
|
|
107
|
-
_: 1
|
|
108
|
-
})) : w(e.$slots, "empty", { key: 1 })
|
|
109
|
-
])),
|
|
110
|
-
e.items.length ? (a(), u("view", {
|
|
111
|
-
key: 1,
|
|
112
|
-
class: "sun-virtual-scroll-spacer",
|
|
113
|
-
style: p(_.value)
|
|
114
|
-
}, null, 4)) : b("", !0)
|
|
115
|
-
], 16, ne));
|
|
28
|
+
m(o.$slots, "default")
|
|
29
|
+
], 2)
|
|
30
|
+
], 16));
|
|
116
31
|
}
|
|
117
32
|
});
|
|
118
33
|
export {
|
|
119
|
-
|
|
34
|
+
k as default
|
|
120
35
|
};
|
package/index18.js
CHANGED
|
@@ -1,12 +1,120 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { defineComponent as F, ref as f, computed as i, onMounted as N, renderList as P, Fragment as I, openBlock as E, createElementBlock as L, renderSlot as D, normalizeStyle as M, createElementVNode as A, toDisplayString as K, createTextVNode as R, unref as j, withCtx as q, createBlock as O, createCommentVNode as Q, mergeProps as W } from "vue";
|
|
2
|
+
import { withPixel as S } from "@solar-kit/core";
|
|
3
|
+
import { rpxToPx as X, vibrator as Y } from "@solar-taro/core";
|
|
4
|
+
import { createSelectorQuery as G } from "@tarojs/taro";
|
|
5
|
+
import H from "./index13.js";
|
|
6
|
+
const J = P, U = I, a = E, u = L, w = D, p = M, Z = A, ee = K, te = R, k = j, re = q, le = O, b = Q, oe = W, ne = ["id", "refresher-enabled", "refresher-triggered", "refresher-background", "scroll-x", "scroll-y"], ie = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "sun-virtual-scroll-placeholder",
|
|
9
|
+
style: { display: "flex", "justify-content": "center", "align-items": "center", height: "85%" }
|
|
10
|
+
};
|
|
11
|
+
let se = 1;
|
|
12
|
+
const de = /* @__PURE__ */ F({
|
|
13
|
+
__name: "index",
|
|
14
|
+
props: {
|
|
15
|
+
refreshing: { type: Boolean },
|
|
16
|
+
refresher: { type: Boolean },
|
|
17
|
+
refresherBg: { default: "transparent" },
|
|
18
|
+
direction: { default: "vertical" },
|
|
19
|
+
items: {},
|
|
20
|
+
itemSize: {},
|
|
21
|
+
itemKey: {},
|
|
22
|
+
id: { default: () => `sun-virtual-scroll-${se++}` },
|
|
23
|
+
bottomSpace: { default: 0 },
|
|
24
|
+
loading: { type: Boolean },
|
|
25
|
+
loadingText: { default: "Loading" }
|
|
26
|
+
},
|
|
27
|
+
emits: ["refresh", "lower"],
|
|
28
|
+
setup(z, { emit: B }) {
|
|
29
|
+
const h = B, r = z;
|
|
30
|
+
let c;
|
|
31
|
+
const s = f(0), m = f(0), d = f(0), l = i(() => r.direction === "vertical"), $ = i(() => ({
|
|
32
|
+
right: l.value ? "0" : "auto",
|
|
33
|
+
transform: `translate${l.value ? "Y" : "X"}(${d.value}px)`,
|
|
34
|
+
"white-space": l.value ? "normal" : "nowrap"
|
|
35
|
+
})), n = i(() => typeof r.itemSize == "number" ? r.itemSize : r.itemSize.endsWith("rpx") ? X(parseFloat(r.itemSize)) : parseFloat(r.itemSize)), x = i(() => n.value * r.items.length), _ = i(() => ({
|
|
36
|
+
[l.value ? "height" : "width"]: S(x.value + r.bottomSpace)
|
|
37
|
+
})), C = i(() => ({
|
|
38
|
+
display: l.value ? "block" : "inline-block",
|
|
39
|
+
[l.value ? "height" : "width"]: S(n.value)
|
|
40
|
+
})), V = i(
|
|
41
|
+
() => r.items.slice(
|
|
42
|
+
Math.max(m.value - s.value, 0),
|
|
43
|
+
m.value + s.value * 2
|
|
44
|
+
)
|
|
45
|
+
);
|
|
46
|
+
function T({ detail: e }) {
|
|
47
|
+
c && cancelAnimationFrame(c), c = requestAnimationFrame(() => {
|
|
48
|
+
const t = l.value ? e.scrollTop : e.scrollLeft;
|
|
49
|
+
m.value = ~~(t / n.value), m.value > s.value - 1 ? d.value = t - n.value * s.value - t % n.value : d.value = t - t % (n.value * s.value), c = 0;
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function g() {
|
|
53
|
+
setTimeout(() => {
|
|
54
|
+
G().select(`#${r.id}`).boundingClientRect((e) => {
|
|
55
|
+
if (!e)
|
|
56
|
+
return g();
|
|
57
|
+
const { height: t, width: o } = e, v = l.value ? t : o;
|
|
58
|
+
s.value = Math.ceil(v / n.value);
|
|
59
|
+
}).exec();
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
return N(() => {
|
|
63
|
+
g();
|
|
64
|
+
}), (e, t) => (a(), u("scroll-view", oe(e.$attrs, {
|
|
65
|
+
id: e.id,
|
|
66
|
+
class: "sun-virtual-scroll",
|
|
67
|
+
"refresher-enabled": e.refresher,
|
|
68
|
+
"refresher-triggered": e.refreshing,
|
|
69
|
+
"refresher-background": e.refresherBg,
|
|
70
|
+
"scroll-x": !l.value,
|
|
71
|
+
"scroll-y": l.value,
|
|
72
|
+
enhanced: !0,
|
|
73
|
+
"enable-passive": !0,
|
|
74
|
+
"lower-threshold": 300,
|
|
75
|
+
onScrollPassive: t[0] || (t[0] = (o) => T(o)),
|
|
76
|
+
onRefresherrefresh: t[1] || (t[1] = (o) => {
|
|
77
|
+
k(Y).short("light"), h("refresh");
|
|
78
|
+
}),
|
|
79
|
+
onScrolltolower: t[2] || (t[2] = (o) => h("lower"))
|
|
80
|
+
}), [
|
|
81
|
+
Z("view", {
|
|
82
|
+
class: "sun-virtual-scroll-content-container",
|
|
83
|
+
style: p($.value)
|
|
84
|
+
}, [
|
|
85
|
+
(a(!0), u(U, null, J(V.value, (o, v) => {
|
|
86
|
+
var y;
|
|
87
|
+
return a(), u("view", {
|
|
88
|
+
key: (y = o[e.itemKey]) != null ? y : v,
|
|
89
|
+
class: "sun-virtual-scroll-item",
|
|
90
|
+
style: p(C.value)
|
|
91
|
+
}, [
|
|
92
|
+
w(e.$slots, "default", {
|
|
93
|
+
item: o,
|
|
94
|
+
index: v
|
|
95
|
+
})
|
|
96
|
+
], 4);
|
|
97
|
+
}), 128))
|
|
98
|
+
], 4),
|
|
99
|
+
e.items.length ? b("", !0) : (a(), u("view", ie, [
|
|
100
|
+
e.loading ? (a(), le(k(H), {
|
|
101
|
+
key: 0,
|
|
102
|
+
spinning: !0
|
|
103
|
+
}, {
|
|
104
|
+
default: re(() => [
|
|
105
|
+
te(ee(e.loadingText), 1)
|
|
106
|
+
]),
|
|
107
|
+
_: 1
|
|
108
|
+
})) : w(e.$slots, "empty", { key: 1 })
|
|
109
|
+
])),
|
|
110
|
+
e.items.length ? (a(), u("view", {
|
|
111
|
+
key: 1,
|
|
112
|
+
class: "sun-virtual-scroll-spacer",
|
|
113
|
+
style: p(_.value)
|
|
114
|
+
}, null, 4)) : b("", !0)
|
|
115
|
+
], 16, ne));
|
|
116
|
+
}
|
|
117
|
+
});
|
|
10
118
|
export {
|
|
11
|
-
|
|
119
|
+
de as default
|
|
12
120
|
};
|
package/index19.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { renderSlot as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
4
|
-
function
|
|
5
|
-
return
|
|
1
|
+
import { renderSlot as r, mergeProps as o, openBlock as t, createElementBlock as n } from "vue";
|
|
2
|
+
import c from "./index23.js";
|
|
3
|
+
const s = {}, l = r, a = o, f = t, _ = n;
|
|
4
|
+
function m(e, p) {
|
|
5
|
+
return f(), _("view", a(e.$attrs, { class: "sun-fab" }), [
|
|
6
6
|
l(e.$slots, "default")
|
|
7
7
|
], 16);
|
|
8
8
|
}
|
|
9
|
-
const
|
|
9
|
+
const u = /* @__PURE__ */ c(s, [["render", m]]);
|
|
10
10
|
export {
|
|
11
|
-
|
|
11
|
+
u as default
|
|
12
12
|
};
|
package/index20.js
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { renderSlot as o, mergeProps as r, openBlock as t, createElementBlock as s } from "vue";
|
|
2
|
+
import n from "./index23.js";
|
|
3
|
+
const c = {}, l = o, m = r, _ = t, a = s;
|
|
4
|
+
function u(e, d) {
|
|
5
|
+
return _(), a("view", m(e.$attrs, { class: "sun-sudoku-item" }), [
|
|
6
|
+
l(e.$slots, "default")
|
|
7
|
+
], 16);
|
|
8
|
+
}
|
|
9
|
+
const i = /* @__PURE__ */ n(c, [["render", u]]);
|
|
2
10
|
export {
|
|
3
|
-
|
|
11
|
+
i as default
|
|
4
12
|
};
|
package/index21.js
CHANGED
package/index22.js
CHANGED
package/index25.js
CHANGED
package/index26.js
CHANGED
package/index27.js
CHANGED
package/index28.js
CHANGED
package/index29.js
CHANGED
package/index30.js
CHANGED
package/index31.js
CHANGED
package/index33.js
CHANGED
package/index34.js
CHANGED
package/index35.js
CHANGED
package/index36.js
CHANGED
package/index37.js
ADDED
package/index38.js
ADDED
package/index5.js
CHANGED
|
@@ -1,21 +1,26 @@
|
|
|
1
|
-
import { defineComponent as o,
|
|
2
|
-
const
|
|
3
|
-
__name: "
|
|
1
|
+
import { defineComponent as a, computed as o, toDisplayString as n, normalizeClass as c, normalizeStyle as i, openBlock as u, createElementBlock as p } from "vue";
|
|
2
|
+
const m = n, _ = c, d = i, v = u, k = p, g = /* @__PURE__ */ a({
|
|
3
|
+
__name: "index",
|
|
4
4
|
props: {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
5
|
+
value: {},
|
|
6
|
+
size: {},
|
|
7
|
+
strokeWidth: {},
|
|
8
|
+
color: { default: "primary" }
|
|
9
9
|
},
|
|
10
|
-
setup(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
setup(s) {
|
|
11
|
+
const e = s, t = o(() => ({
|
|
12
|
+
"--value": e.value,
|
|
13
|
+
"--size": e.size,
|
|
14
|
+
"--stroke-width": e.strokeWidth
|
|
15
|
+
})), l = o(() => [
|
|
16
|
+
`sun-circular-progress-${e.color}`
|
|
17
|
+
]), r = o(() => +(e.value * 100).toFixed(1));
|
|
18
|
+
return (y, z) => (v(), k("view", {
|
|
19
|
+
class: _(["sun-circular-progress", l.value]),
|
|
20
|
+
style: d(t.value)
|
|
21
|
+
}, m(r.value) + "%", 7));
|
|
17
22
|
}
|
|
18
23
|
});
|
|
19
24
|
export {
|
|
20
|
-
|
|
25
|
+
g as default
|
|
21
26
|
};
|
package/index6.js
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
3
|
-
__name: "
|
|
1
|
+
import { defineComponent as o, renderSlot as r, mergeProps as s, openBlock as n, createElementBlock as a } from "vue";
|
|
2
|
+
const l = r, p = s, c = n, f = a, _ = /* @__PURE__ */ o({
|
|
3
|
+
__name: "fab-group",
|
|
4
4
|
props: {
|
|
5
|
-
|
|
5
|
+
offsetY: {
|
|
6
|
+
type: [Number, String],
|
|
7
|
+
default: 0
|
|
8
|
+
}
|
|
6
9
|
},
|
|
7
|
-
setup(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}, [
|
|
12
|
-
|
|
13
|
-
],
|
|
10
|
+
setup(t) {
|
|
11
|
+
return (e, m) => (c(), f("view", p(e.$attrs, {
|
|
12
|
+
class: "sun-fab-group",
|
|
13
|
+
style: { bottom: `calc(${15 + +t.offsetY}px + var(--safe-bottom))` }
|
|
14
|
+
}), [
|
|
15
|
+
l(e.$slots, "default")
|
|
16
|
+
], 16));
|
|
14
17
|
}
|
|
15
18
|
});
|
|
16
19
|
export {
|
|
17
|
-
|
|
20
|
+
_ as default
|
|
18
21
|
};
|
package/index7.js
CHANGED
|
@@ -1,25 +1,18 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as t, computed as c, renderSlot as l, normalizeClass as a, openBlock as r, createElementBlock as i } from "vue";
|
|
2
|
+
const m = l, p = a, _ = r, u = i, k = /* @__PURE__ */ t({
|
|
3
3
|
__name: "index",
|
|
4
4
|
props: {
|
|
5
|
-
|
|
6
|
-
hook: { default: "activated" }
|
|
5
|
+
name: {}
|
|
7
6
|
},
|
|
8
|
-
setup(
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
return o.hook === "created" && a(), c(() => {
|
|
17
|
-
a();
|
|
18
|
-
}), s(() => {
|
|
19
|
-
e.value = !1, t && clearTimeout(t);
|
|
20
|
-
}), (n, p) => e.value ? i(n.$slots, "default", { key: 0 }) : m("", !0);
|
|
7
|
+
setup(e) {
|
|
8
|
+
const n = e, o = c(() => `ionicon-${n.name}`);
|
|
9
|
+
return (s, d) => (_(), u("view", {
|
|
10
|
+
class: p(["sun-icon ionicon", o.value])
|
|
11
|
+
}, [
|
|
12
|
+
m(s.$slots, "default")
|
|
13
|
+
], 2));
|
|
21
14
|
}
|
|
22
15
|
});
|
|
23
16
|
export {
|
|
24
|
-
|
|
17
|
+
k as default
|
|
25
18
|
};
|
package/index8.js
CHANGED
|
@@ -1,30 +1,25 @@
|
|
|
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 d, ref as l, onActivated as c, onDeactivated as s, renderSlot as u, createCommentVNode as f } from "vue";
|
|
2
|
+
const i = u, m = f, v = /* @__PURE__ */ d({
|
|
5
3
|
__name: "index",
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
])
|
|
24
|
-
])
|
|
25
|
-
]));
|
|
4
|
+
props: {
|
|
5
|
+
delay: { default: 50 },
|
|
6
|
+
hook: { default: "activated" }
|
|
7
|
+
},
|
|
8
|
+
setup(r) {
|
|
9
|
+
const o = r, e = l(!1);
|
|
10
|
+
let t;
|
|
11
|
+
function a() {
|
|
12
|
+
t = setTimeout(() => {
|
|
13
|
+
e.value = !0;
|
|
14
|
+
}, o.delay);
|
|
15
|
+
}
|
|
16
|
+
return o.hook === "created" && a(), c(() => {
|
|
17
|
+
a();
|
|
18
|
+
}), s(() => {
|
|
19
|
+
e.value = !1, t && clearTimeout(t);
|
|
20
|
+
}), (n, p) => e.value ? i(n.$slots, "default", { key: 0 }) : m("", !0);
|
|
26
21
|
}
|
|
27
22
|
});
|
|
28
23
|
export {
|
|
29
|
-
|
|
24
|
+
v as default
|
|
30
25
|
};
|