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/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ref as L, reactive as
|
|
2
|
-
const
|
|
1
|
+
import { ref as L, reactive as H, getCurrentInstance as te, provide as St, isVNode as $e, inject as xt, onUnmounted as me, computed as _, defineComponent as P, createVNode as c, watch as X, onMounted as J, nextTick as se, onBeforeUnmount as Ce, onBeforeUpdate as Qe, onUpdated as Jt, createTextVNode as en, Fragment as Je, createApp as Te, h as xe, Transition as et, withDirectives as ie, vShow as Ae, Teleport as wt, vModelText as $t, mergeProps as we, vModelDynamic as tn, resolveDirective as at, render as nn } from "vue";
|
|
2
|
+
const ln = {
|
|
3
3
|
"pull-refresh": {
|
|
4
4
|
pulling: "下拉刷新...",
|
|
5
5
|
loosing: "释放刷新...",
|
|
@@ -10,30 +10,30 @@ const En = {
|
|
|
10
10
|
"form-item": {
|
|
11
11
|
validateMessage: "请输入正确内容"
|
|
12
12
|
}
|
|
13
|
-
},
|
|
14
|
-
"zh-CN":
|
|
15
|
-
}),
|
|
13
|
+
}, ot = L("zh-CN"), it = H({
|
|
14
|
+
"zh-CN": ln
|
|
15
|
+
}), Ct = {
|
|
16
16
|
text() {
|
|
17
|
-
return
|
|
17
|
+
return it[ot.value];
|
|
18
18
|
},
|
|
19
19
|
use(e, t) {
|
|
20
|
-
|
|
20
|
+
ot.value = e, this.add({ [e]: t });
|
|
21
21
|
},
|
|
22
22
|
add(e = {}) {
|
|
23
|
-
Object.assign(
|
|
23
|
+
Object.assign(it, e);
|
|
24
24
|
}
|
|
25
|
-
},
|
|
26
|
-
(a, l) => a + (t[l] ?
|
|
25
|
+
}, ke = (e) => (t) => Object.prototype.toString.call(t) === `[object ${e}]`, Tt = ke("Function"), an = ke("String"), on = ke("Number"), rn = ke("Object"), un = ke("Promise"), Pe = (e, t) => t ? typeof t == "string" ? ` ${e}--${t}` : Array.isArray(t) ? t.reduce((a, l) => a + Pe(e, l), "") : Object.keys(t).reduce(
|
|
26
|
+
(a, l) => a + (t[l] ? Pe(e, l) : ""),
|
|
27
27
|
""
|
|
28
|
-
) : "",
|
|
28
|
+
) : "", sn = (e) => (t, a) => {
|
|
29
29
|
let l = t, o = a;
|
|
30
|
-
return l && typeof l != "string" && (o = l, l = ""), l = l ? `${e}__${l}` : e, `${l}${
|
|
31
|
-
},
|
|
30
|
+
return l && typeof l != "string" && (o = l, l = ""), l = l ? `${e}__${l}` : e, `${l}${Pe(l, o)}`;
|
|
31
|
+
}, cn = () => (e, t) => t ? `${Pe(`y-${e}`, t)}` : `y-${e}`, A = (e) => {
|
|
32
32
|
const t = `y-${e}`;
|
|
33
|
-
return [t,
|
|
34
|
-
},
|
|
35
|
-
var
|
|
36
|
-
const
|
|
33
|
+
return [t, sn(t), cn()];
|
|
34
|
+
}, kt = (e) => Ct.text()[e];
|
|
35
|
+
var Et = /* @__PURE__ */ ((e) => (e.Mini = "mini", e.Small = "small", e.Middle = "middle", e.Large = "large", e))(Et || {}), tt = /* @__PURE__ */ ((e) => (e.Top = "top", e.Middle = "middle", e.Bottom = "bottom", e))(tt || {});
|
|
36
|
+
const F = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, rt = (e, t) => typeof e == "string" && e.includes("%") && e.includes("%") ? t * Number(e.replace(/%/g, "")) / 100 : Number(e), dn = (e) => {
|
|
37
37
|
switch (e) {
|
|
38
38
|
case "top":
|
|
39
39
|
return "column-reverse";
|
|
@@ -46,25 +46,25 @@ const _ = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, Lt = (
|
|
|
46
46
|
default:
|
|
47
47
|
return "column";
|
|
48
48
|
}
|
|
49
|
-
},
|
|
49
|
+
}, fn = (e) => {
|
|
50
50
|
const t = [], a = (l) => {
|
|
51
51
|
Array.isArray(l) && l.forEach((o) => {
|
|
52
52
|
var i;
|
|
53
|
-
|
|
53
|
+
$e(o) && (t.push(o), (i = o.component) != null && i.subTree && a(o.component.subTree.children), o.children && a(o.children));
|
|
54
54
|
});
|
|
55
55
|
};
|
|
56
56
|
return a(e), t;
|
|
57
|
-
},
|
|
58
|
-
const a =
|
|
57
|
+
}, mn = (e, t) => {
|
|
58
|
+
const a = fn(t.subTree.children);
|
|
59
59
|
e.sort((l, o) => a.indexOf(l.vnode) - a.indexOf(o.vnode));
|
|
60
|
-
},
|
|
61
|
-
const t =
|
|
60
|
+
}, Ee = (e) => {
|
|
61
|
+
const t = te(), a = H([]);
|
|
62
62
|
return {
|
|
63
63
|
childrens: a,
|
|
64
64
|
initProvide: (o) => {
|
|
65
|
-
|
|
65
|
+
St(e, {
|
|
66
66
|
addChild: (r) => {
|
|
67
|
-
r.proxy && (a.push(r), t &&
|
|
67
|
+
r.proxy && (a.push(r), t && mn(a, t));
|
|
68
68
|
},
|
|
69
69
|
removeChild: (r) => {
|
|
70
70
|
const d = a.indexOf(r);
|
|
@@ -75,12 +75,12 @@ const _ = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, Lt = (
|
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
|
-
},
|
|
79
|
-
const t =
|
|
78
|
+
}, ve = (e) => {
|
|
79
|
+
const t = xt(e, null), a = te();
|
|
80
80
|
if (t && a) {
|
|
81
81
|
const { childrens: l, addChild: o, removeChild: i } = t;
|
|
82
|
-
return o(a),
|
|
83
|
-
index:
|
|
82
|
+
return o(a), me(() => i(a)), {
|
|
83
|
+
index: _(() => l.indexOf(a)),
|
|
84
84
|
parent: t
|
|
85
85
|
};
|
|
86
86
|
}
|
|
@@ -88,8 +88,8 @@ const _ = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, Lt = (
|
|
|
88
88
|
parent: null,
|
|
89
89
|
index: L(-1)
|
|
90
90
|
};
|
|
91
|
-
}, [
|
|
92
|
-
name:
|
|
91
|
+
}, [vn, gn] = A("swipe-item"), Se = /* @__PURE__ */ P({
|
|
92
|
+
name: vn,
|
|
93
93
|
props: {
|
|
94
94
|
clonenNode: {
|
|
95
95
|
type: Object,
|
|
@@ -103,11 +103,11 @@ const _ = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, Lt = (
|
|
|
103
103
|
setup(e, {
|
|
104
104
|
slots: t
|
|
105
105
|
}) {
|
|
106
|
-
const a =
|
|
106
|
+
const a = te(), {
|
|
107
107
|
parent: l
|
|
108
|
-
} =
|
|
108
|
+
} = ve(Lt);
|
|
109
109
|
!e.clonenNode && a && (l == null || l.children.push(a));
|
|
110
|
-
const o =
|
|
110
|
+
const o = _(() => e.clonenNode ? e.index : l == null ? void 0 : l.children.findIndex((n) => n.proxy === (a == null ? void 0 : a.proxy))), i = _(() => {
|
|
111
111
|
const n = `${(l == null ? void 0 : l.itemDetail.size) || 0}px`;
|
|
112
112
|
let r = "auto";
|
|
113
113
|
const d = `${(l == null ? void 0 : l.itemDetail.space) || 0}px`;
|
|
@@ -125,14 +125,14 @@ const _ = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, Lt = (
|
|
|
125
125
|
var r, d;
|
|
126
126
|
const n = ((r = l == null ? void 0 : l.itemShowedList) == null ? void 0 : r.list[o.value || 0]) || !1;
|
|
127
127
|
return c("div", {
|
|
128
|
-
class:
|
|
128
|
+
class: gn(),
|
|
129
129
|
style: i.value
|
|
130
130
|
}, [n ? e.clonenNode || ((d = t.default) == null ? void 0 : d.call(t)) : null]);
|
|
131
131
|
};
|
|
132
132
|
}
|
|
133
133
|
});
|
|
134
|
-
var
|
|
135
|
-
const
|
|
134
|
+
var Ue = /* @__PURE__ */ ((e) => (e.left = "left", e.top = "top", e.bottom = "bottom", e.right = "right", e))(Ue || {}), ze = /* @__PURE__ */ ((e) => (e.start = "start", e.center = "center", e.end = "end", e))(ze || {});
|
|
135
|
+
const hn = {
|
|
136
136
|
autoplayTime: {
|
|
137
137
|
type: Number,
|
|
138
138
|
default: 0
|
|
@@ -197,12 +197,12 @@ const _n = {
|
|
|
197
197
|
type: String,
|
|
198
198
|
default: "center"
|
|
199
199
|
}
|
|
200
|
-
}, [
|
|
201
|
-
name:
|
|
200
|
+
}, [Nt, Me] = A("swipe"), Lt = Nt, Bt = /* @__PURE__ */ P({
|
|
201
|
+
name: Nt,
|
|
202
202
|
components: {
|
|
203
|
-
YSwipeItem:
|
|
203
|
+
YSwipeItem: Se
|
|
204
204
|
},
|
|
205
|
-
props:
|
|
205
|
+
props: hn,
|
|
206
206
|
setup(e, {
|
|
207
207
|
slots: t,
|
|
208
208
|
emit: a,
|
|
@@ -210,14 +210,14 @@ const _n = {
|
|
|
210
210
|
}) {
|
|
211
211
|
const {
|
|
212
212
|
initProvide: o
|
|
213
|
-
} =
|
|
213
|
+
} = Ee(Lt), i = H([]), n = L(Number(e.initIndex)), r = H({
|
|
214
214
|
// 元素尺寸
|
|
215
215
|
size: 0,
|
|
216
216
|
// 间距
|
|
217
217
|
space: 0,
|
|
218
218
|
// 元素宽度比swipe小,占满整个视窗
|
|
219
219
|
isFillViewport: !1
|
|
220
|
-
}), d =
|
|
220
|
+
}), d = H({
|
|
221
221
|
// 偏移量
|
|
222
222
|
offset: 0,
|
|
223
223
|
// 视窗大小
|
|
@@ -225,36 +225,36 @@ const _n = {
|
|
|
225
225
|
// 重复节点个数
|
|
226
226
|
cloneNodeCount: 0
|
|
227
227
|
}), f = L(), x = L(), m = () => {
|
|
228
|
-
const
|
|
229
|
-
for (let R = 0; R <
|
|
230
|
-
|
|
231
|
-
return
|
|
228
|
+
const w = i.length, z = [];
|
|
229
|
+
for (let R = 0; R < w; R++)
|
|
230
|
+
z.push(!e.lazy);
|
|
231
|
+
return z;
|
|
232
232
|
}, y = () => {
|
|
233
233
|
if (!e.lazy)
|
|
234
234
|
return;
|
|
235
|
-
const
|
|
236
|
-
let R = -(d.offset +
|
|
237
|
-
R < 0 && (R +=
|
|
238
|
-
const
|
|
239
|
-
for (let
|
|
240
|
-
if (!s.list[
|
|
241
|
-
const
|
|
242
|
-
(
|
|
235
|
+
const w = r.size + r.space, z = i.length * w;
|
|
236
|
+
let R = -(d.offset + V.offset) - d.cloneNodeCount * w;
|
|
237
|
+
R < 0 && (R += z);
|
|
238
|
+
const q = R + d.viewportSize;
|
|
239
|
+
for (let U = 0; U < i.length; U++)
|
|
240
|
+
if (!s.list[U]) {
|
|
241
|
+
const Z = w * U, oe = Z + r.size;
|
|
242
|
+
(Z >= R && Z < q || oe > R && oe < q || Z < R && oe > q) && (s.list[U] = !0);
|
|
243
243
|
}
|
|
244
|
-
}, s =
|
|
244
|
+
}, s = H({
|
|
245
245
|
list: m()
|
|
246
246
|
}), S = () => {
|
|
247
247
|
s.list = m(), y();
|
|
248
248
|
};
|
|
249
|
-
|
|
250
|
-
const v = (
|
|
251
|
-
|
|
249
|
+
X(() => [...i], S);
|
|
250
|
+
const v = (w, z) => {
|
|
251
|
+
w ? r.size = rt(w, z) : r.size = z, r.space = Number(e.itemSpace) || 0, r.isFillViewport = r.size >= z, d.viewportSize = z, d.cloneNodeCount = h();
|
|
252
252
|
}, h = () => {
|
|
253
253
|
if (u.value) {
|
|
254
|
-
const
|
|
255
|
-
if (
|
|
254
|
+
const w = r.size + r.space;
|
|
255
|
+
if (w === 0)
|
|
256
256
|
return 0;
|
|
257
|
-
const
|
|
257
|
+
const z = d.viewportSize * 2 - w, R = Math.ceil(z / w);
|
|
258
258
|
return Math.min(R, i.length - 1);
|
|
259
259
|
}
|
|
260
260
|
return 0;
|
|
@@ -262,65 +262,65 @@ const _n = {
|
|
|
262
262
|
if (!f.value)
|
|
263
263
|
return;
|
|
264
264
|
const {
|
|
265
|
-
width:
|
|
266
|
-
height:
|
|
265
|
+
width: w,
|
|
266
|
+
height: z
|
|
267
267
|
} = f.value.getBoundingClientRect();
|
|
268
|
-
e.vertical ? v(e.itemSize,
|
|
268
|
+
e.vertical ? v(e.itemSize, z) : v(e.itemSize, w), n.value = n.value >= i.length ? i.length - 1 : n.value, n.value < 0 && (n.value = 0), g(n.value), S(), D();
|
|
269
269
|
};
|
|
270
|
-
|
|
271
|
-
if (
|
|
270
|
+
J(() => {
|
|
271
|
+
if (se(p).catch(() => {
|
|
272
272
|
}), e.touchable && f.value) {
|
|
273
|
-
const
|
|
274
|
-
|
|
273
|
+
const w = f.value;
|
|
274
|
+
w.addEventListener("touchstart", Y, !1), w.addEventListener("mousedown", Y, !1), w.addEventListener("touchmove", ne, !1), w.addEventListener("mousemove", ne, !1), w.addEventListener("touchend", B, !1), w.addEventListener("mouseup", B, !1), w.addEventListener("mouseleave", B, !1), w.addEventListener("touchcancel", B, !1);
|
|
275
275
|
}
|
|
276
276
|
window.addEventListener("resize", p, !1), window.addEventListener("orientationchange", p, !1);
|
|
277
|
-
}),
|
|
278
|
-
if (
|
|
279
|
-
const
|
|
280
|
-
|
|
277
|
+
}), Ce(() => {
|
|
278
|
+
if (I(), e.touchable && f.value) {
|
|
279
|
+
const w = f.value;
|
|
280
|
+
w.removeEventListener("touchstart", Y, !1), w.removeEventListener("mousedown", Y, !1), w.removeEventListener("mousemove", ne, !1), w.removeEventListener("touchmove", ne, !1), w.removeEventListener("mouseup", B, !1), w.removeEventListener("touchend", B, !1), w.removeEventListener("mouseleave", B, !1), w.removeEventListener("touchcancel", B, !1);
|
|
281
281
|
}
|
|
282
282
|
window.removeEventListener("resize", p, !1), window.removeEventListener("orientationchange", p, !1);
|
|
283
283
|
});
|
|
284
|
-
const C =
|
|
285
|
-
let
|
|
284
|
+
const C = _(() => {
|
|
285
|
+
let w = 0;
|
|
286
286
|
switch (e.align) {
|
|
287
|
-
case
|
|
288
|
-
|
|
287
|
+
case ze.start:
|
|
288
|
+
w = 0;
|
|
289
289
|
break;
|
|
290
|
-
case
|
|
291
|
-
|
|
290
|
+
case ze.center:
|
|
291
|
+
w = (d.viewportSize - r.size) / 2;
|
|
292
292
|
break;
|
|
293
|
-
case
|
|
294
|
-
|
|
293
|
+
case ze.end:
|
|
294
|
+
w = d.viewportSize - r.size;
|
|
295
295
|
break;
|
|
296
296
|
default:
|
|
297
|
-
|
|
297
|
+
w = 0;
|
|
298
298
|
}
|
|
299
|
-
return
|
|
300
|
-
}), u =
|
|
301
|
-
const
|
|
302
|
-
u.value ? d.offset = -
|
|
299
|
+
return w;
|
|
300
|
+
}), u = _(() => e.loop && i.length > 1), g = (w) => {
|
|
301
|
+
const z = r.size + r.space;
|
|
302
|
+
u.value ? d.offset = -z * (w + d.cloneNodeCount) + C.value : (d.offset = -z * w + C.value, e.align !== "center" && (w === 0 && (d.offset = 0), w === i.length - 1 && (d.offset = -z * w + d.viewportSize - r.size)));
|
|
303
303
|
}, T = () => {
|
|
304
304
|
g(n.value), a("afterChange", n.value);
|
|
305
|
-
},
|
|
306
|
-
n.value =
|
|
307
|
-
|
|
305
|
+
}, E = (w) => (i.length + w) % i.length, b = (w, z = !0) => {
|
|
306
|
+
n.value = E(w), g(w), y(), a("change", n.value), z ? (V.transitionEnabled = !0, x.value && x.value.addEventListener("transitionend", () => {
|
|
307
|
+
V.transitionEnabled = !1, T();
|
|
308
308
|
}, {
|
|
309
309
|
once: !0
|
|
310
310
|
})) : T();
|
|
311
|
-
}, k = (
|
|
312
|
-
b(n.value - 1,
|
|
313
|
-
},
|
|
314
|
-
b(n.value + 1,
|
|
311
|
+
}, k = (w = !0) => {
|
|
312
|
+
b(n.value - 1, w);
|
|
313
|
+
}, N = (w = !0) => {
|
|
314
|
+
b(n.value + 1, w);
|
|
315
315
|
};
|
|
316
|
-
let
|
|
317
|
-
const
|
|
318
|
-
e.autoplayTime &&
|
|
316
|
+
let $ = null;
|
|
317
|
+
const I = () => {
|
|
318
|
+
e.autoplayTime && $ && clearInterval($);
|
|
319
319
|
}, D = () => {
|
|
320
|
-
e.autoplayTime && i.length > 1 && (
|
|
321
|
-
|
|
320
|
+
e.autoplayTime && i.length > 1 && ($ && clearInterval($), $ = setInterval(() => {
|
|
321
|
+
N();
|
|
322
322
|
}, Number(e.autoplayTime)));
|
|
323
|
-
},
|
|
323
|
+
}, V = H({
|
|
324
324
|
// 拖拽中
|
|
325
325
|
isDragging: !1,
|
|
326
326
|
// 是否首次拖动
|
|
@@ -335,96 +335,96 @@ const _n = {
|
|
|
335
335
|
startTime: /* @__PURE__ */ new Date(),
|
|
336
336
|
// 是否在执行动画
|
|
337
337
|
transitionEnabled: !1
|
|
338
|
-
}),
|
|
339
|
-
if (
|
|
338
|
+
}), Y = (w) => {
|
|
339
|
+
if (V.transitionEnabled)
|
|
340
340
|
return;
|
|
341
|
-
let
|
|
342
|
-
"touches" in
|
|
343
|
-
},
|
|
344
|
-
if (!
|
|
341
|
+
let z = 0, R = 0;
|
|
342
|
+
"touches" in w ? (z = w.touches[0].clientX, R = w.touches[0].clientY) : (z = w.clientX, R = w.clientY), V.startX = z, V.startY = R, V.isDragging = !0, V.isFirstTouch = !0, V.startTime = /* @__PURE__ */ new Date();
|
|
343
|
+
}, ne = (w) => {
|
|
344
|
+
if (!V.isDragging)
|
|
345
345
|
return;
|
|
346
|
-
let
|
|
347
|
-
"touches" in
|
|
348
|
-
const
|
|
349
|
-
if (
|
|
350
|
-
|
|
346
|
+
let z = 0, R = 0;
|
|
347
|
+
"touches" in w ? (z = w.touches[0].clientX, R = w.touches[0].clientY) : (z = w.clientX, R = w.clientY);
|
|
348
|
+
const q = z - V.startX, U = R - V.startY;
|
|
349
|
+
if (V.isFirstTouch && (V.isFirstTouch = !1, Math.abs(q) < Math.abs(U) !== e.vertical)) {
|
|
350
|
+
V.isDragging = !1;
|
|
351
351
|
return;
|
|
352
352
|
}
|
|
353
|
-
|
|
354
|
-
percent:
|
|
355
|
-
offset:
|
|
353
|
+
w.preventDefault(), V.offset = e.vertical ? U : q, y(), a("dragging", {
|
|
354
|
+
percent: V.offset / (r.size + r.space),
|
|
355
|
+
offset: V.offset
|
|
356
356
|
});
|
|
357
357
|
}, B = () => {
|
|
358
|
-
if (!
|
|
358
|
+
if (!V.isDragging)
|
|
359
359
|
return;
|
|
360
|
-
|
|
361
|
-
const
|
|
362
|
-
|
|
363
|
-
}, O =
|
|
360
|
+
V.isDragging = !1;
|
|
361
|
+
const z = (/* @__PURE__ */ new Date()).getTime() - V.startTime.getTime();
|
|
362
|
+
W() && (Math.abs(V.offset) > O.value || Math.abs(V.offset) / z > 0.5) && (V.offset > 0 ? k() : N()), V.offset = 0, D();
|
|
363
|
+
}, O = _(() => rt(e.minSwipeDistance, r.size + r.space)), W = () => {
|
|
364
364
|
if (u.value)
|
|
365
365
|
return !0;
|
|
366
|
-
const
|
|
367
|
-
return
|
|
368
|
-
},
|
|
369
|
-
const
|
|
370
|
-
return e.vertical ? (
|
|
371
|
-
}),
|
|
366
|
+
const w = V.offset > 0 ? n.value - 1 : n.value + 1;
|
|
367
|
+
return w >= 0 && w < i.length;
|
|
368
|
+
}, re = _(() => {
|
|
369
|
+
const w = V.isDragging && !e.isFollowHand ? d.offset : d.offset + V.offset, z = {};
|
|
370
|
+
return e.vertical ? (z.transform = `translate3d(0, ${w}px, 0)`, z.transitionDuration = V.transitionEnabled ? `${e.duration}ms` : "0ms") : (z.transform = `translate3d(${w}px, 0, 0)`, z.transitionDuration = V.transitionEnabled ? `${e.duration}ms` : "0ms"), V.isDragging && (z.transition = "none"), e.vertical && (z.flexDirection = "column"), e.autoHeight && (z.display = "block", z.whiteSpace = "nowrap"), z;
|
|
371
|
+
}), K = _(() => ["y-swipe__dots", `y-swipe__dots--${e.dotsPosition || (e.vertical ? Ue.left : Ue.bottom)}`]);
|
|
372
372
|
l({
|
|
373
373
|
moveTo: b,
|
|
374
|
-
next:
|
|
374
|
+
next: N,
|
|
375
375
|
prev: k,
|
|
376
376
|
resize: p
|
|
377
377
|
});
|
|
378
|
-
const
|
|
378
|
+
const le = H({
|
|
379
379
|
children: i,
|
|
380
380
|
activeIndex: n,
|
|
381
381
|
props: e,
|
|
382
382
|
itemDetail: r,
|
|
383
383
|
itemShowedList: s
|
|
384
384
|
});
|
|
385
|
-
o(
|
|
386
|
-
const
|
|
387
|
-
class:
|
|
388
|
-
}, [i.map((
|
|
389
|
-
const R =
|
|
390
|
-
active:
|
|
385
|
+
o(le);
|
|
386
|
+
const ae = () => e.dots ? c("div", {
|
|
387
|
+
class: K.value
|
|
388
|
+
}, [i.map((w, z) => {
|
|
389
|
+
const R = Me("dot", {
|
|
390
|
+
active: z === n.value
|
|
391
391
|
});
|
|
392
392
|
return c("div", {
|
|
393
393
|
class: R,
|
|
394
394
|
style: {
|
|
395
395
|
backgroundColor: e.dotsColor
|
|
396
396
|
},
|
|
397
|
-
key:
|
|
397
|
+
key: z
|
|
398
398
|
}, null);
|
|
399
399
|
})]) : null;
|
|
400
400
|
return () => {
|
|
401
|
-
var
|
|
401
|
+
var w;
|
|
402
402
|
return c("div", {
|
|
403
|
-
class:
|
|
403
|
+
class: Me(),
|
|
404
404
|
ref: f
|
|
405
405
|
}, [c("div", {
|
|
406
|
-
class:
|
|
407
|
-
style:
|
|
406
|
+
class: Me("track"),
|
|
407
|
+
style: re.value,
|
|
408
408
|
ref: x
|
|
409
|
-
}, [Array(d.cloneNodeCount).fill("").map((
|
|
410
|
-
var
|
|
411
|
-
const
|
|
412
|
-
return
|
|
413
|
-
clonenNode:
|
|
414
|
-
index:
|
|
409
|
+
}, [Array(d.cloneNodeCount).fill("").map((z, R) => {
|
|
410
|
+
var Z, oe, ge;
|
|
411
|
+
const q = E(R - d.cloneNodeCount), U = (ge = (Z = i[q]) == null ? void 0 : (oe = Z.slots).default) == null ? void 0 : ge.call(oe);
|
|
412
|
+
return U ? c(Se, {
|
|
413
|
+
clonenNode: U,
|
|
414
|
+
index: q
|
|
415
415
|
}, null) : null;
|
|
416
|
-
}), (
|
|
417
|
-
var
|
|
418
|
-
const
|
|
419
|
-
return
|
|
420
|
-
clonenNode:
|
|
421
|
-
index:
|
|
416
|
+
}), (w = t.default) == null ? void 0 : w.call(t), Array(d.cloneNodeCount).fill("").map((z, R) => {
|
|
417
|
+
var Z, oe, ge;
|
|
418
|
+
const q = E(R), U = (ge = (Z = i[q]) == null ? void 0 : (oe = Z.slots).default) == null ? void 0 : ge.call(oe);
|
|
419
|
+
return U ? c(Se, {
|
|
420
|
+
clonenNode: U,
|
|
421
|
+
index: q
|
|
422
422
|
}, null) : null;
|
|
423
|
-
})]), t.dots ? t.dots() :
|
|
423
|
+
})]), t.dots ? t.dots() : ae()]);
|
|
424
424
|
};
|
|
425
425
|
}
|
|
426
|
-
}), [
|
|
427
|
-
name:
|
|
426
|
+
}), [pn, ut] = A("tabs-title"), st = /* @__PURE__ */ P({
|
|
427
|
+
name: pn,
|
|
428
428
|
props: {
|
|
429
429
|
active: {
|
|
430
430
|
type: Boolean,
|
|
@@ -450,14 +450,14 @@ const _n = {
|
|
|
450
450
|
setup(e) {
|
|
451
451
|
const {
|
|
452
452
|
parent: t
|
|
453
|
-
} =
|
|
453
|
+
} = ve(nt), a = _(() => [{
|
|
454
454
|
"y-el--clickable": !e.disabled
|
|
455
|
-
},
|
|
455
|
+
}, ut({
|
|
456
456
|
scrollable: e.scrollable,
|
|
457
457
|
disabled: e.disabled
|
|
458
|
-
}),
|
|
458
|
+
}), ut(`${(t == null ? void 0 : t.props.size) || "middle"}`, {
|
|
459
459
|
active: e.active
|
|
460
|
-
}), t == null ? void 0 : t.props.titleClass, e.active ? t == null ? void 0 : t.props.titleActiveClass : ""]), l =
|
|
460
|
+
}), t == null ? void 0 : t.props.titleClass, e.active ? t == null ? void 0 : t.props.titleActiveClass : ""]), l = _(() => ({
|
|
461
461
|
...t == null ? void 0 : t.props.titleStyle,
|
|
462
462
|
...e.active ? {
|
|
463
463
|
...t == null ? void 0 : t.props.titleActiveStyle
|
|
@@ -476,7 +476,7 @@ const _n = {
|
|
|
476
476
|
}, [i ? i() : o]);
|
|
477
477
|
};
|
|
478
478
|
}
|
|
479
|
-
}),
|
|
479
|
+
}), De = null, yn = {
|
|
480
480
|
initIndex: {
|
|
481
481
|
type: Number,
|
|
482
482
|
default: 0
|
|
@@ -505,7 +505,7 @@ const _n = {
|
|
|
505
505
|
type: [Number, String],
|
|
506
506
|
default: "3px"
|
|
507
507
|
},
|
|
508
|
-
titleWrapperClass:
|
|
508
|
+
titleWrapperClass: De,
|
|
509
509
|
titleScrollThreshold: {
|
|
510
510
|
type: Number,
|
|
511
511
|
default: 5
|
|
@@ -515,7 +515,7 @@ const _n = {
|
|
|
515
515
|
default: null
|
|
516
516
|
},
|
|
517
517
|
titleClass: {
|
|
518
|
-
type:
|
|
518
|
+
type: De,
|
|
519
519
|
default: null
|
|
520
520
|
},
|
|
521
521
|
titleActiveStyle: {
|
|
@@ -523,7 +523,7 @@ const _n = {
|
|
|
523
523
|
default: null
|
|
524
524
|
},
|
|
525
525
|
titleActiveClass: {
|
|
526
|
-
type:
|
|
526
|
+
type: De,
|
|
527
527
|
default: null
|
|
528
528
|
},
|
|
529
529
|
touchable: {
|
|
@@ -543,15 +543,15 @@ const _n = {
|
|
|
543
543
|
default: "center"
|
|
544
544
|
}
|
|
545
545
|
};
|
|
546
|
-
function
|
|
547
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" &&
|
|
546
|
+
function bn(e) {
|
|
547
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !$e(e);
|
|
548
548
|
}
|
|
549
|
-
const [
|
|
550
|
-
name:
|
|
549
|
+
const [je, Oe] = A("tabs"), nt = je, Sn = /* @__PURE__ */ P({
|
|
550
|
+
name: je,
|
|
551
551
|
components: {
|
|
552
|
-
YTabTitle:
|
|
552
|
+
YTabTitle: st
|
|
553
553
|
},
|
|
554
|
-
props:
|
|
554
|
+
props: yn,
|
|
555
555
|
setup(e, {
|
|
556
556
|
slots: t,
|
|
557
557
|
emit: a,
|
|
@@ -559,115 +559,115 @@ const [gt, st] = P("tabs"), Tt = gt, _e = /* @__PURE__ */ M({
|
|
|
559
559
|
}) {
|
|
560
560
|
const {
|
|
561
561
|
initProvide: o
|
|
562
|
-
} =
|
|
563
|
-
x.value =
|
|
564
|
-
const
|
|
565
|
-
|
|
562
|
+
} = Ee(nt), i = L(!1), n = H([]), r = L(), d = _(() => n.length > e.titleScrollThreshold), f = ($) => n.findIndex((I) => (I.$props ? I.$props.name : "") === $), x = L(e.initName ? f(e.initName) : e.initIndex), m = ($) => {
|
|
563
|
+
x.value = $;
|
|
564
|
+
const I = r.value;
|
|
565
|
+
I && (I == null || I.moveTo($, e.changeWithAnimation));
|
|
566
566
|
};
|
|
567
567
|
l({
|
|
568
|
-
scrollToByIndex: (
|
|
569
|
-
m(
|
|
568
|
+
scrollToByIndex: ($) => {
|
|
569
|
+
m($);
|
|
570
570
|
},
|
|
571
|
-
scrollToByName: (
|
|
572
|
-
const
|
|
573
|
-
m(
|
|
571
|
+
scrollToByName: ($) => {
|
|
572
|
+
const I = f($);
|
|
573
|
+
m(I);
|
|
574
574
|
}
|
|
575
575
|
});
|
|
576
|
-
const S = L([]), v = L(), h = (
|
|
577
|
-
S.value[
|
|
578
|
-
}, p = (
|
|
576
|
+
const S = L([]), v = L(), h = ($) => (I) => {
|
|
577
|
+
S.value[$] = I;
|
|
578
|
+
}, p = ($) => {
|
|
579
579
|
const {
|
|
580
|
-
title:
|
|
580
|
+
title: I,
|
|
581
581
|
name: D,
|
|
582
|
-
disabled:
|
|
583
|
-
} = n[
|
|
584
|
-
x.value !==
|
|
582
|
+
disabled: V
|
|
583
|
+
} = n[$].$props || {};
|
|
584
|
+
x.value !== $ && (a(V ? "disabledClick" : "click", $, I, D), !V && m($));
|
|
585
585
|
}, C = async () => {
|
|
586
|
-
await
|
|
586
|
+
await se(() => {
|
|
587
587
|
if (!d.value || !v.value)
|
|
588
588
|
return;
|
|
589
|
-
const
|
|
590
|
-
if (
|
|
589
|
+
const $ = v.value;
|
|
590
|
+
if (!$ || !S.value[x.value])
|
|
591
591
|
return;
|
|
592
|
-
const
|
|
593
|
-
|
|
592
|
+
const I = S.value[x.value].$el, D = I.offsetLeft - ($.offsetWidth - I.offsetWidth) / 2 - $.scrollLeft;
|
|
593
|
+
$.scrollBy({
|
|
594
594
|
left: D,
|
|
595
595
|
behavior: "smooth"
|
|
596
596
|
});
|
|
597
597
|
});
|
|
598
598
|
};
|
|
599
|
-
|
|
599
|
+
Qe(() => {
|
|
600
600
|
S.value = [];
|
|
601
601
|
});
|
|
602
|
-
const u =
|
|
602
|
+
const u = H({
|
|
603
603
|
transform: "translateX(50%)",
|
|
604
604
|
transition: "all 0ms ease-out"
|
|
605
605
|
}), g = async () => {
|
|
606
|
-
await
|
|
606
|
+
await se(() => {
|
|
607
607
|
if (!S.value || S.value.length === 0)
|
|
608
608
|
return;
|
|
609
|
-
const
|
|
609
|
+
const $ = x.value >= S.value.length ? 0 : x.value, I = S.value[$].$el, D = I.offsetLeft + I.offsetWidth / 2;
|
|
610
610
|
u.transform = `translateX(${D}px) translateX(-50%)`, i.value && (u.transition = `all ${e.duration}ms ease-out`), i.value = !0;
|
|
611
611
|
});
|
|
612
|
-
}, T = (
|
|
612
|
+
}, T = ($) => {
|
|
613
613
|
const {
|
|
614
|
-
title:
|
|
614
|
+
title: I,
|
|
615
615
|
name: D
|
|
616
|
-
} = n[
|
|
617
|
-
a("change",
|
|
618
|
-
},
|
|
616
|
+
} = n[$].$props || {};
|
|
617
|
+
a("change", $, I, D), x.value = $;
|
|
618
|
+
}, E = ($) => {
|
|
619
619
|
const {
|
|
620
|
-
title:
|
|
620
|
+
title: I,
|
|
621
621
|
name: D
|
|
622
|
-
} = n[
|
|
623
|
-
a("afterChange",
|
|
624
|
-
}, b =
|
|
622
|
+
} = n[$].$props || {};
|
|
623
|
+
a("afterChange", $, I, D), x.value = $;
|
|
624
|
+
}, b = H({
|
|
625
625
|
children: n,
|
|
626
626
|
activeIndex: x,
|
|
627
627
|
props: e
|
|
628
628
|
});
|
|
629
629
|
o(b);
|
|
630
|
-
const k = (
|
|
631
|
-
return
|
|
630
|
+
const k = ($) => N($) && /^\d+(\.\d+)?$/.test($) ? `${$}px` : $, N = ($) => Object.prototype.toString.call($) === "[object String]";
|
|
631
|
+
return J(async () => {
|
|
632
632
|
await g();
|
|
633
|
-
}),
|
|
633
|
+
}), X(() => x.value, async () => {
|
|
634
634
|
await g(), await C();
|
|
635
|
-
}),
|
|
636
|
-
var
|
|
637
|
-
return (
|
|
635
|
+
}), X(() => {
|
|
636
|
+
var $;
|
|
637
|
+
return ($ = t.default) == null ? void 0 : $.length;
|
|
638
638
|
}, async () => {
|
|
639
639
|
await g();
|
|
640
640
|
}), () => {
|
|
641
|
-
let
|
|
641
|
+
let $;
|
|
642
642
|
return c("div", {
|
|
643
|
-
class:
|
|
643
|
+
class: je
|
|
644
644
|
}, [c("div", {
|
|
645
|
-
class:
|
|
645
|
+
class: Oe("list")
|
|
646
646
|
}, [c("div", {
|
|
647
647
|
ref: v,
|
|
648
|
-
class:
|
|
648
|
+
class: Oe("list-child-wrapper", {
|
|
649
649
|
scrollable: d.value,
|
|
650
650
|
[e.size]: e.size,
|
|
651
651
|
[e.align]: e.align
|
|
652
652
|
})
|
|
653
|
-
}, [n.length > 0 && n.map((
|
|
654
|
-
title:
|
|
655
|
-
disabled:
|
|
656
|
-
"title-slot":
|
|
653
|
+
}, [n.length > 0 && n.map((I, D) => c(st, {
|
|
654
|
+
title: I.title,
|
|
655
|
+
disabled: I.disabled,
|
|
656
|
+
"title-slot": I.$slots.title,
|
|
657
657
|
key: D,
|
|
658
658
|
ref: h(D),
|
|
659
659
|
active: x.value === D,
|
|
660
660
|
scrollable: d.value,
|
|
661
661
|
onClick: () => p(D)
|
|
662
662
|
}, null)), c("div", {
|
|
663
|
-
class:
|
|
663
|
+
class: Oe("line"),
|
|
664
664
|
style: {
|
|
665
665
|
...u,
|
|
666
666
|
width: k(e.lineWidth),
|
|
667
667
|
height: k(e.lineHeight),
|
|
668
668
|
backgroundColor: e.lineColor
|
|
669
669
|
}
|
|
670
|
-
}, null)])]), t.default ? c(
|
|
670
|
+
}, null)])]), t.default ? c(Bt, {
|
|
671
671
|
ref: r,
|
|
672
672
|
dots: !1,
|
|
673
673
|
loop: !1,
|
|
@@ -677,22 +677,26 @@ const [gt, st] = P("tabs"), Tt = gt, _e = /* @__PURE__ */ M({
|
|
|
677
677
|
duration: e.duration,
|
|
678
678
|
"is-follow-hand": e.changeWithAnimation,
|
|
679
679
|
onChange: T,
|
|
680
|
-
onAfterChange:
|
|
681
|
-
},
|
|
682
|
-
default: () => [
|
|
680
|
+
onAfterChange: E
|
|
681
|
+
}, bn($ = t.default()) ? $ : {
|
|
682
|
+
default: () => [$]
|
|
683
683
|
}) : null]);
|
|
684
684
|
};
|
|
685
685
|
}
|
|
686
686
|
});
|
|
687
|
-
|
|
688
|
-
const
|
|
689
|
-
|
|
690
|
-
};
|
|
691
|
-
|
|
692
|
-
|
|
687
|
+
function M(e) {
|
|
688
|
+
const t = e;
|
|
689
|
+
return t.install = (a) => {
|
|
690
|
+
const { name: l } = e;
|
|
691
|
+
l && a.component(l, e);
|
|
692
|
+
}, t;
|
|
693
693
|
}
|
|
694
|
-
const
|
|
695
|
-
|
|
694
|
+
const xn = M(Sn);
|
|
695
|
+
function wn(e) {
|
|
696
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !$e(e);
|
|
697
|
+
}
|
|
698
|
+
const [$n] = A("tab"), Cn = /* @__PURE__ */ P({
|
|
699
|
+
name: $n,
|
|
696
700
|
props: {
|
|
697
701
|
title: {
|
|
698
702
|
type: String,
|
|
@@ -712,29 +716,24 @@ const [jn] = P("tab"), Fe = /* @__PURE__ */ M({
|
|
|
712
716
|
}) {
|
|
713
717
|
const {
|
|
714
718
|
parent: a
|
|
715
|
-
} =
|
|
716
|
-
return l.proxy && (a == null || a.children.push(l.proxy)),
|
|
719
|
+
} = ve(nt), l = te();
|
|
720
|
+
return l.proxy && (a == null || a.children.push(l.proxy)), Ce(() => {
|
|
717
721
|
a && (a.children = a.children.filter((o) => o !== l.proxy));
|
|
718
722
|
}), () => {
|
|
719
723
|
let o;
|
|
720
|
-
return t.default ? c(
|
|
724
|
+
return t.default ? c(Se, null, wn(o = t.default()) ? o : {
|
|
721
725
|
default: () => [o]
|
|
722
726
|
}) : null;
|
|
723
727
|
};
|
|
724
728
|
}
|
|
725
|
-
})
|
|
726
|
-
Fe.install = (e) => {
|
|
727
|
-
const { name: t } = Fe;
|
|
728
|
-
e.component(t, Fe);
|
|
729
|
-
};
|
|
730
|
-
const It = 10, Xn = (e, t) => e > t && e > It ? "horizontal" : t > e && t > It ? "vertical" : "", Yn = (e, t) => Math.abs(e) > Math.abs(t) ? e > 0 ? "right" : "left" : t > 0 ? "bottom" : "top", qn = () => {
|
|
729
|
+
}), Tn = M(Cn), ct = 10, kn = (e, t) => e > t && e > ct ? "horizontal" : t > e && t > ct ? "vertical" : "", En = (e, t) => Math.abs(e) > Math.abs(t) ? e > 0 ? "right" : "left" : t > 0 ? "bottom" : "top", Nn = () => {
|
|
731
730
|
const e = L(0), t = L(0), a = L(0), l = L(0), o = L(0), i = L(0), n = L(""), r = L(""), d = () => n.value === "vertical", f = () => n.value === "horizontal", x = () => {
|
|
732
731
|
a.value = 0, l.value = 0, o.value = 0, i.value = 0, n.value = "", r.value = "";
|
|
733
732
|
};
|
|
734
733
|
return {
|
|
735
734
|
move: (s) => {
|
|
736
735
|
const S = s.touches[0];
|
|
737
|
-
a.value = S.clientX < 0 ? 0 : S.clientX - e.value, l.value = S.clientY - t.value, o.value = Math.abs(a.value), i.value = Math.abs(l.value), n.value || (n.value =
|
|
736
|
+
a.value = S.clientX < 0 ? 0 : S.clientX - e.value, l.value = S.clientY - t.value, o.value = Math.abs(a.value), i.value = Math.abs(l.value), n.value || (n.value = kn(o.value, i.value)), r.value = En(a.value, l.value);
|
|
738
737
|
},
|
|
739
738
|
start: (s) => {
|
|
740
739
|
x(), e.value = s.touches[0].clientX, t.value = s.touches[0].clientY;
|
|
@@ -751,8 +750,8 @@ const It = 10, Xn = (e, t) => e > t && e > It ? "horizontal" : t > e && t > It ?
|
|
|
751
750
|
isVertical: d,
|
|
752
751
|
isHorizontal: f
|
|
753
752
|
};
|
|
754
|
-
}, [
|
|
755
|
-
name:
|
|
753
|
+
}, [Ln, G] = A("slider"), Bn = /* @__PURE__ */ P({
|
|
754
|
+
name: Ln,
|
|
756
755
|
props: {
|
|
757
756
|
modelValue: {
|
|
758
757
|
type: [Number, Array],
|
|
@@ -812,120 +811,120 @@ const It = 10, Xn = (e, t) => e > t && e > It ? "horizontal" : t > e && t > It ?
|
|
|
812
811
|
emit: t,
|
|
813
812
|
slots: a
|
|
814
813
|
}) {
|
|
815
|
-
const l = L(), o = L(0), i = L(0), n = L(""), r =
|
|
814
|
+
const l = L(), o = L(0), i = L(0), n = L(""), r = Nn(), d = _(() => Array.isArray(e.modelValue)), f = (b) => {
|
|
816
815
|
const {
|
|
817
816
|
min: k,
|
|
818
|
-
max:
|
|
819
|
-
step:
|
|
820
|
-
} = e,
|
|
821
|
-
return Math.round(
|
|
817
|
+
max: N,
|
|
818
|
+
step: $
|
|
819
|
+
} = e, I = Math.max(k, Math.min(b, N));
|
|
820
|
+
return Math.round(I / $) * $;
|
|
822
821
|
}, x = (b) => {
|
|
823
822
|
if (b.stopPropagation(), e.disabled)
|
|
824
823
|
return;
|
|
825
824
|
const {
|
|
826
825
|
min: k,
|
|
827
|
-
modelValue:
|
|
826
|
+
modelValue: N
|
|
828
827
|
} = e, {
|
|
829
|
-
left:
|
|
830
|
-
width:
|
|
831
|
-
} = l.value.getBoundingClientRect(), D = b.clientX -
|
|
828
|
+
left: $,
|
|
829
|
+
width: I
|
|
830
|
+
} = l.value.getBoundingClientRect(), D = b.clientX - $, V = Math.floor(k + D / I * p.value);
|
|
832
831
|
if (d.value) {
|
|
833
|
-
const
|
|
834
|
-
|
|
832
|
+
const Y = N[0], ne = N[1], B = (Y + ne) / 2;
|
|
833
|
+
V <= B ? s([V, ne]) : s([Y, V]);
|
|
835
834
|
} else
|
|
836
|
-
s(
|
|
835
|
+
s(V);
|
|
837
836
|
}, m = (b) => b[0] > b[1] ? [b[1], b[0]] : b, y = (b, k) => JSON.stringify(b) === JSON.stringify(k), s = (b, k) => {
|
|
838
|
-
let
|
|
839
|
-
d.value ?
|
|
840
|
-
}, S =
|
|
837
|
+
let N = 0;
|
|
838
|
+
d.value ? N = m(b).map(f) : N = f(b), t("update:modelValue", N), typeof k > "u" && !y(o.value, i.value) && t("change", N);
|
|
839
|
+
}, S = _(() => {
|
|
841
840
|
const {
|
|
842
841
|
modelValue: b,
|
|
843
842
|
min: k
|
|
844
843
|
} = e;
|
|
845
|
-
let
|
|
846
|
-
return d.value ?
|
|
847
|
-
}), v =
|
|
844
|
+
let N = null;
|
|
845
|
+
return d.value ? N = Math.floor((f(b[1]) - f(b[0])) * 100 / p.value) : N = Math.floor((f(b) - k) * 100 / p.value), `${N}%`;
|
|
846
|
+
}), v = _(() => {
|
|
848
847
|
const {
|
|
849
848
|
modelValue: b,
|
|
850
849
|
min: k
|
|
851
850
|
} = e;
|
|
852
851
|
return d.value ? `${Math.floor((f(b[0]) - k) * 100 / p.value)}%` : "0%";
|
|
853
|
-
}), h =
|
|
852
|
+
}), h = _(() => ({
|
|
854
853
|
left: S.value,
|
|
855
854
|
transition: n.value === "moving" ? "none" : `${e.transitionTime}ms ease-in-out`
|
|
856
|
-
})), p =
|
|
855
|
+
})), p = _(() => e.max - e.min), C = (b) => {
|
|
857
856
|
e.disabled || (r.start(b), n.value = "startMove", i.value = e.modelValue, d.value ? o.value = [...i.value] : o.value = i.value);
|
|
858
857
|
}, u = (b, k) => {
|
|
859
858
|
if (e.disabled)
|
|
860
859
|
return;
|
|
861
860
|
r.move(b), n.value === "startMove" && t("drag-start"), n.value = "moving";
|
|
862
861
|
const {
|
|
863
|
-
width:
|
|
864
|
-
} = l.value.getBoundingClientRect(),
|
|
865
|
-
Array.isArray(o.value) && Array.isArray(i.value) ? k === "left" ? i.value[0] = o.value[0] +
|
|
862
|
+
width: N
|
|
863
|
+
} = l.value.getBoundingClientRect(), $ = r.deltaX.value, I = Math.floor($ / N * p.value);
|
|
864
|
+
Array.isArray(o.value) && Array.isArray(i.value) ? k === "left" ? i.value[0] = o.value[0] + I : i.value[1] = o.value[1] + I : i.value = o.value + I, s(i.value, !0);
|
|
866
865
|
}, g = () => {
|
|
867
866
|
e.disabled || (n.value === "moving" && (s(i.value), t("drag-end")), n.value = "endMove");
|
|
868
867
|
}, T = (b) => {
|
|
869
|
-
let k = "",
|
|
870
|
-
return b === 0 ? (k = "left",
|
|
868
|
+
let k = "", N = {}, $ = 0, I = G("button-wrapper");
|
|
869
|
+
return b === 0 ? (k = "left", N = {
|
|
871
870
|
left: v.value,
|
|
872
871
|
backgroundColor: Array.isArray(e.buttonBgColor) ? e.buttonBgColor[0] : e.buttonBgColor
|
|
873
|
-
},
|
|
872
|
+
}, $ = e.modelValue[b], I = G("button-wrapper", "left")) : b === 1 ? (k = "right", $ = e.modelValue[b], N = {
|
|
874
873
|
left: `${parseInt(S.value) + parseInt(v.value)}%`,
|
|
875
874
|
backgroundColor: Array.isArray(e.buttonBgColor) ? e.buttonBgColor[1] : e.buttonBgColor
|
|
876
|
-
},
|
|
875
|
+
}, I = G("button-wrapper", "right")) : ($ = e.modelValue, N = {
|
|
877
876
|
left: S.value,
|
|
878
877
|
backgroundColor: e.buttonBgColor
|
|
879
878
|
}), c("div", {
|
|
880
879
|
role: "slider",
|
|
881
880
|
"aria-valuemin": e.min,
|
|
882
881
|
"aria-valuemax": e.max,
|
|
883
|
-
"aria-valuenow":
|
|
884
|
-
class:
|
|
882
|
+
"aria-valuenow": $,
|
|
883
|
+
class: I,
|
|
885
884
|
onTouchstart: C,
|
|
886
885
|
onTouchmove: (D) => u(D, k),
|
|
887
886
|
onTouchend: g,
|
|
888
887
|
style: {
|
|
889
|
-
...
|
|
888
|
+
...N,
|
|
890
889
|
transition: n.value === "moving" ? "none" : `${e.transitionTime}ms ease-in-out`
|
|
891
890
|
}
|
|
892
891
|
}, [a.button ? a.button() : c("div", {
|
|
893
|
-
class:
|
|
894
|
-
style:
|
|
892
|
+
class: G("inner-button"),
|
|
893
|
+
style: N
|
|
895
894
|
}, null)]);
|
|
896
|
-
},
|
|
897
|
-
position: `${
|
|
895
|
+
}, E = _(() => Array((e.max - e.min) / e.step).fill({}).map((k, N) => ({
|
|
896
|
+
position: `${N * e.step}%`
|
|
898
897
|
})));
|
|
899
898
|
return () => {
|
|
900
899
|
var b;
|
|
901
900
|
return c("div", {
|
|
902
|
-
class:
|
|
901
|
+
class: G()
|
|
903
902
|
}, [a.iconLeft && c("div", {
|
|
904
|
-
class:
|
|
903
|
+
class: G("icon", {
|
|
905
904
|
left: !0
|
|
906
905
|
})
|
|
907
906
|
}, [a.iconLeft()]), c("div", {
|
|
908
907
|
role: "presentation",
|
|
909
908
|
ref: l,
|
|
910
|
-
class:
|
|
909
|
+
class: G("wrapper-main", {
|
|
911
910
|
disabled: e.disabled
|
|
912
911
|
}),
|
|
913
912
|
style: {
|
|
914
913
|
background: e.inactiveColor,
|
|
915
|
-
height:
|
|
914
|
+
height: F(e.barHeight)
|
|
916
915
|
},
|
|
917
916
|
onClick: x
|
|
918
917
|
}, [e.step !== 1 && c("div", {
|
|
919
|
-
class:
|
|
920
|
-
}, [
|
|
921
|
-
class:
|
|
918
|
+
class: G("dots")
|
|
919
|
+
}, [E.value.map((k) => c("div", {
|
|
920
|
+
class: G("dot"),
|
|
922
921
|
style: {
|
|
923
922
|
left: k.position,
|
|
924
923
|
background: e.gapColor,
|
|
925
|
-
width:
|
|
924
|
+
width: F(e.gapWidth)
|
|
926
925
|
}
|
|
927
926
|
}, null))]), e.showTooltip && c("div", {
|
|
928
|
-
class:
|
|
927
|
+
class: G("tooltip", {
|
|
929
928
|
wrapper: a.toolTip
|
|
930
929
|
}),
|
|
931
930
|
style: h.value
|
|
@@ -936,20 +935,16 @@ const It = 10, Xn = (e, t) => e > t && e > It ? "horizontal" : t > e && t > It ?
|
|
|
936
935
|
background: e.activeColor,
|
|
937
936
|
transition: n.value === "moving" ? "none" : `${e.transitionTime}ms ease-in-out`
|
|
938
937
|
},
|
|
939
|
-
class:
|
|
938
|
+
class: G("inner")
|
|
940
939
|
}, null), d.value ? [T(0), T(1)] : T()]), a.iconRight && c("div", {
|
|
941
|
-
class:
|
|
940
|
+
class: G("icon", {
|
|
942
941
|
right: !0
|
|
943
942
|
})
|
|
944
943
|
}, [a.iconRight()])]);
|
|
945
944
|
};
|
|
946
945
|
}
|
|
947
946
|
});
|
|
948
|
-
|
|
949
|
-
const { name: t } = He;
|
|
950
|
-
e.component(t, He);
|
|
951
|
-
};
|
|
952
|
-
const [Kn, fe] = P("loading"), Zn = {
|
|
947
|
+
const In = M(Bn), [Vn, de] = A("loading"), _n = {
|
|
953
948
|
// Loading icon 的颜色
|
|
954
949
|
color: {
|
|
955
950
|
type: String,
|
|
@@ -1008,9 +1003,9 @@ const [Kn, fe] = P("loading"), Zn = {
|
|
|
1008
1003
|
type: String,
|
|
1009
1004
|
default: "relative"
|
|
1010
1005
|
}
|
|
1011
|
-
},
|
|
1012
|
-
name:
|
|
1013
|
-
props:
|
|
1006
|
+
}, lt = /* @__PURE__ */ P({
|
|
1007
|
+
name: Vn,
|
|
1008
|
+
props: _n,
|
|
1014
1009
|
setup(e, {
|
|
1015
1010
|
slots: t
|
|
1016
1011
|
}) {
|
|
@@ -1031,53 +1026,53 @@ const [Kn, fe] = P("loading"), Zn = {
|
|
|
1031
1026
|
textSize: s
|
|
1032
1027
|
} = e, S = ((v = t.default) == null ? void 0 : v.call(t)) || m;
|
|
1033
1028
|
return c("div", {
|
|
1034
|
-
class:
|
|
1029
|
+
class: de({
|
|
1035
1030
|
[a]: a !== "relative"
|
|
1036
1031
|
})
|
|
1037
1032
|
}, [c("div", {
|
|
1038
|
-
class:
|
|
1033
|
+
class: de("bg", {
|
|
1039
1034
|
[a]: a !== "relative"
|
|
1040
1035
|
}),
|
|
1041
1036
|
style: {
|
|
1042
|
-
flexDirection:
|
|
1037
|
+
flexDirection: dn(l),
|
|
1043
1038
|
backgroundColor: o,
|
|
1044
|
-
borderRadius:
|
|
1045
|
-
padding:
|
|
1039
|
+
borderRadius: F(i),
|
|
1040
|
+
padding: F(r)
|
|
1046
1041
|
}
|
|
1047
1042
|
}, [c("span", {
|
|
1048
|
-
class:
|
|
1043
|
+
class: de("icon-wrapper"),
|
|
1049
1044
|
style: {
|
|
1050
|
-
width:
|
|
1051
|
-
height:
|
|
1045
|
+
width: F(n),
|
|
1046
|
+
height: F(n)
|
|
1052
1047
|
}
|
|
1053
1048
|
}, [((h = t.icon) == null ? void 0 : h.call(t)) || c("svg", {
|
|
1054
|
-
class:
|
|
1049
|
+
class: de("icon", {
|
|
1055
1050
|
[x]: x
|
|
1056
1051
|
}),
|
|
1057
1052
|
viewBox: "25 25 50 50"
|
|
1058
1053
|
}, [c("circle", {
|
|
1059
|
-
class:
|
|
1054
|
+
class: de("icon-circle"),
|
|
1060
1055
|
style: {
|
|
1061
1056
|
stroke: d,
|
|
1062
|
-
strokeWidth:
|
|
1057
|
+
strokeWidth: F(f)
|
|
1063
1058
|
},
|
|
1064
1059
|
cx: "50",
|
|
1065
1060
|
cy: "50",
|
|
1066
1061
|
r: "20",
|
|
1067
1062
|
fill: "none"
|
|
1068
1063
|
}, null)])]), S && c("span", {
|
|
1069
|
-
class:
|
|
1064
|
+
class: de("text", {
|
|
1070
1065
|
[l]: l
|
|
1071
1066
|
}),
|
|
1072
1067
|
style: {
|
|
1073
1068
|
color: y,
|
|
1074
|
-
fontSize:
|
|
1069
|
+
fontSize: F(s)
|
|
1075
1070
|
}
|
|
1076
1071
|
}, [S])])]);
|
|
1077
1072
|
};
|
|
1078
1073
|
}
|
|
1079
|
-
}), [
|
|
1080
|
-
name:
|
|
1074
|
+
}), [zn, ue] = A("list"), Pn = /* @__PURE__ */ P({
|
|
1075
|
+
name: zn,
|
|
1081
1076
|
props: {
|
|
1082
1077
|
// 加载中 文案
|
|
1083
1078
|
loadingText: {
|
|
@@ -1146,13 +1141,13 @@ const [Kn, fe] = P("loading"), Zn = {
|
|
|
1146
1141
|
emit: a,
|
|
1147
1142
|
expose: l
|
|
1148
1143
|
}) {
|
|
1149
|
-
const o = L(0), i = L(!1), n = L("normal"), r = L(), d = L(), f = L(), x = L([]), m = L(0), y = L(0), s = L([]), S =
|
|
1144
|
+
const o = L(0), i = L(!1), n = L("normal"), r = L(), d = L(), f = L(), x = L([]), m = L(0), y = L(0), s = L([]), S = _(() => on(e.height) ? `${e.height}px` : e.height), v = _(() => s.value.length ? s.value[s.value.length - 1].bottom : 0), h = _(() => {
|
|
1150
1145
|
if (e.virtual) {
|
|
1151
1146
|
const B = m.value - p.value, O = y.value + C.value;
|
|
1152
1147
|
return g.value.slice(B, O);
|
|
1153
1148
|
}
|
|
1154
1149
|
return g.value;
|
|
1155
|
-
}), p =
|
|
1150
|
+
}), p = _(() => Math.min(m.value, e.bufferScale * u.value)), C = _(() => Math.min(e.dataSource.length - y.value, e.bufferScale * u.value)), u = _(() => Math.ceil(o.value / parseInt(String(e.itemHeight)))), g = _(() => e.dataSource.map((B, O) => (B[e.keyName] = O, B))), T = () => i.value ? document.documentElement.scrollTop || document.body.scrollTop : r.value.scrollTop, E = () => i.value ? document.documentElement.scrollHeight : r.value.scrollHeight, b = () => {
|
|
1156
1151
|
n.value !== "loading" && (n.value = "loading", a("load", (B) => {
|
|
1157
1152
|
if (n.value === "loading")
|
|
1158
1153
|
switch (B) {
|
|
@@ -1160,68 +1155,68 @@ const [Kn, fe] = P("loading"), Zn = {
|
|
|
1160
1155
|
n.value = "error";
|
|
1161
1156
|
break;
|
|
1162
1157
|
case "finished":
|
|
1163
|
-
n.value = "finished", e.virtual &&
|
|
1158
|
+
n.value = "finished", e.virtual && N(), e.virtual && e.dynamicItemHeight && $();
|
|
1164
1159
|
break;
|
|
1165
1160
|
default:
|
|
1166
|
-
n.value = "normal", e.virtual && (
|
|
1161
|
+
n.value = "normal", e.virtual && ($(), e.dataSource.length < u.value + C.value && b());
|
|
1167
1162
|
}
|
|
1168
1163
|
}));
|
|
1169
1164
|
}, k = () => {
|
|
1170
|
-
n.value === "normal" &&
|
|
1171
|
-
},
|
|
1165
|
+
n.value === "normal" && E() - T() - o.value <= e.loadOffset && b();
|
|
1166
|
+
}, N = () => {
|
|
1172
1167
|
s.value = g.value.map((B, O) => {
|
|
1173
|
-
const
|
|
1168
|
+
const W = parseInt(String(e.itemHeight));
|
|
1174
1169
|
return {
|
|
1175
1170
|
index: O,
|
|
1176
|
-
height:
|
|
1177
|
-
top: O *
|
|
1178
|
-
bottom: (O + 1) *
|
|
1171
|
+
height: W,
|
|
1172
|
+
top: O * W,
|
|
1173
|
+
bottom: (O + 1) * W
|
|
1179
1174
|
};
|
|
1180
1175
|
});
|
|
1181
|
-
},
|
|
1182
|
-
|
|
1176
|
+
}, $ = () => {
|
|
1177
|
+
N();
|
|
1183
1178
|
for (let B = 1; B < s.value.length; B++)
|
|
1184
1179
|
s.value[B].top = s.value[B - 1].bottom, s.value[B].bottom = s.value[B].top + s.value[B].height;
|
|
1185
|
-
},
|
|
1186
|
-
let
|
|
1187
|
-
for (;
|
|
1188
|
-
const
|
|
1189
|
-
if (
|
|
1190
|
-
return
|
|
1191
|
-
|
|
1180
|
+
}, I = (B, O) => {
|
|
1181
|
+
let W = 0, re = B.length - 1, K = -1;
|
|
1182
|
+
for (; W <= re; ) {
|
|
1183
|
+
const le = Math.floor((W + re) / 2), ae = B[le].bottom;
|
|
1184
|
+
if (ae === O)
|
|
1185
|
+
return le + 1;
|
|
1186
|
+
ae < O ? W = le + 1 : ae > O && ((K === -1 || K > le) && (K = le), re = le - 1);
|
|
1192
1187
|
}
|
|
1193
|
-
return
|
|
1194
|
-
}, D = (B) =>
|
|
1188
|
+
return K;
|
|
1189
|
+
}, D = (B) => I(s.value, B), V = () => {
|
|
1195
1190
|
if (k(), e.virtual) {
|
|
1196
1191
|
const B = T();
|
|
1197
|
-
|
|
1192
|
+
Y(B);
|
|
1198
1193
|
}
|
|
1199
|
-
},
|
|
1194
|
+
}, Y = (B) => {
|
|
1200
1195
|
if (!d.value)
|
|
1201
1196
|
return;
|
|
1202
1197
|
const O = B || 0;
|
|
1203
1198
|
if (e.dynamicItemHeight) {
|
|
1204
1199
|
m.value = D(O), y.value = m.value + u.value;
|
|
1205
|
-
const
|
|
1206
|
-
d.value.style.transform = `translate3d(0, ${
|
|
1200
|
+
const W = s.value[m.value - p.value].top ? s.value[m.value - p.value].top : 0;
|
|
1201
|
+
d.value.style.transform = `translate3d(0, ${W}px, 0)`;
|
|
1207
1202
|
} else {
|
|
1208
1203
|
m.value = Math.floor(O / parseInt(String(e.itemHeight))), y.value = m.value + u.value;
|
|
1209
|
-
const
|
|
1210
|
-
d.value.style.transform = `translate3d(0, ${
|
|
1204
|
+
const W = m.value * parseInt(String(e.itemHeight)) - p.value * parseInt(String(e.itemHeight));
|
|
1205
|
+
d.value.style.transform = `translate3d(0, ${W}px, 0)`;
|
|
1211
1206
|
}
|
|
1212
|
-
},
|
|
1207
|
+
}, ne = () => {
|
|
1213
1208
|
if (!d.value || !f.value)
|
|
1214
1209
|
return;
|
|
1215
1210
|
const B = d.value.children;
|
|
1216
1211
|
B && B.length > 0 && [...B].forEach((O) => {
|
|
1217
1212
|
if (O instanceof HTMLDivElement) {
|
|
1218
|
-
const
|
|
1219
|
-
height:
|
|
1220
|
-
} =
|
|
1221
|
-
if (
|
|
1222
|
-
s.value[
|
|
1223
|
-
for (let
|
|
1224
|
-
s.value[
|
|
1213
|
+
const W = O.getBoundingClientRect(), {
|
|
1214
|
+
height: re
|
|
1215
|
+
} = W, K = Number(O.dataset.index), ae = s.value[K].height - re;
|
|
1216
|
+
if (ae) {
|
|
1217
|
+
s.value[K].bottom -= ae, s.value[K].height = re;
|
|
1218
|
+
for (let w = K + 1; w < s.value.length; w++)
|
|
1219
|
+
s.value[w].top = s.value[w - 1].bottom, s.value[w].bottom -= ae;
|
|
1225
1220
|
}
|
|
1226
1221
|
}
|
|
1227
1222
|
});
|
|
@@ -1230,81 +1225,71 @@ const [Kn, fe] = P("loading"), Zn = {
|
|
|
1230
1225
|
...e,
|
|
1231
1226
|
checkIsScrollToBottom: k,
|
|
1232
1227
|
loadData: b
|
|
1233
|
-
}),
|
|
1234
|
-
e.height !== "auto" ? (i.value = !1, o.value = r.value.clientHeight) : e.height === "auto" && (i.value = !0, o.value = document.documentElement.clientHeight, document.addEventListener("scroll",
|
|
1235
|
-
}),
|
|
1228
|
+
}), J(() => {
|
|
1229
|
+
e.height !== "auto" ? (i.value = !1, o.value = r.value.clientHeight) : e.height === "auto" && (i.value = !0, o.value = document.documentElement.clientHeight, document.addEventListener("scroll", V)), e.virtual && (N(), Y()), e.immediateCheck && k();
|
|
1230
|
+
}), Jt(async () => {
|
|
1236
1231
|
var B, O;
|
|
1237
1232
|
if (e.virtual && e.dynamicItemHeight) {
|
|
1238
|
-
if (await
|
|
1233
|
+
if (await se(), !((O = (B = d.value) == null ? void 0 : B.children) != null && O.length))
|
|
1239
1234
|
return;
|
|
1240
|
-
|
|
1235
|
+
ne();
|
|
1241
1236
|
}
|
|
1242
|
-
}),
|
|
1243
|
-
i.value && document.removeEventListener("scroll",
|
|
1237
|
+
}), me(() => {
|
|
1238
|
+
i.value && document.removeEventListener("scroll", V);
|
|
1244
1239
|
}), () => c("div", {
|
|
1245
1240
|
ref: r,
|
|
1246
|
-
class: `${
|
|
1241
|
+
class: `${ue()} ${e.virtual ? ue({
|
|
1247
1242
|
virtual: !0
|
|
1248
1243
|
}) : ""}`,
|
|
1249
1244
|
style: {
|
|
1250
1245
|
height: S.value
|
|
1251
1246
|
},
|
|
1252
|
-
onScroll:
|
|
1247
|
+
onScroll: V
|
|
1253
1248
|
}, [e.virtual && c("div", {
|
|
1254
1249
|
ref: f,
|
|
1255
|
-
class:
|
|
1250
|
+
class: ue("phantom"),
|
|
1256
1251
|
style: {
|
|
1257
1252
|
height: `${v.value}px`
|
|
1258
1253
|
}
|
|
1259
1254
|
}, null), c("div", {
|
|
1260
1255
|
ref: d,
|
|
1261
|
-
class:
|
|
1256
|
+
class: ue("content")
|
|
1262
1257
|
}, [h.value.map((B) => {
|
|
1263
1258
|
var O;
|
|
1264
1259
|
return c("div", {
|
|
1265
1260
|
ref: x,
|
|
1266
|
-
class:
|
|
1261
|
+
class: ue("item"),
|
|
1267
1262
|
"data-index": B._index
|
|
1268
1263
|
}, [(O = t.default) == null ? void 0 : O.call(t, {
|
|
1269
1264
|
item: B
|
|
1270
1265
|
})]);
|
|
1271
1266
|
})]), n.value === "loading" && c("div", {
|
|
1272
|
-
class:
|
|
1267
|
+
class: ue({
|
|
1273
1268
|
loading: !0
|
|
1274
1269
|
})
|
|
1275
|
-
}, [t.loading ? t.loading() : c(
|
|
1270
|
+
}, [t.loading ? t.loading() : c(lt, {
|
|
1276
1271
|
"text-location": "right"
|
|
1277
1272
|
}, {
|
|
1278
|
-
default: () => [
|
|
1273
|
+
default: () => [en("加载中...")]
|
|
1279
1274
|
})]), n.value === "finished" && c("div", {
|
|
1280
|
-
class:
|
|
1275
|
+
class: ue({
|
|
1281
1276
|
finished: !0
|
|
1282
1277
|
})
|
|
1283
1278
|
}, [e.finishedText]), n.value === "error" && c("div", {
|
|
1284
|
-
class:
|
|
1279
|
+
class: ue("error"),
|
|
1285
1280
|
role: "presentation",
|
|
1286
1281
|
onClick: b
|
|
1287
1282
|
}, [e.errorText])]);
|
|
1288
1283
|
}
|
|
1289
1284
|
});
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
we.install = (e) => {
|
|
1295
|
-
const { name: t } = we;
|
|
1296
|
-
e.component(t, we);
|
|
1297
|
-
};
|
|
1298
|
-
ue.install = (e) => {
|
|
1299
|
-
const { name: t } = ue;
|
|
1300
|
-
e.component(t, ue);
|
|
1301
|
-
};
|
|
1302
|
-
const Qt = "y-form-item", Jn = () => {
|
|
1303
|
-
const e = ee(), t = L();
|
|
1285
|
+
const An = M(Pn);
|
|
1286
|
+
const Mn = M(Bt);
|
|
1287
|
+
const Dn = M(Se), It = "y-form-item", On = () => {
|
|
1288
|
+
const e = te(), t = L();
|
|
1304
1289
|
return {
|
|
1305
1290
|
filed: t,
|
|
1306
1291
|
initProvide: (l) => {
|
|
1307
|
-
|
|
1292
|
+
St(It, {
|
|
1308
1293
|
setField: (i) => {
|
|
1309
1294
|
i != null && i.proxy && (t.value = i);
|
|
1310
1295
|
},
|
|
@@ -1313,24 +1298,24 @@ const Qt = "y-form-item", Jn = () => {
|
|
|
1313
1298
|
});
|
|
1314
1299
|
}
|
|
1315
1300
|
};
|
|
1316
|
-
},
|
|
1317
|
-
const e =
|
|
1301
|
+
}, Ne = () => {
|
|
1302
|
+
const e = xt(It, null), t = te();
|
|
1318
1303
|
if (e && (t != null && t.proxy)) {
|
|
1319
1304
|
const { setField: a } = e, { resetValidation: l, change: o, validateWithTrigger: i } = e;
|
|
1320
|
-
return
|
|
1305
|
+
return X(
|
|
1321
1306
|
() => t.proxy.modelValue,
|
|
1322
1307
|
() => {
|
|
1323
1308
|
e.instance && e.instance.exposed && (l(), o(), i("onChange"));
|
|
1324
1309
|
}
|
|
1325
|
-
), a(t),
|
|
1310
|
+
), a(t), me(() => a(null)), {
|
|
1326
1311
|
parent: e
|
|
1327
1312
|
};
|
|
1328
1313
|
}
|
|
1329
1314
|
return {
|
|
1330
1315
|
parent: null
|
|
1331
1316
|
};
|
|
1332
|
-
}, [
|
|
1333
|
-
name:
|
|
1317
|
+
}, [Rn, Be] = A("icon"), Fn = (e) => new RegExp(/\.(https|png|jpg|gif|jpeg|webp|apng)$/).test(e.toLowerCase()), Hn = /* @__PURE__ */ P({
|
|
1318
|
+
name: Rn,
|
|
1334
1319
|
props: {
|
|
1335
1320
|
dot: {
|
|
1336
1321
|
type: Boolean,
|
|
@@ -1381,8 +1366,8 @@ const Qt = "y-form-item", Jn = () => {
|
|
|
1381
1366
|
slots: t,
|
|
1382
1367
|
emit: a
|
|
1383
1368
|
}) {
|
|
1384
|
-
const l =
|
|
1385
|
-
fontSize:
|
|
1369
|
+
const l = Fn(e.name), o = () => ({
|
|
1370
|
+
fontSize: F(e.size),
|
|
1386
1371
|
color: e.color
|
|
1387
1372
|
}), i = (n) => {
|
|
1388
1373
|
a("click", n);
|
|
@@ -1405,18 +1390,18 @@ const Qt = "y-form-item", Jn = () => {
|
|
|
1405
1390
|
default: () => {
|
|
1406
1391
|
var s;
|
|
1407
1392
|
return [l ? c("em", {
|
|
1408
|
-
class:
|
|
1393
|
+
class: Be("node")
|
|
1409
1394
|
}, [c("img", {
|
|
1410
|
-
class:
|
|
1395
|
+
class: Be("image"),
|
|
1411
1396
|
src: n,
|
|
1412
1397
|
alt: "icon"
|
|
1413
1398
|
}, null)]) : null, f ? c("em", {
|
|
1414
|
-
class:
|
|
1399
|
+
class: Be("dot"),
|
|
1415
1400
|
style: {
|
|
1416
1401
|
backgroundColor: m
|
|
1417
1402
|
}
|
|
1418
1403
|
}, null) : null, d ? c("em", {
|
|
1419
|
-
class:
|
|
1404
|
+
class: Be("badge"),
|
|
1420
1405
|
style: {
|
|
1421
1406
|
color: x,
|
|
1422
1407
|
backgroundColor: m
|
|
@@ -1427,11 +1412,7 @@ const Qt = "y-form-item", Jn = () => {
|
|
|
1427
1412
|
};
|
|
1428
1413
|
}
|
|
1429
1414
|
});
|
|
1430
|
-
|
|
1431
|
-
const { name: t } = se;
|
|
1432
|
-
e.component(t, se);
|
|
1433
|
-
};
|
|
1434
|
-
const nl = {
|
|
1415
|
+
const Le = M(Hn), Wn = {
|
|
1435
1416
|
/**
|
|
1436
1417
|
* @ignore
|
|
1437
1418
|
*/
|
|
@@ -1481,9 +1462,9 @@ const nl = {
|
|
|
1481
1462
|
type: Boolean,
|
|
1482
1463
|
default: !1
|
|
1483
1464
|
}
|
|
1484
|
-
}, [
|
|
1485
|
-
name:
|
|
1486
|
-
props:
|
|
1465
|
+
}, [Vt, Un] = A("checkbox-group"), _t = Vt, jn = /* @__PURE__ */ P({
|
|
1466
|
+
name: Vt,
|
|
1467
|
+
props: Wn,
|
|
1487
1468
|
setup(e, {
|
|
1488
1469
|
slots: t,
|
|
1489
1470
|
emit: a,
|
|
@@ -1491,8 +1472,8 @@ const nl = {
|
|
|
1491
1472
|
}) {
|
|
1492
1473
|
const {
|
|
1493
1474
|
initProvide: o
|
|
1494
|
-
} =
|
|
1495
|
-
|
|
1475
|
+
} = Ee(_t), i = H([]);
|
|
1476
|
+
Ne();
|
|
1496
1477
|
const n = (f) => {
|
|
1497
1478
|
a("update:modelValue", f), a("change", f);
|
|
1498
1479
|
}, r = (f) => {
|
|
@@ -1518,14 +1499,14 @@ const nl = {
|
|
|
1518
1499
|
}), () => {
|
|
1519
1500
|
var f;
|
|
1520
1501
|
return c("div", {
|
|
1521
|
-
class:
|
|
1502
|
+
class: Un({
|
|
1522
1503
|
horizontal: e.horizontal
|
|
1523
1504
|
})
|
|
1524
1505
|
}, [(f = t.default) == null ? void 0 : f.call(t)]);
|
|
1525
1506
|
};
|
|
1526
1507
|
}
|
|
1527
|
-
}), [
|
|
1528
|
-
name:
|
|
1508
|
+
}), [Xn, Re] = A("checkbox"), Yn = /* @__PURE__ */ P({
|
|
1509
|
+
name: Xn,
|
|
1529
1510
|
props: {
|
|
1530
1511
|
modelValue: {
|
|
1531
1512
|
type: Boolean,
|
|
@@ -1559,20 +1540,20 @@ const nl = {
|
|
|
1559
1540
|
}) {
|
|
1560
1541
|
const {
|
|
1561
1542
|
parent: o
|
|
1562
|
-
} =
|
|
1543
|
+
} = ve(_t), i = o === null ? Ne().parent : null;
|
|
1563
1544
|
o && o.allItemNames.push(e.name);
|
|
1564
|
-
const n = (v, h = null) =>
|
|
1545
|
+
const n = (v, h = null) => _(() => o && o.props[v] !== null ? o.props[v] : Object.keys(e).includes(v) ? e[v] : h), r = n("disabled"), d = n("square"), f = n("checkedColor"), x = n("horizontal", !1), m = _(() => o ? o.props.modelValue.includes(e.name) : e.modelValue), y = (v) => {
|
|
1565
1546
|
var h;
|
|
1566
1547
|
r.value || typeof v < "u" && m.value === v || ((h = o == null ? void 0 : o.onItemChange) == null || h.call(o, e.name), a("update:modelValue", !e.modelValue), a("change", !e.modelValue));
|
|
1567
1548
|
};
|
|
1568
1549
|
l({
|
|
1569
1550
|
toggle: y
|
|
1570
1551
|
});
|
|
1571
|
-
const s =
|
|
1552
|
+
const s = _(() => ["mini", "small", "middle", "large"].includes(e.size.toString() || (i == null ? void 0 : i.getProp("size"))) ? null : F(e.size)), S = _(() => {
|
|
1572
1553
|
const v = {};
|
|
1573
1554
|
return s.value && (v.width = s.value, v.height = s.value), m.value && f.value && (v.backgroundColor = f.value), v;
|
|
1574
1555
|
});
|
|
1575
|
-
return
|
|
1556
|
+
return Ce(() => {
|
|
1576
1557
|
if (!o)
|
|
1577
1558
|
return;
|
|
1578
1559
|
const v = o.allItemNames.indexOf(e.name);
|
|
@@ -1583,7 +1564,7 @@ const nl = {
|
|
|
1583
1564
|
size: v
|
|
1584
1565
|
} = e;
|
|
1585
1566
|
return c("div", {
|
|
1586
|
-
class:
|
|
1567
|
+
class: Re({
|
|
1587
1568
|
disabled: r.value,
|
|
1588
1569
|
checked: m.value,
|
|
1589
1570
|
horizontal: x.value,
|
|
@@ -1595,29 +1576,22 @@ const nl = {
|
|
|
1595
1576
|
}, [((h = t.icon) == null ? void 0 : h.call(t, {
|
|
1596
1577
|
checked: m.value
|
|
1597
1578
|
})) || c("div", {
|
|
1598
|
-
class:
|
|
1579
|
+
class: Re("icon", {
|
|
1599
1580
|
checked: m.value,
|
|
1600
1581
|
square: d.value
|
|
1601
1582
|
}),
|
|
1602
1583
|
style: S.value
|
|
1603
|
-
}, [m.value ? c(
|
|
1584
|
+
}, [m.value ? c(Le, {
|
|
1604
1585
|
name: "done"
|
|
1605
1586
|
}, null) : null]), c("div", {
|
|
1606
|
-
class:
|
|
1587
|
+
class: Re("label")
|
|
1607
1588
|
}, [(p = t.default) == null ? void 0 : p.call(t)])]);
|
|
1608
1589
|
};
|
|
1609
1590
|
}
|
|
1610
1591
|
});
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
};
|
|
1615
|
-
Ue.install = (e) => {
|
|
1616
|
-
const { name: t } = Ue;
|
|
1617
|
-
e.component(t, Ue);
|
|
1618
|
-
};
|
|
1619
|
-
const [ol, zt] = P("switch"), Xe = /* @__PURE__ */ M({
|
|
1620
|
-
name: ol,
|
|
1592
|
+
const qn = M(Yn);
|
|
1593
|
+
const Gn = M(jn), [Kn, dt] = A("switch"), Zn = /* @__PURE__ */ P({
|
|
1594
|
+
name: Kn,
|
|
1621
1595
|
props: {
|
|
1622
1596
|
size: {
|
|
1623
1597
|
type: [Number, String],
|
|
@@ -1658,12 +1632,12 @@ const [ol, zt] = P("switch"), Xe = /* @__PURE__ */ M({
|
|
|
1658
1632
|
}) {
|
|
1659
1633
|
const {
|
|
1660
1634
|
parent: a
|
|
1661
|
-
} =
|
|
1635
|
+
} = Ne(), l = _(() => e.modelValue === e.activeValue), o = () => {
|
|
1662
1636
|
if (!e.disabled && !e.readonly) {
|
|
1663
1637
|
const n = l.value ? e.inactiveValue : e.activeValue;
|
|
1664
1638
|
t("update:modelValue", n), t("change", n);
|
|
1665
1639
|
}
|
|
1666
|
-
}, i =
|
|
1640
|
+
}, i = _(() => {
|
|
1667
1641
|
switch (e.size || (a == null ? void 0 : a.getProp("size")) || "middle") {
|
|
1668
1642
|
case "large":
|
|
1669
1643
|
return "34px";
|
|
@@ -1672,7 +1646,7 @@ const [ol, zt] = P("switch"), Xe = /* @__PURE__ */ M({
|
|
|
1672
1646
|
case "small":
|
|
1673
1647
|
return "24px";
|
|
1674
1648
|
default:
|
|
1675
|
-
return
|
|
1649
|
+
return F(e.size);
|
|
1676
1650
|
}
|
|
1677
1651
|
});
|
|
1678
1652
|
return () => {
|
|
@@ -1682,7 +1656,7 @@ const [ol, zt] = P("switch"), Xe = /* @__PURE__ */ M({
|
|
|
1682
1656
|
inactiveColor: d
|
|
1683
1657
|
} = e;
|
|
1684
1658
|
return c("div", {
|
|
1685
|
-
class:
|
|
1659
|
+
class: dt("", {
|
|
1686
1660
|
on: l.value,
|
|
1687
1661
|
disabled: n
|
|
1688
1662
|
}),
|
|
@@ -1694,7 +1668,7 @@ const [ol, zt] = P("switch"), Xe = /* @__PURE__ */ M({
|
|
|
1694
1668
|
onClick: o,
|
|
1695
1669
|
role: "switch"
|
|
1696
1670
|
}, [c("div", {
|
|
1697
|
-
class:
|
|
1671
|
+
class: dt("node", {
|
|
1698
1672
|
on: l.value,
|
|
1699
1673
|
disabled: n
|
|
1700
1674
|
})
|
|
@@ -1702,14 +1676,10 @@ const [ol, zt] = P("switch"), Xe = /* @__PURE__ */ M({
|
|
|
1702
1676
|
};
|
|
1703
1677
|
}
|
|
1704
1678
|
});
|
|
1705
|
-
|
|
1706
|
-
const { name: t } = Xe;
|
|
1707
|
-
e.component(t, Xe);
|
|
1708
|
-
};
|
|
1709
|
-
const il = (e, t, a, l) => {
|
|
1679
|
+
const Qn = M(Zn), Jn = (e, t, a, l) => {
|
|
1710
1680
|
const o = Math.abs(e - a), i = Math.abs(t - l), n = Math.sqrt(o * o + i * i);
|
|
1711
1681
|
return 90 - Math.round(Math.asin(i / n) / Math.PI * 180);
|
|
1712
|
-
},
|
|
1682
|
+
}, el = (e) => {
|
|
1713
1683
|
const t = e.currentTarget, a = e.target;
|
|
1714
1684
|
let l = !1;
|
|
1715
1685
|
if (t === a)
|
|
@@ -1718,32 +1688,32 @@ const il = (e, t, a, l) => {
|
|
|
1718
1688
|
i.offsetHeight !== i.scrollHeight && i.scrollTop !== 0 ? l = !0 : i.parentElement && i.parentElement !== t && o(i.parentElement);
|
|
1719
1689
|
};
|
|
1720
1690
|
return a && o(a), l;
|
|
1721
|
-
}, [
|
|
1722
|
-
let
|
|
1691
|
+
}, [tl, ft] = A("pull-refresh"), he = kt("pull-refresh"), nl = 30, mt = 0.5;
|
|
1692
|
+
let j = /* @__PURE__ */ function(e) {
|
|
1723
1693
|
return e.DEFUALT = "normal", e.PULLING = "pulling", e.LOOSING = "loosing", e.LOADING = "loading", e.SUCCESS = "success", e.FAILED = "failed", e;
|
|
1724
1694
|
}({});
|
|
1725
|
-
const
|
|
1726
|
-
name:
|
|
1695
|
+
const ll = (e) => e < 60 ? 1 : 1 - (e - 60) / 600, al = /* @__PURE__ */ P({
|
|
1696
|
+
name: tl,
|
|
1727
1697
|
props: {
|
|
1728
1698
|
pullingText: {
|
|
1729
1699
|
type: String,
|
|
1730
|
-
default:
|
|
1700
|
+
default: he.pulling
|
|
1731
1701
|
},
|
|
1732
1702
|
loosingText: {
|
|
1733
1703
|
type: String,
|
|
1734
|
-
default:
|
|
1704
|
+
default: he.loosing
|
|
1735
1705
|
},
|
|
1736
1706
|
loadingText: {
|
|
1737
1707
|
type: String,
|
|
1738
|
-
default:
|
|
1708
|
+
default: he.loading
|
|
1739
1709
|
},
|
|
1740
1710
|
successText: {
|
|
1741
1711
|
type: String,
|
|
1742
|
-
default:
|
|
1712
|
+
default: he.success
|
|
1743
1713
|
},
|
|
1744
1714
|
failedText: {
|
|
1745
1715
|
type: String,
|
|
1746
|
-
default:
|
|
1716
|
+
default: he.failed
|
|
1747
1717
|
},
|
|
1748
1718
|
statusHeight: {
|
|
1749
1719
|
type: Number,
|
|
@@ -1759,29 +1729,29 @@ const cl = (e) => e < 60 ? 1 : 1 - (e - 60) / 600, Ye = /* @__PURE__ */ M({
|
|
|
1759
1729
|
emit: a,
|
|
1760
1730
|
expose: l
|
|
1761
1731
|
}) {
|
|
1762
|
-
const o =
|
|
1732
|
+
const o = te();
|
|
1763
1733
|
let i = 0, n = 0, r = 0, d = null;
|
|
1764
|
-
const f = L(0), x = L(0), m = L(
|
|
1734
|
+
const f = L(0), x = L(0), m = L(j.DEFUALT), y = _(() => {
|
|
1765
1735
|
var T;
|
|
1766
1736
|
const g = [...((T = o == null ? void 0 : o.proxy) == null ? void 0 : T.$el).childNodes];
|
|
1767
|
-
return g == null ? void 0 : g.filter((
|
|
1737
|
+
return g == null ? void 0 : g.filter((E) => E.nodeType !== 3 || E.nodeValue !== "");
|
|
1768
1738
|
}), s = (u = "success") => {
|
|
1769
1739
|
m.value = u, setTimeout(() => {
|
|
1770
1740
|
f.value = 0;
|
|
1771
1741
|
}, 500), setTimeout(() => {
|
|
1772
|
-
m.value =
|
|
1742
|
+
m.value = j.DEFUALT;
|
|
1773
1743
|
}, 1e3);
|
|
1774
1744
|
}, S = () => {
|
|
1775
|
-
f.value = e.statusHeight, x.value =
|
|
1745
|
+
f.value = e.statusHeight, x.value = mt, m.value = j.LOADING, a("load", s);
|
|
1776
1746
|
}, v = (u) => {
|
|
1777
|
-
i = u instanceof TouchEvent ? u.touches[0].pageX : u.pageX, n = u instanceof TouchEvent ? u.touches[0].pageY : u.pageY, y.value.length !== 2 || y.value[1].nodeType === 3 ? d = o == null ? void 0 : o.vnode.el : d = y.value[1], !e.disabled && !
|
|
1747
|
+
i = u instanceof TouchEvent ? u.touches[0].pageX : u.pageX, n = u instanceof TouchEvent ? u.touches[0].pageY : u.pageY, y.value.length !== 2 || y.value[1].nodeType === 3 ? d = o == null ? void 0 : o.vnode.el : d = y.value[1], !e.disabled && !el(u) && d.scrollTop === 0 && m.value === j.DEFUALT && (m.value = j.PULLING, f.value = 0, x.value = 0);
|
|
1778
1748
|
}, h = (u) => {
|
|
1779
|
-
const g = u instanceof TouchEvent ? u.touches[0].pageX : u.pageX, T = u instanceof TouchEvent ? u.touches[0].pageY : u.pageY,
|
|
1780
|
-
r = T - n, (m.value ===
|
|
1749
|
+
const g = u instanceof TouchEvent ? u.touches[0].pageX : u.pageX, T = u instanceof TouchEvent ? u.touches[0].pageY : u.pageY, E = Jn(i, n, g, T);
|
|
1750
|
+
r = T - n, (m.value === j.PULLING || m.value === j.LOOSING) && r > 0 && E < nl && (u.preventDefault(), f.value = r * ll(r), r > e.statusHeight && m.value === j.PULLING && (m.value = j.LOOSING));
|
|
1781
1751
|
}, p = (u) => {
|
|
1782
|
-
m.value ===
|
|
1752
|
+
m.value === j.LOOSING ? (f.value = e.statusHeight, x.value = mt, m.value = j.LOADING, a("load", s, u)) : m.value === j.PULLING && (f.value = 0, m.value = j.DEFUALT);
|
|
1783
1753
|
};
|
|
1784
|
-
|
|
1754
|
+
J(() => {
|
|
1785
1755
|
const u = o == null ? void 0 : o.vnode.el;
|
|
1786
1756
|
u == null || u.addEventListener("touchstart", v, {
|
|
1787
1757
|
passive: !1
|
|
@@ -1798,13 +1768,13 @@ const cl = (e) => e < 60 ? 1 : 1 - (e - 60) / 600, Ye = /* @__PURE__ */ M({
|
|
|
1798
1768
|
}), u == null || u.addEventListener("mouseout", p, {
|
|
1799
1769
|
passive: !1
|
|
1800
1770
|
});
|
|
1801
|
-
}),
|
|
1771
|
+
}), me(() => {
|
|
1802
1772
|
const u = o == null ? void 0 : o.vnode.el;
|
|
1803
1773
|
u == null || u.removeEventListener("touchstart", v), u == null || u.removeEventListener("touchmove", h), u == null || u.removeEventListener("touchend", p), u == null || u.removeEventListener("mousedown", v), u == null || u.removeEventListener("mousemove", h), u == null || u.removeEventListener("mouseup", p), u == null || u.removeEventListener("mouseout", p);
|
|
1804
1774
|
});
|
|
1805
1775
|
const C = () => {
|
|
1806
1776
|
var u;
|
|
1807
|
-
return m.value ===
|
|
1777
|
+
return m.value === j.DEFUALT ? null : t[m.value] ? (u = t[m.value]) == null ? void 0 : u.call(t) : c("p", null, [e[`${m.value}Text`]]);
|
|
1808
1778
|
};
|
|
1809
1779
|
return l({
|
|
1810
1780
|
refresh: S
|
|
@@ -1812,32 +1782,28 @@ const cl = (e) => e < 60 ? 1 : 1 - (e - 60) / 600, Ye = /* @__PURE__ */ M({
|
|
|
1812
1782
|
var b;
|
|
1813
1783
|
const {
|
|
1814
1784
|
statusHeight: u
|
|
1815
|
-
} = e, g = f.value > u ? u : f.value, T = `all ${x.value}s ease 0s`,
|
|
1785
|
+
} = e, g = f.value > u ? u : f.value, T = `all ${x.value}s ease 0s`, E = `translate3d(0, ${-f.value}px, 0)`;
|
|
1816
1786
|
return c("div", {
|
|
1817
|
-
class:
|
|
1787
|
+
class: ft(),
|
|
1818
1788
|
style: {
|
|
1819
1789
|
WebkitTransform: `translate3d(0, ${f.value}px, 0)`,
|
|
1820
1790
|
transform: `translate3d(0, ${f.value}px, 0)`,
|
|
1821
1791
|
transition: T
|
|
1822
1792
|
}
|
|
1823
1793
|
}, [c("div", {
|
|
1824
|
-
class:
|
|
1794
|
+
class: ft("status"),
|
|
1825
1795
|
style: {
|
|
1826
1796
|
height: `${g}px`,
|
|
1827
|
-
WebkitTransform: `${
|
|
1828
|
-
transform: `${
|
|
1797
|
+
WebkitTransform: `${E} scale(${g / u})`,
|
|
1798
|
+
transform: `${E} scale(${g / u})`,
|
|
1829
1799
|
transition: T
|
|
1830
1800
|
}
|
|
1831
1801
|
}, [C()]), (b = t.default) == null ? void 0 : b.call(t)]);
|
|
1832
1802
|
};
|
|
1833
1803
|
}
|
|
1834
1804
|
});
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
e.component(t, Ye);
|
|
1838
|
-
};
|
|
1839
|
-
const [dl, me, fl] = P("cell"), qe = /* @__PURE__ */ M({
|
|
1840
|
-
name: dl,
|
|
1805
|
+
const ol = M(al), [il, fe, rl] = A("cell"), ul = /* @__PURE__ */ P({
|
|
1806
|
+
name: il,
|
|
1841
1807
|
props: {
|
|
1842
1808
|
tag: {
|
|
1843
1809
|
type: String,
|
|
@@ -1857,12 +1823,12 @@ const [dl, me, fl] = P("cell"), qe = /* @__PURE__ */ M({
|
|
|
1857
1823
|
},
|
|
1858
1824
|
size: {
|
|
1859
1825
|
type: String,
|
|
1860
|
-
default:
|
|
1826
|
+
default: Et.Middle
|
|
1861
1827
|
},
|
|
1862
1828
|
// 垂直对齐方式
|
|
1863
1829
|
vertical: {
|
|
1864
1830
|
type: String,
|
|
1865
|
-
default:
|
|
1831
|
+
default: tt.Middle
|
|
1866
1832
|
},
|
|
1867
1833
|
// 是否有 border
|
|
1868
1834
|
border: {
|
|
@@ -1900,11 +1866,11 @@ const [dl, me, fl] = P("cell"), qe = /* @__PURE__ */ M({
|
|
|
1900
1866
|
clickable: y
|
|
1901
1867
|
} = e, s = o === "a" ? !0 : y;
|
|
1902
1868
|
return c(o, {
|
|
1903
|
-
class: [
|
|
1869
|
+
class: [fe({
|
|
1904
1870
|
[`is-${i}`]: i,
|
|
1905
1871
|
[r]: r,
|
|
1906
1872
|
hairline: n
|
|
1907
|
-
}),
|
|
1873
|
+
}), rl("el", {
|
|
1908
1874
|
clickable: s
|
|
1909
1875
|
})],
|
|
1910
1876
|
onClick: l
|
|
@@ -1912,30 +1878,26 @@ const [dl, me, fl] = P("cell"), qe = /* @__PURE__ */ M({
|
|
|
1912
1878
|
default: () => {
|
|
1913
1879
|
var S, v;
|
|
1914
1880
|
return [(S = t.left) == null ? void 0 : S.call(t), c("div", {
|
|
1915
|
-
class:
|
|
1881
|
+
class: fe("center", {
|
|
1916
1882
|
"has-left": t.left
|
|
1917
1883
|
})
|
|
1918
1884
|
}, [t.center ? t.center() : [c("h4", {
|
|
1919
|
-
class:
|
|
1885
|
+
class: fe("title")
|
|
1920
1886
|
}, [d]), c("p", {
|
|
1921
|
-
class:
|
|
1887
|
+
class: fe("label")
|
|
1922
1888
|
}, [x])]]), t.default ? t.default() : c("div", {
|
|
1923
|
-
class:
|
|
1924
|
-
}, [m]), ((v = t.right) == null ? void 0 : v.call(t)) || f && c(
|
|
1889
|
+
class: fe("value")
|
|
1890
|
+
}, [m]), ((v = t.right) == null ? void 0 : v.call(t)) || f && c(Le, {
|
|
1925
1891
|
name: f,
|
|
1926
|
-
class:
|
|
1892
|
+
class: fe("icon")
|
|
1927
1893
|
}, null)];
|
|
1928
1894
|
}
|
|
1929
1895
|
});
|
|
1930
1896
|
};
|
|
1931
1897
|
}
|
|
1932
1898
|
});
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
e.component(t, qe);
|
|
1936
|
-
};
|
|
1937
|
-
const [ml, Se, vl] = P("button"), ge = /* @__PURE__ */ M({
|
|
1938
|
-
name: ml,
|
|
1899
|
+
const sl = M(ul), [cl, pe, dl] = A("button"), fl = /* @__PURE__ */ P({
|
|
1900
|
+
name: cl,
|
|
1939
1901
|
props: {
|
|
1940
1902
|
// 标签
|
|
1941
1903
|
tag: {
|
|
@@ -2024,14 +1986,14 @@ const [ml, Se, vl] = P("button"), ge = /* @__PURE__ */ M({
|
|
|
2024
1986
|
supplementText: v
|
|
2025
1987
|
} = e, h = t.default ? t.default() : S;
|
|
2026
1988
|
return o = n === "link" ? "a" : o, c(o, {
|
|
2027
|
-
class: [
|
|
1989
|
+
class: [pe([n, r, {
|
|
2028
1990
|
block: x,
|
|
2029
1991
|
square: m,
|
|
2030
1992
|
semicircle: y,
|
|
2031
1993
|
disabled: d && o === "a"
|
|
2032
|
-
}, (n === "primary" || n === "secondary") && f ? `shadow_${f}` : "", s ? `${n}_danger` : "", d ? `${n}_disabled` : ""]),
|
|
1994
|
+
}, (n === "primary" || n === "secondary") && f ? `shadow_${f}` : "", s ? `${n}_danger` : "", d ? `${n}_disabled` : ""]), dl("el", "clickable")],
|
|
2033
1995
|
style: {
|
|
2034
|
-
borderRadius:
|
|
1996
|
+
borderRadius: F(i)
|
|
2035
1997
|
},
|
|
2036
1998
|
disabled: d,
|
|
2037
1999
|
onClick: l
|
|
@@ -2039,46 +2001,42 @@ const [ml, Se, vl] = P("button"), ge = /* @__PURE__ */ M({
|
|
|
2039
2001
|
default: () => {
|
|
2040
2002
|
var p, C;
|
|
2041
2003
|
return [c("div", {
|
|
2042
|
-
class:
|
|
2043
|
-
}, [((p = t.leftIcon) == null ? void 0 : p.call(t)) || null, h && c(
|
|
2044
|
-
class:
|
|
2004
|
+
class: pe("content")
|
|
2005
|
+
}, [((p = t.leftIcon) == null ? void 0 : p.call(t)) || null, h && c(Je, null, [v ? c("div", {
|
|
2006
|
+
class: pe("text")
|
|
2045
2007
|
}, [c("p", null, [h]), c("p", {
|
|
2046
|
-
class:
|
|
2008
|
+
class: pe("subtext")
|
|
2047
2009
|
}, [v])]) : c("span", {
|
|
2048
|
-
class:
|
|
2010
|
+
class: pe("text")
|
|
2049
2011
|
}, [h])]), ((C = t.rightIcon) == null ? void 0 : C.call(t)) || null])];
|
|
2050
2012
|
}
|
|
2051
2013
|
});
|
|
2052
2014
|
};
|
|
2053
2015
|
}
|
|
2054
2016
|
});
|
|
2055
|
-
|
|
2056
|
-
const { name: t } = ge;
|
|
2057
|
-
e.component(t, ge);
|
|
2058
|
-
};
|
|
2059
|
-
const gl = {
|
|
2017
|
+
const Xe = M(fl), ml = {
|
|
2060
2018
|
position: "fixed"
|
|
2061
2019
|
};
|
|
2062
|
-
let
|
|
2063
|
-
const
|
|
2064
|
-
const l =
|
|
2065
|
-
render: () =>
|
|
2020
|
+
let ye = null;
|
|
2021
|
+
const zt = (e, t) => {
|
|
2022
|
+
const l = Te({
|
|
2023
|
+
render: () => xe(lt, { ...e }, { ...t })
|
|
2066
2024
|
}), o = document.createElement("div");
|
|
2067
2025
|
return l.mount(o);
|
|
2068
|
-
},
|
|
2026
|
+
}, vl = {
|
|
2069
2027
|
/**
|
|
2070
2028
|
* @description: show
|
|
2071
2029
|
* @param {LoadingPropsType} options
|
|
2072
2030
|
* @return {*}
|
|
2073
2031
|
*/
|
|
2074
2032
|
show: (e, t) => {
|
|
2075
|
-
|
|
2033
|
+
ye || (ye = zt(
|
|
2076
2034
|
{
|
|
2077
|
-
...
|
|
2035
|
+
...ml,
|
|
2078
2036
|
...e
|
|
2079
2037
|
},
|
|
2080
2038
|
t
|
|
2081
|
-
)), document.body.appendChild(
|
|
2039
|
+
)), document.body.appendChild(ye.$el);
|
|
2082
2040
|
},
|
|
2083
2041
|
/**
|
|
2084
2042
|
* @description: hide
|
|
@@ -2086,21 +2044,21 @@ const tn = (e, t) => {
|
|
|
2086
2044
|
* @return {*}
|
|
2087
2045
|
*/
|
|
2088
2046
|
hide: () => {
|
|
2089
|
-
|
|
2047
|
+
ye && ye.$el.remove();
|
|
2090
2048
|
}
|
|
2091
|
-
},
|
|
2049
|
+
}, vt = (e, t) => {
|
|
2092
2050
|
t.value ? (e.classList.add("y-loading__wrap"), e.appendChild(e.instance.$el)) : (e.classList.remove("y-loading__wrap"), e.removeChild(e.instance.$el));
|
|
2093
|
-
},
|
|
2051
|
+
}, gl = {
|
|
2094
2052
|
install: (e) => {
|
|
2095
|
-
e.directive("loading",
|
|
2053
|
+
e.directive("loading", Pt), e.directive("loading-props", hl), e.directive("loading-slots", pl);
|
|
2096
2054
|
}
|
|
2097
|
-
},
|
|
2055
|
+
}, Pt = {
|
|
2098
2056
|
getSSRProps: (e) => ({ ...e }),
|
|
2099
2057
|
mounted: (e, t) => {
|
|
2100
|
-
e.instance =
|
|
2058
|
+
e.instance = zt({ ...e.customProps }, { ...e.customSlots }), t.value && vt(e, t);
|
|
2101
2059
|
},
|
|
2102
2060
|
updated: (e, t) => {
|
|
2103
|
-
t.oldValue !== t.value &&
|
|
2061
|
+
t.oldValue !== t.value && vt(e, t);
|
|
2104
2062
|
},
|
|
2105
2063
|
unmounted: (e) => {
|
|
2106
2064
|
e.instance && e.instance.$el.remove();
|
|
@@ -2116,12 +2074,10 @@ const tn = (e, t) => {
|
|
|
2116
2074
|
e.customSlots = { ...t.value };
|
|
2117
2075
|
}
|
|
2118
2076
|
};
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
const [rn, yl] = P("row"), un = rn, Ge = /* @__PURE__ */ M({
|
|
2124
|
-
name: rn,
|
|
2077
|
+
const yl = M(lt);
|
|
2078
|
+
var At = /* @__PURE__ */ ((e) => (e.Start = "start", e.Center = "center", e.End = "end", e.SpaceBetween = "space-between", e.SpaceAround = "space-around", e))(At || {});
|
|
2079
|
+
const [Mt, bl] = A("row"), Dt = Mt, Sl = /* @__PURE__ */ P({
|
|
2080
|
+
name: Mt,
|
|
2125
2081
|
props: {
|
|
2126
2082
|
type: {
|
|
2127
2083
|
type: String,
|
|
@@ -2134,11 +2090,11 @@ const [rn, yl] = P("row"), un = rn, Ge = /* @__PURE__ */ M({
|
|
|
2134
2090
|
},
|
|
2135
2091
|
align: {
|
|
2136
2092
|
type: String,
|
|
2137
|
-
default:
|
|
2093
|
+
default: tt.Top
|
|
2138
2094
|
},
|
|
2139
2095
|
justify: {
|
|
2140
2096
|
type: String,
|
|
2141
|
-
default:
|
|
2097
|
+
default: At.Start
|
|
2142
2098
|
}
|
|
2143
2099
|
},
|
|
2144
2100
|
setup(e, {
|
|
@@ -2147,14 +2103,14 @@ const [rn, yl] = P("row"), un = rn, Ge = /* @__PURE__ */ M({
|
|
|
2147
2103
|
const {
|
|
2148
2104
|
childrens: a,
|
|
2149
2105
|
initProvide: l
|
|
2150
|
-
} =
|
|
2106
|
+
} = Ee(Dt), o = _(() => {
|
|
2151
2107
|
const n = [[]];
|
|
2152
2108
|
let r = 0;
|
|
2153
2109
|
return a.forEach((d, f) => {
|
|
2154
2110
|
var x;
|
|
2155
2111
|
r += Number((x = d.proxy) == null ? void 0 : x.span), r > 24 ? (n.push([f]), r -= 24) : n[n.length - 1].push(f);
|
|
2156
2112
|
}), n;
|
|
2157
|
-
}), i =
|
|
2113
|
+
}), i = _(() => {
|
|
2158
2114
|
const n = Number(e.gutter), r = [];
|
|
2159
2115
|
return n && o.value.forEach((d) => {
|
|
2160
2116
|
const f = n * (d.length - 1) / d.length;
|
|
@@ -2184,7 +2140,7 @@ const [rn, yl] = P("row"), un = rn, Ge = /* @__PURE__ */ M({
|
|
|
2184
2140
|
justify: d
|
|
2185
2141
|
} = e;
|
|
2186
2142
|
return c("div", {
|
|
2187
|
-
class:
|
|
2143
|
+
class: bl({
|
|
2188
2144
|
[n]: n,
|
|
2189
2145
|
[`align-${r}`]: n && r,
|
|
2190
2146
|
[`justify-${d}`]: n && d
|
|
@@ -2193,12 +2149,8 @@ const [rn, yl] = P("row"), un = rn, Ge = /* @__PURE__ */ M({
|
|
|
2193
2149
|
};
|
|
2194
2150
|
}
|
|
2195
2151
|
});
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
e.component(t, Ge);
|
|
2199
|
-
};
|
|
2200
|
-
const [bl, Sl] = P("col"), Ke = /* @__PURE__ */ M({
|
|
2201
|
-
name: bl,
|
|
2152
|
+
const xl = M(Sl), [wl, $l] = A("col"), Cl = /* @__PURE__ */ P({
|
|
2153
|
+
name: wl,
|
|
2202
2154
|
props: {
|
|
2203
2155
|
// 列数
|
|
2204
2156
|
span: {
|
|
@@ -2217,7 +2169,7 @@ const [bl, Sl] = P("col"), Ke = /* @__PURE__ */ M({
|
|
|
2217
2169
|
const {
|
|
2218
2170
|
parent: a,
|
|
2219
2171
|
index: l
|
|
2220
|
-
} =
|
|
2172
|
+
} = ve(Dt), o = _(() => {
|
|
2221
2173
|
if (!a)
|
|
2222
2174
|
return {};
|
|
2223
2175
|
const {
|
|
@@ -2242,7 +2194,7 @@ const [bl, Sl] = P("col"), Ke = /* @__PURE__ */ M({
|
|
|
2242
2194
|
} = e;
|
|
2243
2195
|
return c("div", {
|
|
2244
2196
|
style: o.value,
|
|
2245
|
-
class:
|
|
2197
|
+
class: $l({
|
|
2246
2198
|
[i]: i,
|
|
2247
2199
|
[`offset-${n}`]: n
|
|
2248
2200
|
})
|
|
@@ -2250,19 +2202,15 @@ const [bl, Sl] = P("col"), Ke = /* @__PURE__ */ M({
|
|
|
2250
2202
|
};
|
|
2251
2203
|
}
|
|
2252
2204
|
});
|
|
2253
|
-
|
|
2254
|
-
const { name: t } = Ke;
|
|
2255
|
-
e.component(t, Ke);
|
|
2256
|
-
};
|
|
2257
|
-
const Dt = F({}), sn = {
|
|
2205
|
+
const Tl = M(Cl), gt = H({}), Ot = {
|
|
2258
2206
|
add(e, t) {
|
|
2259
|
-
Object.assign(
|
|
2207
|
+
Object.assign(gt, { [e]: t });
|
|
2260
2208
|
},
|
|
2261
2209
|
use(e) {
|
|
2262
|
-
return
|
|
2210
|
+
return gt[e];
|
|
2263
2211
|
}
|
|
2264
|
-
}, [
|
|
2265
|
-
name:
|
|
2212
|
+
}, [kl, be] = A("empty"), El = "https://imgservices-1252317822.image.myqcloud.com/image/20200820/q4wu13xxky.png", Nl = /* @__PURE__ */ P({
|
|
2213
|
+
name: kl,
|
|
2266
2214
|
props: {
|
|
2267
2215
|
type: {
|
|
2268
2216
|
type: String,
|
|
@@ -2287,31 +2235,27 @@ const Dt = F({}), sn = {
|
|
|
2287
2235
|
return () => {
|
|
2288
2236
|
const {
|
|
2289
2237
|
type: a
|
|
2290
|
-
} = e, l =
|
|
2238
|
+
} = e, l = Ot.use(a), o = e.imgUrl || (l == null ? void 0 : l.imgUrl) || El, i = e.title || (l == null ? void 0 : l.title), n = e.subTitle || (l == null ? void 0 : l.subTitle), r = t.default || (l == null ? void 0 : l.slot), d = t.img || (l == null ? void 0 : l.imgSlot), f = t.titleIcon || (l == null ? void 0 : l.titleIconSlot);
|
|
2291
2239
|
return c("div", {
|
|
2292
|
-
class:
|
|
2240
|
+
class: be()
|
|
2293
2241
|
}, [d ? d() : o && c("img", {
|
|
2294
|
-
class:
|
|
2242
|
+
class: be("img"),
|
|
2295
2243
|
src: o,
|
|
2296
2244
|
alt: "状态"
|
|
2297
2245
|
}, null), c("h6", {
|
|
2298
|
-
class:
|
|
2246
|
+
class: be("title")
|
|
2299
2247
|
}, [c("span", {
|
|
2300
|
-
class:
|
|
2248
|
+
class: be("title-text", {
|
|
2301
2249
|
"has-icon": f
|
|
2302
2250
|
})
|
|
2303
2251
|
}, [i]), f == null ? void 0 : f()]), c("p", {
|
|
2304
|
-
class:
|
|
2252
|
+
class: be("sub-title")
|
|
2305
2253
|
}, [n]), r == null ? void 0 : r()]);
|
|
2306
2254
|
};
|
|
2307
2255
|
}
|
|
2308
2256
|
});
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
e.component(t, Ze);
|
|
2312
|
-
};
|
|
2313
|
-
const [wl, de] = P("progress"), Qe = /* @__PURE__ */ M({
|
|
2314
|
-
name: wl,
|
|
2257
|
+
const Ll = M(Nl), [Bl, ce] = A("progress"), Il = /* @__PURE__ */ P({
|
|
2258
|
+
name: Bl,
|
|
2315
2259
|
props: {
|
|
2316
2260
|
// 进度
|
|
2317
2261
|
percent: {
|
|
@@ -2387,22 +2331,22 @@ const [wl, de] = P("progress"), Qe = /* @__PURE__ */ M({
|
|
|
2387
2331
|
setup(e, {
|
|
2388
2332
|
slots: t
|
|
2389
2333
|
}) {
|
|
2390
|
-
const a = L(null), l = L(null), o = L([]), i =
|
|
2334
|
+
const a = L(null), l = L(null), o = L([]), i = H({
|
|
2391
2335
|
progressWidth: 0,
|
|
2392
2336
|
pivotContentWidth: 0,
|
|
2393
2337
|
mileageWidth: []
|
|
2394
|
-
}), n =
|
|
2338
|
+
}), n = H({
|
|
2395
2339
|
number: 0,
|
|
2396
2340
|
oldPercent: 0,
|
|
2397
2341
|
timer: 0
|
|
2398
2342
|
});
|
|
2399
|
-
|
|
2343
|
+
J(() => {
|
|
2400
2344
|
d(), e.animation && r(), window.addEventListener("resize", d);
|
|
2401
|
-
}),
|
|
2345
|
+
}), Qe(() => {
|
|
2402
2346
|
o.value = [];
|
|
2403
|
-
}),
|
|
2347
|
+
}), me(() => {
|
|
2404
2348
|
n.timer && cancelAnimationFrame(n.timer), window.removeEventListener("resize", d);
|
|
2405
|
-
}),
|
|
2349
|
+
}), X(() => e.percent, () => {
|
|
2406
2350
|
r(), f();
|
|
2407
2351
|
});
|
|
2408
2352
|
const r = () => {
|
|
@@ -2418,17 +2362,17 @@ const [wl, de] = P("progress"), Qe = /* @__PURE__ */ M({
|
|
|
2418
2362
|
};
|
|
2419
2363
|
n.timer && cancelAnimationFrame(n.timer), n.timer = requestAnimationFrame(p);
|
|
2420
2364
|
};
|
|
2421
|
-
|
|
2365
|
+
X(() => e.mileages, () => x);
|
|
2422
2366
|
const d = () => {
|
|
2423
2367
|
f(), x();
|
|
2424
2368
|
}, f = () => {
|
|
2425
|
-
|
|
2369
|
+
se(() => {
|
|
2426
2370
|
i.progressWidth = a.value && a.value.offsetWidth || 0, i.pivotContentWidth = l.value && l.value.offsetWidth || 0;
|
|
2427
2371
|
}).catch((s) => {
|
|
2428
2372
|
throw new Error(s);
|
|
2429
2373
|
});
|
|
2430
2374
|
}, x = () => {
|
|
2431
|
-
|
|
2375
|
+
se(() => {
|
|
2432
2376
|
e.mileages.forEach((s, S) => {
|
|
2433
2377
|
i.mileageWidth[S] = o.value[S] && o.value[S].offsetWidth || 0;
|
|
2434
2378
|
});
|
|
@@ -2447,13 +2391,13 @@ const [wl, de] = P("progress"), Qe = /* @__PURE__ */ M({
|
|
|
2447
2391
|
ref: (u) => {
|
|
2448
2392
|
u && (o.value[C] = u);
|
|
2449
2393
|
},
|
|
2450
|
-
class: [
|
|
2394
|
+
class: [ce("pivot-content", (v ? n.number : S) >= s[C] ? "arrive" : "no-arrive")],
|
|
2451
2395
|
key: `mileage${C}`,
|
|
2452
2396
|
style: {
|
|
2453
2397
|
left: `${(i.progressWidth - i.mileageWidth[C]) * s[C] / 100}px`
|
|
2454
2398
|
}
|
|
2455
2399
|
}, [((p = t.mileage) == null ? void 0 : p.call(t)) || c("div", {
|
|
2456
|
-
class:
|
|
2400
|
+
class: ce("pivot")
|
|
2457
2401
|
}, [`${s[C]}%`])]);
|
|
2458
2402
|
return h;
|
|
2459
2403
|
}, y = () => {
|
|
@@ -2465,13 +2409,13 @@ const [wl, de] = P("progress"), Qe = /* @__PURE__ */ M({
|
|
|
2465
2409
|
animation: h,
|
|
2466
2410
|
unit: p
|
|
2467
2411
|
} = e;
|
|
2468
|
-
return c(
|
|
2469
|
-
class:
|
|
2412
|
+
return c(Je, null, [((C = t.pivot) == null ? void 0 : C.call(t)) || s && c("div", {
|
|
2413
|
+
class: ce("pivot"),
|
|
2470
2414
|
style: {
|
|
2471
2415
|
color: S
|
|
2472
2416
|
}
|
|
2473
2417
|
}, [h ? c("div", {
|
|
2474
|
-
class:
|
|
2418
|
+
class: ce("number")
|
|
2475
2419
|
}, [c("span", null, [n.number, p])]) : `${v}${p}`])]);
|
|
2476
2420
|
};
|
|
2477
2421
|
return () => {
|
|
@@ -2485,19 +2429,19 @@ const [wl, de] = P("progress"), Qe = /* @__PURE__ */ M({
|
|
|
2485
2429
|
duration: u,
|
|
2486
2430
|
timing: g,
|
|
2487
2431
|
defaultPivot: T,
|
|
2488
|
-
pivotColor:
|
|
2432
|
+
pivotColor: E,
|
|
2489
2433
|
modeMilestone: b
|
|
2490
2434
|
} = e;
|
|
2491
2435
|
return c("div", {
|
|
2492
|
-
class:
|
|
2436
|
+
class: ce(),
|
|
2493
2437
|
ref: a,
|
|
2494
2438
|
style: {
|
|
2495
|
-
height:
|
|
2439
|
+
height: F(s),
|
|
2496
2440
|
background: S,
|
|
2497
|
-
borderRadius:
|
|
2441
|
+
borderRadius: F(v)
|
|
2498
2442
|
}
|
|
2499
2443
|
}, [c("span", {
|
|
2500
|
-
class:
|
|
2444
|
+
class: ce("portion", {
|
|
2501
2445
|
animation: C
|
|
2502
2446
|
}),
|
|
2503
2447
|
style: {
|
|
@@ -2508,12 +2452,12 @@ const [wl, de] = P("progress"), Qe = /* @__PURE__ */ M({
|
|
|
2508
2452
|
}
|
|
2509
2453
|
}, [c("div", {
|
|
2510
2454
|
ref: l,
|
|
2511
|
-
class:
|
|
2455
|
+
class: ce("pivot-content", {
|
|
2512
2456
|
animation: C
|
|
2513
2457
|
}),
|
|
2514
2458
|
style: {
|
|
2515
2459
|
left: `${(i.progressWidth - i.pivotContentWidth) * h / 100}px`,
|
|
2516
|
-
background: T ?
|
|
2460
|
+
background: T ? E || p : "none",
|
|
2517
2461
|
transitionDuration: `${u}ms`,
|
|
2518
2462
|
transitionTimingFunction: g
|
|
2519
2463
|
}
|
|
@@ -2521,11 +2465,7 @@ const [wl, de] = P("progress"), Qe = /* @__PURE__ */ M({
|
|
|
2521
2465
|
};
|
|
2522
2466
|
}
|
|
2523
2467
|
});
|
|
2524
|
-
|
|
2525
|
-
const { name: t } = Qe;
|
|
2526
|
-
e.component(t, Qe);
|
|
2527
|
-
};
|
|
2528
|
-
const [Cl, Pe, Tl] = P("toast"), kl = {
|
|
2468
|
+
const Vl = M(Il), [_l, Ie, zl] = A("toast"), Pl = {
|
|
2529
2469
|
// 主文案
|
|
2530
2470
|
title: {
|
|
2531
2471
|
type: String,
|
|
@@ -2556,13 +2496,13 @@ const [Cl, Pe, Tl] = P("toast"), kl = {
|
|
|
2556
2496
|
type: [Number, String],
|
|
2557
2497
|
default: 300
|
|
2558
2498
|
}
|
|
2559
|
-
},
|
|
2560
|
-
name:
|
|
2561
|
-
props:
|
|
2499
|
+
}, Rt = /* @__PURE__ */ P({
|
|
2500
|
+
name: _l,
|
|
2501
|
+
props: Pl,
|
|
2562
2502
|
setup(e, {
|
|
2563
2503
|
slots: t
|
|
2564
2504
|
}) {
|
|
2565
|
-
const a =
|
|
2505
|
+
const a = H({
|
|
2566
2506
|
visible: !1
|
|
2567
2507
|
// 控制v-show
|
|
2568
2508
|
}), l = () => {
|
|
@@ -2570,7 +2510,7 @@ const [Cl, Pe, Tl] = P("toast"), kl = {
|
|
|
2570
2510
|
a.visible = !1, clearTimeout(o);
|
|
2571
2511
|
}, Number(e.duration));
|
|
2572
2512
|
};
|
|
2573
|
-
return
|
|
2513
|
+
return J(() => {
|
|
2574
2514
|
a.visible = !0, l();
|
|
2575
2515
|
}), () => {
|
|
2576
2516
|
const {
|
|
@@ -2580,52 +2520,50 @@ const [Cl, Pe, Tl] = P("toast"), kl = {
|
|
|
2580
2520
|
animationDuration: r,
|
|
2581
2521
|
onClose: d
|
|
2582
2522
|
} = e;
|
|
2583
|
-
return c(
|
|
2584
|
-
name:
|
|
2523
|
+
return c(et, {
|
|
2524
|
+
name: zl("animation", "fade"),
|
|
2585
2525
|
onAfterLeave: d
|
|
2586
2526
|
}, {
|
|
2587
2527
|
default: () => {
|
|
2588
2528
|
var f;
|
|
2589
|
-
return [
|
|
2590
|
-
class:
|
|
2529
|
+
return [ie(c("div", {
|
|
2530
|
+
class: Ie({
|
|
2591
2531
|
[n]: !0
|
|
2592
2532
|
}),
|
|
2593
2533
|
style: {
|
|
2594
2534
|
animationDuration: typeof r == "number" ? `${r}ms` : r
|
|
2595
2535
|
}
|
|
2596
2536
|
}, [c("div", {
|
|
2597
|
-
class:
|
|
2537
|
+
class: Ie("content")
|
|
2598
2538
|
}, [((f = t.icon) == null ? void 0 : f.call(t)) || null, c("div", {
|
|
2599
|
-
class:
|
|
2539
|
+
class: Ie("text")
|
|
2600
2540
|
}, [o]), i && c("div", {
|
|
2601
|
-
class:
|
|
2602
|
-
}, [i])])]), [[
|
|
2541
|
+
class: Ie("message")
|
|
2542
|
+
}, [i])])]), [[Ae, a.visible]])];
|
|
2603
2543
|
}
|
|
2604
2544
|
});
|
|
2605
2545
|
};
|
|
2606
2546
|
}
|
|
2607
2547
|
});
|
|
2608
|
-
let
|
|
2609
|
-
const
|
|
2610
|
-
const a = `toast${
|
|
2611
|
-
|
|
2612
|
-
render: () =>
|
|
2613
|
-
|
|
2614
|
-
{ ...e, onClose: () =>
|
|
2615
|
-
{ icon: () =>
|
|
2548
|
+
let Fe = Te({}), Al = 0;
|
|
2549
|
+
const Ft = [], Ml = (e, t) => {
|
|
2550
|
+
const a = `toast${Al += 1}`;
|
|
2551
|
+
Fe = Te({
|
|
2552
|
+
render: () => xe(
|
|
2553
|
+
Rt,
|
|
2554
|
+
{ ...e, onClose: () => Dl(a, e.onClose) },
|
|
2555
|
+
{ icon: () => xe(Le, { ...t }) }
|
|
2616
2556
|
)
|
|
2617
2557
|
});
|
|
2618
2558
|
const o = document.createElement("div");
|
|
2619
|
-
|
|
2620
|
-
},
|
|
2621
|
-
|
|
2559
|
+
Ft.push({ id: a, app: Fe, el: o }), Fe.mount(o), document.body.appendChild(o);
|
|
2560
|
+
}, Dl = (e, t) => {
|
|
2561
|
+
Ft.forEach((a) => {
|
|
2622
2562
|
e === a.id && (a.app.unmount(), document.body.removeChild(a.el), t == null || t());
|
|
2623
2563
|
});
|
|
2624
2564
|
};
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
};
|
|
2628
|
-
const [Ll, Bl, Vl] = P("mask"), Il = {
|
|
2565
|
+
M(Rt);
|
|
2566
|
+
const [Ol, Rl, Fl] = A("mask"), Hl = {
|
|
2629
2567
|
// 控制显示
|
|
2630
2568
|
modelValue: {
|
|
2631
2569
|
type: Boolean,
|
|
@@ -2660,33 +2598,33 @@ const [Ll, Bl, Vl] = P("mask"), Il = {
|
|
|
2660
2598
|
type: Function,
|
|
2661
2599
|
default: null
|
|
2662
2600
|
}
|
|
2663
|
-
},
|
|
2664
|
-
let
|
|
2665
|
-
const
|
|
2666
|
-
name:
|
|
2667
|
-
props:
|
|
2601
|
+
}, Q = H([]);
|
|
2602
|
+
let ht = 0;
|
|
2603
|
+
const Wl = /* @__PURE__ */ P({
|
|
2604
|
+
name: Ol,
|
|
2605
|
+
props: Hl,
|
|
2668
2606
|
emits: ["update:modelValue"],
|
|
2669
2607
|
setup(e, {
|
|
2670
2608
|
slots: t
|
|
2671
2609
|
}) {
|
|
2672
2610
|
const a = L("");
|
|
2673
|
-
|
|
2674
|
-
a.value = `mask${
|
|
2675
|
-
}),
|
|
2676
|
-
const n =
|
|
2677
|
-
n >= 0 &&
|
|
2678
|
-
}),
|
|
2611
|
+
J(() => {
|
|
2612
|
+
a.value = `mask${ht}`, ht += 1, l(e.modelValue, !0);
|
|
2613
|
+
}), me(() => {
|
|
2614
|
+
const n = Q.findIndex((r) => r._id === a.value);
|
|
2615
|
+
n >= 0 && Q.splice(n, 1);
|
|
2616
|
+
}), X(() => e.modelValue, (n) => {
|
|
2679
2617
|
l(n);
|
|
2680
2618
|
});
|
|
2681
2619
|
const l = (n, r) => {
|
|
2682
|
-
n ? (
|
|
2620
|
+
n ? (Q.unshift({
|
|
2683
2621
|
_id: a.value,
|
|
2684
2622
|
_state: n
|
|
2685
|
-
}),
|
|
2623
|
+
}), Q.length > 1 && (Q[1]._state = !1)) : r || (Q.splice(0, 1), Q.length > 0 && (Q[0]._state = !0));
|
|
2686
2624
|
}, o = () => {
|
|
2687
2625
|
let n = !1;
|
|
2688
|
-
for (let r = 0; r <
|
|
2689
|
-
|
|
2626
|
+
for (let r = 0; r < Q.length; r++)
|
|
2627
|
+
Q[r]._id === a.value && (n = Q[r]._state);
|
|
2690
2628
|
return {
|
|
2691
2629
|
_state: n
|
|
2692
2630
|
};
|
|
@@ -2706,31 +2644,27 @@ const Ce = /* @__PURE__ */ M({
|
|
|
2706
2644
|
} = e, {
|
|
2707
2645
|
_state: m
|
|
2708
2646
|
} = o();
|
|
2709
|
-
return c(
|
|
2710
|
-
name:
|
|
2647
|
+
return c(et, {
|
|
2648
|
+
name: Fl("animation", "fade"),
|
|
2711
2649
|
onAfterLeave: x
|
|
2712
2650
|
}, {
|
|
2713
2651
|
default: () => {
|
|
2714
2652
|
var y;
|
|
2715
|
-
return [
|
|
2653
|
+
return [ie(c("div", {
|
|
2716
2654
|
style: {
|
|
2717
2655
|
animationDuration: `${r}ms`,
|
|
2718
2656
|
zIndex: d,
|
|
2719
2657
|
...f
|
|
2720
2658
|
},
|
|
2721
|
-
class: [
|
|
2659
|
+
class: [Rl(), n],
|
|
2722
2660
|
onTouchmove: i
|
|
2723
|
-
}, [(y = t.default) == null ? void 0 : y.call(t)]), [[
|
|
2661
|
+
}, [(y = t.default) == null ? void 0 : y.call(t)]), [[Ae, m]])];
|
|
2724
2662
|
}
|
|
2725
2663
|
});
|
|
2726
2664
|
};
|
|
2727
2665
|
}
|
|
2728
2666
|
});
|
|
2729
|
-
|
|
2730
|
-
const { name: t } = Ce;
|
|
2731
|
-
e.component(t, Ce);
|
|
2732
|
-
};
|
|
2733
|
-
const [zl, Rt, Al] = P("popup"), Ml = {
|
|
2667
|
+
const Ht = M(Wl), [Ul, pt, jl] = A("popup"), Xl = {
|
|
2734
2668
|
// 控制显示
|
|
2735
2669
|
modelValue: {
|
|
2736
2670
|
type: Boolean,
|
|
@@ -2783,21 +2717,21 @@ const [zl, Rt, Al] = P("popup"), Ml = {
|
|
|
2783
2717
|
type: Number,
|
|
2784
2718
|
default: 101
|
|
2785
2719
|
}
|
|
2786
|
-
},
|
|
2787
|
-
name:
|
|
2788
|
-
props:
|
|
2720
|
+
}, Yl = /* @__PURE__ */ P({
|
|
2721
|
+
name: Ul,
|
|
2722
|
+
props: Xl,
|
|
2789
2723
|
emits: ["clickMask", "update:modelValue"],
|
|
2790
2724
|
setup(e, {
|
|
2791
2725
|
slots: t,
|
|
2792
2726
|
emit: a
|
|
2793
2727
|
}) {
|
|
2794
|
-
const l =
|
|
2728
|
+
const l = _(() => {
|
|
2795
2729
|
const {
|
|
2796
2730
|
position: n,
|
|
2797
2731
|
borderRadius: r,
|
|
2798
2732
|
customStyle: d,
|
|
2799
2733
|
duration: f
|
|
2800
|
-
} = e, x =
|
|
2734
|
+
} = e, x = F(r);
|
|
2801
2735
|
let m = "0";
|
|
2802
2736
|
switch (n) {
|
|
2803
2737
|
case "top":
|
|
@@ -2822,7 +2756,7 @@ const [zl, Rt, Al] = P("popup"), Ml = {
|
|
|
2822
2756
|
};
|
|
2823
2757
|
}), o = (n) => {
|
|
2824
2758
|
a("clickMask", n), e.isCloseOnClickMask && (i.value = !1);
|
|
2825
|
-
}, i =
|
|
2759
|
+
}, i = _({
|
|
2826
2760
|
get: () => e.modelValue,
|
|
2827
2761
|
set: (n) => a("update:modelValue", n)
|
|
2828
2762
|
});
|
|
@@ -2836,44 +2770,40 @@ const [zl, Rt, Al] = P("popup"), Ml = {
|
|
|
2836
2770
|
lockScroll: m,
|
|
2837
2771
|
zIndex: y
|
|
2838
2772
|
} = e;
|
|
2839
|
-
return c(
|
|
2773
|
+
return c(wt, {
|
|
2840
2774
|
to: n
|
|
2841
2775
|
}, {
|
|
2842
2776
|
default: () => [c("div", {
|
|
2843
|
-
class:
|
|
2777
|
+
class: pt(),
|
|
2844
2778
|
style: {
|
|
2845
2779
|
zIndex: y
|
|
2846
2780
|
}
|
|
2847
|
-
}, [c(
|
|
2781
|
+
}, [c(Ht, {
|
|
2848
2782
|
modelValue: i.value,
|
|
2849
2783
|
"onUpdate:modelValue": (s) => i.value = s,
|
|
2850
2784
|
duration: f,
|
|
2851
2785
|
lockScroll: m,
|
|
2852
2786
|
onClick: o,
|
|
2853
2787
|
onAfterLeave: x
|
|
2854
|
-
}, null), c(
|
|
2855
|
-
name:
|
|
2788
|
+
}, null), c(et, {
|
|
2789
|
+
name: jl("animation", `slide-${r}`)
|
|
2856
2790
|
}, {
|
|
2857
2791
|
default: () => {
|
|
2858
2792
|
var s;
|
|
2859
|
-
return [
|
|
2793
|
+
return [ie(c("div", {
|
|
2860
2794
|
style: l.value,
|
|
2861
|
-
class: [
|
|
2795
|
+
class: [pt("content", {
|
|
2862
2796
|
[r]: r
|
|
2863
2797
|
}), d]
|
|
2864
|
-
}, [((s = t.default) == null ? void 0 : s.call(t)) || null]), [[
|
|
2798
|
+
}, [((s = t.default) == null ? void 0 : s.call(t)) || null]), [[Ae, i.value]])];
|
|
2865
2799
|
}
|
|
2866
2800
|
})])]
|
|
2867
2801
|
});
|
|
2868
2802
|
};
|
|
2869
2803
|
}
|
|
2870
2804
|
});
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
e.component(t, Te);
|
|
2874
|
-
};
|
|
2875
|
-
const [Pl, De, _t] = P("stepper"), Je = /* @__PURE__ */ M({
|
|
2876
|
-
name: Pl,
|
|
2805
|
+
const Wt = M(Yl), [ql, Ve, yt] = A("stepper"), Gl = /* @__PURE__ */ P({
|
|
2806
|
+
name: ql,
|
|
2877
2807
|
props: {
|
|
2878
2808
|
modelValue: {
|
|
2879
2809
|
type: [Number, String],
|
|
@@ -2923,14 +2853,14 @@ const [Pl, De, _t] = P("stepper"), Je = /* @__PURE__ */ M({
|
|
|
2923
2853
|
}) {
|
|
2924
2854
|
const {
|
|
2925
2855
|
parent: l
|
|
2926
|
-
} =
|
|
2856
|
+
} = Ne(), o = L(e.modelValue), i = _(() => e.size || (l == null ? void 0 : l.getProp("size"))), n = _(() => e.modelValue <= e.min || e.disabled), r = _(() => e.modelValue >= e.max || e.disabled), d = (v) => {
|
|
2927
2857
|
let h = e.integer;
|
|
2928
2858
|
return v.toString().replace(/([^0-9\.\-])/g, "").replace(/\./g, (p) => h ? "" : (h = !0, p)).replace(/\-/g, (p, C) => C === 0 ? "-" : "");
|
|
2929
2859
|
}, f = (v) => {
|
|
2930
2860
|
const h = d(v);
|
|
2931
2861
|
o.value = h, a("update:modelValue", h), a("change", h);
|
|
2932
2862
|
};
|
|
2933
|
-
|
|
2863
|
+
X(() => e.modelValue, (v) => {
|
|
2934
2864
|
o.value = v;
|
|
2935
2865
|
});
|
|
2936
2866
|
const x = (v) => a("focus", v), m = (v) => {
|
|
@@ -2966,23 +2896,23 @@ const [Pl, De, _t] = P("stepper"), Je = /* @__PURE__ */ M({
|
|
|
2966
2896
|
disableInput: g
|
|
2967
2897
|
} = e;
|
|
2968
2898
|
return c("div", {
|
|
2969
|
-
class:
|
|
2899
|
+
class: Ve({
|
|
2970
2900
|
[i.value]: i.value
|
|
2971
2901
|
})
|
|
2972
2902
|
}, [t.subtraction ? t.subtraction() : c("button", {
|
|
2973
2903
|
type: "button",
|
|
2974
2904
|
disabled: n.value,
|
|
2975
|
-
class: [
|
|
2905
|
+
class: [Ve("subtraction"), yt("el", {
|
|
2976
2906
|
clickable: !n.value
|
|
2977
2907
|
})],
|
|
2978
2908
|
onClick: s
|
|
2979
|
-
}, null),
|
|
2909
|
+
}, null), ie(c("input", {
|
|
2980
2910
|
type: "text",
|
|
2981
|
-
class:
|
|
2911
|
+
class: Ve("input", {
|
|
2982
2912
|
"only-disable": g
|
|
2983
2913
|
}),
|
|
2984
2914
|
style: {
|
|
2985
|
-
width:
|
|
2915
|
+
width: F(p)
|
|
2986
2916
|
},
|
|
2987
2917
|
"onUpdate:modelValue": (T) => o.value = T,
|
|
2988
2918
|
role: "spinbutton",
|
|
@@ -2995,10 +2925,10 @@ const [Pl, De, _t] = P("stepper"), Je = /* @__PURE__ */ M({
|
|
|
2995
2925
|
onFocus: x,
|
|
2996
2926
|
placeholder: C,
|
|
2997
2927
|
disabled: u || g
|
|
2998
|
-
}, null), [[
|
|
2928
|
+
}, null), [[$t, o.value]]), t.addition ? t.addition() : c("button", {
|
|
2999
2929
|
type: "button",
|
|
3000
2930
|
disabled: r.value,
|
|
3001
|
-
class: [
|
|
2931
|
+
class: [Ve("addition"), yt("el", {
|
|
3002
2932
|
clickable: !r.value
|
|
3003
2933
|
})],
|
|
3004
2934
|
onClick: S
|
|
@@ -3006,11 +2936,7 @@ const [Pl, De, _t] = P("stepper"), Je = /* @__PURE__ */ M({
|
|
|
3006
2936
|
};
|
|
3007
2937
|
}
|
|
3008
2938
|
});
|
|
3009
|
-
|
|
3010
|
-
const { name: t } = Je;
|
|
3011
|
-
e.component(t, Je);
|
|
3012
|
-
};
|
|
3013
|
-
const mn = {
|
|
2939
|
+
const Kl = M(Gl), Ut = {
|
|
3014
2940
|
size: {
|
|
3015
2941
|
type: String,
|
|
3016
2942
|
default: null
|
|
@@ -3048,10 +2974,10 @@ const mn = {
|
|
|
3048
2974
|
type: [Object, Array],
|
|
3049
2975
|
default: null
|
|
3050
2976
|
}
|
|
3051
|
-
}, [
|
|
3052
|
-
name:
|
|
2977
|
+
}, [jt, Zl] = A("form"), Xt = jt, Ql = /* @__PURE__ */ P({
|
|
2978
|
+
name: jt,
|
|
3053
2979
|
props: {
|
|
3054
|
-
...
|
|
2980
|
+
...Ut,
|
|
3055
2981
|
validateFirst: {
|
|
3056
2982
|
// 是否在某一项校验不通过时停止校验
|
|
3057
2983
|
type: Boolean,
|
|
@@ -3080,7 +3006,7 @@ const mn = {
|
|
|
3080
3006
|
const {
|
|
3081
3007
|
initProvide: o,
|
|
3082
3008
|
childrens: i
|
|
3083
|
-
} =
|
|
3009
|
+
} = Ee(Xt), n = () => {
|
|
3084
3010
|
const h = {};
|
|
3085
3011
|
return i.forEach((p) => {
|
|
3086
3012
|
const C = p.exposed;
|
|
@@ -3153,18 +3079,15 @@ const mn = {
|
|
|
3153
3079
|
var h;
|
|
3154
3080
|
return c("form", {
|
|
3155
3081
|
onSubmit: s,
|
|
3156
|
-
class: [
|
|
3082
|
+
class: [Zl()]
|
|
3157
3083
|
}, [(h = t.default) == null ? void 0 : h.call(t)]);
|
|
3158
3084
|
};
|
|
3159
3085
|
}
|
|
3160
3086
|
});
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
};
|
|
3164
|
-
const hn = "form-item", [Ol, Oe, Rl] = P(hn), _l = qt(hn), tt = /* @__PURE__ */ M({
|
|
3165
|
-
name: Ol,
|
|
3087
|
+
const Jl = M(Ql), Yt = "form-item", [ea, _e, ta] = A(Yt), na = kt(Yt), la = /* @__PURE__ */ P({
|
|
3088
|
+
name: ea,
|
|
3166
3089
|
props: {
|
|
3167
|
-
...
|
|
3090
|
+
...Ut,
|
|
3168
3091
|
label: {
|
|
3169
3092
|
type: [Number, String],
|
|
3170
3093
|
default: ""
|
|
@@ -3185,31 +3108,31 @@ const hn = "form-item", [Ol, Oe, Rl] = P(hn), _l = qt(hn), tt = /* @__PURE__ */
|
|
|
3185
3108
|
}) {
|
|
3186
3109
|
const {
|
|
3187
3110
|
parent: l
|
|
3188
|
-
} =
|
|
3111
|
+
} = ve(Xt), {
|
|
3189
3112
|
initProvide: o,
|
|
3190
3113
|
filed: i
|
|
3191
|
-
} =
|
|
3114
|
+
} = On(), n = L(!1), r = L(na.validateMessage), d = (g) => {
|
|
3192
3115
|
if (e[g] && e[g] !== null)
|
|
3193
3116
|
return e[g];
|
|
3194
3117
|
const T = l && l.props;
|
|
3195
3118
|
return T && T[g] || null;
|
|
3196
|
-
}, f =
|
|
3119
|
+
}, f = _(() => {
|
|
3197
3120
|
const g = l && l.props.rules, T = e.rules || (g == null ? void 0 : g[e.prop]);
|
|
3198
|
-
return
|
|
3199
|
-
}), x =
|
|
3121
|
+
return rn(T) ? [T] : T;
|
|
3122
|
+
}), x = _(() => f.value && f.value.some((g) => g.required)), m = _(() => i.value ? i.value.proxy.modelValue : null), y = _(() => d("showError") && n.value), s = (g, T) => !(T.required && (i.value && i.value.exposed && typeof i.value.exposed.isRequired < "u" && !i.value.exposed.isRequired || !(Array.isArray(g) ? g.length : g)) || T.pattern && an(g) && !T.pattern.test(g)), S = (g, T) => {
|
|
3200
3123
|
const {
|
|
3201
|
-
message:
|
|
3124
|
+
message: E
|
|
3202
3125
|
} = T;
|
|
3203
|
-
return
|
|
3204
|
-
}, v = (g) => g.reduce((T,
|
|
3126
|
+
return Tt(E) ? E(g, T) : E;
|
|
3127
|
+
}, v = (g) => g.reduce((T, E) => T.then(() => {
|
|
3205
3128
|
if (n.value)
|
|
3206
3129
|
return null;
|
|
3207
|
-
const b =
|
|
3208
|
-
if (!s(b,
|
|
3209
|
-
return n.value = !0, r.value = S(b,
|
|
3210
|
-
if (
|
|
3211
|
-
const k =
|
|
3212
|
-
return typeof k == "boolean" ? (k || (n.value = !0, r.value = S(b,
|
|
3130
|
+
const b = E.formatter ? E.formatter(m.value, E) : m.value;
|
|
3131
|
+
if (!s(b, E))
|
|
3132
|
+
return n.value = !0, r.value = S(b, E), null;
|
|
3133
|
+
if (E.validator) {
|
|
3134
|
+
const k = E.validator(b, E);
|
|
3135
|
+
return typeof k == "boolean" ? (k || (n.value = !0, r.value = S(b, E)), Promise.resolve(k)) : k.then((N) => (N || (n.value = !0, r.value = S(b, E)), N));
|
|
3213
3136
|
}
|
|
3214
3137
|
return null;
|
|
3215
3138
|
}), Promise.resolve()), h = async (g) => {
|
|
@@ -3221,7 +3144,7 @@ const hn = "form-item", [Ol, Oe, Rl] = P(hn), _l = qt(hn), tt = /* @__PURE__ */
|
|
|
3221
3144
|
}, p = (g) => {
|
|
3222
3145
|
var T;
|
|
3223
3146
|
if (l && f.value) {
|
|
3224
|
-
const
|
|
3147
|
+
const E = ((T = l.props) == null ? void 0 : T.validateTrigger) === g, b = f.value.filter((k) => k.trigger ? k.trigger === g : E);
|
|
3225
3148
|
return h(b);
|
|
3226
3149
|
}
|
|
3227
3150
|
return Promise.resolve(null);
|
|
@@ -3239,45 +3162,42 @@ const hn = "form-item", [Ol, Oe, Rl] = P(hn), _l = qt(hn), tt = /* @__PURE__ */
|
|
|
3239
3162
|
validate: h
|
|
3240
3163
|
});
|
|
3241
3164
|
const u = () => y.value ? t.error ? t.error() : d("showErrorMessage") ? c("p", {
|
|
3242
|
-
class:
|
|
3165
|
+
class: _e("error"),
|
|
3243
3166
|
style: {
|
|
3244
3167
|
textAlign: "left"
|
|
3245
3168
|
}
|
|
3246
3169
|
}, [r.value]) : null : null;
|
|
3247
3170
|
return () => {
|
|
3248
|
-
var b, k,
|
|
3171
|
+
var b, k, N;
|
|
3249
3172
|
const {
|
|
3250
3173
|
label: g,
|
|
3251
3174
|
border: T,
|
|
3252
|
-
colon:
|
|
3175
|
+
colon: E
|
|
3253
3176
|
} = e;
|
|
3254
3177
|
return c("div", {
|
|
3255
|
-
class: [
|
|
3178
|
+
class: [_e({
|
|
3256
3179
|
"is-error": y.value,
|
|
3257
3180
|
[d("size")]: d("size"),
|
|
3258
3181
|
hairline: T
|
|
3259
|
-
}),
|
|
3182
|
+
}), ta("el", {
|
|
3260
3183
|
"hairline-bottom": T
|
|
3261
3184
|
})]
|
|
3262
3185
|
}, [c("label", {
|
|
3263
|
-
class:
|
|
3186
|
+
class: _e("label", {
|
|
3264
3187
|
"is-required": x.value
|
|
3265
3188
|
}),
|
|
3266
3189
|
style: {
|
|
3267
3190
|
width: d("labelWidth"),
|
|
3268
3191
|
textAlign: d("labelAlign") || "left"
|
|
3269
3192
|
}
|
|
3270
|
-
}, [(b = t.labelIcon) == null ? void 0 : b.call(t), g,
|
|
3271
|
-
class:
|
|
3272
|
-
}, [(k = t.default) == null ? void 0 : k.call(t), u()]), (
|
|
3193
|
+
}, [(b = t.labelIcon) == null ? void 0 : b.call(t), g, E ? " :" : ""]), c("div", {
|
|
3194
|
+
class: _e("content")
|
|
3195
|
+
}, [(k = t.default) == null ? void 0 : k.call(t), u()]), (N = t.extra) == null ? void 0 : N.call(t)]);
|
|
3273
3196
|
};
|
|
3274
3197
|
}
|
|
3275
3198
|
});
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
};
|
|
3279
|
-
const [Fl, Hl] = P("input"), Wl = 13, nt = /* @__PURE__ */ M({
|
|
3280
|
-
name: Fl,
|
|
3199
|
+
const aa = M(la), [oa, ia] = A("input"), ra = 13, ua = /* @__PURE__ */ P({
|
|
3200
|
+
name: oa,
|
|
3281
3201
|
props: {
|
|
3282
3202
|
modelValue: {
|
|
3283
3203
|
type: [String, Number],
|
|
@@ -3332,16 +3252,16 @@ const [Fl, Hl] = P("input"), Wl = 13, nt = /* @__PURE__ */ M({
|
|
|
3332
3252
|
setup(e, {
|
|
3333
3253
|
emit: t
|
|
3334
3254
|
}) {
|
|
3335
|
-
const a =
|
|
3255
|
+
const a = te(), {
|
|
3336
3256
|
parent: l
|
|
3337
|
-
} =
|
|
3257
|
+
} = Ne();
|
|
3338
3258
|
let o = null;
|
|
3339
3259
|
const i = (s, S) => {
|
|
3340
3260
|
s !== S && o && (o.innerHTML = `${e.modelValue.toString().length}/${e.maxLength}`);
|
|
3341
3261
|
}, n = (s, S) => {
|
|
3342
3262
|
s !== S && (s ? (o = document.createElement("div"), o.className = "y-input__limit-num", (a == null ? void 0 : a.vnode.el).insertAdjacentElement("afterend", o), e.maxLength && i(e.maxLength)) : (o && o.remove(), o = null));
|
|
3343
3263
|
};
|
|
3344
|
-
|
|
3264
|
+
X(() => e.showWordLimit, n), X(() => e.modelValue, i), X(() => e.maxLength, i);
|
|
3345
3265
|
const r = (s) => t("focus", s), d = (s) => t("click", s), f = (s) => {
|
|
3346
3266
|
if (l) {
|
|
3347
3267
|
const {
|
|
@@ -3353,14 +3273,14 @@ const [Fl, Hl] = P("input"), Wl = 13, nt = /* @__PURE__ */ M({
|
|
|
3353
3273
|
}, x = (s) => {
|
|
3354
3274
|
t("update:modelValue", s.target.value), t("input", s);
|
|
3355
3275
|
}, m = (s) => {
|
|
3356
|
-
s.keyCode ===
|
|
3276
|
+
s.keyCode === ra && (l != null && l.getProp("enterable") || s.preventDefault(), e.type === "search" && (a == null ? void 0 : a.vnode.el).blur()), t("keypress", s);
|
|
3357
3277
|
};
|
|
3358
|
-
|
|
3278
|
+
J(() => {
|
|
3359
3279
|
n(e.showWordLimit), i(e.maxLength);
|
|
3360
|
-
}),
|
|
3280
|
+
}), Ce(() => {
|
|
3361
3281
|
o && o.remove(), o = null;
|
|
3362
3282
|
});
|
|
3363
|
-
const y =
|
|
3283
|
+
const y = _({
|
|
3364
3284
|
get: () => e.modelValue,
|
|
3365
3285
|
set: (s) => t("update:modelValue", s)
|
|
3366
3286
|
});
|
|
@@ -3375,9 +3295,9 @@ const [Fl, Hl] = P("input"), Wl = 13, nt = /* @__PURE__ */ M({
|
|
|
3375
3295
|
border: u,
|
|
3376
3296
|
readonly: g,
|
|
3377
3297
|
autocomplete: T,
|
|
3378
|
-
placeholder:
|
|
3298
|
+
placeholder: E
|
|
3379
3299
|
} = e, b = C || (l == null ? void 0 : l.getProp("size")), k = {
|
|
3380
|
-
class:
|
|
3300
|
+
class: ia({
|
|
3381
3301
|
[b]: b,
|
|
3382
3302
|
border: u
|
|
3383
3303
|
}),
|
|
@@ -3386,7 +3306,7 @@ const [Fl, Hl] = P("input"), Wl = 13, nt = /* @__PURE__ */ M({
|
|
|
3386
3306
|
},
|
|
3387
3307
|
disabled: h,
|
|
3388
3308
|
readonly: g,
|
|
3389
|
-
placeholder:
|
|
3309
|
+
placeholder: E,
|
|
3390
3310
|
maxlength: p,
|
|
3391
3311
|
onInput: x,
|
|
3392
3312
|
autocomplete: T,
|
|
@@ -3395,21 +3315,18 @@ const [Fl, Hl] = P("input"), Wl = 13, nt = /* @__PURE__ */ M({
|
|
|
3395
3315
|
onKeypress: m,
|
|
3396
3316
|
onBlur: f
|
|
3397
3317
|
};
|
|
3398
|
-
return s === "textarea" ?
|
|
3318
|
+
return s === "textarea" ? ie(c("textarea", we(k, {
|
|
3399
3319
|
rows: S,
|
|
3400
|
-
"onUpdate:modelValue": (
|
|
3401
|
-
}), null), [[
|
|
3402
|
-
"onUpdate:modelValue": (
|
|
3320
|
+
"onUpdate:modelValue": (N) => y.value = N
|
|
3321
|
+
}), null), [[$t, y.value]]) : ie(c("input", we(k, {
|
|
3322
|
+
"onUpdate:modelValue": (N) => y.value = N,
|
|
3403
3323
|
type: s
|
|
3404
|
-
}), null), [[
|
|
3324
|
+
}), null), [[tn, y.value]]);
|
|
3405
3325
|
};
|
|
3406
3326
|
}
|
|
3407
3327
|
});
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
};
|
|
3411
|
-
const ht = 1e3, pt = 60 * ht, yt = 60 * pt, Ft = 24 * yt, [Ul] = P("count-down"), lt = /* @__PURE__ */ M({
|
|
3412
|
-
name: Ul,
|
|
3328
|
+
const sa = M(ua), Ye = 1e3, qe = 60 * Ye, Ge = 60 * qe, bt = 24 * Ge, [ca] = A("count-down"), da = /* @__PURE__ */ P({
|
|
3329
|
+
name: ca,
|
|
3413
3330
|
props: {
|
|
3414
3331
|
time: {
|
|
3415
3332
|
type: [Number, String],
|
|
@@ -3436,8 +3353,8 @@ const ht = 1e3, pt = 60 * ht, yt = 60 * pt, Ft = 24 * yt, [Ul] = P("count-down")
|
|
|
3436
3353
|
emit: a,
|
|
3437
3354
|
expose: l
|
|
3438
3355
|
}) {
|
|
3439
|
-
const o = L(), i = L(!1), n = L(Number(e.time)), r = L(0), d =
|
|
3440
|
-
|
|
3356
|
+
const o = L(), i = L(!1), n = L(Number(e.time)), r = L(0), d = _(() => h(n.value));
|
|
3357
|
+
J(() => {
|
|
3441
3358
|
e.autoStart && f();
|
|
3442
3359
|
});
|
|
3443
3360
|
const f = () => {
|
|
@@ -3455,11 +3372,11 @@ const ht = 1e3, pt = 60 * ht, yt = 60 * pt, Ft = 24 * yt, [Ul] = P("count-down")
|
|
|
3455
3372
|
}
|
|
3456
3373
|
a("change", d.value);
|
|
3457
3374
|
}, S = () => Math.max(r.value - Date.now(), 0), v = (u, g) => Math.floor(u / 1e3) === Math.floor(g / 1e3), h = (u) => {
|
|
3458
|
-
const g = Math.floor(u /
|
|
3375
|
+
const g = Math.floor(u / bt), T = Math.floor(u % bt / Ge), E = Math.floor(u % Ge / qe), b = Math.floor(u % qe / Ye), k = Math.floor(u % Ye);
|
|
3459
3376
|
return {
|
|
3460
3377
|
days: g,
|
|
3461
3378
|
hours: T,
|
|
3462
|
-
minutes:
|
|
3379
|
+
minutes: E,
|
|
3463
3380
|
seconds: b,
|
|
3464
3381
|
milliseconds: k,
|
|
3465
3382
|
timestamp: u
|
|
@@ -3470,12 +3387,12 @@ const ht = 1e3, pt = 60 * ht, yt = 60 * pt, Ft = 24 * yt, [Ul] = P("count-down")
|
|
|
3470
3387
|
days: T
|
|
3471
3388
|
} = d.value;
|
|
3472
3389
|
let {
|
|
3473
|
-
hours:
|
|
3390
|
+
hours: E,
|
|
3474
3391
|
minutes: b,
|
|
3475
3392
|
seconds: k,
|
|
3476
|
-
milliseconds:
|
|
3393
|
+
milliseconds: N
|
|
3477
3394
|
} = d.value;
|
|
3478
|
-
return g.indexOf("DD") === -1 ?
|
|
3395
|
+
return g.indexOf("DD") === -1 ? E += T * 24 : g = g.replace("DD", C(T)), g.indexOf("HH") === -1 ? b += E * 60 : g = g.replace("HH", C(E)), g.indexOf("mm") === -1 ? k += b * 60 : g = g.replace("mm", C(b)), g.indexOf("ss") === -1 ? N += k * 1e3 : g = g.replace("ss", C(k)), g.indexOf("S") !== -1 && (g = g.replace(/S+/, ($) => C(N, $.length).slice(0, $.length))), g;
|
|
3479
3396
|
}, C = (u, g = 2) => {
|
|
3480
3397
|
let T = `${u}`;
|
|
3481
3398
|
for (; T.length < g; )
|
|
@@ -3492,14 +3409,11 @@ const ht = 1e3, pt = 60 * ht, yt = 60 * pt, Ft = 24 * yt, [Ul] = P("count-down")
|
|
|
3492
3409
|
};
|
|
3493
3410
|
}
|
|
3494
3411
|
});
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
e.
|
|
3498
|
-
};
|
|
3499
|
-
function jl(e) {
|
|
3500
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Le(e);
|
|
3412
|
+
const fa = M(da);
|
|
3413
|
+
function ma(e) {
|
|
3414
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !$e(e);
|
|
3501
3415
|
}
|
|
3502
|
-
const [
|
|
3416
|
+
const [va, ee] = A("dialog"), ga = {
|
|
3503
3417
|
// 控制显示
|
|
3504
3418
|
modelValue: {
|
|
3505
3419
|
type: Boolean,
|
|
@@ -3570,18 +3484,18 @@ const [Xl, J] = P("dialog"), Yl = {
|
|
|
3570
3484
|
type: String,
|
|
3571
3485
|
default: "body"
|
|
3572
3486
|
}
|
|
3573
|
-
},
|
|
3574
|
-
name:
|
|
3487
|
+
}, qt = /* @__PURE__ */ P({
|
|
3488
|
+
name: va,
|
|
3575
3489
|
directives: {
|
|
3576
|
-
loading:
|
|
3490
|
+
loading: Pt
|
|
3577
3491
|
},
|
|
3578
|
-
props:
|
|
3492
|
+
props: ga,
|
|
3579
3493
|
emits: ["update:modelValue", "cancel", "confirm"],
|
|
3580
3494
|
setup(e, {
|
|
3581
3495
|
emit: t,
|
|
3582
3496
|
slots: a
|
|
3583
3497
|
}) {
|
|
3584
|
-
const l =
|
|
3498
|
+
const l = H({
|
|
3585
3499
|
cancel: !1,
|
|
3586
3500
|
confirm: !1
|
|
3587
3501
|
}), o = (y) => {
|
|
@@ -3599,10 +3513,10 @@ const [Xl, J] = P("dialog"), Yl = {
|
|
|
3599
3513
|
beforeClose: S
|
|
3600
3514
|
} = e;
|
|
3601
3515
|
if (s)
|
|
3602
|
-
if (
|
|
3516
|
+
if (Tt(S)) {
|
|
3603
3517
|
l[y] = !0;
|
|
3604
3518
|
const v = S(y);
|
|
3605
|
-
|
|
3519
|
+
un(v) ? v.then((p) => {
|
|
3606
3520
|
f(p, y);
|
|
3607
3521
|
}).catch((p) => {
|
|
3608
3522
|
throw new Error(p);
|
|
@@ -3614,7 +3528,7 @@ const [Xl, J] = P("dialog"), Yl = {
|
|
|
3614
3528
|
}, x = (y, s, S) => {
|
|
3615
3529
|
let v = Number(y.substring(0, y.length - 2));
|
|
3616
3530
|
return v /= s || 2, S ? `${S(v)}px` : `${v}px`;
|
|
3617
|
-
}, m =
|
|
3531
|
+
}, m = _({
|
|
3618
3532
|
get: () => e.modelValue,
|
|
3619
3533
|
set: (y) => t("update:modelValue", y)
|
|
3620
3534
|
});
|
|
@@ -3630,80 +3544,80 @@ const [Xl, J] = P("dialog"), Yl = {
|
|
|
3630
3544
|
showCancelBtn: u,
|
|
3631
3545
|
cancelButtonText: g,
|
|
3632
3546
|
showConfirmBtn: T,
|
|
3633
|
-
confirmButtonText:
|
|
3547
|
+
confirmButtonText: E,
|
|
3634
3548
|
imgSrc: b,
|
|
3635
3549
|
circleImg: k,
|
|
3636
|
-
teleport:
|
|
3550
|
+
teleport: N
|
|
3637
3551
|
} = e;
|
|
3638
|
-
return c(
|
|
3552
|
+
return c(Wt, we({
|
|
3639
3553
|
modelValue: m.value,
|
|
3640
|
-
"onUpdate:modelValue": (
|
|
3641
|
-
customClass:
|
|
3554
|
+
"onUpdate:modelValue": ($) => m.value = $,
|
|
3555
|
+
customClass: ee(),
|
|
3642
3556
|
customStyle: {
|
|
3643
|
-
width:
|
|
3557
|
+
width: F(y)
|
|
3644
3558
|
}
|
|
3645
3559
|
}, {
|
|
3646
3560
|
"onUpdate:modelValue": o
|
|
3647
3561
|
}, {
|
|
3648
3562
|
isCloseOnClickMask: p,
|
|
3649
|
-
teleport:
|
|
3563
|
+
teleport: N
|
|
3650
3564
|
}), {
|
|
3651
3565
|
default: () => {
|
|
3652
|
-
var
|
|
3653
|
-
return [((
|
|
3654
|
-
class:
|
|
3566
|
+
var $, I, D, V;
|
|
3567
|
+
return [(($ = a.img) == null ? void 0 : $.call(a)) || b && c("div", {
|
|
3568
|
+
class: ee("img", {
|
|
3655
3569
|
circle: k
|
|
3656
3570
|
}),
|
|
3657
3571
|
style: {
|
|
3658
|
-
top: k ? `-${x(
|
|
3659
|
-
left: k ? `calc(50% - ${x(
|
|
3572
|
+
top: k ? `-${x(F(y), 4)}` : "auto",
|
|
3573
|
+
left: k ? `calc(50% - ${x(F(y), 4)})` : "auto"
|
|
3660
3574
|
}
|
|
3661
3575
|
}, [c("div", {
|
|
3662
3576
|
style: {
|
|
3663
|
-
width: k ? x(
|
|
3664
|
-
height: x(
|
|
3577
|
+
width: k ? x(F(y)) : F(y),
|
|
3578
|
+
height: x(F(y)),
|
|
3665
3579
|
background: `url(${b}) center`,
|
|
3666
3580
|
borderRadius: k ? "50%" : "20px 20px 0 0"
|
|
3667
3581
|
}
|
|
3668
3582
|
}, null)]), c("div", {
|
|
3669
|
-
class:
|
|
3583
|
+
class: ee("container")
|
|
3670
3584
|
}, [c("div", {
|
|
3671
3585
|
style: {
|
|
3672
|
-
height: k ? x(
|
|
3586
|
+
height: k ? x(F(y), 4, (Y) => Y + 20) : "24px"
|
|
3673
3587
|
}
|
|
3674
|
-
}, null), ((
|
|
3675
|
-
class:
|
|
3588
|
+
}, null), ((I = a.title) == null ? void 0 : I.call(a)) || c("div", {
|
|
3589
|
+
class: ee("title"),
|
|
3676
3590
|
style: {
|
|
3677
3591
|
textAlign: S
|
|
3678
3592
|
}
|
|
3679
3593
|
}, [s]), c("div", {
|
|
3680
|
-
class:
|
|
3594
|
+
class: ee("content")
|
|
3681
3595
|
}, [c("div", {
|
|
3682
|
-
class:
|
|
3596
|
+
class: ee("message"),
|
|
3683
3597
|
style: {
|
|
3684
3598
|
textAlign: h
|
|
3685
3599
|
}
|
|
3686
|
-
}, [((D = a.default) == null ? void 0 : D.call(a)) || v]), ((
|
|
3687
|
-
class:
|
|
3600
|
+
}, [((D = a.default) == null ? void 0 : D.call(a)) || v]), ((V = a.footer) == null ? void 0 : V.call(a)) || c("div", {
|
|
3601
|
+
class: ee("footer"),
|
|
3688
3602
|
style: {
|
|
3689
3603
|
paddingTop: u || T ? "20px" : "0px"
|
|
3690
3604
|
}
|
|
3691
|
-
}, [u &&
|
|
3605
|
+
}, [u && ie(c(Xe, {
|
|
3692
3606
|
type: "secondary",
|
|
3693
|
-
class:
|
|
3607
|
+
class: ee("footer-btn"),
|
|
3694
3608
|
onClick: n
|
|
3695
|
-
},
|
|
3609
|
+
}, ma(g) ? g : {
|
|
3696
3610
|
default: () => [g]
|
|
3697
|
-
}), [[
|
|
3611
|
+
}), [[at("loading"), l.cancel]]), T && ie(c(Xe, {
|
|
3698
3612
|
type: "primary",
|
|
3699
|
-
class:
|
|
3613
|
+
class: ee("footer-btn"),
|
|
3700
3614
|
onClick: r
|
|
3701
3615
|
}, {
|
|
3702
|
-
default: () => [l.confirm ? "" :
|
|
3703
|
-
}), [[
|
|
3704
|
-
class:
|
|
3616
|
+
default: () => [l.confirm ? "" : E]
|
|
3617
|
+
}), [[at("loading"), l.confirm]])])]), C && c("div", {
|
|
3618
|
+
class: ee("close"),
|
|
3705
3619
|
onClick: () => i("close")
|
|
3706
|
-
}, [c(
|
|
3620
|
+
}, [c(Le, {
|
|
3707
3621
|
name: "cross"
|
|
3708
3622
|
}, null)])])];
|
|
3709
3623
|
}
|
|
@@ -3711,22 +3625,22 @@ const [Xl, J] = P("dialog"), Yl = {
|
|
|
3711
3625
|
};
|
|
3712
3626
|
}
|
|
3713
3627
|
});
|
|
3714
|
-
let
|
|
3715
|
-
const
|
|
3716
|
-
const a = `dialog${
|
|
3717
|
-
|
|
3628
|
+
let He = Te({}), ha = 0;
|
|
3629
|
+
const Gt = [], pa = (e, t) => {
|
|
3630
|
+
const a = `dialog${ha += 1}`;
|
|
3631
|
+
He = Te({
|
|
3718
3632
|
setup() {
|
|
3719
3633
|
const i = L(!0), n = (r) => {
|
|
3720
3634
|
i.value = r;
|
|
3721
3635
|
};
|
|
3722
|
-
return () =>
|
|
3723
|
-
|
|
3636
|
+
return () => xe(
|
|
3637
|
+
qt,
|
|
3724
3638
|
{
|
|
3725
3639
|
modelValue: i.value,
|
|
3726
3640
|
"onUpdate:modelValue": n,
|
|
3727
3641
|
...e,
|
|
3728
3642
|
onAfterLeave: () => {
|
|
3729
|
-
|
|
3643
|
+
ya(a);
|
|
3730
3644
|
}
|
|
3731
3645
|
},
|
|
3732
3646
|
{ ...t }
|
|
@@ -3734,17 +3648,13 @@ const pn = [], yn = (e, t) => {
|
|
|
3734
3648
|
}
|
|
3735
3649
|
});
|
|
3736
3650
|
const o = document.createElement("div");
|
|
3737
|
-
|
|
3738
|
-
},
|
|
3739
|
-
|
|
3651
|
+
Gt.push({ id: a, app: He, el: o }), He.mount(o);
|
|
3652
|
+
}, ya = (e) => {
|
|
3653
|
+
Gt.forEach((t) => {
|
|
3740
3654
|
e === t.id && t.app.unmount();
|
|
3741
3655
|
});
|
|
3742
3656
|
};
|
|
3743
|
-
|
|
3744
|
-
const { name: t } = ke;
|
|
3745
|
-
e.component(t, ke), e.provide("dialog", yn);
|
|
3746
|
-
};
|
|
3747
|
-
const bn = {
|
|
3657
|
+
const ba = M(qt), Kt = {
|
|
3748
3658
|
// 是否显示
|
|
3749
3659
|
modelValue: {
|
|
3750
3660
|
type: Boolean,
|
|
@@ -3799,16 +3709,16 @@ const bn = {
|
|
|
3799
3709
|
default: "top"
|
|
3800
3710
|
/* Top */
|
|
3801
3711
|
}
|
|
3802
|
-
}, [
|
|
3712
|
+
}, [Sa, We] = A("popper"), Zt = (e) => e.parentElement ? getComputedStyle(e.parentElement).position !== "static" ? e.parentElement : Zt(e.parentElement) : e, Ke = (e, t, a) => {
|
|
3803
3713
|
let l = t || e.offsetTop, o = a || e.offsetLeft;
|
|
3804
|
-
return e.parentElement ? (getComputedStyle(e.parentElement).position !== "static" && (l += e.parentElement.offsetTop, o += e.parentElement.offsetLeft),
|
|
3714
|
+
return e.parentElement ? (getComputedStyle(e.parentElement).position !== "static" && (l += e.parentElement.offsetTop, o += e.parentElement.offsetLeft), Ke(e.parentElement, l, o)) : {
|
|
3805
3715
|
offsetLeft: o,
|
|
3806
3716
|
offsetTop: l
|
|
3807
3717
|
};
|
|
3808
|
-
},
|
|
3809
|
-
name:
|
|
3718
|
+
}, Ze = /* @__PURE__ */ P({
|
|
3719
|
+
name: Sa,
|
|
3810
3720
|
props: {
|
|
3811
|
-
...
|
|
3721
|
+
...Kt,
|
|
3812
3722
|
reference: {
|
|
3813
3723
|
type: Object,
|
|
3814
3724
|
default: null
|
|
@@ -3817,15 +3727,15 @@ const bn = {
|
|
|
3817
3727
|
setup(e, {
|
|
3818
3728
|
slots: t
|
|
3819
3729
|
}) {
|
|
3820
|
-
const a =
|
|
3730
|
+
const a = te(), l = L(e.modelValue), o = H({
|
|
3821
3731
|
placement: "",
|
|
3822
3732
|
align: ""
|
|
3823
|
-
}), i =
|
|
3733
|
+
}), i = H({
|
|
3824
3734
|
top: 0,
|
|
3825
3735
|
left: 0
|
|
3826
3736
|
}), n = () => {
|
|
3827
|
-
var
|
|
3828
|
-
const m = e.reference, y = (
|
|
3737
|
+
var $;
|
|
3738
|
+
const m = e.reference, y = ($ = a == null ? void 0 : a.proxy) == null ? void 0 : $.$refs.popper;
|
|
3829
3739
|
if (!m || !y)
|
|
3830
3740
|
return;
|
|
3831
3741
|
const {
|
|
@@ -3834,7 +3744,7 @@ const bn = {
|
|
|
3834
3744
|
} = m, {
|
|
3835
3745
|
offsetTop: v,
|
|
3836
3746
|
offsetLeft: h
|
|
3837
|
-
} =
|
|
3747
|
+
} = Ke(m), {
|
|
3838
3748
|
offsetWidth: p,
|
|
3839
3749
|
offsetHeight: C
|
|
3840
3750
|
} = y, {
|
|
@@ -3842,14 +3752,14 @@ const bn = {
|
|
|
3842
3752
|
align: g
|
|
3843
3753
|
} = o, {
|
|
3844
3754
|
offsetLeft: T,
|
|
3845
|
-
offsetTop:
|
|
3846
|
-
} =
|
|
3755
|
+
offsetTop: E
|
|
3756
|
+
} = Ke(Zt(y)), b = {
|
|
3847
3757
|
x: 0,
|
|
3848
3758
|
y: 0,
|
|
3849
3759
|
newPlacement: u
|
|
3850
3760
|
};
|
|
3851
3761
|
e.autoFlipping && (u === "left" && h - p < pageXOffset ? b.newPlacement = "right" : u === "right" && h + s + p > pageXOffset + innerWidth ? b.newPlacement = "left" : u === "top" && v - C < pageYOffset ? b.newPlacement = "bottom" : u === "bottom" && v + S + C > pageYOffset + innerHeight && (b.newPlacement = "top"));
|
|
3852
|
-
const k = b.newPlacement === "top" ? -C : S,
|
|
3762
|
+
const k = b.newPlacement === "top" ? -C : S, N = b.newPlacement === "left" ? -p : s;
|
|
3853
3763
|
switch (b.newPlacement) {
|
|
3854
3764
|
case "top":
|
|
3855
3765
|
case "bottom":
|
|
@@ -3857,10 +3767,10 @@ const bn = {
|
|
|
3857
3767
|
break;
|
|
3858
3768
|
case "left":
|
|
3859
3769
|
case "right":
|
|
3860
|
-
b.x = h +
|
|
3770
|
+
b.x = h + N, g === "start" ? b.y = v : g === "end" ? b.y = v + S - C : b.y = v + S / 2 - C / 2;
|
|
3861
3771
|
break;
|
|
3862
3772
|
}
|
|
3863
|
-
i.left = b.x - T, i.top = b.y -
|
|
3773
|
+
i.left = b.x - T, i.top = b.y - E, o.placement = b.newPlacement;
|
|
3864
3774
|
}, r = (m) => {
|
|
3865
3775
|
var S;
|
|
3866
3776
|
const y = (S = a == null ? void 0 : a.proxy) == null ? void 0 : S.$refs.popper, s = e.reference;
|
|
@@ -3871,16 +3781,16 @@ const bn = {
|
|
|
3871
3781
|
const [m, y] = e.position.split("-");
|
|
3872
3782
|
o.align = y, o.placement = m;
|
|
3873
3783
|
}, x = () => {
|
|
3874
|
-
e.manual && (l.value = e.modelValue), e.modelValue || l.value ?
|
|
3784
|
+
e.manual && (l.value = e.modelValue), e.modelValue || l.value ? se(n).catch((m) => {
|
|
3875
3785
|
throw new Error(m);
|
|
3876
3786
|
}) : (i.left = 0, i.top = 0);
|
|
3877
3787
|
};
|
|
3878
|
-
return
|
|
3788
|
+
return X(() => e.position, () => {
|
|
3879
3789
|
f(), x();
|
|
3880
|
-
}),
|
|
3790
|
+
}), X([() => l.value, () => e.modelValue, () => e.reference], x), J(() => {
|
|
3881
3791
|
var m;
|
|
3882
3792
|
f(), x(), e.manual || ((m = e.reference) == null || m.addEventListener("click", d), document.addEventListener("touchstart", r), document.addEventListener("mousedown", r));
|
|
3883
|
-
}),
|
|
3793
|
+
}), Ce(() => {
|
|
3884
3794
|
var m;
|
|
3885
3795
|
e.manual || ((m = e.reference) == null || m.removeEventListener("click", d), document.removeEventListener("touchstart", r), document.removeEventListener("mousedown", r));
|
|
3886
3796
|
}), () => {
|
|
@@ -3897,13 +3807,13 @@ const bn = {
|
|
|
3897
3807
|
popperStyle: u,
|
|
3898
3808
|
text: g
|
|
3899
3809
|
} = e;
|
|
3900
|
-
return c(
|
|
3810
|
+
return c(wt, {
|
|
3901
3811
|
to: e.teleport
|
|
3902
3812
|
}, {
|
|
3903
3813
|
default: () => {
|
|
3904
3814
|
var T;
|
|
3905
|
-
return [
|
|
3906
|
-
class: [
|
|
3815
|
+
return [ie(c("div", {
|
|
3816
|
+
class: [We({
|
|
3907
3817
|
[o.placement]: o.placement
|
|
3908
3818
|
}), C],
|
|
3909
3819
|
ref: "popper",
|
|
@@ -3913,42 +3823,42 @@ const bn = {
|
|
|
3913
3823
|
top: `${y}px`
|
|
3914
3824
|
}
|
|
3915
3825
|
}, [c("div", {
|
|
3916
|
-
class:
|
|
3826
|
+
class: We("content"),
|
|
3917
3827
|
style: {
|
|
3918
3828
|
color: S,
|
|
3919
|
-
width:
|
|
3920
|
-
minWidth:
|
|
3829
|
+
width: F(s),
|
|
3830
|
+
minWidth: F(p),
|
|
3921
3831
|
backgroundColor: v
|
|
3922
3832
|
}
|
|
3923
3833
|
}, [((T = t.default) == null ? void 0 : T.call(t)) || g]), c("div", {
|
|
3924
|
-
class:
|
|
3834
|
+
class: We("arrow", [`${o.placement}${o.align ? `-${o.align}` : ""}`]),
|
|
3925
3835
|
style: {
|
|
3926
3836
|
color: v
|
|
3927
3837
|
}
|
|
3928
|
-
}, null)]), [[
|
|
3838
|
+
}, null)]), [[Ae, h || l.value]])];
|
|
3929
3839
|
}
|
|
3930
3840
|
});
|
|
3931
3841
|
};
|
|
3932
3842
|
}
|
|
3933
3843
|
});
|
|
3934
|
-
function
|
|
3935
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" &&
|
|
3844
|
+
function xa(e) {
|
|
3845
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !$e(e);
|
|
3936
3846
|
}
|
|
3937
|
-
const [
|
|
3938
|
-
name:
|
|
3939
|
-
props:
|
|
3847
|
+
const [wa] = A("tooltip"), $a = /* @__PURE__ */ P({
|
|
3848
|
+
name: wa,
|
|
3849
|
+
props: Kt,
|
|
3940
3850
|
setup(e, {
|
|
3941
3851
|
slots: t
|
|
3942
3852
|
}) {
|
|
3943
|
-
const a =
|
|
3853
|
+
const a = te(), l = L(), o = () => {
|
|
3944
3854
|
var n;
|
|
3945
3855
|
const i = (n = a == null ? void 0 : a.proxy) == null ? void 0 : n.$el;
|
|
3946
3856
|
return i == null ? void 0 : i.nextElementSibling;
|
|
3947
3857
|
};
|
|
3948
|
-
return
|
|
3858
|
+
return J(() => {
|
|
3949
3859
|
l.value = o();
|
|
3950
|
-
}),
|
|
3951
|
-
|
|
3860
|
+
}), Qe(() => {
|
|
3861
|
+
se(() => {
|
|
3952
3862
|
l.value = o();
|
|
3953
3863
|
}).catch((i) => {
|
|
3954
3864
|
throw Error(i);
|
|
@@ -3956,16 +3866,16 @@ const [Ql] = P("tooltip"), at = /* @__PURE__ */ M({
|
|
|
3956
3866
|
}), () => {
|
|
3957
3867
|
var n;
|
|
3958
3868
|
let i;
|
|
3959
|
-
return c(
|
|
3869
|
+
return c(Je, null, [(n = t.default) == null ? void 0 : n.call(t)[0], l.value && (t.popper ? c(Ze, we(e, {
|
|
3960
3870
|
reference: l.value
|
|
3961
|
-
}),
|
|
3871
|
+
}), xa(i = t.popper()) ? i : {
|
|
3962
3872
|
default: () => [i]
|
|
3963
|
-
}) : c(
|
|
3873
|
+
}) : c(Ze, we(e, {
|
|
3964
3874
|
reference: l.value
|
|
3965
3875
|
}), null))]);
|
|
3966
3876
|
};
|
|
3967
3877
|
}
|
|
3968
|
-
}),
|
|
3878
|
+
}), Ca = {
|
|
3969
3879
|
install: (e) => {
|
|
3970
3880
|
e.directive("tooltip", {
|
|
3971
3881
|
getSSRProps: (t) => ({ ...t }),
|
|
@@ -3973,8 +3883,8 @@ const [Ql] = P("tooltip"), at = /* @__PURE__ */ M({
|
|
|
3973
3883
|
// 在绑定元素的 attribute 或事件监听器被应用之前调用
|
|
3974
3884
|
// 在绑定元素的父组件挂载之前调用
|
|
3975
3885
|
mounted: (t, a) => {
|
|
3976
|
-
const l =
|
|
3977
|
-
t.$popper = document.createElement("div"), document.body.appendChild(t.$popper), l.appContext = e._context,
|
|
3886
|
+
const l = xe(Ze, { ...a.value, reference: t });
|
|
3887
|
+
t.$popper = document.createElement("div"), document.body.appendChild(t.$popper), l.appContext = e._context, nn(l, t.$popper);
|
|
3978
3888
|
},
|
|
3979
3889
|
unmounted: (t) => {
|
|
3980
3890
|
t.$popper && t.$popper.remove();
|
|
@@ -3982,81 +3892,76 @@ const [Ql] = P("tooltip"), at = /* @__PURE__ */ M({
|
|
|
3982
3892
|
});
|
|
3983
3893
|
}
|
|
3984
3894
|
};
|
|
3985
|
-
|
|
3986
|
-
const { name: t } = at;
|
|
3987
|
-
e.component(t, at), e.use(xn);
|
|
3988
|
-
};
|
|
3989
|
-
const $n = [
|
|
3895
|
+
const Ta = M($a), ka = [
|
|
3990
3896
|
// 组件
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
3897
|
+
Le,
|
|
3898
|
+
Ct,
|
|
3899
|
+
An,
|
|
3900
|
+
xn,
|
|
3901
|
+
Tn,
|
|
3902
|
+
In,
|
|
3903
|
+
Mn,
|
|
3904
|
+
Dn,
|
|
3905
|
+
qn,
|
|
3906
|
+
Gn,
|
|
3907
|
+
Qn,
|
|
3908
|
+
ol,
|
|
3909
|
+
sl,
|
|
3910
|
+
Jl,
|
|
3911
|
+
aa,
|
|
4001
3912
|
Xe,
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
lt,
|
|
4018
|
-
ke,
|
|
4019
|
-
at
|
|
4020
|
-
], wn = (e) => {
|
|
4021
|
-
wn.installed || ($n.forEach((t) => {
|
|
3913
|
+
sa,
|
|
3914
|
+
yl,
|
|
3915
|
+
Ll,
|
|
3916
|
+
Ot,
|
|
3917
|
+
xl,
|
|
3918
|
+
Tl,
|
|
3919
|
+
Vl,
|
|
3920
|
+
Wt,
|
|
3921
|
+
Ht,
|
|
3922
|
+
Kl,
|
|
3923
|
+
fa,
|
|
3924
|
+
ba,
|
|
3925
|
+
Ta
|
|
3926
|
+
], Qt = (e) => {
|
|
3927
|
+
Qt.installed || (ka.forEach((t) => {
|
|
4022
3928
|
t.name && e.component(t.name, t);
|
|
4023
|
-
}), e.provide("loading",
|
|
4024
|
-
},
|
|
4025
|
-
install:
|
|
4026
|
-
...$n
|
|
3929
|
+
}), e.provide("loading", vl), e.provide("toast", Ml), e.provide("dialog", pa), e.use(gl), e.use(Ca));
|
|
3930
|
+
}, Na = {
|
|
3931
|
+
install: Qt
|
|
4027
3932
|
};
|
|
4028
3933
|
export {
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
3934
|
+
Xe as Button,
|
|
3935
|
+
sl as Cell,
|
|
3936
|
+
qn as Checkbox,
|
|
3937
|
+
Gn as CheckboxGroup,
|
|
3938
|
+
Tl as Col,
|
|
3939
|
+
fa as CountDown,
|
|
3940
|
+
ba as Dialog,
|
|
3941
|
+
Ll as Empty,
|
|
3942
|
+
Jl as Form,
|
|
3943
|
+
aa as FormItem,
|
|
3944
|
+
Le as Icon,
|
|
3945
|
+
sa as Input,
|
|
3946
|
+
An as List,
|
|
3947
|
+
yl as Loading,
|
|
3948
|
+
Ht as Mask,
|
|
3949
|
+
Wt as Popup,
|
|
3950
|
+
Vl as Progress,
|
|
3951
|
+
ol as Pullrefresh,
|
|
3952
|
+
xl as Row,
|
|
3953
|
+
In as Slider,
|
|
3954
|
+
Kl as Stepper,
|
|
3955
|
+
Mn as Swipe,
|
|
3956
|
+
Dn as SwipeItem,
|
|
3957
|
+
Qn as Switch,
|
|
3958
|
+
Tn as Tab,
|
|
3959
|
+
xn as Tabs,
|
|
3960
|
+
Ta as Tooltip,
|
|
3961
|
+
vl as createLoading,
|
|
3962
|
+
Na as default,
|
|
3963
|
+
Ot as empty,
|
|
3964
|
+
gl as loadingDirective,
|
|
3965
|
+
Ct as locale,
|
|
3966
|
+
Ca as tooltipDirective
|
|
4062
3967
|
};
|