y-design-ssr 0.2.10 → 0.2.12
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/libs/button/index.d.ts +112 -1
- package/libs/button/index.mjs +55 -51
- package/libs/button/index.umd.js +2 -2
- package/libs/cell/index.d.ts +87 -1
- package/libs/cell/index.mjs +70 -70
- package/libs/cell/index.umd.js +2 -2
- package/libs/checkbox/index.d.ts +58 -1
- package/libs/checkbox/index.mjs +72 -72
- package/libs/checkbox/index.umd.js +2 -2
- package/libs/checkboxGroup/index.d.ts +67 -1
- package/libs/checkboxGroup/index.mjs +48 -44
- package/libs/checkboxGroup/index.umd.js +2 -2
- package/libs/col/index.d.ts +24 -1
- package/libs/col/index.mjs +49 -45
- package/libs/col/index.umd.js +2 -2
- package/libs/countdown/index.d.ts +42 -1
- package/libs/countdown/index.mjs +54 -50
- package/libs/countdown/index.umd.js +2 -2
- package/libs/dialog/index.d.ts +157 -1
- package/libs/dialog/index.mjs +219 -274
- package/libs/dialog/index.umd.js +2 -2
- package/libs/empty/index.d.ts +40 -1
- package/libs/empty/index.mjs +36 -32
- package/libs/empty/index.umd.js +2 -2
- package/libs/form/index.d.ts +127 -1
- package/libs/form/index.mjs +69 -64
- package/libs/form/index.umd.js +2 -2
- package/libs/formItem/index.d.ts +118 -1
- package/libs/formItem/index.mjs +61 -56
- package/libs/formItem/index.umd.js +2 -2
- package/libs/icon/index.d.ts +94 -1
- package/libs/icon/index.mjs +46 -42
- package/libs/icon/index.umd.js +2 -2
- package/libs/index.d.ts +3 -56
- package/libs/index.mjs +804 -899
- package/libs/index.umd.js +2 -2
- package/libs/input/index.d.ts +112 -1
- package/libs/input/index.mjs +75 -70
- package/libs/input/index.umd.js +2 -2
- package/libs/list/index.d.ts +112 -1
- package/libs/list/index.mjs +110 -106
- package/libs/list/index.umd.js +2 -2
- package/libs/loading/index.d.ts +112 -1
- package/libs/loading/index.mjs +57 -52
- package/libs/loading/index.umd.js +2 -2
- package/libs/mask/index.d.ts +67 -1
- package/libs/mask/index.mjs +54 -50
- package/libs/mask/index.umd.js +2 -2
- package/libs/popup/index.d.ts +103 -1
- package/libs/popup/index.mjs +47 -47
- package/libs/popup/index.umd.js +2 -2
- package/libs/progress/index.d.ts +130 -1
- package/libs/progress/index.mjs +66 -62
- package/libs/progress/index.umd.js +2 -2
- package/libs/pullrefresh/index.d.ts +67 -1
- package/libs/pullrefresh/index.mjs +59 -55
- package/libs/pullrefresh/index.umd.js +2 -2
- package/libs/row/index.d.ts +42 -1
- package/libs/row/index.mjs +55 -51
- package/libs/row/index.umd.js +2 -2
- package/libs/slider/index.d.ts +121 -1
- package/libs/slider/index.mjs +93 -89
- package/libs/slider/index.umd.js +2 -2
- package/libs/stepper/index.d.ts +94 -1
- package/libs/stepper/index.mjs +50 -46
- package/libs/stepper/index.umd.js +2 -2
- package/libs/swipe/index.d.ts +148 -1
- package/libs/swipe/index.mjs +78 -74
- package/libs/swipe/index.umd.js +2 -2
- package/libs/swipeItem/index.d.ts +22 -1
- package/libs/swipeItem/index.mjs +38 -34
- package/libs/swipeItem/index.umd.js +2 -2
- package/libs/switch/index.d.ts +79 -1
- package/libs/switch/index.mjs +32 -28
- package/libs/switch/index.umd.js +2 -2
- package/libs/tab/index.d.ts +31 -1
- package/libs/tab/index.mjs +36 -32
- package/libs/tab/index.umd.js +1 -1
- package/libs/tabs/index.d.ts +150 -1
- package/libs/tabs/index.mjs +89 -85
- package/libs/tabs/index.umd.js +2 -2
- package/libs/toast/index.d.ts +57 -1
- package/libs/toast/index.mjs +59 -57
- package/libs/toast/index.umd.js +2 -2
- package/libs/tooltip/index.d.ts +112 -1
- package/libs/tooltip/index.mjs +69 -65
- package/libs/tooltip/index.umd.js +2 -2
- package/libs/utils/withInstall.d.ts +5 -0
- package/libs/vue-sfc.d.ts +4 -8
- package/package.json +2 -2
package/libs/tabs/index.d.ts
CHANGED
|
@@ -1,3 +1,152 @@
|
|
|
1
|
-
|
|
1
|
+
declare const Tabs: import("../utils/withInstall").WithInstall<import("vue").DefineComponent<{
|
|
2
|
+
initIndex: {
|
|
3
|
+
type: NumberConstructor;
|
|
4
|
+
default: number;
|
|
5
|
+
};
|
|
6
|
+
initName: {
|
|
7
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
8
|
+
default: null;
|
|
9
|
+
};
|
|
10
|
+
duration: {
|
|
11
|
+
type: NumberConstructor;
|
|
12
|
+
default: number;
|
|
13
|
+
};
|
|
14
|
+
lazy: {
|
|
15
|
+
type: BooleanConstructor;
|
|
16
|
+
default: boolean;
|
|
17
|
+
};
|
|
18
|
+
lineColor: {
|
|
19
|
+
type: StringConstructor;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
lineWidth: {
|
|
23
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
24
|
+
default: string;
|
|
25
|
+
};
|
|
26
|
+
lineHeight: {
|
|
27
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
28
|
+
default: string;
|
|
29
|
+
};
|
|
30
|
+
titleWrapperClass: import("vue").PropType<unknown>;
|
|
31
|
+
titleScrollThreshold: {
|
|
32
|
+
type: NumberConstructor;
|
|
33
|
+
default: number;
|
|
34
|
+
};
|
|
35
|
+
titleStyle: {
|
|
36
|
+
type: import("vue").PropType<import("vue").CSSProperties>;
|
|
37
|
+
default: null;
|
|
38
|
+
};
|
|
39
|
+
titleClass: {
|
|
40
|
+
type: import("vue").PropType<unknown>;
|
|
41
|
+
default: null;
|
|
42
|
+
};
|
|
43
|
+
titleActiveStyle: {
|
|
44
|
+
type: import("vue").PropType<import("vue").CSSProperties>;
|
|
45
|
+
default: null;
|
|
46
|
+
};
|
|
47
|
+
titleActiveClass: {
|
|
48
|
+
type: import("vue").PropType<unknown>;
|
|
49
|
+
default: null;
|
|
50
|
+
};
|
|
51
|
+
touchable: {
|
|
52
|
+
type: BooleanConstructor;
|
|
53
|
+
default: boolean;
|
|
54
|
+
};
|
|
55
|
+
changeWithAnimation: {
|
|
56
|
+
type: BooleanConstructor;
|
|
57
|
+
default: boolean;
|
|
58
|
+
};
|
|
59
|
+
size: {
|
|
60
|
+
type: import("vue").PropType<"small" | "large" | "middle">;
|
|
61
|
+
default: string;
|
|
62
|
+
};
|
|
63
|
+
align: {
|
|
64
|
+
type: import("vue").PropType<"center" | "left">;
|
|
65
|
+
default: string;
|
|
66
|
+
};
|
|
67
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
68
|
+
initIndex: {
|
|
69
|
+
type: NumberConstructor;
|
|
70
|
+
default: number;
|
|
71
|
+
};
|
|
72
|
+
initName: {
|
|
73
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
74
|
+
default: null;
|
|
75
|
+
};
|
|
76
|
+
duration: {
|
|
77
|
+
type: NumberConstructor;
|
|
78
|
+
default: number;
|
|
79
|
+
};
|
|
80
|
+
lazy: {
|
|
81
|
+
type: BooleanConstructor;
|
|
82
|
+
default: boolean;
|
|
83
|
+
};
|
|
84
|
+
lineColor: {
|
|
85
|
+
type: StringConstructor;
|
|
86
|
+
default: string;
|
|
87
|
+
};
|
|
88
|
+
lineWidth: {
|
|
89
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
90
|
+
default: string;
|
|
91
|
+
};
|
|
92
|
+
lineHeight: {
|
|
93
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
94
|
+
default: string;
|
|
95
|
+
};
|
|
96
|
+
titleWrapperClass: import("vue").PropType<unknown>;
|
|
97
|
+
titleScrollThreshold: {
|
|
98
|
+
type: NumberConstructor;
|
|
99
|
+
default: number;
|
|
100
|
+
};
|
|
101
|
+
titleStyle: {
|
|
102
|
+
type: import("vue").PropType<import("vue").CSSProperties>;
|
|
103
|
+
default: null;
|
|
104
|
+
};
|
|
105
|
+
titleClass: {
|
|
106
|
+
type: import("vue").PropType<unknown>;
|
|
107
|
+
default: null;
|
|
108
|
+
};
|
|
109
|
+
titleActiveStyle: {
|
|
110
|
+
type: import("vue").PropType<import("vue").CSSProperties>;
|
|
111
|
+
default: null;
|
|
112
|
+
};
|
|
113
|
+
titleActiveClass: {
|
|
114
|
+
type: import("vue").PropType<unknown>;
|
|
115
|
+
default: null;
|
|
116
|
+
};
|
|
117
|
+
touchable: {
|
|
118
|
+
type: BooleanConstructor;
|
|
119
|
+
default: boolean;
|
|
120
|
+
};
|
|
121
|
+
changeWithAnimation: {
|
|
122
|
+
type: BooleanConstructor;
|
|
123
|
+
default: boolean;
|
|
124
|
+
};
|
|
125
|
+
size: {
|
|
126
|
+
type: import("vue").PropType<"small" | "large" | "middle">;
|
|
127
|
+
default: string;
|
|
128
|
+
};
|
|
129
|
+
align: {
|
|
130
|
+
type: import("vue").PropType<"center" | "left">;
|
|
131
|
+
default: string;
|
|
132
|
+
};
|
|
133
|
+
}>>, {
|
|
134
|
+
size: "small" | "large" | "middle";
|
|
135
|
+
initIndex: number;
|
|
136
|
+
initName: string | number;
|
|
137
|
+
duration: number;
|
|
138
|
+
lazy: boolean;
|
|
139
|
+
lineColor: string;
|
|
140
|
+
lineWidth: string | number;
|
|
141
|
+
lineHeight: string | number;
|
|
142
|
+
titleScrollThreshold: number;
|
|
143
|
+
titleStyle: import("vue").CSSProperties;
|
|
144
|
+
titleClass: null;
|
|
145
|
+
titleActiveStyle: import("vue").CSSProperties;
|
|
146
|
+
titleActiveClass: null;
|
|
147
|
+
touchable: boolean;
|
|
148
|
+
changeWithAnimation: boolean;
|
|
149
|
+
align: "center" | "left";
|
|
150
|
+
}>>;
|
|
2
151
|
export default Tabs;
|
|
3
152
|
export * from './src/constants';
|
package/libs/tabs/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ref as z, reactive as N, getCurrentInstance as
|
|
1
|
+
import { ref as z, reactive as N, getCurrentInstance as le, provide as Se, isVNode as se, inject as pe, onUnmounted as Ne, computed as C, defineComponent as H, createVNode as b, watch as Z, onMounted as re, nextTick as ee, onBeforeUnmount as Ce, onBeforeUpdate as Te } from "vue";
|
|
2
2
|
const V = (e, n) => n ? typeof n == "string" ? ` ${e}--${n}` : Array.isArray(n) ? n.reduce((o, l) => o + V(e, l), "") : Object.keys(n).reduce(
|
|
3
3
|
(o, l) => o + (n[l] ? V(e, l) : ""),
|
|
4
4
|
""
|
|
5
|
-
) : "",
|
|
5
|
+
) : "", ze = (e) => (n, o) => {
|
|
6
6
|
let l = n, v = o;
|
|
7
7
|
return l && typeof l != "string" && (v = l, l = ""), l = l ? `${e}__${l}` : e, `${l}${V(l, v)}`;
|
|
8
|
-
},
|
|
8
|
+
}, Ee = () => (e, n) => n ? `${V(`y-${e}`, n)}` : `y-${e}`, Le = {
|
|
9
9
|
"pull-refresh": {
|
|
10
10
|
pulling: "下拉刷新...",
|
|
11
11
|
loosing: "释放刷新...",
|
|
@@ -19,30 +19,30 @@ const V = (e, n) => n ? typeof n == "string" ? ` ${e}--${n}` : Array.isArray(n)
|
|
|
19
19
|
};
|
|
20
20
|
z("zh-CN");
|
|
21
21
|
N({
|
|
22
|
-
"zh-CN":
|
|
22
|
+
"zh-CN": Le
|
|
23
23
|
});
|
|
24
24
|
const U = (e) => {
|
|
25
25
|
const n = `y-${e}`;
|
|
26
|
-
return [n,
|
|
27
|
-
},
|
|
26
|
+
return [n, ze(n), Ee()];
|
|
27
|
+
}, ie = (e, n) => typeof e == "string" && e.includes("%") && e.includes("%") ? n * Number(e.replace(/%/g, "")) / 100 : Number(e), $e = (e) => {
|
|
28
28
|
const n = [], o = (l) => {
|
|
29
29
|
Array.isArray(l) && l.forEach((v) => {
|
|
30
30
|
var u;
|
|
31
|
-
|
|
31
|
+
se(v) && (n.push(v), (u = v.component) != null && u.subTree && o(v.component.subTree.children), v.children && o(v.children));
|
|
32
32
|
});
|
|
33
33
|
};
|
|
34
34
|
return o(e), n;
|
|
35
|
-
},
|
|
36
|
-
const o =
|
|
35
|
+
}, xe = (e, n) => {
|
|
36
|
+
const o = $e(n.subTree.children);
|
|
37
37
|
e.sort((l, v) => o.indexOf(l.vnode) - o.indexOf(v.vnode));
|
|
38
|
-
},
|
|
39
|
-
const n =
|
|
38
|
+
}, ce = (e) => {
|
|
39
|
+
const n = le(), o = N([]);
|
|
40
40
|
return {
|
|
41
41
|
childrens: o,
|
|
42
42
|
initProvide: (v) => {
|
|
43
43
|
Se(e, {
|
|
44
44
|
addChild: (s) => {
|
|
45
|
-
s.proxy && (o.push(s), n &&
|
|
45
|
+
s.proxy && (o.push(s), n && xe(o, n));
|
|
46
46
|
},
|
|
47
47
|
removeChild: (s) => {
|
|
48
48
|
const f = o.indexOf(s);
|
|
@@ -53,11 +53,11 @@ const U = (e) => {
|
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
|
-
},
|
|
57
|
-
const n =
|
|
56
|
+
}, ue = (e) => {
|
|
57
|
+
const n = pe(e, null), o = le();
|
|
58
58
|
if (n && o) {
|
|
59
59
|
const { childrens: l, addChild: v, removeChild: u } = n;
|
|
60
|
-
return v(o),
|
|
60
|
+
return v(o), Ne(() => u(o)), {
|
|
61
61
|
index: C(() => l.indexOf(o)),
|
|
62
62
|
parent: n
|
|
63
63
|
};
|
|
@@ -66,8 +66,8 @@ const U = (e) => {
|
|
|
66
66
|
parent: null,
|
|
67
67
|
index: z(-1)
|
|
68
68
|
};
|
|
69
|
-
}, [
|
|
70
|
-
name:
|
|
69
|
+
}, [Ie, Be] = U("swipe-item"), K = /* @__PURE__ */ H({
|
|
70
|
+
name: Ie,
|
|
71
71
|
props: {
|
|
72
72
|
clonenNode: {
|
|
73
73
|
type: Object,
|
|
@@ -81,9 +81,9 @@ const U = (e) => {
|
|
|
81
81
|
setup(e, {
|
|
82
82
|
slots: n
|
|
83
83
|
}) {
|
|
84
|
-
const o =
|
|
84
|
+
const o = le(), {
|
|
85
85
|
parent: l
|
|
86
|
-
} =
|
|
86
|
+
} = ue(de);
|
|
87
87
|
!e.clonenNode && o && (l == null || l.children.push(o));
|
|
88
88
|
const v = C(() => e.clonenNode ? e.index : l == null ? void 0 : l.children.findIndex((c) => c.proxy === (o == null ? void 0 : o.proxy))), u = C(() => {
|
|
89
89
|
const c = `${(l == null ? void 0 : l.itemDetail.size) || 0}px`;
|
|
@@ -103,14 +103,14 @@ const U = (e) => {
|
|
|
103
103
|
var s, f;
|
|
104
104
|
const c = ((s = l == null ? void 0 : l.itemShowedList) == null ? void 0 : s.list[v.value || 0]) || !1;
|
|
105
105
|
return b("div", {
|
|
106
|
-
class:
|
|
106
|
+
class: Be(),
|
|
107
107
|
style: u.value
|
|
108
108
|
}, [c ? e.clonenNode || ((f = n.default) == null ? void 0 : f.call(n)) : null]);
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
111
|
});
|
|
112
|
-
var
|
|
113
|
-
const
|
|
112
|
+
var te = /* @__PURE__ */ ((e) => (e.left = "left", e.top = "top", e.bottom = "bottom", e.right = "right", e))(te || {}), W = /* @__PURE__ */ ((e) => (e.start = "start", e.center = "center", e.end = "end", e))(W || {});
|
|
113
|
+
const De = {
|
|
114
114
|
autoplayTime: {
|
|
115
115
|
type: Number,
|
|
116
116
|
default: 0
|
|
@@ -175,12 +175,12 @@ const ke = {
|
|
|
175
175
|
type: String,
|
|
176
176
|
default: "center"
|
|
177
177
|
}
|
|
178
|
-
}, [
|
|
179
|
-
name:
|
|
178
|
+
}, [fe, q] = U("swipe"), de = fe, ke = /* @__PURE__ */ H({
|
|
179
|
+
name: fe,
|
|
180
180
|
components: {
|
|
181
181
|
YSwipeItem: K
|
|
182
182
|
},
|
|
183
|
-
props:
|
|
183
|
+
props: De,
|
|
184
184
|
setup(e, {
|
|
185
185
|
slots: n,
|
|
186
186
|
emit: o,
|
|
@@ -188,7 +188,7 @@ const ke = {
|
|
|
188
188
|
}) {
|
|
189
189
|
const {
|
|
190
190
|
initProvide: v
|
|
191
|
-
} =
|
|
191
|
+
} = ce(de), u = N([]), c = z(Number(e.initIndex)), s = N({
|
|
192
192
|
// 元素尺寸
|
|
193
193
|
size: 0,
|
|
194
194
|
// 间距
|
|
@@ -216,17 +216,17 @@ const ke = {
|
|
|
216
216
|
const w = m + f.viewportSize;
|
|
217
217
|
for (let y = 0; y < u.length; y++)
|
|
218
218
|
if (!k.list[y]) {
|
|
219
|
-
const
|
|
220
|
-
(
|
|
219
|
+
const p = t * y, E = p + s.size;
|
|
220
|
+
(p >= m && p < w || E > m && E < w || p < m && E > w) && (k.list[y] = !0);
|
|
221
221
|
}
|
|
222
222
|
}, k = N({
|
|
223
223
|
list: B()
|
|
224
|
-
}),
|
|
224
|
+
}), S = () => {
|
|
225
225
|
k.list = B(), R();
|
|
226
226
|
};
|
|
227
|
-
|
|
227
|
+
Z(() => [...u], S);
|
|
228
228
|
const D = (t, a) => {
|
|
229
|
-
t ? s.size =
|
|
229
|
+
t ? s.size = ie(t, a) : s.size = a, s.space = Number(e.itemSpace) || 0, s.isFillViewport = s.size >= a, f.viewportSize = a, f.cloneNodeCount = G();
|
|
230
230
|
}, G = () => {
|
|
231
231
|
if (x.value) {
|
|
232
232
|
const t = s.size + s.space;
|
|
@@ -243,16 +243,16 @@ const ke = {
|
|
|
243
243
|
width: t,
|
|
244
244
|
height: a
|
|
245
245
|
} = T.value.getBoundingClientRect();
|
|
246
|
-
e.vertical ? D(e.itemSize, a) : D(e.itemSize, t), c.value = c.value >= u.length ? u.length - 1 : c.value, c.value < 0 && (c.value = 0), I(c.value),
|
|
246
|
+
e.vertical ? D(e.itemSize, a) : D(e.itemSize, t), c.value = c.value >= u.length ? u.length - 1 : c.value, c.value < 0 && (c.value = 0), I(c.value), S(), h();
|
|
247
247
|
};
|
|
248
|
-
|
|
249
|
-
if (
|
|
248
|
+
re(() => {
|
|
249
|
+
if (ee(L).catch(() => {
|
|
250
250
|
}), e.touchable && T.value) {
|
|
251
251
|
const t = T.value;
|
|
252
252
|
t.addEventListener("touchstart", M, !1), t.addEventListener("mousedown", M, !1), t.addEventListener("touchmove", P, !1), t.addEventListener("mousemove", P, !1), t.addEventListener("touchend", $, !1), t.addEventListener("mouseup", $, !1), t.addEventListener("mouseleave", $, !1), t.addEventListener("touchcancel", $, !1);
|
|
253
253
|
}
|
|
254
254
|
window.addEventListener("resize", L, !1), window.addEventListener("orientationchange", L, !1);
|
|
255
|
-
}),
|
|
255
|
+
}), Ce(() => {
|
|
256
256
|
if (d(), e.touchable && T.value) {
|
|
257
257
|
const t = T.value;
|
|
258
258
|
t.removeEventListener("touchstart", M, !1), t.removeEventListener("mousedown", M, !1), t.removeEventListener("mousemove", P, !1), t.removeEventListener("touchmove", P, !1), t.removeEventListener("mouseup", $, !1), t.removeEventListener("touchend", $, !1), t.removeEventListener("mouseleave", $, !1), t.removeEventListener("touchcancel", $, !1);
|
|
@@ -337,32 +337,32 @@ const ke = {
|
|
|
337
337
|
return;
|
|
338
338
|
r.isDragging = !1;
|
|
339
339
|
const a = (/* @__PURE__ */ new Date()).getTime() - r.startTime.getTime();
|
|
340
|
-
|
|
341
|
-
},
|
|
340
|
+
he() && (Math.abs(r.offset) > me.value || Math.abs(r.offset) / a > 0.5) && (r.offset > 0 ? Y() : O()), r.offset = 0, h();
|
|
341
|
+
}, me = C(() => ie(e.minSwipeDistance, s.size + s.space)), he = () => {
|
|
342
342
|
if (x.value)
|
|
343
343
|
return !0;
|
|
344
344
|
const t = r.offset > 0 ? c.value - 1 : c.value + 1;
|
|
345
345
|
return t >= 0 && t < u.length;
|
|
346
|
-
},
|
|
346
|
+
}, ge = C(() => {
|
|
347
347
|
const t = r.isDragging && !e.isFollowHand ? f.offset : f.offset + r.offset, a = {};
|
|
348
348
|
return e.vertical ? (a.transform = `translate3d(0, ${t}px, 0)`, a.transitionDuration = r.transitionEnabled ? `${e.duration}ms` : "0ms") : (a.transform = `translate3d(${t}px, 0, 0)`, a.transitionDuration = r.transitionEnabled ? `${e.duration}ms` : "0ms"), r.isDragging && (a.transition = "none"), e.vertical && (a.flexDirection = "column"), e.autoHeight && (a.display = "block", a.whiteSpace = "nowrap"), a;
|
|
349
|
-
}),
|
|
349
|
+
}), ye = C(() => ["y-swipe__dots", `y-swipe__dots--${e.dotsPosition || (e.vertical ? te.left : te.bottom)}`]);
|
|
350
350
|
l({
|
|
351
351
|
moveTo: A,
|
|
352
352
|
next: O,
|
|
353
353
|
prev: Y,
|
|
354
354
|
resize: L
|
|
355
355
|
});
|
|
356
|
-
const
|
|
356
|
+
const be = N({
|
|
357
357
|
children: u,
|
|
358
358
|
activeIndex: c,
|
|
359
359
|
props: e,
|
|
360
360
|
itemDetail: s,
|
|
361
361
|
itemShowedList: k
|
|
362
362
|
});
|
|
363
|
-
v(
|
|
364
|
-
const
|
|
365
|
-
class:
|
|
363
|
+
v(be);
|
|
364
|
+
const we = () => e.dots ? b("div", {
|
|
365
|
+
class: ye.value
|
|
366
366
|
}, [u.map((t, a) => {
|
|
367
367
|
const m = q("dot", {
|
|
368
368
|
active: a === c.value
|
|
@@ -382,27 +382,27 @@ const ke = {
|
|
|
382
382
|
ref: T
|
|
383
383
|
}, [b("div", {
|
|
384
384
|
class: q("track"),
|
|
385
|
-
style:
|
|
385
|
+
style: ge.value,
|
|
386
386
|
ref: g
|
|
387
387
|
}, [Array(f.cloneNodeCount).fill("").map((a, m) => {
|
|
388
|
-
var
|
|
389
|
-
const w = _(m - f.cloneNodeCount), y = (X = (
|
|
388
|
+
var p, E, X;
|
|
389
|
+
const w = _(m - f.cloneNodeCount), y = (X = (p = u[w]) == null ? void 0 : (E = p.slots).default) == null ? void 0 : X.call(E);
|
|
390
390
|
return y ? b(K, {
|
|
391
391
|
clonenNode: y,
|
|
392
392
|
index: w
|
|
393
393
|
}, null) : null;
|
|
394
394
|
}), (t = n.default) == null ? void 0 : t.call(n), Array(f.cloneNodeCount).fill("").map((a, m) => {
|
|
395
|
-
var
|
|
396
|
-
const w = _(m), y = (X = (
|
|
395
|
+
var p, E, X;
|
|
396
|
+
const w = _(m), y = (X = (p = u[w]) == null ? void 0 : (E = p.slots).default) == null ? void 0 : X.call(E);
|
|
397
397
|
return y ? b(K, {
|
|
398
398
|
clonenNode: y,
|
|
399
399
|
index: w
|
|
400
400
|
}, null) : null;
|
|
401
|
-
})]), n.dots ? n.dots() :
|
|
401
|
+
})]), n.dots ? n.dots() : we()]);
|
|
402
402
|
};
|
|
403
403
|
}
|
|
404
|
-
}), [
|
|
405
|
-
name:
|
|
404
|
+
}), [_e, ae] = U("tabs-title"), oe = /* @__PURE__ */ H({
|
|
405
|
+
name: _e,
|
|
406
406
|
props: {
|
|
407
407
|
active: {
|
|
408
408
|
type: Boolean,
|
|
@@ -428,12 +428,12 @@ const ke = {
|
|
|
428
428
|
setup(e) {
|
|
429
429
|
const {
|
|
430
430
|
parent: n
|
|
431
|
-
} =
|
|
431
|
+
} = ue(ve), o = C(() => [{
|
|
432
432
|
"y-el--clickable": !e.disabled
|
|
433
|
-
},
|
|
433
|
+
}, ae({
|
|
434
434
|
scrollable: e.scrollable,
|
|
435
435
|
disabled: e.disabled
|
|
436
|
-
}),
|
|
436
|
+
}), ae(`${(n == null ? void 0 : n.props.size) || "middle"}`, {
|
|
437
437
|
active: e.active
|
|
438
438
|
}), n == null ? void 0 : n.props.titleClass, e.active ? n == null ? void 0 : n.props.titleActiveClass : ""]), l = C(() => ({
|
|
439
439
|
...n == null ? void 0 : n.props.titleStyle,
|
|
@@ -454,7 +454,7 @@ const ke = {
|
|
|
454
454
|
}, [u ? u() : v]);
|
|
455
455
|
};
|
|
456
456
|
}
|
|
457
|
-
}), J = null,
|
|
457
|
+
}), J = null, Ae = {
|
|
458
458
|
initIndex: {
|
|
459
459
|
type: Number,
|
|
460
460
|
default: 0
|
|
@@ -521,15 +521,15 @@ const ke = {
|
|
|
521
521
|
default: "center"
|
|
522
522
|
}
|
|
523
523
|
};
|
|
524
|
-
function
|
|
525
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
524
|
+
function Ye(e) {
|
|
525
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !se(e);
|
|
526
526
|
}
|
|
527
|
-
const [
|
|
528
|
-
name:
|
|
527
|
+
const [ne, Q] = U("tabs"), ve = ne, Oe = /* @__PURE__ */ H({
|
|
528
|
+
name: ne,
|
|
529
529
|
components: {
|
|
530
|
-
YTabTitle:
|
|
530
|
+
YTabTitle: oe
|
|
531
531
|
},
|
|
532
|
-
props:
|
|
532
|
+
props: Ae,
|
|
533
533
|
setup(e, {
|
|
534
534
|
slots: n,
|
|
535
535
|
emit: o,
|
|
@@ -537,7 +537,7 @@ const [le, Q] = U("tabs"), me = le, Z = /* @__PURE__ */ H({
|
|
|
537
537
|
}) {
|
|
538
538
|
const {
|
|
539
539
|
initProvide: v
|
|
540
|
-
} =
|
|
540
|
+
} = ce(ve), u = z(!1), c = N([]), s = z(), f = C(() => c.length > e.titleScrollThreshold), T = (i) => c.findIndex((d) => (d.$props ? d.$props.name : "") === i), g = z(e.initName ? T(e.initName) : e.initIndex), B = (i) => {
|
|
541
541
|
g.value = i;
|
|
542
542
|
const d = s.value;
|
|
543
543
|
d && (d == null || d.moveTo(i, e.changeWithAnimation));
|
|
@@ -551,8 +551,8 @@ const [le, Q] = U("tabs"), me = le, Z = /* @__PURE__ */ H({
|
|
|
551
551
|
B(d);
|
|
552
552
|
}
|
|
553
553
|
});
|
|
554
|
-
const
|
|
555
|
-
|
|
554
|
+
const S = z([]), D = z(), G = (i) => (d) => {
|
|
555
|
+
S.value[i] = d;
|
|
556
556
|
}, L = (i) => {
|
|
557
557
|
const {
|
|
558
558
|
title: d,
|
|
@@ -561,30 +561,30 @@ const [le, Q] = U("tabs"), me = le, Z = /* @__PURE__ */ H({
|
|
|
561
561
|
} = c[i].$props || {};
|
|
562
562
|
g.value !== i && (o(r ? "disabledClick" : "click", i, d, h), !r && B(i));
|
|
563
563
|
}, j = async () => {
|
|
564
|
-
await
|
|
564
|
+
await ee(() => {
|
|
565
565
|
if (!f.value || !D.value)
|
|
566
566
|
return;
|
|
567
567
|
const i = D.value;
|
|
568
|
-
if (!i || !
|
|
568
|
+
if (!i || !S.value[g.value])
|
|
569
569
|
return;
|
|
570
|
-
const d =
|
|
570
|
+
const d = S.value[g.value].$el, h = d.offsetLeft - (i.offsetWidth - d.offsetWidth) / 2 - i.scrollLeft;
|
|
571
571
|
i.scrollBy({
|
|
572
572
|
left: h,
|
|
573
573
|
behavior: "smooth"
|
|
574
574
|
});
|
|
575
575
|
});
|
|
576
576
|
};
|
|
577
|
-
|
|
578
|
-
|
|
577
|
+
Te(() => {
|
|
578
|
+
S.value = [];
|
|
579
579
|
});
|
|
580
580
|
const x = N({
|
|
581
581
|
transform: "translateX(50%)",
|
|
582
582
|
transition: "all 0ms ease-out"
|
|
583
583
|
}), I = async () => {
|
|
584
|
-
await
|
|
585
|
-
if (!
|
|
584
|
+
await ee(() => {
|
|
585
|
+
if (!S.value || S.value.length === 0)
|
|
586
586
|
return;
|
|
587
|
-
const i = g.value >=
|
|
587
|
+
const i = g.value >= S.value.length ? 0 : g.value, d = S.value[i].$el, h = d.offsetLeft + d.offsetWidth / 2;
|
|
588
588
|
x.transform = `translateX(${h}px) translateX(-50%)`, u.value && (x.transition = `all ${e.duration}ms ease-out`), u.value = !0;
|
|
589
589
|
});
|
|
590
590
|
}, F = (i) => {
|
|
@@ -606,11 +606,11 @@ const [le, Q] = U("tabs"), me = le, Z = /* @__PURE__ */ H({
|
|
|
606
606
|
});
|
|
607
607
|
v(A);
|
|
608
608
|
const Y = (i) => O(i) && /^\d+(\.\d+)?$/.test(i) ? `${i}px` : i, O = (i) => Object.prototype.toString.call(i) === "[object String]";
|
|
609
|
-
return
|
|
609
|
+
return re(async () => {
|
|
610
610
|
await I();
|
|
611
|
-
}),
|
|
611
|
+
}), Z(() => g.value, async () => {
|
|
612
612
|
await I(), await j();
|
|
613
|
-
}),
|
|
613
|
+
}), Z(() => {
|
|
614
614
|
var i;
|
|
615
615
|
return (i = n.default) == null ? void 0 : i.length;
|
|
616
616
|
}, async () => {
|
|
@@ -618,7 +618,7 @@ const [le, Q] = U("tabs"), me = le, Z = /* @__PURE__ */ H({
|
|
|
618
618
|
}), () => {
|
|
619
619
|
let i;
|
|
620
620
|
return b("div", {
|
|
621
|
-
class:
|
|
621
|
+
class: ne
|
|
622
622
|
}, [b("div", {
|
|
623
623
|
class: Q("list")
|
|
624
624
|
}, [b("div", {
|
|
@@ -628,7 +628,7 @@ const [le, Q] = U("tabs"), me = le, Z = /* @__PURE__ */ H({
|
|
|
628
628
|
[e.size]: e.size,
|
|
629
629
|
[e.align]: e.align
|
|
630
630
|
})
|
|
631
|
-
}, [c.length > 0 && c.map((d, h) => b(
|
|
631
|
+
}, [c.length > 0 && c.map((d, h) => b(oe, {
|
|
632
632
|
title: d.title,
|
|
633
633
|
disabled: d.disabled,
|
|
634
634
|
"title-slot": d.$slots.title,
|
|
@@ -645,7 +645,7 @@ const [le, Q] = U("tabs"), me = le, Z = /* @__PURE__ */ H({
|
|
|
645
645
|
height: Y(e.lineHeight),
|
|
646
646
|
backgroundColor: e.lineColor
|
|
647
647
|
}
|
|
648
|
-
}, null)])]), n.default ? b(
|
|
648
|
+
}, null)])]), n.default ? b(ke, {
|
|
649
649
|
ref: s,
|
|
650
650
|
dots: !1,
|
|
651
651
|
loop: !1,
|
|
@@ -656,18 +656,22 @@ const [le, Q] = U("tabs"), me = le, Z = /* @__PURE__ */ H({
|
|
|
656
656
|
"is-follow-hand": e.changeWithAnimation,
|
|
657
657
|
onChange: F,
|
|
658
658
|
onAfterChange: _
|
|
659
|
-
},
|
|
659
|
+
}, Ye(i = n.default()) ? i : {
|
|
660
660
|
default: () => [i]
|
|
661
661
|
}) : null]);
|
|
662
662
|
};
|
|
663
663
|
}
|
|
664
664
|
});
|
|
665
|
-
|
|
666
|
-
const
|
|
667
|
-
|
|
668
|
-
};
|
|
665
|
+
function Xe(e) {
|
|
666
|
+
const n = e;
|
|
667
|
+
return n.install = (o) => {
|
|
668
|
+
const { name: l } = e;
|
|
669
|
+
l && o.component(l, e);
|
|
670
|
+
}, n;
|
|
671
|
+
}
|
|
672
|
+
const je = Xe(Oe);
|
|
669
673
|
export {
|
|
670
|
-
|
|
671
|
-
|
|
674
|
+
Ae as acceptProps,
|
|
675
|
+
je as default,
|
|
672
676
|
J as unknownProp
|
|
673
677
|
};
|