y-design-ssr 0.2.12 → 0.2.13
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/index.css +1 -1
- package/libs/index.d.ts +2 -1
- package/libs/index.mjs +1356 -1206
- package/libs/index.umd.js +2 -2
- package/libs/pagination/index.css +1 -0
- package/libs/pagination/index.d.ts +113 -0
- package/libs/pagination/index.mjs +187 -0
- package/libs/pagination/index.umd.js +2 -0
- package/libs/pagination/package.json +6 -0
- package/libs/pagination/src/pagination.d.ts +115 -0
- package/libs/utils/index.mjs +34 -33
- package/libs/utils/index.umd.js +1 -1
- package/libs/utils/types.d.ts +4 -0
- package/package.json +2 -2
package/libs/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
const
|
|
1
|
+
import { ref as B, reactive as W, getCurrentInstance as te, provide as wt, isVNode as Te, inject as $t, onUnmounted as ve, computed as V, defineComponent as z, createVNode as c, watch as X, onMounted as J, nextTick as se, onBeforeUnmount as Ne, onBeforeUpdate as et, onUpdated as nn, createTextVNode as ln, Fragment as tt, createApp as ke, h as $e, Transition as nt, withDirectives as ie, vShow as De, Teleport as Ct, vModelText as Tt, mergeProps as Ce, vModelDynamic as an, resolveDirective as it, render as on, watchEffect as rn } from "vue";
|
|
2
|
+
const un = {
|
|
3
3
|
"pull-refresh": {
|
|
4
4
|
pulling: "下拉刷新...",
|
|
5
5
|
loosing: "释放刷新...",
|
|
@@ -10,30 +10,30 @@ const ln = {
|
|
|
10
10
|
"form-item": {
|
|
11
11
|
validateMessage: "请输入正确内容"
|
|
12
12
|
}
|
|
13
|
-
},
|
|
14
|
-
"zh-CN":
|
|
15
|
-
}),
|
|
13
|
+
}, rt = B("zh-CN"), ut = W({
|
|
14
|
+
"zh-CN": un
|
|
15
|
+
}), Nt = {
|
|
16
16
|
text() {
|
|
17
|
-
return
|
|
17
|
+
return ut[rt.value];
|
|
18
18
|
},
|
|
19
19
|
use(e, t) {
|
|
20
|
-
|
|
20
|
+
rt.value = e, this.add({ [e]: t });
|
|
21
21
|
},
|
|
22
22
|
add(e = {}) {
|
|
23
|
-
Object.assign(
|
|
23
|
+
Object.assign(ut, e);
|
|
24
24
|
}
|
|
25
|
-
},
|
|
26
|
-
(a, l) => a + (t[l] ?
|
|
25
|
+
}, Ee = (e) => (t) => Object.prototype.toString.call(t) === `[object ${e}]`, kt = Ee("Function"), sn = Ee("String"), cn = Ee("Number"), dn = Ee("Object"), fn = Ee("Promise"), Ae = (e, t) => t ? typeof t == "string" ? ` ${e}--${t}` : Array.isArray(t) ? t.reduce((a, l) => a + Ae(e, l), "") : Object.keys(t).reduce(
|
|
26
|
+
(a, l) => a + (t[l] ? Ae(e, l) : ""),
|
|
27
27
|
""
|
|
28
|
-
) : "",
|
|
28
|
+
) : "", mn = (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}${Ae(l, o)}`;
|
|
31
|
+
}, vn = () => (e, t) => t ? `${Ae(`y-${e}`, t)}` : `y-${e}`, M = (e) => {
|
|
32
32
|
const t = `y-${e}`;
|
|
33
|
-
return [t,
|
|
34
|
-
},
|
|
35
|
-
var
|
|
36
|
-
const F = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`,
|
|
33
|
+
return [t, mn(t), vn()];
|
|
34
|
+
}, Et = (e) => Nt.text()[e];
|
|
35
|
+
var Bt = /* @__PURE__ */ ((e) => (e.Mini = "mini", e.Small = "small", e.Middle = "middle", e.Large = "large", e))(Bt || {}), lt = /* @__PURE__ */ ((e) => (e.Top = "top", e.Middle = "middle", e.Bottom = "bottom", e))(lt || {}), Lt = /* @__PURE__ */ ((e) => (e.simple = "simple", e.multi = "multi", e))(Lt || {});
|
|
36
|
+
const F = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, st = (e, t) => typeof e == "string" && e.includes("%") && e.includes("%") ? t * Number(e.replace(/%/g, "")) / 100 : Number(e), gn = (e) => {
|
|
37
37
|
switch (e) {
|
|
38
38
|
case "top":
|
|
39
39
|
return "column-reverse";
|
|
@@ -46,25 +46,25 @@ const F = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, rt = (
|
|
|
46
46
|
default:
|
|
47
47
|
return "column";
|
|
48
48
|
}
|
|
49
|
-
},
|
|
49
|
+
}, hn = (e) => {
|
|
50
50
|
const t = [], a = (l) => {
|
|
51
51
|
Array.isArray(l) && l.forEach((o) => {
|
|
52
52
|
var i;
|
|
53
|
-
|
|
53
|
+
Te(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
|
+
}, pn = (e, t) => {
|
|
58
|
+
const a = hn(t.subTree.children);
|
|
59
59
|
e.sort((l, o) => a.indexOf(l.vnode) - a.indexOf(o.vnode));
|
|
60
|
-
},
|
|
61
|
-
const t = te(), a =
|
|
60
|
+
}, Be = (e) => {
|
|
61
|
+
const t = te(), a = W([]);
|
|
62
62
|
return {
|
|
63
63
|
childrens: a,
|
|
64
64
|
initProvide: (o) => {
|
|
65
|
-
|
|
65
|
+
wt(e, {
|
|
66
66
|
addChild: (r) => {
|
|
67
|
-
r.proxy && (a.push(r), t &&
|
|
67
|
+
r.proxy && (a.push(r), t && pn(a, t));
|
|
68
68
|
},
|
|
69
69
|
removeChild: (r) => {
|
|
70
70
|
const d = a.indexOf(r);
|
|
@@ -75,21 +75,21 @@ const F = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, rt = (
|
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
|
-
},
|
|
79
|
-
const t =
|
|
78
|
+
}, ge = (e) => {
|
|
79
|
+
const t = $t(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), ve(() => i(a)), {
|
|
83
|
+
index: V(() => l.indexOf(a)),
|
|
84
84
|
parent: t
|
|
85
85
|
};
|
|
86
86
|
}
|
|
87
87
|
return {
|
|
88
88
|
parent: null,
|
|
89
|
-
index:
|
|
89
|
+
index: B(-1)
|
|
90
90
|
};
|
|
91
|
-
}, [
|
|
92
|
-
name:
|
|
91
|
+
}, [yn, bn] = M("swipe-item"), we = /* @__PURE__ */ z({
|
|
92
|
+
name: yn,
|
|
93
93
|
props: {
|
|
94
94
|
clonenNode: {
|
|
95
95
|
type: Object,
|
|
@@ -105,9 +105,9 @@ const F = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, rt = (
|
|
|
105
105
|
}) {
|
|
106
106
|
const a = te(), {
|
|
107
107
|
parent: l
|
|
108
|
-
} =
|
|
108
|
+
} = ge(It);
|
|
109
109
|
!e.clonenNode && a && (l == null || l.children.push(a));
|
|
110
|
-
const o =
|
|
110
|
+
const o = V(() => e.clonenNode ? e.index : l == null ? void 0 : l.children.findIndex((n) => n.proxy === (a == null ? void 0 : a.proxy))), i = V(() => {
|
|
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 F = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, rt = (
|
|
|
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: bn(),
|
|
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 Xe = /* @__PURE__ */ ((e) => (e.left = "left", e.top = "top", e.bottom = "bottom", e.right = "right", e))(Xe || {}), Me = /* @__PURE__ */ ((e) => (e.start = "start", e.center = "center", e.end = "end", e))(Me || {});
|
|
135
|
+
const Sn = {
|
|
136
136
|
autoplayTime: {
|
|
137
137
|
type: Number,
|
|
138
138
|
default: 0
|
|
@@ -197,12 +197,12 @@ const hn = {
|
|
|
197
197
|
type: String,
|
|
198
198
|
default: "center"
|
|
199
199
|
}
|
|
200
|
-
}, [
|
|
201
|
-
name:
|
|
200
|
+
}, [Vt, Oe] = M("swipe"), It = Vt, Pt = /* @__PURE__ */ z({
|
|
201
|
+
name: Vt,
|
|
202
202
|
components: {
|
|
203
|
-
YSwipeItem:
|
|
203
|
+
YSwipeItem: we
|
|
204
204
|
},
|
|
205
|
-
props:
|
|
205
|
+
props: Sn,
|
|
206
206
|
setup(e, {
|
|
207
207
|
slots: t,
|
|
208
208
|
emit: a,
|
|
@@ -210,117 +210,117 @@ const hn = {
|
|
|
210
210
|
}) {
|
|
211
211
|
const {
|
|
212
212
|
initProvide: o
|
|
213
|
-
} =
|
|
213
|
+
} = Be(It), i = W([]), n = B(Number(e.initIndex)), r = W({
|
|
214
214
|
// 元素尺寸
|
|
215
215
|
size: 0,
|
|
216
216
|
// 间距
|
|
217
217
|
space: 0,
|
|
218
218
|
// 元素宽度比swipe小,占满整个视窗
|
|
219
219
|
isFillViewport: !1
|
|
220
|
-
}), d =
|
|
220
|
+
}), d = W({
|
|
221
221
|
// 偏移量
|
|
222
222
|
offset: 0,
|
|
223
223
|
// 视窗大小
|
|
224
224
|
viewportSize: 0,
|
|
225
225
|
// 重复节点个数
|
|
226
226
|
cloneNodeCount: 0
|
|
227
|
-
}),
|
|
228
|
-
const w = i.length,
|
|
227
|
+
}), m = B(), S = B(), v = () => {
|
|
228
|
+
const w = i.length, _ = [];
|
|
229
229
|
for (let R = 0; R < w; R++)
|
|
230
|
-
|
|
231
|
-
return
|
|
232
|
-
},
|
|
230
|
+
_.push(!e.lazy);
|
|
231
|
+
return _;
|
|
232
|
+
}, h = () => {
|
|
233
233
|
if (!e.lazy)
|
|
234
234
|
return;
|
|
235
|
-
const w = r.size + r.space,
|
|
236
|
-
let R = -(d.offset +
|
|
237
|
-
R < 0 && (R +=
|
|
235
|
+
const w = r.size + r.space, _ = i.length * w;
|
|
236
|
+
let R = -(d.offset + P.offset) - d.cloneNodeCount * w;
|
|
237
|
+
R < 0 && (R += _);
|
|
238
238
|
const q = R + d.viewportSize;
|
|
239
239
|
for (let U = 0; U < i.length; U++)
|
|
240
|
-
if (!
|
|
240
|
+
if (!u.list[U]) {
|
|
241
241
|
const Z = w * U, oe = Z + r.size;
|
|
242
|
-
(Z >= R && Z < q || oe > R && oe < q || Z < R && oe > q) && (
|
|
242
|
+
(Z >= R && Z < q || oe > R && oe < q || Z < R && oe > q) && (u.list[U] = !0);
|
|
243
243
|
}
|
|
244
|
-
},
|
|
245
|
-
list:
|
|
246
|
-
}),
|
|
247
|
-
|
|
244
|
+
}, u = W({
|
|
245
|
+
list: v()
|
|
246
|
+
}), b = () => {
|
|
247
|
+
u.list = v(), h();
|
|
248
248
|
};
|
|
249
|
-
X(() => [...i],
|
|
250
|
-
const
|
|
251
|
-
w ? r.size =
|
|
252
|
-
},
|
|
253
|
-
if (
|
|
249
|
+
X(() => [...i], b);
|
|
250
|
+
const f = (w, _) => {
|
|
251
|
+
w ? r.size = st(w, _) : r.size = _, r.space = Number(e.itemSpace) || 0, r.isFillViewport = r.size >= _, d.viewportSize = _, d.cloneNodeCount = g();
|
|
252
|
+
}, g = () => {
|
|
253
|
+
if (s.value) {
|
|
254
254
|
const w = r.size + r.space;
|
|
255
255
|
if (w === 0)
|
|
256
256
|
return 0;
|
|
257
|
-
const
|
|
257
|
+
const _ = d.viewportSize * 2 - w, R = Math.ceil(_ / w);
|
|
258
258
|
return Math.min(R, i.length - 1);
|
|
259
259
|
}
|
|
260
260
|
return 0;
|
|
261
|
-
},
|
|
262
|
-
if (!
|
|
261
|
+
}, y = () => {
|
|
262
|
+
if (!m.value)
|
|
263
263
|
return;
|
|
264
264
|
const {
|
|
265
265
|
width: w,
|
|
266
|
-
height:
|
|
267
|
-
} =
|
|
268
|
-
e.vertical ?
|
|
266
|
+
height: _
|
|
267
|
+
} = m.value.getBoundingClientRect();
|
|
268
|
+
e.vertical ? f(e.itemSize, _) : f(e.itemSize, w), n.value = n.value >= i.length ? i.length - 1 : n.value, n.value < 0 && (n.value = 0), p(n.value), b(), D();
|
|
269
269
|
};
|
|
270
270
|
J(() => {
|
|
271
|
-
if (se(
|
|
272
|
-
}), e.touchable &&
|
|
273
|
-
const w =
|
|
274
|
-
w.addEventListener("touchstart", Y, !1), w.addEventListener("mousedown", Y, !1), w.addEventListener("touchmove", ne, !1), w.addEventListener("mousemove", ne, !1), w.addEventListener("touchend",
|
|
271
|
+
if (se(y).catch(() => {
|
|
272
|
+
}), e.touchable && m.value) {
|
|
273
|
+
const w = m.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", L, !1), w.addEventListener("mouseup", L, !1), w.addEventListener("mouseleave", L, !1), w.addEventListener("touchcancel", L, !1);
|
|
275
275
|
}
|
|
276
|
-
window.addEventListener("resize",
|
|
277
|
-
}),
|
|
278
|
-
if (I(), e.touchable &&
|
|
279
|
-
const w =
|
|
280
|
-
w.removeEventListener("touchstart", Y, !1), w.removeEventListener("mousedown", Y, !1), w.removeEventListener("mousemove", ne, !1), w.removeEventListener("touchmove", ne, !1), w.removeEventListener("mouseup",
|
|
276
|
+
window.addEventListener("resize", y, !1), window.addEventListener("orientationchange", y, !1);
|
|
277
|
+
}), Ne(() => {
|
|
278
|
+
if (I(), e.touchable && m.value) {
|
|
279
|
+
const w = m.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", L, !1), w.removeEventListener("touchend", L, !1), w.removeEventListener("mouseleave", L, !1), w.removeEventListener("touchcancel", L, !1);
|
|
281
281
|
}
|
|
282
|
-
window.removeEventListener("resize",
|
|
282
|
+
window.removeEventListener("resize", y, !1), window.removeEventListener("orientationchange", y, !1);
|
|
283
283
|
});
|
|
284
|
-
const C =
|
|
284
|
+
const C = V(() => {
|
|
285
285
|
let w = 0;
|
|
286
286
|
switch (e.align) {
|
|
287
|
-
case
|
|
287
|
+
case Me.start:
|
|
288
288
|
w = 0;
|
|
289
289
|
break;
|
|
290
|
-
case
|
|
290
|
+
case Me.center:
|
|
291
291
|
w = (d.viewportSize - r.size) / 2;
|
|
292
292
|
break;
|
|
293
|
-
case
|
|
293
|
+
case Me.end:
|
|
294
294
|
w = d.viewportSize - r.size;
|
|
295
295
|
break;
|
|
296
296
|
default:
|
|
297
297
|
w = 0;
|
|
298
298
|
}
|
|
299
299
|
return w;
|
|
300
|
-
}),
|
|
301
|
-
const
|
|
302
|
-
|
|
300
|
+
}), s = V(() => e.loop && i.length > 1), p = (w) => {
|
|
301
|
+
const _ = r.size + r.space;
|
|
302
|
+
s.value ? d.offset = -_ * (w + d.cloneNodeCount) + C.value : (d.offset = -_ * w + C.value, e.align !== "center" && (w === 0 && (d.offset = 0), w === i.length - 1 && (d.offset = -_ * w + d.viewportSize - r.size)));
|
|
303
303
|
}, T = () => {
|
|
304
|
-
|
|
305
|
-
},
|
|
306
|
-
n.value =
|
|
307
|
-
|
|
304
|
+
p(n.value), a("afterChange", n.value);
|
|
305
|
+
}, k = (w) => (i.length + w) % i.length, x = (w, _ = !0) => {
|
|
306
|
+
n.value = k(w), p(w), h(), a("change", n.value), _ ? (P.transitionEnabled = !0, S.value && S.value.addEventListener("transitionend", () => {
|
|
307
|
+
P.transitionEnabled = !1, T();
|
|
308
308
|
}, {
|
|
309
309
|
once: !0
|
|
310
310
|
})) : T();
|
|
311
|
-
}, k = (w = !0) => {
|
|
312
|
-
b(n.value - 1, w);
|
|
313
311
|
}, N = (w = !0) => {
|
|
314
|
-
|
|
312
|
+
x(n.value - 1, w);
|
|
313
|
+
}, E = (w = !0) => {
|
|
314
|
+
x(n.value + 1, w);
|
|
315
315
|
};
|
|
316
316
|
let $ = null;
|
|
317
317
|
const I = () => {
|
|
318
318
|
e.autoplayTime && $ && clearInterval($);
|
|
319
319
|
}, D = () => {
|
|
320
320
|
e.autoplayTime && i.length > 1 && ($ && clearInterval($), $ = setInterval(() => {
|
|
321
|
-
|
|
321
|
+
E();
|
|
322
322
|
}, Number(e.autoplayTime)));
|
|
323
|
-
},
|
|
323
|
+
}, P = W({
|
|
324
324
|
// 拖拽中
|
|
325
325
|
isDragging: !1,
|
|
326
326
|
// 是否首次拖动
|
|
@@ -336,95 +336,95 @@ const hn = {
|
|
|
336
336
|
// 是否在执行动画
|
|
337
337
|
transitionEnabled: !1
|
|
338
338
|
}), Y = (w) => {
|
|
339
|
-
if (
|
|
339
|
+
if (P.transitionEnabled)
|
|
340
340
|
return;
|
|
341
|
-
let
|
|
342
|
-
"touches" in w ? (
|
|
341
|
+
let _ = 0, R = 0;
|
|
342
|
+
"touches" in w ? (_ = w.touches[0].clientX, R = w.touches[0].clientY) : (_ = w.clientX, R = w.clientY), P.startX = _, P.startY = R, P.isDragging = !0, P.isFirstTouch = !0, P.startTime = /* @__PURE__ */ new Date();
|
|
343
343
|
}, ne = (w) => {
|
|
344
|
-
if (!
|
|
344
|
+
if (!P.isDragging)
|
|
345
345
|
return;
|
|
346
|
-
let
|
|
347
|
-
"touches" in w ? (
|
|
348
|
-
const q =
|
|
349
|
-
if (
|
|
350
|
-
|
|
346
|
+
let _ = 0, R = 0;
|
|
347
|
+
"touches" in w ? (_ = w.touches[0].clientX, R = w.touches[0].clientY) : (_ = w.clientX, R = w.clientY);
|
|
348
|
+
const q = _ - P.startX, U = R - P.startY;
|
|
349
|
+
if (P.isFirstTouch && (P.isFirstTouch = !1, Math.abs(q) < Math.abs(U) !== e.vertical)) {
|
|
350
|
+
P.isDragging = !1;
|
|
351
351
|
return;
|
|
352
352
|
}
|
|
353
|
-
w.preventDefault(),
|
|
354
|
-
percent:
|
|
355
|
-
offset:
|
|
353
|
+
w.preventDefault(), P.offset = e.vertical ? U : q, h(), a("dragging", {
|
|
354
|
+
percent: P.offset / (r.size + r.space),
|
|
355
|
+
offset: P.offset
|
|
356
356
|
});
|
|
357
|
-
},
|
|
358
|
-
if (!
|
|
357
|
+
}, L = () => {
|
|
358
|
+
if (!P.isDragging)
|
|
359
359
|
return;
|
|
360
|
-
|
|
361
|
-
const
|
|
362
|
-
|
|
363
|
-
}, O =
|
|
364
|
-
if (
|
|
360
|
+
P.isDragging = !1;
|
|
361
|
+
const _ = (/* @__PURE__ */ new Date()).getTime() - P.startTime.getTime();
|
|
362
|
+
H() && (Math.abs(P.offset) > O.value || Math.abs(P.offset) / _ > 0.5) && (P.offset > 0 ? N() : E()), P.offset = 0, D();
|
|
363
|
+
}, O = V(() => st(e.minSwipeDistance, r.size + r.space)), H = () => {
|
|
364
|
+
if (s.value)
|
|
365
365
|
return !0;
|
|
366
|
-
const w =
|
|
366
|
+
const w = P.offset > 0 ? n.value - 1 : n.value + 1;
|
|
367
367
|
return w >= 0 && w < i.length;
|
|
368
|
-
}, re =
|
|
369
|
-
const w =
|
|
370
|
-
return e.vertical ? (
|
|
371
|
-
}), K =
|
|
368
|
+
}, re = V(() => {
|
|
369
|
+
const w = P.isDragging && !e.isFollowHand ? d.offset : d.offset + P.offset, _ = {};
|
|
370
|
+
return e.vertical ? (_.transform = `translate3d(0, ${w}px, 0)`, _.transitionDuration = P.transitionEnabled ? `${e.duration}ms` : "0ms") : (_.transform = `translate3d(${w}px, 0, 0)`, _.transitionDuration = P.transitionEnabled ? `${e.duration}ms` : "0ms"), P.isDragging && (_.transition = "none"), e.vertical && (_.flexDirection = "column"), e.autoHeight && (_.display = "block", _.whiteSpace = "nowrap"), _;
|
|
371
|
+
}), K = V(() => ["y-swipe__dots", `y-swipe__dots--${e.dotsPosition || (e.vertical ? Xe.left : Xe.bottom)}`]);
|
|
372
372
|
l({
|
|
373
|
-
moveTo:
|
|
374
|
-
next:
|
|
375
|
-
prev:
|
|
376
|
-
resize:
|
|
373
|
+
moveTo: x,
|
|
374
|
+
next: E,
|
|
375
|
+
prev: N,
|
|
376
|
+
resize: y
|
|
377
377
|
});
|
|
378
|
-
const le =
|
|
378
|
+
const le = W({
|
|
379
379
|
children: i,
|
|
380
380
|
activeIndex: n,
|
|
381
381
|
props: e,
|
|
382
382
|
itemDetail: r,
|
|
383
|
-
itemShowedList:
|
|
383
|
+
itemShowedList: u
|
|
384
384
|
});
|
|
385
385
|
o(le);
|
|
386
386
|
const ae = () => e.dots ? c("div", {
|
|
387
387
|
class: K.value
|
|
388
|
-
}, [i.map((w,
|
|
389
|
-
const R =
|
|
390
|
-
active:
|
|
388
|
+
}, [i.map((w, _) => {
|
|
389
|
+
const R = Oe("dot", {
|
|
390
|
+
active: _ === 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: _
|
|
398
398
|
}, null);
|
|
399
399
|
})]) : null;
|
|
400
400
|
return () => {
|
|
401
401
|
var w;
|
|
402
402
|
return c("div", {
|
|
403
|
-
class:
|
|
404
|
-
ref:
|
|
403
|
+
class: Oe(),
|
|
404
|
+
ref: m
|
|
405
405
|
}, [c("div", {
|
|
406
|
-
class:
|
|
406
|
+
class: Oe("track"),
|
|
407
407
|
style: re.value,
|
|
408
|
-
ref:
|
|
409
|
-
}, [Array(d.cloneNodeCount).fill("").map((
|
|
410
|
-
var Z, oe,
|
|
411
|
-
const q =
|
|
412
|
-
return U ? c(
|
|
408
|
+
ref: S
|
|
409
|
+
}, [Array(d.cloneNodeCount).fill("").map((_, R) => {
|
|
410
|
+
var Z, oe, he;
|
|
411
|
+
const q = k(R - d.cloneNodeCount), U = (he = (Z = i[q]) == null ? void 0 : (oe = Z.slots).default) == null ? void 0 : he.call(oe);
|
|
412
|
+
return U ? c(we, {
|
|
413
413
|
clonenNode: U,
|
|
414
414
|
index: q
|
|
415
415
|
}, null) : null;
|
|
416
|
-
}), (w = t.default) == null ? void 0 : w.call(t), Array(d.cloneNodeCount).fill("").map((
|
|
417
|
-
var Z, oe,
|
|
418
|
-
const q =
|
|
419
|
-
return U ? c(
|
|
416
|
+
}), (w = t.default) == null ? void 0 : w.call(t), Array(d.cloneNodeCount).fill("").map((_, R) => {
|
|
417
|
+
var Z, oe, he;
|
|
418
|
+
const q = k(R), U = (he = (Z = i[q]) == null ? void 0 : (oe = Z.slots).default) == null ? void 0 : he.call(oe);
|
|
419
|
+
return U ? c(we, {
|
|
420
420
|
clonenNode: U,
|
|
421
421
|
index: q
|
|
422
422
|
}, null) : null;
|
|
423
423
|
})]), t.dots ? t.dots() : ae()]);
|
|
424
424
|
};
|
|
425
425
|
}
|
|
426
|
-
}), [
|
|
427
|
-
name:
|
|
426
|
+
}), [xn, ct] = M("tabs-title"), dt = /* @__PURE__ */ z({
|
|
427
|
+
name: xn,
|
|
428
428
|
props: {
|
|
429
429
|
active: {
|
|
430
430
|
type: Boolean,
|
|
@@ -450,14 +450,14 @@ const hn = {
|
|
|
450
450
|
setup(e) {
|
|
451
451
|
const {
|
|
452
452
|
parent: t
|
|
453
|
-
} =
|
|
453
|
+
} = ge(at), a = V(() => [{
|
|
454
454
|
"y-el--clickable": !e.disabled
|
|
455
|
-
},
|
|
455
|
+
}, ct({
|
|
456
456
|
scrollable: e.scrollable,
|
|
457
457
|
disabled: e.disabled
|
|
458
|
-
}),
|
|
458
|
+
}), ct(`${(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 = V(() => ({
|
|
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 hn = {
|
|
|
476
476
|
}, [i ? i() : o]);
|
|
477
477
|
};
|
|
478
478
|
}
|
|
479
|
-
}),
|
|
479
|
+
}), Re = null, wn = {
|
|
480
480
|
initIndex: {
|
|
481
481
|
type: Number,
|
|
482
482
|
default: 0
|
|
@@ -505,7 +505,7 @@ const hn = {
|
|
|
505
505
|
type: [Number, String],
|
|
506
506
|
default: "3px"
|
|
507
507
|
},
|
|
508
|
-
titleWrapperClass:
|
|
508
|
+
titleWrapperClass: Re,
|
|
509
509
|
titleScrollThreshold: {
|
|
510
510
|
type: Number,
|
|
511
511
|
default: 5
|
|
@@ -515,7 +515,7 @@ const hn = {
|
|
|
515
515
|
default: null
|
|
516
516
|
},
|
|
517
517
|
titleClass: {
|
|
518
|
-
type:
|
|
518
|
+
type: Re,
|
|
519
519
|
default: null
|
|
520
520
|
},
|
|
521
521
|
titleActiveStyle: {
|
|
@@ -523,7 +523,7 @@ const hn = {
|
|
|
523
523
|
default: null
|
|
524
524
|
},
|
|
525
525
|
titleActiveClass: {
|
|
526
|
-
type:
|
|
526
|
+
type: Re,
|
|
527
527
|
default: null
|
|
528
528
|
},
|
|
529
529
|
touchable: {
|
|
@@ -543,15 +543,15 @@ const hn = {
|
|
|
543
543
|
default: "center"
|
|
544
544
|
}
|
|
545
545
|
};
|
|
546
|
-
function
|
|
547
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" &&
|
|
546
|
+
function $n(e) {
|
|
547
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Te(e);
|
|
548
548
|
}
|
|
549
|
-
const [
|
|
550
|
-
name:
|
|
549
|
+
const [Ye, Fe] = M("tabs"), at = Ye, Cn = /* @__PURE__ */ z({
|
|
550
|
+
name: Ye,
|
|
551
551
|
components: {
|
|
552
|
-
YTabTitle:
|
|
552
|
+
YTabTitle: dt
|
|
553
553
|
},
|
|
554
|
-
props:
|
|
554
|
+
props: wn,
|
|
555
555
|
setup(e, {
|
|
556
556
|
slots: t,
|
|
557
557
|
emit: a,
|
|
@@ -559,144 +559,144 @@ const [je, Oe] = A("tabs"), nt = je, Sn = /* @__PURE__ */ P({
|
|
|
559
559
|
}) {
|
|
560
560
|
const {
|
|
561
561
|
initProvide: o
|
|
562
|
-
} =
|
|
563
|
-
|
|
562
|
+
} = Be(at), i = B(!1), n = W([]), r = B(), d = V(() => n.length > e.titleScrollThreshold), m = ($) => n.findIndex((I) => (I.$props ? I.$props.name : "") === $), S = B(e.initName ? m(e.initName) : e.initIndex), v = ($) => {
|
|
563
|
+
S.value = $;
|
|
564
564
|
const I = r.value;
|
|
565
565
|
I && (I == null || I.moveTo($, e.changeWithAnimation));
|
|
566
566
|
};
|
|
567
567
|
l({
|
|
568
568
|
scrollToByIndex: ($) => {
|
|
569
|
-
|
|
569
|
+
v($);
|
|
570
570
|
},
|
|
571
571
|
scrollToByName: ($) => {
|
|
572
|
-
const I =
|
|
573
|
-
|
|
572
|
+
const I = m($);
|
|
573
|
+
v(I);
|
|
574
574
|
}
|
|
575
575
|
});
|
|
576
|
-
const
|
|
577
|
-
|
|
578
|
-
},
|
|
576
|
+
const b = B([]), f = B(), g = ($) => (I) => {
|
|
577
|
+
b.value[$] = I;
|
|
578
|
+
}, y = ($) => {
|
|
579
579
|
const {
|
|
580
580
|
title: I,
|
|
581
581
|
name: D,
|
|
582
|
-
disabled:
|
|
582
|
+
disabled: P
|
|
583
583
|
} = n[$].$props || {};
|
|
584
|
-
|
|
584
|
+
S.value !== $ && (a(P ? "disabledClick" : "click", $, I, D), !P && v($));
|
|
585
585
|
}, C = async () => {
|
|
586
586
|
await se(() => {
|
|
587
|
-
if (!d.value || !
|
|
587
|
+
if (!d.value || !f.value)
|
|
588
588
|
return;
|
|
589
|
-
const $ =
|
|
590
|
-
if (!$ || !
|
|
589
|
+
const $ = f.value;
|
|
590
|
+
if (!$ || !b.value[S.value])
|
|
591
591
|
return;
|
|
592
|
-
const I =
|
|
592
|
+
const I = b.value[S.value].$el, D = I.offsetLeft - ($.offsetWidth - I.offsetWidth) / 2 - $.scrollLeft;
|
|
593
593
|
$.scrollBy({
|
|
594
594
|
left: D,
|
|
595
595
|
behavior: "smooth"
|
|
596
596
|
});
|
|
597
597
|
});
|
|
598
598
|
};
|
|
599
|
-
|
|
600
|
-
|
|
599
|
+
et(() => {
|
|
600
|
+
b.value = [];
|
|
601
601
|
});
|
|
602
|
-
const
|
|
602
|
+
const s = W({
|
|
603
603
|
transform: "translateX(50%)",
|
|
604
604
|
transition: "all 0ms ease-out"
|
|
605
|
-
}),
|
|
605
|
+
}), p = async () => {
|
|
606
606
|
await se(() => {
|
|
607
|
-
if (!
|
|
607
|
+
if (!b.value || b.value.length === 0)
|
|
608
608
|
return;
|
|
609
|
-
const $ =
|
|
610
|
-
|
|
609
|
+
const $ = S.value >= b.value.length ? 0 : S.value, I = b.value[$].$el, D = I.offsetLeft + I.offsetWidth / 2;
|
|
610
|
+
s.transform = `translateX(${D}px) translateX(-50%)`, i.value && (s.transition = `all ${e.duration}ms ease-out`), i.value = !0;
|
|
611
611
|
});
|
|
612
612
|
}, T = ($) => {
|
|
613
613
|
const {
|
|
614
614
|
title: I,
|
|
615
615
|
name: D
|
|
616
616
|
} = n[$].$props || {};
|
|
617
|
-
a("change", $, I, D),
|
|
618
|
-
},
|
|
617
|
+
a("change", $, I, D), S.value = $;
|
|
618
|
+
}, k = ($) => {
|
|
619
619
|
const {
|
|
620
620
|
title: I,
|
|
621
621
|
name: D
|
|
622
622
|
} = n[$].$props || {};
|
|
623
|
-
a("afterChange", $, I, D),
|
|
624
|
-
},
|
|
623
|
+
a("afterChange", $, I, D), S.value = $;
|
|
624
|
+
}, x = W({
|
|
625
625
|
children: n,
|
|
626
|
-
activeIndex:
|
|
626
|
+
activeIndex: S,
|
|
627
627
|
props: e
|
|
628
628
|
});
|
|
629
|
-
o(
|
|
630
|
-
const
|
|
629
|
+
o(x);
|
|
630
|
+
const N = ($) => E($) && /^\d+(\.\d+)?$/.test($) ? `${$}px` : $, E = ($) => Object.prototype.toString.call($) === "[object String]";
|
|
631
631
|
return J(async () => {
|
|
632
|
-
await
|
|
633
|
-
}), X(() =>
|
|
634
|
-
await
|
|
632
|
+
await p();
|
|
633
|
+
}), X(() => S.value, async () => {
|
|
634
|
+
await p(), await C();
|
|
635
635
|
}), X(() => {
|
|
636
636
|
var $;
|
|
637
637
|
return ($ = t.default) == null ? void 0 : $.length;
|
|
638
638
|
}, async () => {
|
|
639
|
-
await
|
|
639
|
+
await p();
|
|
640
640
|
}), () => {
|
|
641
641
|
let $;
|
|
642
642
|
return c("div", {
|
|
643
|
-
class:
|
|
643
|
+
class: Ye
|
|
644
644
|
}, [c("div", {
|
|
645
|
-
class:
|
|
645
|
+
class: Fe("list")
|
|
646
646
|
}, [c("div", {
|
|
647
|
-
ref:
|
|
648
|
-
class:
|
|
647
|
+
ref: f,
|
|
648
|
+
class: Fe("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((I, D) => c(
|
|
653
|
+
}, [n.length > 0 && n.map((I, D) => c(dt, {
|
|
654
654
|
title: I.title,
|
|
655
655
|
disabled: I.disabled,
|
|
656
656
|
"title-slot": I.$slots.title,
|
|
657
657
|
key: D,
|
|
658
|
-
ref:
|
|
659
|
-
active:
|
|
658
|
+
ref: g(D),
|
|
659
|
+
active: S.value === D,
|
|
660
660
|
scrollable: d.value,
|
|
661
|
-
onClick: () =>
|
|
661
|
+
onClick: () => y(D)
|
|
662
662
|
}, null)), c("div", {
|
|
663
|
-
class:
|
|
663
|
+
class: Fe("line"),
|
|
664
664
|
style: {
|
|
665
|
-
...
|
|
666
|
-
width:
|
|
667
|
-
height:
|
|
665
|
+
...s,
|
|
666
|
+
width: N(e.lineWidth),
|
|
667
|
+
height: N(e.lineHeight),
|
|
668
668
|
backgroundColor: e.lineColor
|
|
669
669
|
}
|
|
670
|
-
}, null)])]), t.default ? c(
|
|
670
|
+
}, null)])]), t.default ? c(Pt, {
|
|
671
671
|
ref: r,
|
|
672
672
|
dots: !1,
|
|
673
673
|
loop: !1,
|
|
674
|
-
initIndex:
|
|
674
|
+
initIndex: S.value,
|
|
675
675
|
lazy: e.lazy,
|
|
676
676
|
touchable: e.touchable,
|
|
677
677
|
duration: e.duration,
|
|
678
678
|
"is-follow-hand": e.changeWithAnimation,
|
|
679
679
|
onChange: T,
|
|
680
|
-
onAfterChange:
|
|
681
|
-
},
|
|
680
|
+
onAfterChange: k
|
|
681
|
+
}, $n($ = t.default()) ? $ : {
|
|
682
682
|
default: () => [$]
|
|
683
683
|
}) : null]);
|
|
684
684
|
};
|
|
685
685
|
}
|
|
686
686
|
});
|
|
687
|
-
function
|
|
687
|
+
function A(e) {
|
|
688
688
|
const t = e;
|
|
689
689
|
return t.install = (a) => {
|
|
690
690
|
const { name: l } = e;
|
|
691
691
|
l && a.component(l, e);
|
|
692
692
|
}, t;
|
|
693
693
|
}
|
|
694
|
-
const
|
|
695
|
-
function
|
|
696
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" &&
|
|
694
|
+
const Tn = A(Cn);
|
|
695
|
+
function Nn(e) {
|
|
696
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Te(e);
|
|
697
697
|
}
|
|
698
|
-
const [
|
|
699
|
-
name:
|
|
698
|
+
const [kn] = M("tab"), En = /* @__PURE__ */ z({
|
|
699
|
+
name: kn,
|
|
700
700
|
props: {
|
|
701
701
|
title: {
|
|
702
702
|
type: String,
|
|
@@ -716,29 +716,29 @@ const [$n] = A("tab"), Cn = /* @__PURE__ */ P({
|
|
|
716
716
|
}) {
|
|
717
717
|
const {
|
|
718
718
|
parent: a
|
|
719
|
-
} =
|
|
720
|
-
return l.proxy && (a == null || a.children.push(l.proxy)),
|
|
719
|
+
} = ge(at), l = te();
|
|
720
|
+
return l.proxy && (a == null || a.children.push(l.proxy)), Ne(() => {
|
|
721
721
|
a && (a.children = a.children.filter((o) => o !== l.proxy));
|
|
722
722
|
}), () => {
|
|
723
723
|
let o;
|
|
724
|
-
return t.default ? c(
|
|
724
|
+
return t.default ? c(we, null, Nn(o = t.default()) ? o : {
|
|
725
725
|
default: () => [o]
|
|
726
726
|
}) : null;
|
|
727
727
|
};
|
|
728
728
|
}
|
|
729
|
-
}),
|
|
730
|
-
const e =
|
|
729
|
+
}), Bn = A(En), ft = 10, Ln = (e, t) => e > t && e > ft ? "horizontal" : t > e && t > ft ? "vertical" : "", Vn = (e, t) => Math.abs(e) > Math.abs(t) ? e > 0 ? "right" : "left" : t > 0 ? "bottom" : "top", In = () => {
|
|
730
|
+
const e = B(0), t = B(0), a = B(0), l = B(0), o = B(0), i = B(0), n = B(""), r = B(""), d = () => n.value === "vertical", m = () => n.value === "horizontal", S = () => {
|
|
731
731
|
a.value = 0, l.value = 0, o.value = 0, i.value = 0, n.value = "", r.value = "";
|
|
732
732
|
};
|
|
733
733
|
return {
|
|
734
|
-
move: (
|
|
735
|
-
const
|
|
736
|
-
a.value =
|
|
734
|
+
move: (u) => {
|
|
735
|
+
const b = u.touches[0];
|
|
736
|
+
a.value = b.clientX < 0 ? 0 : b.clientX - e.value, l.value = b.clientY - t.value, o.value = Math.abs(a.value), i.value = Math.abs(l.value), n.value || (n.value = Ln(o.value, i.value)), r.value = Vn(a.value, l.value);
|
|
737
737
|
},
|
|
738
|
-
start: (
|
|
739
|
-
|
|
738
|
+
start: (u) => {
|
|
739
|
+
S(), e.value = u.touches[0].clientX, t.value = u.touches[0].clientY;
|
|
740
740
|
},
|
|
741
|
-
reset:
|
|
741
|
+
reset: S,
|
|
742
742
|
startX: e,
|
|
743
743
|
startY: t,
|
|
744
744
|
deltaX: a,
|
|
@@ -748,10 +748,10 @@ const [$n] = A("tab"), Cn = /* @__PURE__ */ P({
|
|
|
748
748
|
direction: n,
|
|
749
749
|
touchDirection: r,
|
|
750
750
|
isVertical: d,
|
|
751
|
-
isHorizontal:
|
|
751
|
+
isHorizontal: m
|
|
752
752
|
};
|
|
753
|
-
}, [
|
|
754
|
-
name:
|
|
753
|
+
}, [Pn, G] = M("slider"), _n = /* @__PURE__ */ z({
|
|
754
|
+
name: Pn,
|
|
755
755
|
props: {
|
|
756
756
|
modelValue: {
|
|
757
757
|
type: [Number, Array],
|
|
@@ -811,69 +811,69 @@ const [$n] = A("tab"), Cn = /* @__PURE__ */ P({
|
|
|
811
811
|
emit: t,
|
|
812
812
|
slots: a
|
|
813
813
|
}) {
|
|
814
|
-
const l =
|
|
814
|
+
const l = B(), o = B(0), i = B(0), n = B(""), r = In(), d = V(() => Array.isArray(e.modelValue)), m = (x) => {
|
|
815
815
|
const {
|
|
816
|
-
min:
|
|
817
|
-
max:
|
|
816
|
+
min: N,
|
|
817
|
+
max: E,
|
|
818
818
|
step: $
|
|
819
|
-
} = e, I = Math.max(
|
|
819
|
+
} = e, I = Math.max(N, Math.min(x, E));
|
|
820
820
|
return Math.round(I / $) * $;
|
|
821
|
-
},
|
|
822
|
-
if (
|
|
821
|
+
}, S = (x) => {
|
|
822
|
+
if (x.stopPropagation(), e.disabled)
|
|
823
823
|
return;
|
|
824
824
|
const {
|
|
825
|
-
min:
|
|
826
|
-
modelValue:
|
|
825
|
+
min: N,
|
|
826
|
+
modelValue: E
|
|
827
827
|
} = e, {
|
|
828
828
|
left: $,
|
|
829
829
|
width: I
|
|
830
|
-
} = l.value.getBoundingClientRect(), D =
|
|
830
|
+
} = l.value.getBoundingClientRect(), D = x.clientX - $, P = Math.floor(N + D / I * y.value);
|
|
831
831
|
if (d.value) {
|
|
832
|
-
const Y =
|
|
833
|
-
|
|
832
|
+
const Y = E[0], ne = E[1], L = (Y + ne) / 2;
|
|
833
|
+
P <= L ? u([P, ne]) : u([Y, P]);
|
|
834
834
|
} else
|
|
835
|
-
|
|
836
|
-
},
|
|
837
|
-
let
|
|
838
|
-
d.value ?
|
|
839
|
-
},
|
|
835
|
+
u(P);
|
|
836
|
+
}, v = (x) => x[0] > x[1] ? [x[1], x[0]] : x, h = (x, N) => JSON.stringify(x) === JSON.stringify(N), u = (x, N) => {
|
|
837
|
+
let E = 0;
|
|
838
|
+
d.value ? E = v(x).map(m) : E = m(x), t("update:modelValue", E), typeof N > "u" && !h(o.value, i.value) && t("change", E);
|
|
839
|
+
}, b = V(() => {
|
|
840
840
|
const {
|
|
841
|
-
modelValue:
|
|
842
|
-
min:
|
|
841
|
+
modelValue: x,
|
|
842
|
+
min: N
|
|
843
843
|
} = e;
|
|
844
|
-
let
|
|
845
|
-
return d.value ?
|
|
846
|
-
}),
|
|
844
|
+
let E = null;
|
|
845
|
+
return d.value ? E = Math.floor((m(x[1]) - m(x[0])) * 100 / y.value) : E = Math.floor((m(x) - N) * 100 / y.value), `${E}%`;
|
|
846
|
+
}), f = V(() => {
|
|
847
847
|
const {
|
|
848
|
-
modelValue:
|
|
849
|
-
min:
|
|
848
|
+
modelValue: x,
|
|
849
|
+
min: N
|
|
850
850
|
} = e;
|
|
851
|
-
return d.value ? `${Math.floor((
|
|
852
|
-
}),
|
|
853
|
-
left:
|
|
851
|
+
return d.value ? `${Math.floor((m(x[0]) - N) * 100 / y.value)}%` : "0%";
|
|
852
|
+
}), g = V(() => ({
|
|
853
|
+
left: b.value,
|
|
854
854
|
transition: n.value === "moving" ? "none" : `${e.transitionTime}ms ease-in-out`
|
|
855
|
-
})),
|
|
856
|
-
e.disabled || (r.start(
|
|
857
|
-
},
|
|
855
|
+
})), y = V(() => e.max - e.min), C = (x) => {
|
|
856
|
+
e.disabled || (r.start(x), n.value = "startMove", i.value = e.modelValue, d.value ? o.value = [...i.value] : o.value = i.value);
|
|
857
|
+
}, s = (x, N) => {
|
|
858
858
|
if (e.disabled)
|
|
859
859
|
return;
|
|
860
|
-
r.move(
|
|
860
|
+
r.move(x), n.value === "startMove" && t("drag-start"), n.value = "moving";
|
|
861
861
|
const {
|
|
862
|
-
width:
|
|
863
|
-
} = l.value.getBoundingClientRect(), $ = r.deltaX.value, I = Math.floor($ /
|
|
864
|
-
Array.isArray(o.value) && Array.isArray(i.value) ?
|
|
865
|
-
},
|
|
866
|
-
e.disabled || (n.value === "moving" && (
|
|
867
|
-
}, T = (
|
|
868
|
-
let
|
|
869
|
-
return
|
|
870
|
-
left:
|
|
862
|
+
width: E
|
|
863
|
+
} = l.value.getBoundingClientRect(), $ = r.deltaX.value, I = Math.floor($ / E * y.value);
|
|
864
|
+
Array.isArray(o.value) && Array.isArray(i.value) ? N === "left" ? i.value[0] = o.value[0] + I : i.value[1] = o.value[1] + I : i.value = o.value + I, u(i.value, !0);
|
|
865
|
+
}, p = () => {
|
|
866
|
+
e.disabled || (n.value === "moving" && (u(i.value), t("drag-end")), n.value = "endMove");
|
|
867
|
+
}, T = (x) => {
|
|
868
|
+
let N = "", E = {}, $ = 0, I = G("button-wrapper");
|
|
869
|
+
return x === 0 ? (N = "left", E = {
|
|
870
|
+
left: f.value,
|
|
871
871
|
backgroundColor: Array.isArray(e.buttonBgColor) ? e.buttonBgColor[0] : e.buttonBgColor
|
|
872
|
-
}, $ = e.modelValue[
|
|
873
|
-
left: `${parseInt(
|
|
872
|
+
}, $ = e.modelValue[x], I = G("button-wrapper", "left")) : x === 1 ? (N = "right", $ = e.modelValue[x], E = {
|
|
873
|
+
left: `${parseInt(b.value) + parseInt(f.value)}%`,
|
|
874
874
|
backgroundColor: Array.isArray(e.buttonBgColor) ? e.buttonBgColor[1] : e.buttonBgColor
|
|
875
|
-
}, I = G("button-wrapper", "right")) : ($ = e.modelValue,
|
|
876
|
-
left:
|
|
875
|
+
}, I = G("button-wrapper", "right")) : ($ = e.modelValue, E = {
|
|
876
|
+
left: b.value,
|
|
877
877
|
backgroundColor: e.buttonBgColor
|
|
878
878
|
}), c("div", {
|
|
879
879
|
role: "slider",
|
|
@@ -882,21 +882,21 @@ const [$n] = A("tab"), Cn = /* @__PURE__ */ P({
|
|
|
882
882
|
"aria-valuenow": $,
|
|
883
883
|
class: I,
|
|
884
884
|
onTouchstart: C,
|
|
885
|
-
onTouchmove: (D) =>
|
|
886
|
-
onTouchend:
|
|
885
|
+
onTouchmove: (D) => s(D, N),
|
|
886
|
+
onTouchend: p,
|
|
887
887
|
style: {
|
|
888
|
-
...
|
|
888
|
+
...E,
|
|
889
889
|
transition: n.value === "moving" ? "none" : `${e.transitionTime}ms ease-in-out`
|
|
890
890
|
}
|
|
891
891
|
}, [a.button ? a.button() : c("div", {
|
|
892
892
|
class: G("inner-button"),
|
|
893
|
-
style:
|
|
893
|
+
style: E
|
|
894
894
|
}, null)]);
|
|
895
|
-
},
|
|
896
|
-
position: `${
|
|
895
|
+
}, k = V(() => Array((e.max - e.min) / e.step).fill({}).map((N, E) => ({
|
|
896
|
+
position: `${E * e.step}%`
|
|
897
897
|
})));
|
|
898
898
|
return () => {
|
|
899
|
-
var
|
|
899
|
+
var x;
|
|
900
900
|
return c("div", {
|
|
901
901
|
class: G()
|
|
902
902
|
}, [a.iconLeft && c("div", {
|
|
@@ -913,13 +913,13 @@ const [$n] = A("tab"), Cn = /* @__PURE__ */ P({
|
|
|
913
913
|
background: e.inactiveColor,
|
|
914
914
|
height: F(e.barHeight)
|
|
915
915
|
},
|
|
916
|
-
onClick:
|
|
916
|
+
onClick: S
|
|
917
917
|
}, [e.step !== 1 && c("div", {
|
|
918
918
|
class: G("dots")
|
|
919
|
-
}, [
|
|
919
|
+
}, [k.value.map((N) => c("div", {
|
|
920
920
|
class: G("dot"),
|
|
921
921
|
style: {
|
|
922
|
-
left:
|
|
922
|
+
left: N.position,
|
|
923
923
|
background: e.gapColor,
|
|
924
924
|
width: F(e.gapWidth)
|
|
925
925
|
}
|
|
@@ -927,11 +927,11 @@ const [$n] = A("tab"), Cn = /* @__PURE__ */ P({
|
|
|
927
927
|
class: G("tooltip", {
|
|
928
928
|
wrapper: a.toolTip
|
|
929
929
|
}),
|
|
930
|
-
style:
|
|
931
|
-
}, [((
|
|
930
|
+
style: g.value
|
|
931
|
+
}, [((x = a.toolTip) == null ? void 0 : x.call(a)) || e.modelValue]), c("div", {
|
|
932
932
|
style: {
|
|
933
|
-
left:
|
|
934
|
-
width:
|
|
933
|
+
left: f.value,
|
|
934
|
+
width: b.value,
|
|
935
935
|
background: e.activeColor,
|
|
936
936
|
transition: n.value === "moving" ? "none" : `${e.transitionTime}ms ease-in-out`
|
|
937
937
|
},
|
|
@@ -944,7 +944,7 @@ const [$n] = A("tab"), Cn = /* @__PURE__ */ P({
|
|
|
944
944
|
};
|
|
945
945
|
}
|
|
946
946
|
});
|
|
947
|
-
const
|
|
947
|
+
const zn = A(_n), [Mn, de] = M("loading"), An = {
|
|
948
948
|
// Loading icon 的颜色
|
|
949
949
|
color: {
|
|
950
950
|
type: String,
|
|
@@ -1003,14 +1003,14 @@ const In = M(Bn), [Vn, de] = A("loading"), _n = {
|
|
|
1003
1003
|
type: String,
|
|
1004
1004
|
default: "relative"
|
|
1005
1005
|
}
|
|
1006
|
-
},
|
|
1007
|
-
name:
|
|
1008
|
-
props:
|
|
1006
|
+
}, ot = /* @__PURE__ */ z({
|
|
1007
|
+
name: Mn,
|
|
1008
|
+
props: An,
|
|
1009
1009
|
setup(e, {
|
|
1010
1010
|
slots: t
|
|
1011
1011
|
}) {
|
|
1012
1012
|
return () => {
|
|
1013
|
-
var
|
|
1013
|
+
var f, g;
|
|
1014
1014
|
const {
|
|
1015
1015
|
position: a,
|
|
1016
1016
|
textLocation: l,
|
|
@@ -1019,12 +1019,12 @@ const In = M(Bn), [Vn, de] = A("loading"), _n = {
|
|
|
1019
1019
|
size: n,
|
|
1020
1020
|
padding: r,
|
|
1021
1021
|
color: d,
|
|
1022
|
-
thick:
|
|
1023
|
-
direction:
|
|
1024
|
-
text:
|
|
1025
|
-
textColor:
|
|
1026
|
-
textSize:
|
|
1027
|
-
} = e,
|
|
1022
|
+
thick: m,
|
|
1023
|
+
direction: S,
|
|
1024
|
+
text: v,
|
|
1025
|
+
textColor: h,
|
|
1026
|
+
textSize: u
|
|
1027
|
+
} = e, b = ((f = t.default) == null ? void 0 : f.call(t)) || v;
|
|
1028
1028
|
return c("div", {
|
|
1029
1029
|
class: de({
|
|
1030
1030
|
[a]: a !== "relative"
|
|
@@ -1034,7 +1034,7 @@ const In = M(Bn), [Vn, de] = A("loading"), _n = {
|
|
|
1034
1034
|
[a]: a !== "relative"
|
|
1035
1035
|
}),
|
|
1036
1036
|
style: {
|
|
1037
|
-
flexDirection:
|
|
1037
|
+
flexDirection: gn(l),
|
|
1038
1038
|
backgroundColor: o,
|
|
1039
1039
|
borderRadius: F(i),
|
|
1040
1040
|
padding: F(r)
|
|
@@ -1045,34 +1045,34 @@ const In = M(Bn), [Vn, de] = A("loading"), _n = {
|
|
|
1045
1045
|
width: F(n),
|
|
1046
1046
|
height: F(n)
|
|
1047
1047
|
}
|
|
1048
|
-
}, [((
|
|
1048
|
+
}, [((g = t.icon) == null ? void 0 : g.call(t)) || c("svg", {
|
|
1049
1049
|
class: de("icon", {
|
|
1050
|
-
[
|
|
1050
|
+
[S]: S
|
|
1051
1051
|
}),
|
|
1052
1052
|
viewBox: "25 25 50 50"
|
|
1053
1053
|
}, [c("circle", {
|
|
1054
1054
|
class: de("icon-circle"),
|
|
1055
1055
|
style: {
|
|
1056
1056
|
stroke: d,
|
|
1057
|
-
strokeWidth: F(
|
|
1057
|
+
strokeWidth: F(m)
|
|
1058
1058
|
},
|
|
1059
1059
|
cx: "50",
|
|
1060
1060
|
cy: "50",
|
|
1061
1061
|
r: "20",
|
|
1062
1062
|
fill: "none"
|
|
1063
|
-
}, null)])]),
|
|
1063
|
+
}, null)])]), b && c("span", {
|
|
1064
1064
|
class: de("text", {
|
|
1065
1065
|
[l]: l
|
|
1066
1066
|
}),
|
|
1067
1067
|
style: {
|
|
1068
|
-
color:
|
|
1069
|
-
fontSize: F(
|
|
1068
|
+
color: h,
|
|
1069
|
+
fontSize: F(u)
|
|
1070
1070
|
}
|
|
1071
|
-
}, [
|
|
1071
|
+
}, [b])])]);
|
|
1072
1072
|
};
|
|
1073
1073
|
}
|
|
1074
|
-
}), [
|
|
1075
|
-
name:
|
|
1074
|
+
}), [Dn, ue] = M("list"), On = /* @__PURE__ */ z({
|
|
1075
|
+
name: Dn,
|
|
1076
1076
|
props: {
|
|
1077
1077
|
// 加载中 文案
|
|
1078
1078
|
loadingText: {
|
|
@@ -1141,136 +1141,136 @@ const In = M(Bn), [Vn, de] = A("loading"), _n = {
|
|
|
1141
1141
|
emit: a,
|
|
1142
1142
|
expose: l
|
|
1143
1143
|
}) {
|
|
1144
|
-
const o =
|
|
1144
|
+
const o = B(0), i = B(!1), n = B("normal"), r = B(), d = B(), m = B(), S = B([]), v = B(0), h = B(0), u = B([]), b = V(() => cn(e.height) ? `${e.height}px` : e.height), f = V(() => u.value.length ? u.value[u.value.length - 1].bottom : 0), g = V(() => {
|
|
1145
1145
|
if (e.virtual) {
|
|
1146
|
-
const
|
|
1147
|
-
return
|
|
1146
|
+
const L = v.value - y.value, O = h.value + C.value;
|
|
1147
|
+
return p.value.slice(L, O);
|
|
1148
1148
|
}
|
|
1149
|
-
return
|
|
1150
|
-
}),
|
|
1151
|
-
n.value !== "loading" && (n.value = "loading", a("load", (
|
|
1149
|
+
return p.value;
|
|
1150
|
+
}), y = V(() => Math.min(v.value, e.bufferScale * s.value)), C = V(() => Math.min(e.dataSource.length - h.value, e.bufferScale * s.value)), s = V(() => Math.ceil(o.value / parseInt(String(e.itemHeight)))), p = V(() => e.dataSource.map((L, O) => (L[e.keyName] = O, L))), T = () => i.value ? document.documentElement.scrollTop || document.body.scrollTop : r.value.scrollTop, k = () => i.value ? document.documentElement.scrollHeight : r.value.scrollHeight, x = () => {
|
|
1151
|
+
n.value !== "loading" && (n.value = "loading", a("load", (L) => {
|
|
1152
1152
|
if (n.value === "loading")
|
|
1153
|
-
switch (
|
|
1153
|
+
switch (L) {
|
|
1154
1154
|
case "error":
|
|
1155
1155
|
n.value = "error";
|
|
1156
1156
|
break;
|
|
1157
1157
|
case "finished":
|
|
1158
|
-
n.value = "finished", e.virtual &&
|
|
1158
|
+
n.value = "finished", e.virtual && E(), e.virtual && e.dynamicItemHeight && $();
|
|
1159
1159
|
break;
|
|
1160
1160
|
default:
|
|
1161
|
-
n.value = "normal", e.virtual && ($(), e.dataSource.length <
|
|
1161
|
+
n.value = "normal", e.virtual && ($(), e.dataSource.length < s.value + C.value && x());
|
|
1162
1162
|
}
|
|
1163
1163
|
}));
|
|
1164
|
-
}, k = () => {
|
|
1165
|
-
n.value === "normal" && E() - T() - o.value <= e.loadOffset && b();
|
|
1166
1164
|
}, N = () => {
|
|
1167
|
-
|
|
1168
|
-
|
|
1165
|
+
n.value === "normal" && k() - T() - o.value <= e.loadOffset && x();
|
|
1166
|
+
}, E = () => {
|
|
1167
|
+
u.value = p.value.map((L, O) => {
|
|
1168
|
+
const H = parseInt(String(e.itemHeight));
|
|
1169
1169
|
return {
|
|
1170
1170
|
index: O,
|
|
1171
|
-
height:
|
|
1172
|
-
top: O *
|
|
1173
|
-
bottom: (O + 1) *
|
|
1171
|
+
height: H,
|
|
1172
|
+
top: O * H,
|
|
1173
|
+
bottom: (O + 1) * H
|
|
1174
1174
|
};
|
|
1175
1175
|
});
|
|
1176
1176
|
}, $ = () => {
|
|
1177
|
-
|
|
1178
|
-
for (let
|
|
1179
|
-
|
|
1180
|
-
}, I = (
|
|
1181
|
-
let
|
|
1182
|
-
for (;
|
|
1183
|
-
const le = Math.floor((
|
|
1177
|
+
E();
|
|
1178
|
+
for (let L = 1; L < u.value.length; L++)
|
|
1179
|
+
u.value[L].top = u.value[L - 1].bottom, u.value[L].bottom = u.value[L].top + u.value[L].height;
|
|
1180
|
+
}, I = (L, O) => {
|
|
1181
|
+
let H = 0, re = L.length - 1, K = -1;
|
|
1182
|
+
for (; H <= re; ) {
|
|
1183
|
+
const le = Math.floor((H + re) / 2), ae = L[le].bottom;
|
|
1184
1184
|
if (ae === O)
|
|
1185
1185
|
return le + 1;
|
|
1186
|
-
ae < O ?
|
|
1186
|
+
ae < O ? H = le + 1 : ae > O && ((K === -1 || K > le) && (K = le), re = le - 1);
|
|
1187
1187
|
}
|
|
1188
1188
|
return K;
|
|
1189
|
-
}, D = (
|
|
1190
|
-
if (
|
|
1191
|
-
const
|
|
1192
|
-
Y(
|
|
1189
|
+
}, D = (L) => I(u.value, L), P = () => {
|
|
1190
|
+
if (N(), e.virtual) {
|
|
1191
|
+
const L = T();
|
|
1192
|
+
Y(L);
|
|
1193
1193
|
}
|
|
1194
|
-
}, Y = (
|
|
1194
|
+
}, Y = (L) => {
|
|
1195
1195
|
if (!d.value)
|
|
1196
1196
|
return;
|
|
1197
|
-
const O =
|
|
1197
|
+
const O = L || 0;
|
|
1198
1198
|
if (e.dynamicItemHeight) {
|
|
1199
|
-
|
|
1200
|
-
const
|
|
1201
|
-
d.value.style.transform = `translate3d(0, ${
|
|
1199
|
+
v.value = D(O), h.value = v.value + s.value;
|
|
1200
|
+
const H = u.value[v.value - y.value].top ? u.value[v.value - y.value].top : 0;
|
|
1201
|
+
d.value.style.transform = `translate3d(0, ${H}px, 0)`;
|
|
1202
1202
|
} else {
|
|
1203
|
-
|
|
1204
|
-
const
|
|
1205
|
-
d.value.style.transform = `translate3d(0, ${
|
|
1203
|
+
v.value = Math.floor(O / parseInt(String(e.itemHeight))), h.value = v.value + s.value;
|
|
1204
|
+
const H = v.value * parseInt(String(e.itemHeight)) - y.value * parseInt(String(e.itemHeight));
|
|
1205
|
+
d.value.style.transform = `translate3d(0, ${H}px, 0)`;
|
|
1206
1206
|
}
|
|
1207
1207
|
}, ne = () => {
|
|
1208
|
-
if (!d.value || !
|
|
1208
|
+
if (!d.value || !m.value)
|
|
1209
1209
|
return;
|
|
1210
|
-
const
|
|
1211
|
-
|
|
1210
|
+
const L = d.value.children;
|
|
1211
|
+
L && L.length > 0 && [...L].forEach((O) => {
|
|
1212
1212
|
if (O instanceof HTMLDivElement) {
|
|
1213
|
-
const
|
|
1213
|
+
const H = O.getBoundingClientRect(), {
|
|
1214
1214
|
height: re
|
|
1215
|
-
} =
|
|
1215
|
+
} = H, K = Number(O.dataset.index), ae = u.value[K].height - re;
|
|
1216
1216
|
if (ae) {
|
|
1217
|
-
|
|
1218
|
-
for (let w = K + 1; w <
|
|
1219
|
-
|
|
1217
|
+
u.value[K].bottom -= ae, u.value[K].height = re;
|
|
1218
|
+
for (let w = K + 1; w < u.value.length; w++)
|
|
1219
|
+
u.value[w].top = u.value[w - 1].bottom, u.value[w].bottom -= ae;
|
|
1220
1220
|
}
|
|
1221
1221
|
}
|
|
1222
1222
|
});
|
|
1223
1223
|
};
|
|
1224
1224
|
return l({
|
|
1225
1225
|
...e,
|
|
1226
|
-
checkIsScrollToBottom:
|
|
1227
|
-
loadData:
|
|
1226
|
+
checkIsScrollToBottom: N,
|
|
1227
|
+
loadData: x
|
|
1228
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",
|
|
1230
|
-
}),
|
|
1231
|
-
var
|
|
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", P)), e.virtual && (E(), Y()), e.immediateCheck && N();
|
|
1230
|
+
}), nn(async () => {
|
|
1231
|
+
var L, O;
|
|
1232
1232
|
if (e.virtual && e.dynamicItemHeight) {
|
|
1233
|
-
if (await se(), !((O = (
|
|
1233
|
+
if (await se(), !((O = (L = d.value) == null ? void 0 : L.children) != null && O.length))
|
|
1234
1234
|
return;
|
|
1235
1235
|
ne();
|
|
1236
1236
|
}
|
|
1237
|
-
}),
|
|
1238
|
-
i.value && document.removeEventListener("scroll",
|
|
1237
|
+
}), ve(() => {
|
|
1238
|
+
i.value && document.removeEventListener("scroll", P);
|
|
1239
1239
|
}), () => c("div", {
|
|
1240
1240
|
ref: r,
|
|
1241
1241
|
class: `${ue()} ${e.virtual ? ue({
|
|
1242
1242
|
virtual: !0
|
|
1243
1243
|
}) : ""}`,
|
|
1244
1244
|
style: {
|
|
1245
|
-
height:
|
|
1245
|
+
height: b.value
|
|
1246
1246
|
},
|
|
1247
|
-
onScroll:
|
|
1247
|
+
onScroll: P
|
|
1248
1248
|
}, [e.virtual && c("div", {
|
|
1249
|
-
ref:
|
|
1249
|
+
ref: m,
|
|
1250
1250
|
class: ue("phantom"),
|
|
1251
1251
|
style: {
|
|
1252
|
-
height: `${
|
|
1252
|
+
height: `${f.value}px`
|
|
1253
1253
|
}
|
|
1254
1254
|
}, null), c("div", {
|
|
1255
1255
|
ref: d,
|
|
1256
1256
|
class: ue("content")
|
|
1257
|
-
}, [
|
|
1257
|
+
}, [g.value.map((L) => {
|
|
1258
1258
|
var O;
|
|
1259
1259
|
return c("div", {
|
|
1260
|
-
ref:
|
|
1260
|
+
ref: S,
|
|
1261
1261
|
class: ue("item"),
|
|
1262
|
-
"data-index":
|
|
1262
|
+
"data-index": L._index
|
|
1263
1263
|
}, [(O = t.default) == null ? void 0 : O.call(t, {
|
|
1264
|
-
item:
|
|
1264
|
+
item: L
|
|
1265
1265
|
})]);
|
|
1266
1266
|
})]), n.value === "loading" && c("div", {
|
|
1267
1267
|
class: ue({
|
|
1268
1268
|
loading: !0
|
|
1269
1269
|
})
|
|
1270
|
-
}, [t.loading ? t.loading() : c(
|
|
1270
|
+
}, [t.loading ? t.loading() : c(ot, {
|
|
1271
1271
|
"text-location": "right"
|
|
1272
1272
|
}, {
|
|
1273
|
-
default: () => [
|
|
1273
|
+
default: () => [ln("加载中...")]
|
|
1274
1274
|
})]), n.value === "finished" && c("div", {
|
|
1275
1275
|
class: ue({
|
|
1276
1276
|
finished: !0
|
|
@@ -1278,18 +1278,18 @@ const In = M(Bn), [Vn, de] = A("loading"), _n = {
|
|
|
1278
1278
|
}, [e.finishedText]), n.value === "error" && c("div", {
|
|
1279
1279
|
class: ue("error"),
|
|
1280
1280
|
role: "presentation",
|
|
1281
|
-
onClick:
|
|
1281
|
+
onClick: x
|
|
1282
1282
|
}, [e.errorText])]);
|
|
1283
1283
|
}
|
|
1284
1284
|
});
|
|
1285
|
-
const
|
|
1286
|
-
const
|
|
1287
|
-
const
|
|
1288
|
-
const e = te(), t =
|
|
1285
|
+
const Rn = A(On);
|
|
1286
|
+
const Fn = A(Pt);
|
|
1287
|
+
const Wn = A(we), _t = "y-form-item", Hn = () => {
|
|
1288
|
+
const e = te(), t = B();
|
|
1289
1289
|
return {
|
|
1290
1290
|
filed: t,
|
|
1291
1291
|
initProvide: (l) => {
|
|
1292
|
-
|
|
1292
|
+
wt(_t, {
|
|
1293
1293
|
setField: (i) => {
|
|
1294
1294
|
i != null && i.proxy && (t.value = i);
|
|
1295
1295
|
},
|
|
@@ -1298,8 +1298,8 @@ const Dn = M(Se), It = "y-form-item", On = () => {
|
|
|
1298
1298
|
});
|
|
1299
1299
|
}
|
|
1300
1300
|
};
|
|
1301
|
-
},
|
|
1302
|
-
const e =
|
|
1301
|
+
}, Le = () => {
|
|
1302
|
+
const e = $t(_t, null), t = te();
|
|
1303
1303
|
if (e && (t != null && t.proxy)) {
|
|
1304
1304
|
const { setField: a } = e, { resetValidation: l, change: o, validateWithTrigger: i } = e;
|
|
1305
1305
|
return X(
|
|
@@ -1307,15 +1307,15 @@ const Dn = M(Se), It = "y-form-item", On = () => {
|
|
|
1307
1307
|
() => {
|
|
1308
1308
|
e.instance && e.instance.exposed && (l(), o(), i("onChange"));
|
|
1309
1309
|
}
|
|
1310
|
-
), a(t),
|
|
1310
|
+
), a(t), ve(() => a(null)), {
|
|
1311
1311
|
parent: e
|
|
1312
1312
|
};
|
|
1313
1313
|
}
|
|
1314
1314
|
return {
|
|
1315
1315
|
parent: null
|
|
1316
1316
|
};
|
|
1317
|
-
}, [
|
|
1318
|
-
name:
|
|
1317
|
+
}, [Un, Ie] = M("icon"), jn = (e) => new RegExp(/\.(https|png|jpg|gif|jpeg|webp|apng)$/).test(e.toLowerCase()), Xn = /* @__PURE__ */ z({
|
|
1318
|
+
name: Un,
|
|
1319
1319
|
props: {
|
|
1320
1320
|
dot: {
|
|
1321
1321
|
type: Boolean,
|
|
@@ -1366,7 +1366,7 @@ const Dn = M(Se), It = "y-form-item", On = () => {
|
|
|
1366
1366
|
slots: t,
|
|
1367
1367
|
emit: a
|
|
1368
1368
|
}) {
|
|
1369
|
-
const l =
|
|
1369
|
+
const l = jn(e.name), o = () => ({
|
|
1370
1370
|
fontSize: F(e.size),
|
|
1371
1371
|
color: e.color
|
|
1372
1372
|
}), i = (n) => {
|
|
@@ -1377,42 +1377,42 @@ const Dn = M(Se), It = "y-form-item", On = () => {
|
|
|
1377
1377
|
name: n,
|
|
1378
1378
|
classPrefix: r,
|
|
1379
1379
|
badge: d,
|
|
1380
|
-
dot:
|
|
1381
|
-
subColor:
|
|
1382
|
-
subBg:
|
|
1383
|
-
tag:
|
|
1380
|
+
dot: m,
|
|
1381
|
+
subColor: S,
|
|
1382
|
+
subBg: v,
|
|
1383
|
+
tag: h
|
|
1384
1384
|
} = e;
|
|
1385
|
-
return c(
|
|
1385
|
+
return c(h, {
|
|
1386
1386
|
class: `${r}${l ? "" : ` y-icon--${n}`}`,
|
|
1387
1387
|
style: o(),
|
|
1388
1388
|
onClick: i
|
|
1389
1389
|
}, {
|
|
1390
1390
|
default: () => {
|
|
1391
|
-
var
|
|
1391
|
+
var u;
|
|
1392
1392
|
return [l ? c("em", {
|
|
1393
|
-
class:
|
|
1393
|
+
class: Ie("node")
|
|
1394
1394
|
}, [c("img", {
|
|
1395
|
-
class:
|
|
1395
|
+
class: Ie("image"),
|
|
1396
1396
|
src: n,
|
|
1397
1397
|
alt: "icon"
|
|
1398
|
-
}, null)]) : null,
|
|
1399
|
-
class:
|
|
1398
|
+
}, null)]) : null, m ? c("em", {
|
|
1399
|
+
class: Ie("dot"),
|
|
1400
1400
|
style: {
|
|
1401
|
-
backgroundColor:
|
|
1401
|
+
backgroundColor: v
|
|
1402
1402
|
}
|
|
1403
1403
|
}, null) : null, d ? c("em", {
|
|
1404
|
-
class:
|
|
1404
|
+
class: Ie("badge"),
|
|
1405
1405
|
style: {
|
|
1406
|
-
color:
|
|
1407
|
-
backgroundColor:
|
|
1406
|
+
color: S,
|
|
1407
|
+
backgroundColor: v
|
|
1408
1408
|
}
|
|
1409
|
-
}, [d]) : null, ((
|
|
1409
|
+
}, [d]) : null, ((u = t.default) == null ? void 0 : u.call(t)) || null];
|
|
1410
1410
|
}
|
|
1411
1411
|
});
|
|
1412
1412
|
};
|
|
1413
1413
|
}
|
|
1414
1414
|
});
|
|
1415
|
-
const
|
|
1415
|
+
const Ve = A(Xn), Yn = {
|
|
1416
1416
|
/**
|
|
1417
1417
|
* @ignore
|
|
1418
1418
|
*/
|
|
@@ -1462,9 +1462,9 @@ const Le = M(Hn), Wn = {
|
|
|
1462
1462
|
type: Boolean,
|
|
1463
1463
|
default: !1
|
|
1464
1464
|
}
|
|
1465
|
-
}, [
|
|
1466
|
-
name:
|
|
1467
|
-
props:
|
|
1465
|
+
}, [zt, qn] = M("checkbox-group"), Mt = zt, Gn = /* @__PURE__ */ z({
|
|
1466
|
+
name: zt,
|
|
1467
|
+
props: Yn,
|
|
1468
1468
|
setup(e, {
|
|
1469
1469
|
slots: t,
|
|
1470
1470
|
emit: a,
|
|
@@ -1472,41 +1472,41 @@ const Le = M(Hn), Wn = {
|
|
|
1472
1472
|
}) {
|
|
1473
1473
|
const {
|
|
1474
1474
|
initProvide: o
|
|
1475
|
-
} =
|
|
1476
|
-
|
|
1477
|
-
const n = (
|
|
1478
|
-
a("update:modelValue",
|
|
1479
|
-
}, r = (
|
|
1480
|
-
const
|
|
1481
|
-
if (
|
|
1482
|
-
if (e.min !== null &&
|
|
1475
|
+
} = Be(Mt), i = W([]);
|
|
1476
|
+
Le();
|
|
1477
|
+
const n = (m) => {
|
|
1478
|
+
a("update:modelValue", m), a("change", m);
|
|
1479
|
+
}, r = (m) => {
|
|
1480
|
+
const S = [...e.modelValue], v = S.indexOf(m);
|
|
1481
|
+
if (v >= 0) {
|
|
1482
|
+
if (e.min !== null && S.length <= e.min)
|
|
1483
1483
|
return;
|
|
1484
|
-
|
|
1484
|
+
S.splice(v, 1), n(S);
|
|
1485
1485
|
} else {
|
|
1486
|
-
if (e.max !== null &&
|
|
1486
|
+
if (e.max !== null && S.length >= e.max)
|
|
1487
1487
|
return;
|
|
1488
|
-
n([...
|
|
1488
|
+
n([...S, m]);
|
|
1489
1489
|
}
|
|
1490
1490
|
};
|
|
1491
1491
|
return l({
|
|
1492
|
-
toggleAll: (
|
|
1493
|
-
n(
|
|
1492
|
+
toggleAll: (m = null) => {
|
|
1493
|
+
n(m === null ? e.modelValue.length === 0 ? i : [] : m ? i : []);
|
|
1494
1494
|
}
|
|
1495
1495
|
}), o({
|
|
1496
1496
|
props: e,
|
|
1497
1497
|
onItemChange: r,
|
|
1498
1498
|
allItemNames: i
|
|
1499
1499
|
}), () => {
|
|
1500
|
-
var
|
|
1500
|
+
var m;
|
|
1501
1501
|
return c("div", {
|
|
1502
|
-
class:
|
|
1502
|
+
class: qn({
|
|
1503
1503
|
horizontal: e.horizontal
|
|
1504
1504
|
})
|
|
1505
|
-
}, [(
|
|
1505
|
+
}, [(m = t.default) == null ? void 0 : m.call(t)]);
|
|
1506
1506
|
};
|
|
1507
1507
|
}
|
|
1508
|
-
}), [
|
|
1509
|
-
name:
|
|
1508
|
+
}), [Kn, We] = M("checkbox"), Zn = /* @__PURE__ */ z({
|
|
1509
|
+
name: Kn,
|
|
1510
1510
|
props: {
|
|
1511
1511
|
modelValue: {
|
|
1512
1512
|
type: Boolean,
|
|
@@ -1540,58 +1540,58 @@ const Le = M(Hn), Wn = {
|
|
|
1540
1540
|
}) {
|
|
1541
1541
|
const {
|
|
1542
1542
|
parent: o
|
|
1543
|
-
} =
|
|
1543
|
+
} = ge(Mt), i = o === null ? Le().parent : null;
|
|
1544
1544
|
o && o.allItemNames.push(e.name);
|
|
1545
|
-
const n = (
|
|
1546
|
-
var
|
|
1547
|
-
r.value || typeof
|
|
1545
|
+
const n = (f, g = null) => V(() => o && o.props[f] !== null ? o.props[f] : Object.keys(e).includes(f) ? e[f] : g), r = n("disabled"), d = n("square"), m = n("checkedColor"), S = n("horizontal", !1), v = V(() => o ? o.props.modelValue.includes(e.name) : e.modelValue), h = (f) => {
|
|
1546
|
+
var g;
|
|
1547
|
+
r.value || typeof f < "u" && v.value === f || ((g = o == null ? void 0 : o.onItemChange) == null || g.call(o, e.name), a("update:modelValue", !e.modelValue), a("change", !e.modelValue));
|
|
1548
1548
|
};
|
|
1549
1549
|
l({
|
|
1550
|
-
toggle:
|
|
1550
|
+
toggle: h
|
|
1551
1551
|
});
|
|
1552
|
-
const
|
|
1553
|
-
const
|
|
1554
|
-
return
|
|
1552
|
+
const u = V(() => ["mini", "small", "middle", "large"].includes(e.size.toString() || (i == null ? void 0 : i.getProp("size"))) ? null : F(e.size)), b = V(() => {
|
|
1553
|
+
const f = {};
|
|
1554
|
+
return u.value && (f.width = u.value, f.height = u.value), v.value && m.value && (f.backgroundColor = m.value), f;
|
|
1555
1555
|
});
|
|
1556
|
-
return
|
|
1556
|
+
return Ne(() => {
|
|
1557
1557
|
if (!o)
|
|
1558
1558
|
return;
|
|
1559
|
-
const
|
|
1560
|
-
|
|
1559
|
+
const f = o.allItemNames.indexOf(e.name);
|
|
1560
|
+
f >= 0 && o.allItemNames.splice(f, 1);
|
|
1561
1561
|
}), () => {
|
|
1562
|
-
var
|
|
1562
|
+
var g, y;
|
|
1563
1563
|
const {
|
|
1564
|
-
size:
|
|
1564
|
+
size: f
|
|
1565
1565
|
} = e;
|
|
1566
1566
|
return c("div", {
|
|
1567
|
-
class:
|
|
1567
|
+
class: We({
|
|
1568
1568
|
disabled: r.value,
|
|
1569
|
-
checked:
|
|
1570
|
-
horizontal:
|
|
1571
|
-
[
|
|
1569
|
+
checked: v.value,
|
|
1570
|
+
horizontal: S.value,
|
|
1571
|
+
[f]: ["mini", "small", "middle", "large"].includes(f.toString())
|
|
1572
1572
|
}),
|
|
1573
|
-
onClick: () =>
|
|
1573
|
+
onClick: () => h(),
|
|
1574
1574
|
role: "checkbox",
|
|
1575
|
-
"aria-checked":
|
|
1576
|
-
}, [((
|
|
1577
|
-
checked:
|
|
1575
|
+
"aria-checked": v.value
|
|
1576
|
+
}, [((g = t.icon) == null ? void 0 : g.call(t, {
|
|
1577
|
+
checked: v.value
|
|
1578
1578
|
})) || c("div", {
|
|
1579
|
-
class:
|
|
1580
|
-
checked:
|
|
1579
|
+
class: We("icon", {
|
|
1580
|
+
checked: v.value,
|
|
1581
1581
|
square: d.value
|
|
1582
1582
|
}),
|
|
1583
|
-
style:
|
|
1584
|
-
}, [
|
|
1583
|
+
style: b.value
|
|
1584
|
+
}, [v.value ? c(Ve, {
|
|
1585
1585
|
name: "done"
|
|
1586
1586
|
}, null) : null]), c("div", {
|
|
1587
|
-
class:
|
|
1588
|
-
}, [(
|
|
1587
|
+
class: We("label")
|
|
1588
|
+
}, [(y = t.default) == null ? void 0 : y.call(t)])]);
|
|
1589
1589
|
};
|
|
1590
1590
|
}
|
|
1591
1591
|
});
|
|
1592
|
-
const
|
|
1593
|
-
const
|
|
1594
|
-
name:
|
|
1592
|
+
const Qn = A(Zn);
|
|
1593
|
+
const Jn = A(Gn), [el, mt] = M("switch"), tl = /* @__PURE__ */ z({
|
|
1594
|
+
name: el,
|
|
1595
1595
|
props: {
|
|
1596
1596
|
size: {
|
|
1597
1597
|
type: [Number, String],
|
|
@@ -1632,12 +1632,12 @@ const Gn = M(jn), [Kn, dt] = A("switch"), Zn = /* @__PURE__ */ P({
|
|
|
1632
1632
|
}) {
|
|
1633
1633
|
const {
|
|
1634
1634
|
parent: a
|
|
1635
|
-
} =
|
|
1635
|
+
} = Le(), l = V(() => e.modelValue === e.activeValue), o = () => {
|
|
1636
1636
|
if (!e.disabled && !e.readonly) {
|
|
1637
1637
|
const n = l.value ? e.inactiveValue : e.activeValue;
|
|
1638
1638
|
t("update:modelValue", n), t("change", n);
|
|
1639
1639
|
}
|
|
1640
|
-
}, i =
|
|
1640
|
+
}, i = V(() => {
|
|
1641
1641
|
switch (e.size || (a == null ? void 0 : a.getProp("size")) || "middle") {
|
|
1642
1642
|
case "large":
|
|
1643
1643
|
return "34px";
|
|
@@ -1656,7 +1656,7 @@ const Gn = M(jn), [Kn, dt] = A("switch"), Zn = /* @__PURE__ */ P({
|
|
|
1656
1656
|
inactiveColor: d
|
|
1657
1657
|
} = e;
|
|
1658
1658
|
return c("div", {
|
|
1659
|
-
class:
|
|
1659
|
+
class: mt("", {
|
|
1660
1660
|
on: l.value,
|
|
1661
1661
|
disabled: n
|
|
1662
1662
|
}),
|
|
@@ -1668,7 +1668,7 @@ const Gn = M(jn), [Kn, dt] = A("switch"), Zn = /* @__PURE__ */ P({
|
|
|
1668
1668
|
onClick: o,
|
|
1669
1669
|
role: "switch"
|
|
1670
1670
|
}, [c("div", {
|
|
1671
|
-
class:
|
|
1671
|
+
class: mt("node", {
|
|
1672
1672
|
on: l.value,
|
|
1673
1673
|
disabled: n
|
|
1674
1674
|
})
|
|
@@ -1676,10 +1676,10 @@ const Gn = M(jn), [Kn, dt] = A("switch"), Zn = /* @__PURE__ */ P({
|
|
|
1676
1676
|
};
|
|
1677
1677
|
}
|
|
1678
1678
|
});
|
|
1679
|
-
const
|
|
1679
|
+
const nl = A(tl), ll = (e, t, a, l) => {
|
|
1680
1680
|
const o = Math.abs(e - a), i = Math.abs(t - l), n = Math.sqrt(o * o + i * i);
|
|
1681
1681
|
return 90 - Math.round(Math.asin(i / n) / Math.PI * 180);
|
|
1682
|
-
},
|
|
1682
|
+
}, al = (e) => {
|
|
1683
1683
|
const t = e.currentTarget, a = e.target;
|
|
1684
1684
|
let l = !1;
|
|
1685
1685
|
if (t === a)
|
|
@@ -1688,32 +1688,32 @@ const Qn = M(Zn), Jn = (e, t, a, l) => {
|
|
|
1688
1688
|
i.offsetHeight !== i.scrollHeight && i.scrollTop !== 0 ? l = !0 : i.parentElement && i.parentElement !== t && o(i.parentElement);
|
|
1689
1689
|
};
|
|
1690
1690
|
return a && o(a), l;
|
|
1691
|
-
}, [
|
|
1691
|
+
}, [ol, vt] = M("pull-refresh"), pe = Et("pull-refresh"), il = 30, gt = 0.5;
|
|
1692
1692
|
let j = /* @__PURE__ */ function(e) {
|
|
1693
1693
|
return e.DEFUALT = "normal", e.PULLING = "pulling", e.LOOSING = "loosing", e.LOADING = "loading", e.SUCCESS = "success", e.FAILED = "failed", e;
|
|
1694
1694
|
}({});
|
|
1695
|
-
const
|
|
1696
|
-
name:
|
|
1695
|
+
const rl = (e) => e < 60 ? 1 : 1 - (e - 60) / 600, ul = /* @__PURE__ */ z({
|
|
1696
|
+
name: ol,
|
|
1697
1697
|
props: {
|
|
1698
1698
|
pullingText: {
|
|
1699
1699
|
type: String,
|
|
1700
|
-
default:
|
|
1700
|
+
default: pe.pulling
|
|
1701
1701
|
},
|
|
1702
1702
|
loosingText: {
|
|
1703
1703
|
type: String,
|
|
1704
|
-
default:
|
|
1704
|
+
default: pe.loosing
|
|
1705
1705
|
},
|
|
1706
1706
|
loadingText: {
|
|
1707
1707
|
type: String,
|
|
1708
|
-
default:
|
|
1708
|
+
default: pe.loading
|
|
1709
1709
|
},
|
|
1710
1710
|
successText: {
|
|
1711
1711
|
type: String,
|
|
1712
|
-
default:
|
|
1712
|
+
default: pe.success
|
|
1713
1713
|
},
|
|
1714
1714
|
failedText: {
|
|
1715
1715
|
type: String,
|
|
1716
|
-
default:
|
|
1716
|
+
default: pe.failed
|
|
1717
1717
|
},
|
|
1718
1718
|
statusHeight: {
|
|
1719
1719
|
type: Number,
|
|
@@ -1731,79 +1731,79 @@ const ll = (e) => e < 60 ? 1 : 1 - (e - 60) / 600, al = /* @__PURE__ */ P({
|
|
|
1731
1731
|
}) {
|
|
1732
1732
|
const o = te();
|
|
1733
1733
|
let i = 0, n = 0, r = 0, d = null;
|
|
1734
|
-
const
|
|
1734
|
+
const m = B(0), S = B(0), v = B(j.DEFUALT), h = V(() => {
|
|
1735
1735
|
var T;
|
|
1736
|
-
const
|
|
1737
|
-
return
|
|
1738
|
-
}),
|
|
1739
|
-
|
|
1740
|
-
|
|
1736
|
+
const p = [...((T = o == null ? void 0 : o.proxy) == null ? void 0 : T.$el).childNodes];
|
|
1737
|
+
return p == null ? void 0 : p.filter((k) => k.nodeType !== 3 || k.nodeValue !== "");
|
|
1738
|
+
}), u = (s = "success") => {
|
|
1739
|
+
v.value = s, setTimeout(() => {
|
|
1740
|
+
m.value = 0;
|
|
1741
1741
|
}, 500), setTimeout(() => {
|
|
1742
|
-
|
|
1742
|
+
v.value = j.DEFUALT;
|
|
1743
1743
|
}, 1e3);
|
|
1744
|
-
},
|
|
1745
|
-
|
|
1746
|
-
},
|
|
1747
|
-
i =
|
|
1748
|
-
},
|
|
1749
|
-
const
|
|
1750
|
-
r = T - n, (
|
|
1751
|
-
},
|
|
1752
|
-
|
|
1744
|
+
}, b = () => {
|
|
1745
|
+
m.value = e.statusHeight, S.value = gt, v.value = j.LOADING, a("load", u);
|
|
1746
|
+
}, f = (s) => {
|
|
1747
|
+
i = s instanceof TouchEvent ? s.touches[0].pageX : s.pageX, n = s instanceof TouchEvent ? s.touches[0].pageY : s.pageY, h.value.length !== 2 || h.value[1].nodeType === 3 ? d = o == null ? void 0 : o.vnode.el : d = h.value[1], !e.disabled && !al(s) && d.scrollTop === 0 && v.value === j.DEFUALT && (v.value = j.PULLING, m.value = 0, S.value = 0);
|
|
1748
|
+
}, g = (s) => {
|
|
1749
|
+
const p = s instanceof TouchEvent ? s.touches[0].pageX : s.pageX, T = s instanceof TouchEvent ? s.touches[0].pageY : s.pageY, k = ll(i, n, p, T);
|
|
1750
|
+
r = T - n, (v.value === j.PULLING || v.value === j.LOOSING) && r > 0 && k < il && (s.preventDefault(), m.value = r * rl(r), r > e.statusHeight && v.value === j.PULLING && (v.value = j.LOOSING));
|
|
1751
|
+
}, y = (s) => {
|
|
1752
|
+
v.value === j.LOOSING ? (m.value = e.statusHeight, S.value = gt, v.value = j.LOADING, a("load", u, s)) : v.value === j.PULLING && (m.value = 0, v.value = j.DEFUALT);
|
|
1753
1753
|
};
|
|
1754
1754
|
J(() => {
|
|
1755
|
-
const
|
|
1756
|
-
|
|
1755
|
+
const s = o == null ? void 0 : o.vnode.el;
|
|
1756
|
+
s == null || s.addEventListener("touchstart", f, {
|
|
1757
1757
|
passive: !1
|
|
1758
|
-
}),
|
|
1758
|
+
}), s == null || s.addEventListener("touchmove", g, {
|
|
1759
1759
|
passive: !1
|
|
1760
|
-
}),
|
|
1760
|
+
}), s == null || s.addEventListener("touchend", y, {
|
|
1761
1761
|
passive: !1
|
|
1762
|
-
}),
|
|
1762
|
+
}), s == null || s.addEventListener("mousedown", f, {
|
|
1763
1763
|
passive: !1
|
|
1764
|
-
}),
|
|
1764
|
+
}), s == null || s.addEventListener("mousemove", g, {
|
|
1765
1765
|
passive: !1
|
|
1766
|
-
}),
|
|
1766
|
+
}), s == null || s.addEventListener("mouseup", y, {
|
|
1767
1767
|
passive: !1
|
|
1768
|
-
}),
|
|
1768
|
+
}), s == null || s.addEventListener("mouseout", y, {
|
|
1769
1769
|
passive: !1
|
|
1770
1770
|
});
|
|
1771
|
-
}),
|
|
1772
|
-
const
|
|
1773
|
-
|
|
1771
|
+
}), ve(() => {
|
|
1772
|
+
const s = o == null ? void 0 : o.vnode.el;
|
|
1773
|
+
s == null || s.removeEventListener("touchstart", f), s == null || s.removeEventListener("touchmove", g), s == null || s.removeEventListener("touchend", y), s == null || s.removeEventListener("mousedown", f), s == null || s.removeEventListener("mousemove", g), s == null || s.removeEventListener("mouseup", y), s == null || s.removeEventListener("mouseout", y);
|
|
1774
1774
|
});
|
|
1775
1775
|
const C = () => {
|
|
1776
|
-
var
|
|
1777
|
-
return
|
|
1776
|
+
var s;
|
|
1777
|
+
return v.value === j.DEFUALT ? null : t[v.value] ? (s = t[v.value]) == null ? void 0 : s.call(t) : c("p", null, [e[`${v.value}Text`]]);
|
|
1778
1778
|
};
|
|
1779
1779
|
return l({
|
|
1780
|
-
refresh:
|
|
1780
|
+
refresh: b
|
|
1781
1781
|
}), () => {
|
|
1782
|
-
var
|
|
1782
|
+
var x;
|
|
1783
1783
|
const {
|
|
1784
|
-
statusHeight:
|
|
1785
|
-
} = e,
|
|
1784
|
+
statusHeight: s
|
|
1785
|
+
} = e, p = m.value > s ? s : m.value, T = `all ${S.value}s ease 0s`, k = `translate3d(0, ${-m.value}px, 0)`;
|
|
1786
1786
|
return c("div", {
|
|
1787
|
-
class:
|
|
1787
|
+
class: vt(),
|
|
1788
1788
|
style: {
|
|
1789
|
-
WebkitTransform: `translate3d(0, ${
|
|
1790
|
-
transform: `translate3d(0, ${
|
|
1789
|
+
WebkitTransform: `translate3d(0, ${m.value}px, 0)`,
|
|
1790
|
+
transform: `translate3d(0, ${m.value}px, 0)`,
|
|
1791
1791
|
transition: T
|
|
1792
1792
|
}
|
|
1793
1793
|
}, [c("div", {
|
|
1794
|
-
class:
|
|
1794
|
+
class: vt("status"),
|
|
1795
1795
|
style: {
|
|
1796
|
-
height: `${
|
|
1797
|
-
WebkitTransform: `${
|
|
1798
|
-
transform: `${
|
|
1796
|
+
height: `${p}px`,
|
|
1797
|
+
WebkitTransform: `${k} scale(${p / s})`,
|
|
1798
|
+
transform: `${k} scale(${p / s})`,
|
|
1799
1799
|
transition: T
|
|
1800
1800
|
}
|
|
1801
|
-
}, [C()]), (
|
|
1801
|
+
}, [C()]), (x = t.default) == null ? void 0 : x.call(t)]);
|
|
1802
1802
|
};
|
|
1803
1803
|
}
|
|
1804
1804
|
});
|
|
1805
|
-
const
|
|
1806
|
-
name:
|
|
1805
|
+
const sl = A(ul), [cl, fe, dl] = M("cell"), fl = /* @__PURE__ */ z({
|
|
1806
|
+
name: cl,
|
|
1807
1807
|
props: {
|
|
1808
1808
|
tag: {
|
|
1809
1809
|
type: String,
|
|
@@ -1823,12 +1823,12 @@ const ol = M(al), [il, fe, rl] = A("cell"), ul = /* @__PURE__ */ P({
|
|
|
1823
1823
|
},
|
|
1824
1824
|
size: {
|
|
1825
1825
|
type: String,
|
|
1826
|
-
default:
|
|
1826
|
+
default: Bt.Middle
|
|
1827
1827
|
},
|
|
1828
1828
|
// 垂直对齐方式
|
|
1829
1829
|
vertical: {
|
|
1830
1830
|
type: String,
|
|
1831
|
-
default:
|
|
1831
|
+
default: lt.Middle
|
|
1832
1832
|
},
|
|
1833
1833
|
// 是否有 border
|
|
1834
1834
|
border: {
|
|
@@ -1860,24 +1860,24 @@ const ol = M(al), [il, fe, rl] = A("cell"), ul = /* @__PURE__ */ P({
|
|
|
1860
1860
|
border: n,
|
|
1861
1861
|
size: r,
|
|
1862
1862
|
title: d,
|
|
1863
|
-
icon:
|
|
1864
|
-
label:
|
|
1865
|
-
value:
|
|
1866
|
-
clickable:
|
|
1867
|
-
} = e,
|
|
1863
|
+
icon: m,
|
|
1864
|
+
label: S,
|
|
1865
|
+
value: v,
|
|
1866
|
+
clickable: h
|
|
1867
|
+
} = e, u = o === "a" ? !0 : h;
|
|
1868
1868
|
return c(o, {
|
|
1869
1869
|
class: [fe({
|
|
1870
1870
|
[`is-${i}`]: i,
|
|
1871
1871
|
[r]: r,
|
|
1872
1872
|
hairline: n
|
|
1873
|
-
}),
|
|
1874
|
-
clickable:
|
|
1873
|
+
}), dl("el", {
|
|
1874
|
+
clickable: u
|
|
1875
1875
|
})],
|
|
1876
1876
|
onClick: l
|
|
1877
1877
|
}, {
|
|
1878
1878
|
default: () => {
|
|
1879
|
-
var
|
|
1880
|
-
return [(
|
|
1879
|
+
var b, f;
|
|
1880
|
+
return [(b = t.left) == null ? void 0 : b.call(t), c("div", {
|
|
1881
1881
|
class: fe("center", {
|
|
1882
1882
|
"has-left": t.left
|
|
1883
1883
|
})
|
|
@@ -1885,10 +1885,10 @@ const ol = M(al), [il, fe, rl] = A("cell"), ul = /* @__PURE__ */ P({
|
|
|
1885
1885
|
class: fe("title")
|
|
1886
1886
|
}, [d]), c("p", {
|
|
1887
1887
|
class: fe("label")
|
|
1888
|
-
}, [
|
|
1888
|
+
}, [S])]]), t.default ? t.default() : c("div", {
|
|
1889
1889
|
class: fe("value")
|
|
1890
|
-
}, [
|
|
1891
|
-
name:
|
|
1890
|
+
}, [v]), ((f = t.right) == null ? void 0 : f.call(t)) || m && c(Ve, {
|
|
1891
|
+
name: m,
|
|
1892
1892
|
class: fe("icon")
|
|
1893
1893
|
}, null)];
|
|
1894
1894
|
}
|
|
@@ -1896,8 +1896,8 @@ const ol = M(al), [il, fe, rl] = A("cell"), ul = /* @__PURE__ */ P({
|
|
|
1896
1896
|
};
|
|
1897
1897
|
}
|
|
1898
1898
|
});
|
|
1899
|
-
const
|
|
1900
|
-
name:
|
|
1899
|
+
const ml = A(fl), [vl, ye, gl] = M("button"), hl = /* @__PURE__ */ z({
|
|
1900
|
+
name: vl,
|
|
1901
1901
|
props: {
|
|
1902
1902
|
// 标签
|
|
1903
1903
|
tag: {
|
|
@@ -1977,21 +1977,21 @@ const sl = M(ul), [cl, pe, dl] = A("button"), fl = /* @__PURE__ */ P({
|
|
|
1977
1977
|
type: n,
|
|
1978
1978
|
size: r,
|
|
1979
1979
|
disabled: d,
|
|
1980
|
-
shadow:
|
|
1981
|
-
block:
|
|
1982
|
-
square:
|
|
1983
|
-
semicircle:
|
|
1984
|
-
danger:
|
|
1985
|
-
text:
|
|
1986
|
-
supplementText:
|
|
1987
|
-
} = e,
|
|
1980
|
+
shadow: m,
|
|
1981
|
+
block: S,
|
|
1982
|
+
square: v,
|
|
1983
|
+
semicircle: h,
|
|
1984
|
+
danger: u,
|
|
1985
|
+
text: b,
|
|
1986
|
+
supplementText: f
|
|
1987
|
+
} = e, g = t.default ? t.default() : b;
|
|
1988
1988
|
return o = n === "link" ? "a" : o, c(o, {
|
|
1989
|
-
class: [
|
|
1990
|
-
block:
|
|
1991
|
-
square:
|
|
1992
|
-
semicircle:
|
|
1989
|
+
class: [ye([n, r, {
|
|
1990
|
+
block: S,
|
|
1991
|
+
square: v,
|
|
1992
|
+
semicircle: h,
|
|
1993
1993
|
disabled: d && o === "a"
|
|
1994
|
-
}, (n === "primary" || n === "secondary") &&
|
|
1994
|
+
}, (n === "primary" || n === "secondary") && m ? `shadow_${m}` : "", u ? `${n}_danger` : "", d ? `${n}_disabled` : ""]), gl("el", "clickable")],
|
|
1995
1995
|
style: {
|
|
1996
1996
|
borderRadius: F(i)
|
|
1997
1997
|
},
|
|
@@ -1999,44 +1999,44 @@ const sl = M(ul), [cl, pe, dl] = A("button"), fl = /* @__PURE__ */ P({
|
|
|
1999
1999
|
onClick: l
|
|
2000
2000
|
}, {
|
|
2001
2001
|
default: () => {
|
|
2002
|
-
var
|
|
2002
|
+
var y, C;
|
|
2003
2003
|
return [c("div", {
|
|
2004
|
-
class:
|
|
2005
|
-
}, [((
|
|
2006
|
-
class:
|
|
2007
|
-
}, [c("p", null, [
|
|
2008
|
-
class:
|
|
2009
|
-
}, [
|
|
2010
|
-
class:
|
|
2011
|
-
}, [
|
|
2004
|
+
class: ye("content")
|
|
2005
|
+
}, [((y = t.leftIcon) == null ? void 0 : y.call(t)) || null, g && c(tt, null, [f ? c("div", {
|
|
2006
|
+
class: ye("text")
|
|
2007
|
+
}, [c("p", null, [g]), c("p", {
|
|
2008
|
+
class: ye("subtext")
|
|
2009
|
+
}, [f])]) : c("span", {
|
|
2010
|
+
class: ye("text")
|
|
2011
|
+
}, [g])]), ((C = t.rightIcon) == null ? void 0 : C.call(t)) || null])];
|
|
2012
2012
|
}
|
|
2013
2013
|
});
|
|
2014
2014
|
};
|
|
2015
2015
|
}
|
|
2016
2016
|
});
|
|
2017
|
-
const
|
|
2017
|
+
const qe = A(hl), pl = {
|
|
2018
2018
|
position: "fixed"
|
|
2019
2019
|
};
|
|
2020
|
-
let
|
|
2021
|
-
const
|
|
2022
|
-
const l =
|
|
2023
|
-
render: () =>
|
|
2020
|
+
let be = null;
|
|
2021
|
+
const At = (e, t) => {
|
|
2022
|
+
const l = ke({
|
|
2023
|
+
render: () => $e(ot, { ...e }, { ...t })
|
|
2024
2024
|
}), o = document.createElement("div");
|
|
2025
2025
|
return l.mount(o);
|
|
2026
|
-
},
|
|
2026
|
+
}, yl = {
|
|
2027
2027
|
/**
|
|
2028
2028
|
* @description: show
|
|
2029
2029
|
* @param {LoadingPropsType} options
|
|
2030
2030
|
* @return {*}
|
|
2031
2031
|
*/
|
|
2032
2032
|
show: (e, t) => {
|
|
2033
|
-
|
|
2033
|
+
be || (be = At(
|
|
2034
2034
|
{
|
|
2035
|
-
...
|
|
2035
|
+
...pl,
|
|
2036
2036
|
...e
|
|
2037
2037
|
},
|
|
2038
2038
|
t
|
|
2039
|
-
)), document.body.appendChild(
|
|
2039
|
+
)), document.body.appendChild(be.$el);
|
|
2040
2040
|
},
|
|
2041
2041
|
/**
|
|
2042
2042
|
* @description: hide
|
|
@@ -2044,40 +2044,40 @@ const zt = (e, t) => {
|
|
|
2044
2044
|
* @return {*}
|
|
2045
2045
|
*/
|
|
2046
2046
|
hide: () => {
|
|
2047
|
-
|
|
2047
|
+
be && be.$el.remove();
|
|
2048
2048
|
}
|
|
2049
|
-
},
|
|
2049
|
+
}, ht = (e, t) => {
|
|
2050
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));
|
|
2051
|
-
},
|
|
2051
|
+
}, bl = {
|
|
2052
2052
|
install: (e) => {
|
|
2053
|
-
e.directive("loading",
|
|
2053
|
+
e.directive("loading", Dt), e.directive("loading-props", Sl), e.directive("loading-slots", xl);
|
|
2054
2054
|
}
|
|
2055
|
-
},
|
|
2055
|
+
}, Dt = {
|
|
2056
2056
|
getSSRProps: (e) => ({ ...e }),
|
|
2057
2057
|
mounted: (e, t) => {
|
|
2058
|
-
e.instance =
|
|
2058
|
+
e.instance = At({ ...e.customProps }, { ...e.customSlots }), t.value && ht(e, t);
|
|
2059
2059
|
},
|
|
2060
2060
|
updated: (e, t) => {
|
|
2061
|
-
t.oldValue !== t.value &&
|
|
2061
|
+
t.oldValue !== t.value && ht(e, t);
|
|
2062
2062
|
},
|
|
2063
2063
|
unmounted: (e) => {
|
|
2064
2064
|
e.instance && e.instance.$el.remove();
|
|
2065
2065
|
}
|
|
2066
|
-
},
|
|
2066
|
+
}, Sl = {
|
|
2067
2067
|
getSSRProps: (e) => ({ ...e }),
|
|
2068
2068
|
beforeMount: (e, t) => {
|
|
2069
2069
|
e.customProps = { ...t.value };
|
|
2070
2070
|
}
|
|
2071
|
-
},
|
|
2071
|
+
}, xl = {
|
|
2072
2072
|
getSSRProps: (e) => ({ ...e }),
|
|
2073
2073
|
beforeMount: (e, t) => {
|
|
2074
2074
|
e.customSlots = { ...t.value };
|
|
2075
2075
|
}
|
|
2076
2076
|
};
|
|
2077
|
-
const
|
|
2078
|
-
var
|
|
2079
|
-
const [
|
|
2080
|
-
name:
|
|
2077
|
+
const wl = A(ot);
|
|
2078
|
+
var Ot = /* @__PURE__ */ ((e) => (e.Start = "start", e.Center = "center", e.End = "end", e.SpaceBetween = "space-between", e.SpaceAround = "space-around", e))(Ot || {});
|
|
2079
|
+
const [Rt, $l] = M("row"), Ft = Rt, Cl = /* @__PURE__ */ z({
|
|
2080
|
+
name: Rt,
|
|
2081
2081
|
props: {
|
|
2082
2082
|
type: {
|
|
2083
2083
|
type: String,
|
|
@@ -2090,11 +2090,11 @@ const [Mt, bl] = A("row"), Dt = Mt, Sl = /* @__PURE__ */ P({
|
|
|
2090
2090
|
},
|
|
2091
2091
|
align: {
|
|
2092
2092
|
type: String,
|
|
2093
|
-
default:
|
|
2093
|
+
default: lt.Top
|
|
2094
2094
|
},
|
|
2095
2095
|
justify: {
|
|
2096
2096
|
type: String,
|
|
2097
|
-
default:
|
|
2097
|
+
default: Ot.Start
|
|
2098
2098
|
}
|
|
2099
2099
|
},
|
|
2100
2100
|
setup(e, {
|
|
@@ -2103,28 +2103,28 @@ const [Mt, bl] = A("row"), Dt = Mt, Sl = /* @__PURE__ */ P({
|
|
|
2103
2103
|
const {
|
|
2104
2104
|
childrens: a,
|
|
2105
2105
|
initProvide: l
|
|
2106
|
-
} =
|
|
2106
|
+
} = Be(Ft), o = V(() => {
|
|
2107
2107
|
const n = [[]];
|
|
2108
2108
|
let r = 0;
|
|
2109
|
-
return a.forEach((d,
|
|
2110
|
-
var
|
|
2111
|
-
r += Number((
|
|
2109
|
+
return a.forEach((d, m) => {
|
|
2110
|
+
var S;
|
|
2111
|
+
r += Number((S = d.proxy) == null ? void 0 : S.span), r > 24 ? (n.push([m]), r -= 24) : n[n.length - 1].push(m);
|
|
2112
2112
|
}), n;
|
|
2113
|
-
}), i =
|
|
2113
|
+
}), i = V(() => {
|
|
2114
2114
|
const n = Number(e.gutter), r = [];
|
|
2115
2115
|
return n && o.value.forEach((d) => {
|
|
2116
|
-
const
|
|
2117
|
-
d.forEach((
|
|
2118
|
-
if (
|
|
2116
|
+
const m = n * (d.length - 1) / d.length;
|
|
2117
|
+
d.forEach((S, v) => {
|
|
2118
|
+
if (v === 0)
|
|
2119
2119
|
r.push({
|
|
2120
|
-
right:
|
|
2120
|
+
right: m,
|
|
2121
2121
|
left: 0
|
|
2122
2122
|
});
|
|
2123
2123
|
else {
|
|
2124
|
-
const
|
|
2124
|
+
const h = n - r[S - 1].right, u = m - h;
|
|
2125
2125
|
r.push({
|
|
2126
|
-
left:
|
|
2127
|
-
right:
|
|
2126
|
+
left: h,
|
|
2127
|
+
right: u
|
|
2128
2128
|
});
|
|
2129
2129
|
}
|
|
2130
2130
|
});
|
|
@@ -2133,24 +2133,24 @@ const [Mt, bl] = A("row"), Dt = Mt, Sl = /* @__PURE__ */ P({
|
|
|
2133
2133
|
return l({
|
|
2134
2134
|
spaceList: i
|
|
2135
2135
|
}), () => {
|
|
2136
|
-
var
|
|
2136
|
+
var m;
|
|
2137
2137
|
const {
|
|
2138
2138
|
type: n,
|
|
2139
2139
|
align: r,
|
|
2140
2140
|
justify: d
|
|
2141
2141
|
} = e;
|
|
2142
2142
|
return c("div", {
|
|
2143
|
-
class:
|
|
2143
|
+
class: $l({
|
|
2144
2144
|
[n]: n,
|
|
2145
2145
|
[`align-${r}`]: n && r,
|
|
2146
2146
|
[`justify-${d}`]: n && d
|
|
2147
2147
|
})
|
|
2148
|
-
}, [(
|
|
2148
|
+
}, [(m = t.default) == null ? void 0 : m.call(t)]);
|
|
2149
2149
|
};
|
|
2150
2150
|
}
|
|
2151
2151
|
});
|
|
2152
|
-
const
|
|
2153
|
-
name:
|
|
2152
|
+
const Tl = A(Cl), [Nl, kl] = M("col"), El = /* @__PURE__ */ z({
|
|
2153
|
+
name: Nl,
|
|
2154
2154
|
props: {
|
|
2155
2155
|
// 列数
|
|
2156
2156
|
span: {
|
|
@@ -2169,7 +2169,7 @@ const xl = M(Sl), [wl, $l] = A("col"), Cl = /* @__PURE__ */ P({
|
|
|
2169
2169
|
const {
|
|
2170
2170
|
parent: a,
|
|
2171
2171
|
index: l
|
|
2172
|
-
} =
|
|
2172
|
+
} = ge(Ft), o = V(() => {
|
|
2173
2173
|
if (!a)
|
|
2174
2174
|
return {};
|
|
2175
2175
|
const {
|
|
@@ -2194,7 +2194,7 @@ const xl = M(Sl), [wl, $l] = A("col"), Cl = /* @__PURE__ */ P({
|
|
|
2194
2194
|
} = e;
|
|
2195
2195
|
return c("div", {
|
|
2196
2196
|
style: o.value,
|
|
2197
|
-
class:
|
|
2197
|
+
class: kl({
|
|
2198
2198
|
[i]: i,
|
|
2199
2199
|
[`offset-${n}`]: n
|
|
2200
2200
|
})
|
|
@@ -2202,15 +2202,15 @@ const xl = M(Sl), [wl, $l] = A("col"), Cl = /* @__PURE__ */ P({
|
|
|
2202
2202
|
};
|
|
2203
2203
|
}
|
|
2204
2204
|
});
|
|
2205
|
-
const
|
|
2205
|
+
const Bl = A(El), pt = W({}), Wt = {
|
|
2206
2206
|
add(e, t) {
|
|
2207
|
-
Object.assign(
|
|
2207
|
+
Object.assign(pt, { [e]: t });
|
|
2208
2208
|
},
|
|
2209
2209
|
use(e) {
|
|
2210
|
-
return
|
|
2210
|
+
return pt[e];
|
|
2211
2211
|
}
|
|
2212
|
-
}, [
|
|
2213
|
-
name:
|
|
2212
|
+
}, [Ll, Se] = M("empty"), Vl = "https://imgservices-1252317822.image.myqcloud.com/image/20200820/q4wu13xxky.png", Il = /* @__PURE__ */ z({
|
|
2213
|
+
name: Ll,
|
|
2214
2214
|
props: {
|
|
2215
2215
|
type: {
|
|
2216
2216
|
type: String,
|
|
@@ -2235,27 +2235,27 @@ const Tl = M(Cl), gt = H({}), Ot = {
|
|
|
2235
2235
|
return () => {
|
|
2236
2236
|
const {
|
|
2237
2237
|
type: a
|
|
2238
|
-
} = e, l =
|
|
2238
|
+
} = e, l = Wt.use(a), o = e.imgUrl || (l == null ? void 0 : l.imgUrl) || Vl, 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), m = t.titleIcon || (l == null ? void 0 : l.titleIconSlot);
|
|
2239
2239
|
return c("div", {
|
|
2240
|
-
class:
|
|
2240
|
+
class: Se()
|
|
2241
2241
|
}, [d ? d() : o && c("img", {
|
|
2242
|
-
class:
|
|
2242
|
+
class: Se("img"),
|
|
2243
2243
|
src: o,
|
|
2244
2244
|
alt: "状态"
|
|
2245
2245
|
}, null), c("h6", {
|
|
2246
|
-
class:
|
|
2246
|
+
class: Se("title")
|
|
2247
2247
|
}, [c("span", {
|
|
2248
|
-
class:
|
|
2249
|
-
"has-icon":
|
|
2248
|
+
class: Se("title-text", {
|
|
2249
|
+
"has-icon": m
|
|
2250
2250
|
})
|
|
2251
|
-
}, [i]),
|
|
2252
|
-
class:
|
|
2251
|
+
}, [i]), m == null ? void 0 : m()]), c("p", {
|
|
2252
|
+
class: Se("sub-title")
|
|
2253
2253
|
}, [n]), r == null ? void 0 : r()]);
|
|
2254
2254
|
};
|
|
2255
2255
|
}
|
|
2256
2256
|
});
|
|
2257
|
-
const
|
|
2258
|
-
name:
|
|
2257
|
+
const Pl = A(Il), [_l, ce] = M("progress"), zl = /* @__PURE__ */ z({
|
|
2258
|
+
name: _l,
|
|
2259
2259
|
props: {
|
|
2260
2260
|
// 进度
|
|
2261
2261
|
percent: {
|
|
@@ -2331,124 +2331,124 @@ const Ll = M(Nl), [Bl, ce] = A("progress"), Il = /* @__PURE__ */ P({
|
|
|
2331
2331
|
setup(e, {
|
|
2332
2332
|
slots: t
|
|
2333
2333
|
}) {
|
|
2334
|
-
const a =
|
|
2334
|
+
const a = B(null), l = B(null), o = B([]), i = W({
|
|
2335
2335
|
progressWidth: 0,
|
|
2336
2336
|
pivotContentWidth: 0,
|
|
2337
2337
|
mileageWidth: []
|
|
2338
|
-
}), n =
|
|
2338
|
+
}), n = W({
|
|
2339
2339
|
number: 0,
|
|
2340
2340
|
oldPercent: 0,
|
|
2341
2341
|
timer: 0
|
|
2342
2342
|
});
|
|
2343
2343
|
J(() => {
|
|
2344
2344
|
d(), e.animation && r(), window.addEventListener("resize", d);
|
|
2345
|
-
}),
|
|
2345
|
+
}), et(() => {
|
|
2346
2346
|
o.value = [];
|
|
2347
|
-
}),
|
|
2347
|
+
}), ve(() => {
|
|
2348
2348
|
n.timer && cancelAnimationFrame(n.timer), window.removeEventListener("resize", d);
|
|
2349
2349
|
}), X(() => e.percent, () => {
|
|
2350
|
-
r(),
|
|
2350
|
+
r(), m();
|
|
2351
2351
|
});
|
|
2352
2352
|
const r = () => {
|
|
2353
2353
|
const {
|
|
2354
|
-
duration:
|
|
2355
|
-
percent:
|
|
2356
|
-
} = e,
|
|
2357
|
-
if (
|
|
2354
|
+
duration: u,
|
|
2355
|
+
percent: b
|
|
2356
|
+
} = e, f = Math.abs(b - n.oldPercent) / (u / 16);
|
|
2357
|
+
if (f === 0)
|
|
2358
2358
|
return;
|
|
2359
|
-
let
|
|
2360
|
-
const
|
|
2361
|
-
|
|
2359
|
+
let g = Number(n.oldPercent);
|
|
2360
|
+
const y = () => {
|
|
2361
|
+
b > n.oldPercent ? g += f : g -= f, b > n.oldPercent && g > b || b < n.oldPercent && g < b ? g = b : n.timer = requestAnimationFrame(y), n.oldPercent = g, n.number = parseInt(g.toString());
|
|
2362
2362
|
};
|
|
2363
|
-
n.timer && cancelAnimationFrame(n.timer), n.timer = requestAnimationFrame(
|
|
2363
|
+
n.timer && cancelAnimationFrame(n.timer), n.timer = requestAnimationFrame(y);
|
|
2364
2364
|
};
|
|
2365
|
-
X(() => e.mileages, () =>
|
|
2365
|
+
X(() => e.mileages, () => S);
|
|
2366
2366
|
const d = () => {
|
|
2367
|
-
|
|
2368
|
-
},
|
|
2367
|
+
m(), S();
|
|
2368
|
+
}, m = () => {
|
|
2369
2369
|
se(() => {
|
|
2370
2370
|
i.progressWidth = a.value && a.value.offsetWidth || 0, i.pivotContentWidth = l.value && l.value.offsetWidth || 0;
|
|
2371
|
-
}).catch((
|
|
2372
|
-
throw new Error(
|
|
2371
|
+
}).catch((u) => {
|
|
2372
|
+
throw new Error(u);
|
|
2373
2373
|
});
|
|
2374
|
-
},
|
|
2374
|
+
}, S = () => {
|
|
2375
2375
|
se(() => {
|
|
2376
|
-
e.mileages.forEach((
|
|
2377
|
-
i.mileageWidth[
|
|
2376
|
+
e.mileages.forEach((u, b) => {
|
|
2377
|
+
i.mileageWidth[b] = o.value[b] && o.value[b].offsetWidth || 0;
|
|
2378
2378
|
});
|
|
2379
|
-
}).catch((
|
|
2380
|
-
throw new Error(
|
|
2379
|
+
}).catch((u) => {
|
|
2380
|
+
throw new Error(u);
|
|
2381
2381
|
});
|
|
2382
|
-
},
|
|
2383
|
-
var
|
|
2382
|
+
}, v = () => {
|
|
2383
|
+
var y;
|
|
2384
2384
|
const {
|
|
2385
|
-
mileages:
|
|
2386
|
-
percent:
|
|
2387
|
-
animation:
|
|
2388
|
-
} = e,
|
|
2389
|
-
for (let C = 0; C <
|
|
2390
|
-
|
|
2391
|
-
ref: (
|
|
2392
|
-
|
|
2385
|
+
mileages: u,
|
|
2386
|
+
percent: b,
|
|
2387
|
+
animation: f
|
|
2388
|
+
} = e, g = [];
|
|
2389
|
+
for (let C = 0; C < u.length; C++)
|
|
2390
|
+
g[C] = c("div", {
|
|
2391
|
+
ref: (s) => {
|
|
2392
|
+
s && (o.value[C] = s);
|
|
2393
2393
|
},
|
|
2394
|
-
class: [ce("pivot-content", (
|
|
2394
|
+
class: [ce("pivot-content", (f ? n.number : b) >= u[C] ? "arrive" : "no-arrive")],
|
|
2395
2395
|
key: `mileage${C}`,
|
|
2396
2396
|
style: {
|
|
2397
|
-
left: `${(i.progressWidth - i.mileageWidth[C]) *
|
|
2397
|
+
left: `${(i.progressWidth - i.mileageWidth[C]) * u[C] / 100}px`
|
|
2398
2398
|
}
|
|
2399
|
-
}, [((
|
|
2399
|
+
}, [((y = t.mileage) == null ? void 0 : y.call(t)) || c("div", {
|
|
2400
2400
|
class: ce("pivot")
|
|
2401
|
-
}, [`${
|
|
2402
|
-
return
|
|
2403
|
-
},
|
|
2401
|
+
}, [`${u[C]}%`])]);
|
|
2402
|
+
return g;
|
|
2403
|
+
}, h = () => {
|
|
2404
2404
|
var C;
|
|
2405
2405
|
const {
|
|
2406
|
-
defaultPivot:
|
|
2407
|
-
textColor:
|
|
2408
|
-
percent:
|
|
2409
|
-
animation:
|
|
2410
|
-
unit:
|
|
2406
|
+
defaultPivot: u,
|
|
2407
|
+
textColor: b,
|
|
2408
|
+
percent: f,
|
|
2409
|
+
animation: g,
|
|
2410
|
+
unit: y
|
|
2411
2411
|
} = e;
|
|
2412
|
-
return c(
|
|
2412
|
+
return c(tt, null, [((C = t.pivot) == null ? void 0 : C.call(t)) || u && c("div", {
|
|
2413
2413
|
class: ce("pivot"),
|
|
2414
2414
|
style: {
|
|
2415
|
-
color:
|
|
2415
|
+
color: b
|
|
2416
2416
|
}
|
|
2417
|
-
}, [
|
|
2417
|
+
}, [g ? c("div", {
|
|
2418
2418
|
class: ce("number")
|
|
2419
|
-
}, [c("span", null, [n.number,
|
|
2419
|
+
}, [c("span", null, [n.number, y])]) : `${f}${y}`])]);
|
|
2420
2420
|
};
|
|
2421
2421
|
return () => {
|
|
2422
2422
|
const {
|
|
2423
|
-
strokeWidth:
|
|
2424
|
-
trackColor:
|
|
2425
|
-
radius:
|
|
2426
|
-
percent:
|
|
2427
|
-
color:
|
|
2423
|
+
strokeWidth: u,
|
|
2424
|
+
trackColor: b,
|
|
2425
|
+
radius: f,
|
|
2426
|
+
percent: g,
|
|
2427
|
+
color: y,
|
|
2428
2428
|
animation: C,
|
|
2429
|
-
duration:
|
|
2430
|
-
timing:
|
|
2429
|
+
duration: s,
|
|
2430
|
+
timing: p,
|
|
2431
2431
|
defaultPivot: T,
|
|
2432
|
-
pivotColor:
|
|
2433
|
-
modeMilestone:
|
|
2432
|
+
pivotColor: k,
|
|
2433
|
+
modeMilestone: x
|
|
2434
2434
|
} = e;
|
|
2435
2435
|
return c("div", {
|
|
2436
2436
|
class: ce(),
|
|
2437
2437
|
ref: a,
|
|
2438
2438
|
style: {
|
|
2439
|
-
height: F(
|
|
2440
|
-
background:
|
|
2441
|
-
borderRadius: F(
|
|
2439
|
+
height: F(u),
|
|
2440
|
+
background: b,
|
|
2441
|
+
borderRadius: F(f)
|
|
2442
2442
|
}
|
|
2443
2443
|
}, [c("span", {
|
|
2444
2444
|
class: ce("portion", {
|
|
2445
2445
|
animation: C
|
|
2446
2446
|
}),
|
|
2447
2447
|
style: {
|
|
2448
|
-
width: `${i.progressWidth *
|
|
2449
|
-
background:
|
|
2450
|
-
transitionDuration: `${
|
|
2451
|
-
transitionTimingFunction:
|
|
2448
|
+
width: `${i.progressWidth * g / 100}px`,
|
|
2449
|
+
background: y,
|
|
2450
|
+
transitionDuration: `${s}ms`,
|
|
2451
|
+
transitionTimingFunction: p
|
|
2452
2452
|
}
|
|
2453
2453
|
}, [c("div", {
|
|
2454
2454
|
ref: l,
|
|
@@ -2456,16 +2456,16 @@ const Ll = M(Nl), [Bl, ce] = A("progress"), Il = /* @__PURE__ */ P({
|
|
|
2456
2456
|
animation: C
|
|
2457
2457
|
}),
|
|
2458
2458
|
style: {
|
|
2459
|
-
left: `${(i.progressWidth - i.pivotContentWidth) *
|
|
2460
|
-
background: T ?
|
|
2461
|
-
transitionDuration: `${
|
|
2462
|
-
transitionTimingFunction:
|
|
2459
|
+
left: `${(i.progressWidth - i.pivotContentWidth) * g / 100}px`,
|
|
2460
|
+
background: T ? k || y : "none",
|
|
2461
|
+
transitionDuration: `${s}ms`,
|
|
2462
|
+
transitionTimingFunction: p
|
|
2463
2463
|
}
|
|
2464
|
-
}, [
|
|
2464
|
+
}, [h()])]), x && v()]);
|
|
2465
2465
|
};
|
|
2466
2466
|
}
|
|
2467
2467
|
});
|
|
2468
|
-
const
|
|
2468
|
+
const Ml = A(zl), [Al, Pe, Dl] = M("toast"), Ol = {
|
|
2469
2469
|
// 主文案
|
|
2470
2470
|
title: {
|
|
2471
2471
|
type: String,
|
|
@@ -2496,13 +2496,13 @@ const Vl = M(Il), [_l, Ie, zl] = A("toast"), Pl = {
|
|
|
2496
2496
|
type: [Number, String],
|
|
2497
2497
|
default: 300
|
|
2498
2498
|
}
|
|
2499
|
-
},
|
|
2500
|
-
name:
|
|
2501
|
-
props:
|
|
2499
|
+
}, Ht = /* @__PURE__ */ z({
|
|
2500
|
+
name: Al,
|
|
2501
|
+
props: Ol,
|
|
2502
2502
|
setup(e, {
|
|
2503
2503
|
slots: t
|
|
2504
2504
|
}) {
|
|
2505
|
-
const a =
|
|
2505
|
+
const a = W({
|
|
2506
2506
|
visible: !1
|
|
2507
2507
|
// 控制v-show
|
|
2508
2508
|
}), l = () => {
|
|
@@ -2520,50 +2520,50 @@ const Vl = M(Il), [_l, Ie, zl] = A("toast"), Pl = {
|
|
|
2520
2520
|
animationDuration: r,
|
|
2521
2521
|
onClose: d
|
|
2522
2522
|
} = e;
|
|
2523
|
-
return c(
|
|
2524
|
-
name:
|
|
2523
|
+
return c(nt, {
|
|
2524
|
+
name: Dl("animation", "fade"),
|
|
2525
2525
|
onAfterLeave: d
|
|
2526
2526
|
}, {
|
|
2527
2527
|
default: () => {
|
|
2528
|
-
var
|
|
2528
|
+
var m;
|
|
2529
2529
|
return [ie(c("div", {
|
|
2530
|
-
class:
|
|
2530
|
+
class: Pe({
|
|
2531
2531
|
[n]: !0
|
|
2532
2532
|
}),
|
|
2533
2533
|
style: {
|
|
2534
2534
|
animationDuration: typeof r == "number" ? `${r}ms` : r
|
|
2535
2535
|
}
|
|
2536
2536
|
}, [c("div", {
|
|
2537
|
-
class:
|
|
2538
|
-
}, [((
|
|
2539
|
-
class:
|
|
2537
|
+
class: Pe("content")
|
|
2538
|
+
}, [((m = t.icon) == null ? void 0 : m.call(t)) || null, c("div", {
|
|
2539
|
+
class: Pe("text")
|
|
2540
2540
|
}, [o]), i && c("div", {
|
|
2541
|
-
class:
|
|
2542
|
-
}, [i])])]), [[
|
|
2541
|
+
class: Pe("message")
|
|
2542
|
+
}, [i])])]), [[De, a.visible]])];
|
|
2543
2543
|
}
|
|
2544
2544
|
});
|
|
2545
2545
|
};
|
|
2546
2546
|
}
|
|
2547
2547
|
});
|
|
2548
|
-
let
|
|
2549
|
-
const
|
|
2550
|
-
const a = `toast${
|
|
2551
|
-
|
|
2552
|
-
render: () =>
|
|
2553
|
-
|
|
2554
|
-
{ ...e, onClose: () =>
|
|
2555
|
-
{ icon: () =>
|
|
2548
|
+
let He = ke({}), Rl = 0;
|
|
2549
|
+
const Ut = [], Fl = (e, t) => {
|
|
2550
|
+
const a = `toast${Rl += 1}`;
|
|
2551
|
+
He = ke({
|
|
2552
|
+
render: () => $e(
|
|
2553
|
+
Ht,
|
|
2554
|
+
{ ...e, onClose: () => Wl(a, e.onClose) },
|
|
2555
|
+
{ icon: () => $e(Ve, { ...t }) }
|
|
2556
2556
|
)
|
|
2557
2557
|
});
|
|
2558
2558
|
const o = document.createElement("div");
|
|
2559
|
-
|
|
2560
|
-
},
|
|
2561
|
-
|
|
2559
|
+
Ut.push({ id: a, app: He, el: o }), He.mount(o), document.body.appendChild(o);
|
|
2560
|
+
}, Wl = (e, t) => {
|
|
2561
|
+
Ut.forEach((a) => {
|
|
2562
2562
|
e === a.id && (a.app.unmount(), document.body.removeChild(a.el), t == null || t());
|
|
2563
2563
|
});
|
|
2564
2564
|
};
|
|
2565
|
-
|
|
2566
|
-
const [
|
|
2565
|
+
A(Ht);
|
|
2566
|
+
const [Hl, Ul, jl] = M("mask"), Xl = {
|
|
2567
2567
|
// 控制显示
|
|
2568
2568
|
modelValue: {
|
|
2569
2569
|
type: Boolean,
|
|
@@ -2598,19 +2598,19 @@ const [Ol, Rl, Fl] = A("mask"), Hl = {
|
|
|
2598
2598
|
type: Function,
|
|
2599
2599
|
default: null
|
|
2600
2600
|
}
|
|
2601
|
-
}, Q =
|
|
2602
|
-
let
|
|
2603
|
-
const
|
|
2604
|
-
name:
|
|
2605
|
-
props:
|
|
2601
|
+
}, Q = W([]);
|
|
2602
|
+
let yt = 0;
|
|
2603
|
+
const Yl = /* @__PURE__ */ z({
|
|
2604
|
+
name: Hl,
|
|
2605
|
+
props: Xl,
|
|
2606
2606
|
emits: ["update:modelValue"],
|
|
2607
2607
|
setup(e, {
|
|
2608
2608
|
slots: t
|
|
2609
2609
|
}) {
|
|
2610
|
-
const a =
|
|
2610
|
+
const a = B("");
|
|
2611
2611
|
J(() => {
|
|
2612
|
-
a.value = `mask${
|
|
2613
|
-
}),
|
|
2612
|
+
a.value = `mask${yt}`, yt += 1, l(e.modelValue, !0);
|
|
2613
|
+
}), ve(() => {
|
|
2614
2614
|
const n = Q.findIndex((r) => r._id === a.value);
|
|
2615
2615
|
n >= 0 && Q.splice(n, 1);
|
|
2616
2616
|
}), X(() => e.modelValue, (n) => {
|
|
@@ -2639,32 +2639,32 @@ const Wl = /* @__PURE__ */ P({
|
|
|
2639
2639
|
customClass: n,
|
|
2640
2640
|
duration: r,
|
|
2641
2641
|
zIndex: d,
|
|
2642
|
-
customStyle:
|
|
2643
|
-
onAfterLeave:
|
|
2642
|
+
customStyle: m,
|
|
2643
|
+
onAfterLeave: S
|
|
2644
2644
|
} = e, {
|
|
2645
|
-
_state:
|
|
2645
|
+
_state: v
|
|
2646
2646
|
} = o();
|
|
2647
|
-
return c(
|
|
2648
|
-
name:
|
|
2649
|
-
onAfterLeave:
|
|
2647
|
+
return c(nt, {
|
|
2648
|
+
name: jl("animation", "fade"),
|
|
2649
|
+
onAfterLeave: S
|
|
2650
2650
|
}, {
|
|
2651
2651
|
default: () => {
|
|
2652
|
-
var
|
|
2652
|
+
var h;
|
|
2653
2653
|
return [ie(c("div", {
|
|
2654
2654
|
style: {
|
|
2655
2655
|
animationDuration: `${r}ms`,
|
|
2656
2656
|
zIndex: d,
|
|
2657
|
-
...
|
|
2657
|
+
...m
|
|
2658
2658
|
},
|
|
2659
|
-
class: [
|
|
2659
|
+
class: [Ul(), n],
|
|
2660
2660
|
onTouchmove: i
|
|
2661
|
-
}, [(
|
|
2661
|
+
}, [(h = t.default) == null ? void 0 : h.call(t)]), [[De, v]])];
|
|
2662
2662
|
}
|
|
2663
2663
|
});
|
|
2664
2664
|
};
|
|
2665
2665
|
}
|
|
2666
2666
|
});
|
|
2667
|
-
const
|
|
2667
|
+
const jt = A(Yl), [ql, bt, Gl] = M("popup"), Kl = {
|
|
2668
2668
|
// 控制显示
|
|
2669
2669
|
modelValue: {
|
|
2670
2670
|
type: Boolean,
|
|
@@ -2717,46 +2717,46 @@ const Ht = M(Wl), [Ul, pt, jl] = A("popup"), Xl = {
|
|
|
2717
2717
|
type: Number,
|
|
2718
2718
|
default: 101
|
|
2719
2719
|
}
|
|
2720
|
-
},
|
|
2721
|
-
name:
|
|
2722
|
-
props:
|
|
2720
|
+
}, Zl = /* @__PURE__ */ z({
|
|
2721
|
+
name: ql,
|
|
2722
|
+
props: Kl,
|
|
2723
2723
|
emits: ["clickMask", "update:modelValue"],
|
|
2724
2724
|
setup(e, {
|
|
2725
2725
|
slots: t,
|
|
2726
2726
|
emit: a
|
|
2727
2727
|
}) {
|
|
2728
|
-
const l =
|
|
2728
|
+
const l = V(() => {
|
|
2729
2729
|
const {
|
|
2730
2730
|
position: n,
|
|
2731
2731
|
borderRadius: r,
|
|
2732
2732
|
customStyle: d,
|
|
2733
|
-
duration:
|
|
2734
|
-
} = e,
|
|
2735
|
-
let
|
|
2733
|
+
duration: m
|
|
2734
|
+
} = e, S = F(r);
|
|
2735
|
+
let v = "0";
|
|
2736
2736
|
switch (n) {
|
|
2737
2737
|
case "top":
|
|
2738
|
-
|
|
2738
|
+
v = ` 0 0 ${S} ${S}`;
|
|
2739
2739
|
break;
|
|
2740
2740
|
case "bottom":
|
|
2741
|
-
|
|
2741
|
+
v = `${S} ${S} 0 0`;
|
|
2742
2742
|
break;
|
|
2743
2743
|
case "left":
|
|
2744
|
-
|
|
2744
|
+
v = `0 ${S} ${S} 0`;
|
|
2745
2745
|
break;
|
|
2746
2746
|
case "right":
|
|
2747
|
-
|
|
2747
|
+
v = `${S} 0 0 ${S}`;
|
|
2748
2748
|
break;
|
|
2749
2749
|
default:
|
|
2750
|
-
|
|
2750
|
+
v = `${S}`;
|
|
2751
2751
|
}
|
|
2752
2752
|
return {
|
|
2753
|
-
borderRadius:
|
|
2754
|
-
animationDuration: `${
|
|
2753
|
+
borderRadius: v,
|
|
2754
|
+
animationDuration: `${m}ms`,
|
|
2755
2755
|
...d
|
|
2756
2756
|
};
|
|
2757
2757
|
}), o = (n) => {
|
|
2758
2758
|
a("clickMask", n), e.isCloseOnClickMask && (i.value = !1);
|
|
2759
|
-
}, i =
|
|
2759
|
+
}, i = V({
|
|
2760
2760
|
get: () => e.modelValue,
|
|
2761
2761
|
set: (n) => a("update:modelValue", n)
|
|
2762
2762
|
});
|
|
@@ -2765,45 +2765,45 @@ const Ht = M(Wl), [Ul, pt, jl] = A("popup"), Xl = {
|
|
|
2765
2765
|
teleport: n,
|
|
2766
2766
|
position: r,
|
|
2767
2767
|
customClass: d,
|
|
2768
|
-
duration:
|
|
2769
|
-
onAfterLeave:
|
|
2770
|
-
lockScroll:
|
|
2771
|
-
zIndex:
|
|
2768
|
+
duration: m,
|
|
2769
|
+
onAfterLeave: S,
|
|
2770
|
+
lockScroll: v,
|
|
2771
|
+
zIndex: h
|
|
2772
2772
|
} = e;
|
|
2773
|
-
return c(
|
|
2773
|
+
return c(Ct, {
|
|
2774
2774
|
to: n
|
|
2775
2775
|
}, {
|
|
2776
2776
|
default: () => [c("div", {
|
|
2777
|
-
class:
|
|
2777
|
+
class: bt(),
|
|
2778
2778
|
style: {
|
|
2779
|
-
zIndex:
|
|
2779
|
+
zIndex: h
|
|
2780
2780
|
}
|
|
2781
|
-
}, [c(
|
|
2781
|
+
}, [c(jt, {
|
|
2782
2782
|
modelValue: i.value,
|
|
2783
|
-
"onUpdate:modelValue": (
|
|
2784
|
-
duration:
|
|
2785
|
-
lockScroll:
|
|
2783
|
+
"onUpdate:modelValue": (u) => i.value = u,
|
|
2784
|
+
duration: m,
|
|
2785
|
+
lockScroll: v,
|
|
2786
2786
|
onClick: o,
|
|
2787
|
-
onAfterLeave:
|
|
2788
|
-
}, null), c(
|
|
2789
|
-
name:
|
|
2787
|
+
onAfterLeave: S
|
|
2788
|
+
}, null), c(nt, {
|
|
2789
|
+
name: Gl("animation", `slide-${r}`)
|
|
2790
2790
|
}, {
|
|
2791
2791
|
default: () => {
|
|
2792
|
-
var
|
|
2792
|
+
var u;
|
|
2793
2793
|
return [ie(c("div", {
|
|
2794
2794
|
style: l.value,
|
|
2795
|
-
class: [
|
|
2795
|
+
class: [bt("content", {
|
|
2796
2796
|
[r]: r
|
|
2797
2797
|
}), d]
|
|
2798
|
-
}, [((
|
|
2798
|
+
}, [((u = t.default) == null ? void 0 : u.call(t)) || null]), [[De, i.value]])];
|
|
2799
2799
|
}
|
|
2800
2800
|
})])]
|
|
2801
2801
|
});
|
|
2802
2802
|
};
|
|
2803
2803
|
}
|
|
2804
2804
|
});
|
|
2805
|
-
const
|
|
2806
|
-
name:
|
|
2805
|
+
const Xt = A(Zl), [Ql, _e, St] = M("stepper"), Jl = /* @__PURE__ */ z({
|
|
2806
|
+
name: Ql,
|
|
2807
2807
|
props: {
|
|
2808
2808
|
modelValue: {
|
|
2809
2809
|
type: [Number, String],
|
|
@@ -2853,90 +2853,90 @@ const Wt = M(Yl), [ql, Ve, yt] = A("stepper"), Gl = /* @__PURE__ */ P({
|
|
|
2853
2853
|
}) {
|
|
2854
2854
|
const {
|
|
2855
2855
|
parent: l
|
|
2856
|
-
} =
|
|
2857
|
-
let
|
|
2858
|
-
return
|
|
2859
|
-
},
|
|
2860
|
-
const
|
|
2861
|
-
o.value =
|
|
2856
|
+
} = Le(), o = B(e.modelValue), i = V(() => e.size || (l == null ? void 0 : l.getProp("size"))), n = V(() => e.modelValue <= e.min || e.disabled), r = V(() => e.modelValue >= e.max || e.disabled), d = (f) => {
|
|
2857
|
+
let g = e.integer;
|
|
2858
|
+
return f.toString().replace(/([^0-9\.\-])/g, "").replace(/\./g, (y) => g ? "" : (g = !0, y)).replace(/\-/g, (y, C) => C === 0 ? "-" : "");
|
|
2859
|
+
}, m = (f) => {
|
|
2860
|
+
const g = d(f);
|
|
2861
|
+
o.value = g, a("update:modelValue", g), a("change", g);
|
|
2862
2862
|
};
|
|
2863
|
-
X(() => e.modelValue, (
|
|
2864
|
-
o.value =
|
|
2863
|
+
X(() => e.modelValue, (f) => {
|
|
2864
|
+
o.value = f;
|
|
2865
2865
|
});
|
|
2866
|
-
const
|
|
2866
|
+
const S = (f) => a("focus", f), v = (f) => {
|
|
2867
2867
|
const {
|
|
2868
|
-
value:
|
|
2869
|
-
} =
|
|
2870
|
-
|
|
2871
|
-
},
|
|
2868
|
+
value: g
|
|
2869
|
+
} = f.target;
|
|
2870
|
+
m(g);
|
|
2871
|
+
}, h = (f) => {
|
|
2872
2872
|
const {
|
|
2873
|
-
value:
|
|
2874
|
-
} =
|
|
2875
|
-
if (
|
|
2873
|
+
value: g
|
|
2874
|
+
} = f.target, y = Number(d(g));
|
|
2875
|
+
if (y && y < e.min ? m(e.min) : y && y > e.max ? m(e.max) : y && m(y), l) {
|
|
2876
2876
|
const {
|
|
2877
2877
|
validateWithTrigger: C
|
|
2878
2878
|
} = l;
|
|
2879
2879
|
C("onBlur");
|
|
2880
2880
|
}
|
|
2881
|
-
a("blur",
|
|
2882
|
-
},
|
|
2883
|
-
const
|
|
2884
|
-
f
|
|
2885
|
-
},
|
|
2886
|
-
const
|
|
2887
|
-
f
|
|
2881
|
+
a("blur", f);
|
|
2882
|
+
}, u = () => {
|
|
2883
|
+
const f = Number(e.modelValue) - e.step;
|
|
2884
|
+
m(f), a("subtract", f);
|
|
2885
|
+
}, b = () => {
|
|
2886
|
+
const f = Number(e.modelValue) + e.step;
|
|
2887
|
+
m(f), a("addit", f);
|
|
2888
2888
|
};
|
|
2889
2889
|
return () => {
|
|
2890
2890
|
const {
|
|
2891
|
-
min:
|
|
2892
|
-
max:
|
|
2893
|
-
inputWidth:
|
|
2891
|
+
min: f,
|
|
2892
|
+
max: g,
|
|
2893
|
+
inputWidth: y,
|
|
2894
2894
|
placeholder: C,
|
|
2895
|
-
disabled:
|
|
2896
|
-
disableInput:
|
|
2895
|
+
disabled: s,
|
|
2896
|
+
disableInput: p
|
|
2897
2897
|
} = e;
|
|
2898
2898
|
return c("div", {
|
|
2899
|
-
class:
|
|
2899
|
+
class: _e({
|
|
2900
2900
|
[i.value]: i.value
|
|
2901
2901
|
})
|
|
2902
2902
|
}, [t.subtraction ? t.subtraction() : c("button", {
|
|
2903
2903
|
type: "button",
|
|
2904
2904
|
disabled: n.value,
|
|
2905
|
-
class: [
|
|
2905
|
+
class: [_e("subtraction"), St("el", {
|
|
2906
2906
|
clickable: !n.value
|
|
2907
2907
|
})],
|
|
2908
|
-
onClick:
|
|
2908
|
+
onClick: u
|
|
2909
2909
|
}, null), ie(c("input", {
|
|
2910
2910
|
type: "text",
|
|
2911
|
-
class:
|
|
2912
|
-
"only-disable":
|
|
2911
|
+
class: _e("input", {
|
|
2912
|
+
"only-disable": p
|
|
2913
2913
|
}),
|
|
2914
2914
|
style: {
|
|
2915
|
-
width: F(
|
|
2915
|
+
width: F(y)
|
|
2916
2916
|
},
|
|
2917
2917
|
"onUpdate:modelValue": (T) => o.value = T,
|
|
2918
2918
|
role: "spinbutton",
|
|
2919
2919
|
inputmode: "decimal",
|
|
2920
|
-
"aria-min":
|
|
2921
|
-
"aria-max":
|
|
2920
|
+
"aria-min": f,
|
|
2921
|
+
"aria-max": g,
|
|
2922
2922
|
"aria-valuenow": o.value,
|
|
2923
|
-
onInput:
|
|
2924
|
-
onBlur:
|
|
2925
|
-
onFocus:
|
|
2923
|
+
onInput: v,
|
|
2924
|
+
onBlur: h,
|
|
2925
|
+
onFocus: S,
|
|
2926
2926
|
placeholder: C,
|
|
2927
|
-
disabled:
|
|
2928
|
-
}, null), [[
|
|
2927
|
+
disabled: s || p
|
|
2928
|
+
}, null), [[Tt, o.value]]), t.addition ? t.addition() : c("button", {
|
|
2929
2929
|
type: "button",
|
|
2930
2930
|
disabled: r.value,
|
|
2931
|
-
class: [
|
|
2931
|
+
class: [_e("addition"), St("el", {
|
|
2932
2932
|
clickable: !r.value
|
|
2933
2933
|
})],
|
|
2934
|
-
onClick:
|
|
2934
|
+
onClick: b
|
|
2935
2935
|
}, null)]);
|
|
2936
2936
|
};
|
|
2937
2937
|
}
|
|
2938
2938
|
});
|
|
2939
|
-
const
|
|
2939
|
+
const ea = A(Jl), Yt = {
|
|
2940
2940
|
size: {
|
|
2941
2941
|
type: String,
|
|
2942
2942
|
default: null
|
|
@@ -2974,10 +2974,10 @@ const Kl = M(Gl), Ut = {
|
|
|
2974
2974
|
type: [Object, Array],
|
|
2975
2975
|
default: null
|
|
2976
2976
|
}
|
|
2977
|
-
}, [
|
|
2978
|
-
name:
|
|
2977
|
+
}, [qt, ta] = M("form"), Gt = qt, na = /* @__PURE__ */ z({
|
|
2978
|
+
name: qt,
|
|
2979
2979
|
props: {
|
|
2980
|
-
...
|
|
2980
|
+
...Yt,
|
|
2981
2981
|
validateFirst: {
|
|
2982
2982
|
// 是否在某一项校验不通过时停止校验
|
|
2983
2983
|
type: Boolean,
|
|
@@ -3006,88 +3006,88 @@ const Kl = M(Gl), Ut = {
|
|
|
3006
3006
|
const {
|
|
3007
3007
|
initProvide: o,
|
|
3008
3008
|
childrens: i
|
|
3009
|
-
} =
|
|
3010
|
-
const
|
|
3011
|
-
return i.forEach((
|
|
3012
|
-
const C =
|
|
3013
|
-
|
|
3014
|
-
}),
|
|
3015
|
-
}, r = (
|
|
3016
|
-
const
|
|
3017
|
-
return new Promise((C,
|
|
3018
|
-
if (
|
|
3019
|
-
|
|
3009
|
+
} = Be(Gt), n = () => {
|
|
3010
|
+
const g = {};
|
|
3011
|
+
return i.forEach((y) => {
|
|
3012
|
+
const C = y.exposed;
|
|
3013
|
+
g[y.props.prop] = C.formValue;
|
|
3014
|
+
}), g;
|
|
3015
|
+
}, r = (g) => {
|
|
3016
|
+
const y = i.filter((C) => C.props.prop === g);
|
|
3017
|
+
return new Promise((C, s) => {
|
|
3018
|
+
if (y.length === 0)
|
|
3019
|
+
s(new Error('【YUI】form method "validateField": no field, please check your param: "propName"!'));
|
|
3020
3020
|
else {
|
|
3021
|
-
const
|
|
3022
|
-
|
|
3023
|
-
T ?
|
|
3021
|
+
const p = y[0].exposed;
|
|
3022
|
+
p == null || p.validate().then((T) => {
|
|
3023
|
+
T ? s(T) : C();
|
|
3024
3024
|
});
|
|
3025
3025
|
}
|
|
3026
3026
|
});
|
|
3027
3027
|
}, d = async () => {
|
|
3028
|
-
const
|
|
3029
|
-
if (await i.reduce((
|
|
3030
|
-
if (!
|
|
3031
|
-
const
|
|
3032
|
-
return
|
|
3033
|
-
|
|
3028
|
+
const g = [];
|
|
3029
|
+
if (await i.reduce((y, C) => y.then(() => {
|
|
3030
|
+
if (!g.length) {
|
|
3031
|
+
const s = C.exposed;
|
|
3032
|
+
return s == null ? void 0 : s.validate().then((p) => {
|
|
3033
|
+
p && g.push(p);
|
|
3034
3034
|
});
|
|
3035
3035
|
}
|
|
3036
3036
|
return null;
|
|
3037
|
-
}), Promise.resolve()),
|
|
3038
|
-
throw
|
|
3039
|
-
},
|
|
3040
|
-
const
|
|
3041
|
-
if (
|
|
3042
|
-
throw
|
|
3043
|
-
},
|
|
3044
|
-
const C = i.find((
|
|
3045
|
-
(C == null ? void 0 : C.vnode.el).scrollIntoView(
|
|
3046
|
-
},
|
|
3047
|
-
const
|
|
3048
|
-
|
|
3049
|
-
a("submit",
|
|
3050
|
-
}).catch((
|
|
3037
|
+
}), Promise.resolve()), g.length)
|
|
3038
|
+
throw g;
|
|
3039
|
+
}, m = async () => {
|
|
3040
|
+
const y = (await Promise.all(i.map((C) => C.exposed.validate()))).filter((C) => C);
|
|
3041
|
+
if (y.length)
|
|
3042
|
+
throw y;
|
|
3043
|
+
}, S = (g) => g ? r(g) : e.validateFirst ? d() : m(), v = (g, y) => {
|
|
3044
|
+
const C = i.find((p) => p.props.prop === g);
|
|
3045
|
+
(C == null ? void 0 : C.vnode.el).scrollIntoView(y);
|
|
3046
|
+
}, h = () => {
|
|
3047
|
+
const g = n();
|
|
3048
|
+
S().then(() => {
|
|
3049
|
+
a("submit", g);
|
|
3050
|
+
}).catch((y) => {
|
|
3051
3051
|
a("failed", {
|
|
3052
|
-
values:
|
|
3053
|
-
errors:
|
|
3054
|
-
}), Array.isArray(
|
|
3052
|
+
values: g,
|
|
3053
|
+
errors: y
|
|
3054
|
+
}), Array.isArray(y) && e.scrollToError && v(y == null ? void 0 : y[0].name);
|
|
3055
3055
|
});
|
|
3056
|
-
},
|
|
3057
|
-
|
|
3058
|
-
},
|
|
3056
|
+
}, u = (g) => {
|
|
3057
|
+
g.preventDefault(), h();
|
|
3058
|
+
}, b = () => {
|
|
3059
3059
|
a("change", n());
|
|
3060
|
-
},
|
|
3061
|
-
i.forEach((
|
|
3060
|
+
}, f = (g) => {
|
|
3061
|
+
i.forEach((y) => {
|
|
3062
3062
|
var C;
|
|
3063
|
-
if (!
|
|
3064
|
-
const
|
|
3065
|
-
(C =
|
|
3063
|
+
if (!g || y.props.prop === g) {
|
|
3064
|
+
const s = y.exposed;
|
|
3065
|
+
(C = s.resetValidation) == null || C.call(s);
|
|
3066
3066
|
}
|
|
3067
3067
|
});
|
|
3068
3068
|
};
|
|
3069
3069
|
return o({
|
|
3070
3070
|
props: e,
|
|
3071
|
-
change:
|
|
3071
|
+
change: b
|
|
3072
3072
|
}), l({
|
|
3073
|
-
submit:
|
|
3074
|
-
scrollToField:
|
|
3075
|
-
validate:
|
|
3076
|
-
change:
|
|
3077
|
-
resetValidation:
|
|
3073
|
+
submit: h,
|
|
3074
|
+
scrollToField: v,
|
|
3075
|
+
validate: S,
|
|
3076
|
+
change: b,
|
|
3077
|
+
resetValidation: f
|
|
3078
3078
|
}), () => {
|
|
3079
|
-
var
|
|
3079
|
+
var g;
|
|
3080
3080
|
return c("form", {
|
|
3081
|
-
onSubmit:
|
|
3082
|
-
class: [
|
|
3083
|
-
}, [(
|
|
3081
|
+
onSubmit: u,
|
|
3082
|
+
class: [ta()]
|
|
3083
|
+
}, [(g = t.default) == null ? void 0 : g.call(t)]);
|
|
3084
3084
|
};
|
|
3085
3085
|
}
|
|
3086
3086
|
});
|
|
3087
|
-
const
|
|
3088
|
-
name:
|
|
3087
|
+
const la = A(na), Kt = "form-item", [aa, ze, oa] = M(Kt), ia = Et(Kt), ra = /* @__PURE__ */ z({
|
|
3088
|
+
name: aa,
|
|
3089
3089
|
props: {
|
|
3090
|
-
...
|
|
3090
|
+
...Yt,
|
|
3091
3091
|
label: {
|
|
3092
3092
|
type: [Number, String],
|
|
3093
3093
|
default: ""
|
|
@@ -3108,44 +3108,44 @@ const Jl = M(Ql), Yt = "form-item", [ea, _e, ta] = A(Yt), na = kt(Yt), la = /* @
|
|
|
3108
3108
|
}) {
|
|
3109
3109
|
const {
|
|
3110
3110
|
parent: l
|
|
3111
|
-
} =
|
|
3111
|
+
} = ge(Gt), {
|
|
3112
3112
|
initProvide: o,
|
|
3113
3113
|
filed: i
|
|
3114
|
-
} =
|
|
3115
|
-
if (e[
|
|
3116
|
-
return e[
|
|
3114
|
+
} = Hn(), n = B(!1), r = B(ia.validateMessage), d = (p) => {
|
|
3115
|
+
if (e[p] && e[p] !== null)
|
|
3116
|
+
return e[p];
|
|
3117
3117
|
const T = l && l.props;
|
|
3118
|
-
return T && T[
|
|
3119
|
-
},
|
|
3120
|
-
const
|
|
3121
|
-
return
|
|
3122
|
-
}),
|
|
3118
|
+
return T && T[p] || null;
|
|
3119
|
+
}, m = V(() => {
|
|
3120
|
+
const p = l && l.props.rules, T = e.rules || (p == null ? void 0 : p[e.prop]);
|
|
3121
|
+
return dn(T) ? [T] : T;
|
|
3122
|
+
}), S = V(() => m.value && m.value.some((p) => p.required)), v = V(() => i.value ? i.value.proxy.modelValue : null), h = V(() => d("showError") && n.value), u = (p, T) => !(T.required && (i.value && i.value.exposed && typeof i.value.exposed.isRequired < "u" && !i.value.exposed.isRequired || !(Array.isArray(p) ? p.length : p)) || T.pattern && sn(p) && !T.pattern.test(p)), b = (p, T) => {
|
|
3123
3123
|
const {
|
|
3124
|
-
message:
|
|
3124
|
+
message: k
|
|
3125
3125
|
} = T;
|
|
3126
|
-
return
|
|
3127
|
-
},
|
|
3126
|
+
return kt(k) ? k(p, T) : k;
|
|
3127
|
+
}, f = (p) => p.reduce((T, k) => T.then(() => {
|
|
3128
3128
|
if (n.value)
|
|
3129
3129
|
return null;
|
|
3130
|
-
const
|
|
3131
|
-
if (!
|
|
3132
|
-
return n.value = !0, r.value =
|
|
3133
|
-
if (
|
|
3134
|
-
const
|
|
3135
|
-
return typeof
|
|
3130
|
+
const x = k.formatter ? k.formatter(v.value, k) : v.value;
|
|
3131
|
+
if (!u(x, k))
|
|
3132
|
+
return n.value = !0, r.value = b(x, k), null;
|
|
3133
|
+
if (k.validator) {
|
|
3134
|
+
const N = k.validator(x, k);
|
|
3135
|
+
return typeof N == "boolean" ? (N || (n.value = !0, r.value = b(x, k)), Promise.resolve(N)) : N.then((E) => (E || (n.value = !0, r.value = b(x, k)), E));
|
|
3136
3136
|
}
|
|
3137
3137
|
return null;
|
|
3138
|
-
}), Promise.resolve()),
|
|
3139
|
-
const T =
|
|
3140
|
-
return T ? (await
|
|
3138
|
+
}), Promise.resolve()), g = async (p) => {
|
|
3139
|
+
const T = p || m.value;
|
|
3140
|
+
return T ? (await f(T), n.value ? {
|
|
3141
3141
|
name: e.prop,
|
|
3142
3142
|
message: r.value
|
|
3143
3143
|
} : null) : Promise.resolve();
|
|
3144
|
-
},
|
|
3144
|
+
}, y = (p) => {
|
|
3145
3145
|
var T;
|
|
3146
|
-
if (l &&
|
|
3147
|
-
const
|
|
3148
|
-
return
|
|
3146
|
+
if (l && m.value) {
|
|
3147
|
+
const k = ((T = l.props) == null ? void 0 : T.validateTrigger) === p, x = m.value.filter((N) => N.trigger ? N.trigger === p : k);
|
|
3148
|
+
return g(x);
|
|
3149
3149
|
}
|
|
3150
3150
|
return Promise.resolve(null);
|
|
3151
3151
|
}, C = () => {
|
|
@@ -3153,51 +3153,51 @@ const Jl = M(Ql), Yt = "form-item", [ea, _e, ta] = A(Yt), na = kt(Yt), la = /* @
|
|
|
3153
3153
|
};
|
|
3154
3154
|
o({
|
|
3155
3155
|
getProp: d,
|
|
3156
|
-
validateWithTrigger:
|
|
3156
|
+
validateWithTrigger: y,
|
|
3157
3157
|
resetValidation: C,
|
|
3158
3158
|
change: l == null ? void 0 : l.change
|
|
3159
3159
|
}), a({
|
|
3160
3160
|
resetValidation: C,
|
|
3161
|
-
formValue:
|
|
3162
|
-
validate:
|
|
3161
|
+
formValue: v,
|
|
3162
|
+
validate: g
|
|
3163
3163
|
});
|
|
3164
|
-
const
|
|
3165
|
-
class:
|
|
3164
|
+
const s = () => h.value ? t.error ? t.error() : d("showErrorMessage") ? c("p", {
|
|
3165
|
+
class: ze("error"),
|
|
3166
3166
|
style: {
|
|
3167
3167
|
textAlign: "left"
|
|
3168
3168
|
}
|
|
3169
3169
|
}, [r.value]) : null : null;
|
|
3170
3170
|
return () => {
|
|
3171
|
-
var
|
|
3171
|
+
var x, N, E;
|
|
3172
3172
|
const {
|
|
3173
|
-
label:
|
|
3173
|
+
label: p,
|
|
3174
3174
|
border: T,
|
|
3175
|
-
colon:
|
|
3175
|
+
colon: k
|
|
3176
3176
|
} = e;
|
|
3177
3177
|
return c("div", {
|
|
3178
|
-
class: [
|
|
3179
|
-
"is-error":
|
|
3178
|
+
class: [ze({
|
|
3179
|
+
"is-error": h.value,
|
|
3180
3180
|
[d("size")]: d("size"),
|
|
3181
3181
|
hairline: T
|
|
3182
|
-
}),
|
|
3182
|
+
}), oa("el", {
|
|
3183
3183
|
"hairline-bottom": T
|
|
3184
3184
|
})]
|
|
3185
3185
|
}, [c("label", {
|
|
3186
|
-
class:
|
|
3187
|
-
"is-required":
|
|
3186
|
+
class: ze("label", {
|
|
3187
|
+
"is-required": S.value
|
|
3188
3188
|
}),
|
|
3189
3189
|
style: {
|
|
3190
3190
|
width: d("labelWidth"),
|
|
3191
3191
|
textAlign: d("labelAlign") || "left"
|
|
3192
3192
|
}
|
|
3193
|
-
}, [(
|
|
3194
|
-
class:
|
|
3195
|
-
}, [(
|
|
3193
|
+
}, [(x = t.labelIcon) == null ? void 0 : x.call(t), p, k ? " :" : ""]), c("div", {
|
|
3194
|
+
class: ze("content")
|
|
3195
|
+
}, [(N = t.default) == null ? void 0 : N.call(t), s()]), (E = t.extra) == null ? void 0 : E.call(t)]);
|
|
3196
3196
|
};
|
|
3197
3197
|
}
|
|
3198
3198
|
});
|
|
3199
|
-
const
|
|
3200
|
-
name:
|
|
3199
|
+
const ua = A(ra), [sa, ca] = M("input"), da = 13, fa = /* @__PURE__ */ z({
|
|
3200
|
+
name: sa,
|
|
3201
3201
|
props: {
|
|
3202
3202
|
modelValue: {
|
|
3203
3203
|
type: [String, Number],
|
|
@@ -3254,79 +3254,79 @@ const aa = M(la), [oa, ia] = A("input"), ra = 13, ua = /* @__PURE__ */ P({
|
|
|
3254
3254
|
}) {
|
|
3255
3255
|
const a = te(), {
|
|
3256
3256
|
parent: l
|
|
3257
|
-
} =
|
|
3257
|
+
} = Le();
|
|
3258
3258
|
let o = null;
|
|
3259
|
-
const i = (
|
|
3260
|
-
|
|
3261
|
-
}, n = (
|
|
3262
|
-
|
|
3259
|
+
const i = (u, b) => {
|
|
3260
|
+
u !== b && o && (o.innerHTML = `${e.modelValue.toString().length}/${e.maxLength}`);
|
|
3261
|
+
}, n = (u, b) => {
|
|
3262
|
+
u !== b && (u ? (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));
|
|
3263
3263
|
};
|
|
3264
3264
|
X(() => e.showWordLimit, n), X(() => e.modelValue, i), X(() => e.maxLength, i);
|
|
3265
|
-
const r = (
|
|
3265
|
+
const r = (u) => t("focus", u), d = (u) => t("click", u), m = (u) => {
|
|
3266
3266
|
if (l) {
|
|
3267
3267
|
const {
|
|
3268
|
-
validateWithTrigger:
|
|
3268
|
+
validateWithTrigger: b
|
|
3269
3269
|
} = l;
|
|
3270
|
-
|
|
3270
|
+
b("onBlur");
|
|
3271
3271
|
}
|
|
3272
|
-
t("blur",
|
|
3273
|
-
},
|
|
3274
|
-
t("update:modelValue",
|
|
3275
|
-
},
|
|
3276
|
-
|
|
3272
|
+
t("blur", u);
|
|
3273
|
+
}, S = (u) => {
|
|
3274
|
+
t("update:modelValue", u.target.value), t("input", u);
|
|
3275
|
+
}, v = (u) => {
|
|
3276
|
+
u.keyCode === da && (l != null && l.getProp("enterable") || u.preventDefault(), e.type === "search" && (a == null ? void 0 : a.vnode.el).blur()), t("keypress", u);
|
|
3277
3277
|
};
|
|
3278
3278
|
J(() => {
|
|
3279
3279
|
n(e.showWordLimit), i(e.maxLength);
|
|
3280
|
-
}),
|
|
3280
|
+
}), Ne(() => {
|
|
3281
3281
|
o && o.remove(), o = null;
|
|
3282
3282
|
});
|
|
3283
|
-
const
|
|
3283
|
+
const h = V({
|
|
3284
3284
|
get: () => e.modelValue,
|
|
3285
|
-
set: (
|
|
3285
|
+
set: (u) => t("update:modelValue", u)
|
|
3286
3286
|
});
|
|
3287
3287
|
return () => {
|
|
3288
3288
|
const {
|
|
3289
|
-
type:
|
|
3290
|
-
rows:
|
|
3291
|
-
align:
|
|
3292
|
-
disabled:
|
|
3293
|
-
maxLength:
|
|
3289
|
+
type: u,
|
|
3290
|
+
rows: b,
|
|
3291
|
+
align: f,
|
|
3292
|
+
disabled: g,
|
|
3293
|
+
maxLength: y,
|
|
3294
3294
|
size: C,
|
|
3295
|
-
border:
|
|
3296
|
-
readonly:
|
|
3295
|
+
border: s,
|
|
3296
|
+
readonly: p,
|
|
3297
3297
|
autocomplete: T,
|
|
3298
|
-
placeholder:
|
|
3299
|
-
} = e,
|
|
3300
|
-
class:
|
|
3301
|
-
[
|
|
3302
|
-
border:
|
|
3298
|
+
placeholder: k
|
|
3299
|
+
} = e, x = C || (l == null ? void 0 : l.getProp("size")), N = {
|
|
3300
|
+
class: ca({
|
|
3301
|
+
[x]: x,
|
|
3302
|
+
border: s
|
|
3303
3303
|
}),
|
|
3304
3304
|
style: {
|
|
3305
|
-
"text-align":
|
|
3305
|
+
"text-align": f
|
|
3306
3306
|
},
|
|
3307
|
-
disabled:
|
|
3308
|
-
readonly:
|
|
3309
|
-
placeholder:
|
|
3310
|
-
maxlength:
|
|
3311
|
-
onInput:
|
|
3307
|
+
disabled: g,
|
|
3308
|
+
readonly: p,
|
|
3309
|
+
placeholder: k,
|
|
3310
|
+
maxlength: y,
|
|
3311
|
+
onInput: S,
|
|
3312
3312
|
autocomplete: T,
|
|
3313
3313
|
onFocus: r,
|
|
3314
3314
|
onClick: d,
|
|
3315
|
-
onKeypress:
|
|
3316
|
-
onBlur:
|
|
3315
|
+
onKeypress: v,
|
|
3316
|
+
onBlur: m
|
|
3317
3317
|
};
|
|
3318
|
-
return
|
|
3319
|
-
rows:
|
|
3320
|
-
"onUpdate:modelValue": (
|
|
3321
|
-
}), null), [[
|
|
3322
|
-
"onUpdate:modelValue": (
|
|
3323
|
-
type:
|
|
3324
|
-
}), null), [[
|
|
3318
|
+
return u === "textarea" ? ie(c("textarea", Ce(N, {
|
|
3319
|
+
rows: b,
|
|
3320
|
+
"onUpdate:modelValue": (E) => h.value = E
|
|
3321
|
+
}), null), [[Tt, h.value]]) : ie(c("input", Ce(N, {
|
|
3322
|
+
"onUpdate:modelValue": (E) => h.value = E,
|
|
3323
|
+
type: u
|
|
3324
|
+
}), null), [[an, h.value]]);
|
|
3325
3325
|
};
|
|
3326
3326
|
}
|
|
3327
3327
|
});
|
|
3328
|
-
const
|
|
3329
|
-
name:
|
|
3328
|
+
const ma = A(fa), Ge = 1e3, Ke = 60 * Ge, Ze = 60 * Ke, xt = 24 * Ze, [va] = M("count-down"), ga = /* @__PURE__ */ z({
|
|
3329
|
+
name: va,
|
|
3330
3330
|
props: {
|
|
3331
3331
|
time: {
|
|
3332
3332
|
type: [Number, String],
|
|
@@ -3353,67 +3353,67 @@ const sa = M(ua), Ye = 1e3, qe = 60 * Ye, Ge = 60 * qe, bt = 24 * Ge, [ca] = A("
|
|
|
3353
3353
|
emit: a,
|
|
3354
3354
|
expose: l
|
|
3355
3355
|
}) {
|
|
3356
|
-
const o =
|
|
3356
|
+
const o = B(), i = B(!1), n = B(Number(e.time)), r = B(0), d = V(() => g(n.value));
|
|
3357
3357
|
J(() => {
|
|
3358
|
-
e.autoStart &&
|
|
3358
|
+
e.autoStart && m();
|
|
3359
3359
|
});
|
|
3360
|
-
const
|
|
3361
|
-
i.value = !0, r.value = n.value + Date.now(),
|
|
3362
|
-
},
|
|
3363
|
-
|
|
3364
|
-
},
|
|
3360
|
+
const m = () => {
|
|
3361
|
+
i.value = !0, r.value = n.value + Date.now(), h();
|
|
3362
|
+
}, S = () => {
|
|
3363
|
+
v(), n.value = Number(e.time), e.autoStart && m();
|
|
3364
|
+
}, v = () => {
|
|
3365
3365
|
i.value = !1, window.cancelAnimationFrame(o.value);
|
|
3366
|
-
},
|
|
3367
|
-
i.value && (e.millisecond ?
|
|
3368
|
-
},
|
|
3369
|
-
if (n.value =
|
|
3366
|
+
}, h = () => {
|
|
3367
|
+
i.value && (e.millisecond ? u() : f(n.value, b()) || u(), o.value = window.requestAnimationFrame(h));
|
|
3368
|
+
}, u = () => {
|
|
3369
|
+
if (n.value = b(), e.millisecond && n.value === 0 || !e.millisecond && Math.floor(n.value / 1e3) === 0) {
|
|
3370
3370
|
i.value = !1, a("finish");
|
|
3371
3371
|
return;
|
|
3372
3372
|
}
|
|
3373
3373
|
a("change", d.value);
|
|
3374
|
-
},
|
|
3375
|
-
const
|
|
3374
|
+
}, b = () => Math.max(r.value - Date.now(), 0), f = (s, p) => Math.floor(s / 1e3) === Math.floor(p / 1e3), g = (s) => {
|
|
3375
|
+
const p = Math.floor(s / xt), T = Math.floor(s % xt / Ze), k = Math.floor(s % Ze / Ke), x = Math.floor(s % Ke / Ge), N = Math.floor(s % Ge);
|
|
3376
3376
|
return {
|
|
3377
|
-
days:
|
|
3377
|
+
days: p,
|
|
3378
3378
|
hours: T,
|
|
3379
|
-
minutes:
|
|
3380
|
-
seconds:
|
|
3381
|
-
milliseconds:
|
|
3382
|
-
timestamp:
|
|
3379
|
+
minutes: k,
|
|
3380
|
+
seconds: x,
|
|
3381
|
+
milliseconds: N,
|
|
3382
|
+
timestamp: s
|
|
3383
3383
|
};
|
|
3384
|
-
},
|
|
3385
|
-
let
|
|
3384
|
+
}, y = (s) => {
|
|
3385
|
+
let p = s;
|
|
3386
3386
|
const {
|
|
3387
3387
|
days: T
|
|
3388
3388
|
} = d.value;
|
|
3389
3389
|
let {
|
|
3390
|
-
hours:
|
|
3391
|
-
minutes:
|
|
3392
|
-
seconds:
|
|
3393
|
-
milliseconds:
|
|
3390
|
+
hours: k,
|
|
3391
|
+
minutes: x,
|
|
3392
|
+
seconds: N,
|
|
3393
|
+
milliseconds: E
|
|
3394
3394
|
} = d.value;
|
|
3395
|
-
return
|
|
3396
|
-
}, C = (
|
|
3397
|
-
let T = `${
|
|
3398
|
-
for (; T.length <
|
|
3395
|
+
return p.indexOf("DD") === -1 ? k += T * 24 : p = p.replace("DD", C(T)), p.indexOf("HH") === -1 ? x += k * 60 : p = p.replace("HH", C(k)), p.indexOf("mm") === -1 ? N += x * 60 : p = p.replace("mm", C(x)), p.indexOf("ss") === -1 ? E += N * 1e3 : p = p.replace("ss", C(N)), p.indexOf("S") !== -1 && (p = p.replace(/S+/, ($) => C(E, $.length).slice(0, $.length))), p;
|
|
3396
|
+
}, C = (s, p = 2) => {
|
|
3397
|
+
let T = `${s}`;
|
|
3398
|
+
for (; T.length < p; )
|
|
3399
3399
|
T = `0${T}`;
|
|
3400
3400
|
return T;
|
|
3401
3401
|
};
|
|
3402
3402
|
return l({
|
|
3403
|
-
start:
|
|
3404
|
-
reset:
|
|
3405
|
-
suspend:
|
|
3403
|
+
start: m,
|
|
3404
|
+
reset: S,
|
|
3405
|
+
suspend: v
|
|
3406
3406
|
}), () => {
|
|
3407
|
-
var
|
|
3408
|
-
return ((
|
|
3407
|
+
var s;
|
|
3408
|
+
return ((s = t.default) == null ? void 0 : s.call(t, d.value)) || c("div", null, [y(e.format)]);
|
|
3409
3409
|
};
|
|
3410
3410
|
}
|
|
3411
3411
|
});
|
|
3412
|
-
const
|
|
3413
|
-
function
|
|
3414
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" &&
|
|
3412
|
+
const ha = A(ga);
|
|
3413
|
+
function pa(e) {
|
|
3414
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Te(e);
|
|
3415
3415
|
}
|
|
3416
|
-
const [
|
|
3416
|
+
const [ya, ee] = M("dialog"), ba = {
|
|
3417
3417
|
// 控制显示
|
|
3418
3418
|
modelValue: {
|
|
3419
3419
|
type: Boolean,
|
|
@@ -3484,140 +3484,140 @@ const [va, ee] = A("dialog"), ga = {
|
|
|
3484
3484
|
type: String,
|
|
3485
3485
|
default: "body"
|
|
3486
3486
|
}
|
|
3487
|
-
},
|
|
3488
|
-
name:
|
|
3487
|
+
}, Zt = /* @__PURE__ */ z({
|
|
3488
|
+
name: ya,
|
|
3489
3489
|
directives: {
|
|
3490
|
-
loading:
|
|
3490
|
+
loading: Dt
|
|
3491
3491
|
},
|
|
3492
|
-
props:
|
|
3492
|
+
props: ba,
|
|
3493
3493
|
emits: ["update:modelValue", "cancel", "confirm"],
|
|
3494
3494
|
setup(e, {
|
|
3495
3495
|
emit: t,
|
|
3496
3496
|
slots: a
|
|
3497
3497
|
}) {
|
|
3498
|
-
const l =
|
|
3498
|
+
const l = W({
|
|
3499
3499
|
cancel: !1,
|
|
3500
3500
|
confirm: !1
|
|
3501
|
-
}), o = (
|
|
3502
|
-
|
|
3503
|
-
}, i = (
|
|
3504
|
-
var
|
|
3505
|
-
o(!1), (
|
|
3506
|
-
}, n = (
|
|
3507
|
-
t("cancel",
|
|
3508
|
-
}, r = (
|
|
3509
|
-
t("confirm",
|
|
3510
|
-
}, d = (
|
|
3501
|
+
}), o = (h) => {
|
|
3502
|
+
v.value = h;
|
|
3503
|
+
}, i = (h) => {
|
|
3504
|
+
var u;
|
|
3505
|
+
o(!1), (u = e.callback) == null || u.call(e, h);
|
|
3506
|
+
}, n = (h) => {
|
|
3507
|
+
t("cancel", h, d("cancel"));
|
|
3508
|
+
}, r = (h) => {
|
|
3509
|
+
t("confirm", h, d("confirm"));
|
|
3510
|
+
}, d = (h) => {
|
|
3511
3511
|
const {
|
|
3512
|
-
modelValue:
|
|
3513
|
-
beforeClose:
|
|
3512
|
+
modelValue: u,
|
|
3513
|
+
beforeClose: b
|
|
3514
3514
|
} = e;
|
|
3515
|
-
if (
|
|
3516
|
-
if (
|
|
3517
|
-
l[
|
|
3518
|
-
const
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
}).catch((
|
|
3522
|
-
throw new Error(
|
|
3523
|
-
}) : f
|
|
3515
|
+
if (u)
|
|
3516
|
+
if (kt(b)) {
|
|
3517
|
+
l[h] = !0;
|
|
3518
|
+
const f = b(h);
|
|
3519
|
+
fn(f) ? f.then((y) => {
|
|
3520
|
+
m(y, h);
|
|
3521
|
+
}).catch((y) => {
|
|
3522
|
+
throw new Error(y);
|
|
3523
|
+
}) : m(f, h);
|
|
3524
3524
|
} else
|
|
3525
|
-
i(
|
|
3526
|
-
},
|
|
3527
|
-
|
|
3528
|
-
},
|
|
3529
|
-
let
|
|
3530
|
-
return
|
|
3531
|
-
},
|
|
3525
|
+
i(h);
|
|
3526
|
+
}, m = (h, u) => {
|
|
3527
|
+
h && i(u), l[u] = !1;
|
|
3528
|
+
}, S = (h, u, b) => {
|
|
3529
|
+
let f = Number(h.substring(0, h.length - 2));
|
|
3530
|
+
return f /= u || 2, b ? `${b(f)}px` : `${f}px`;
|
|
3531
|
+
}, v = V({
|
|
3532
3532
|
get: () => e.modelValue,
|
|
3533
|
-
set: (
|
|
3533
|
+
set: (h) => t("update:modelValue", h)
|
|
3534
3534
|
});
|
|
3535
3535
|
return () => {
|
|
3536
3536
|
const {
|
|
3537
|
-
width:
|
|
3538
|
-
title:
|
|
3539
|
-
titleAlign:
|
|
3540
|
-
message:
|
|
3541
|
-
messageAlign:
|
|
3542
|
-
isCloseOnClickMask:
|
|
3537
|
+
width: h,
|
|
3538
|
+
title: u,
|
|
3539
|
+
titleAlign: b,
|
|
3540
|
+
message: f,
|
|
3541
|
+
messageAlign: g,
|
|
3542
|
+
isCloseOnClickMask: y,
|
|
3543
3543
|
showCloseIcon: C,
|
|
3544
|
-
showCancelBtn:
|
|
3545
|
-
cancelButtonText:
|
|
3544
|
+
showCancelBtn: s,
|
|
3545
|
+
cancelButtonText: p,
|
|
3546
3546
|
showConfirmBtn: T,
|
|
3547
|
-
confirmButtonText:
|
|
3548
|
-
imgSrc:
|
|
3549
|
-
circleImg:
|
|
3550
|
-
teleport:
|
|
3547
|
+
confirmButtonText: k,
|
|
3548
|
+
imgSrc: x,
|
|
3549
|
+
circleImg: N,
|
|
3550
|
+
teleport: E
|
|
3551
3551
|
} = e;
|
|
3552
|
-
return c(
|
|
3553
|
-
modelValue:
|
|
3554
|
-
"onUpdate:modelValue": ($) =>
|
|
3552
|
+
return c(Xt, Ce({
|
|
3553
|
+
modelValue: v.value,
|
|
3554
|
+
"onUpdate:modelValue": ($) => v.value = $,
|
|
3555
3555
|
customClass: ee(),
|
|
3556
3556
|
customStyle: {
|
|
3557
|
-
width: F(
|
|
3557
|
+
width: F(h)
|
|
3558
3558
|
}
|
|
3559
3559
|
}, {
|
|
3560
3560
|
"onUpdate:modelValue": o
|
|
3561
3561
|
}, {
|
|
3562
|
-
isCloseOnClickMask:
|
|
3563
|
-
teleport:
|
|
3562
|
+
isCloseOnClickMask: y,
|
|
3563
|
+
teleport: E
|
|
3564
3564
|
}), {
|
|
3565
3565
|
default: () => {
|
|
3566
|
-
var $, I, D,
|
|
3567
|
-
return [(($ = a.img) == null ? void 0 : $.call(a)) ||
|
|
3566
|
+
var $, I, D, P;
|
|
3567
|
+
return [(($ = a.img) == null ? void 0 : $.call(a)) || x && c("div", {
|
|
3568
3568
|
class: ee("img", {
|
|
3569
|
-
circle:
|
|
3569
|
+
circle: N
|
|
3570
3570
|
}),
|
|
3571
3571
|
style: {
|
|
3572
|
-
top:
|
|
3573
|
-
left:
|
|
3572
|
+
top: N ? `-${S(F(h), 4)}` : "auto",
|
|
3573
|
+
left: N ? `calc(50% - ${S(F(h), 4)})` : "auto"
|
|
3574
3574
|
}
|
|
3575
3575
|
}, [c("div", {
|
|
3576
3576
|
style: {
|
|
3577
|
-
width:
|
|
3578
|
-
height:
|
|
3579
|
-
background: `url(${
|
|
3580
|
-
borderRadius:
|
|
3577
|
+
width: N ? S(F(h)) : F(h),
|
|
3578
|
+
height: S(F(h)),
|
|
3579
|
+
background: `url(${x}) center`,
|
|
3580
|
+
borderRadius: N ? "50%" : "20px 20px 0 0"
|
|
3581
3581
|
}
|
|
3582
3582
|
}, null)]), c("div", {
|
|
3583
3583
|
class: ee("container")
|
|
3584
3584
|
}, [c("div", {
|
|
3585
3585
|
style: {
|
|
3586
|
-
height:
|
|
3586
|
+
height: N ? S(F(h), 4, (Y) => Y + 20) : "24px"
|
|
3587
3587
|
}
|
|
3588
3588
|
}, null), ((I = a.title) == null ? void 0 : I.call(a)) || c("div", {
|
|
3589
3589
|
class: ee("title"),
|
|
3590
3590
|
style: {
|
|
3591
|
-
textAlign:
|
|
3591
|
+
textAlign: b
|
|
3592
3592
|
}
|
|
3593
|
-
}, [
|
|
3593
|
+
}, [u]), c("div", {
|
|
3594
3594
|
class: ee("content")
|
|
3595
3595
|
}, [c("div", {
|
|
3596
3596
|
class: ee("message"),
|
|
3597
3597
|
style: {
|
|
3598
|
-
textAlign:
|
|
3598
|
+
textAlign: g
|
|
3599
3599
|
}
|
|
3600
|
-
}, [((D = a.default) == null ? void 0 : D.call(a)) ||
|
|
3600
|
+
}, [((D = a.default) == null ? void 0 : D.call(a)) || f]), ((P = a.footer) == null ? void 0 : P.call(a)) || c("div", {
|
|
3601
3601
|
class: ee("footer"),
|
|
3602
3602
|
style: {
|
|
3603
|
-
paddingTop:
|
|
3603
|
+
paddingTop: s || T ? "20px" : "0px"
|
|
3604
3604
|
}
|
|
3605
|
-
}, [
|
|
3605
|
+
}, [s && ie(c(qe, {
|
|
3606
3606
|
type: "secondary",
|
|
3607
3607
|
class: ee("footer-btn"),
|
|
3608
3608
|
onClick: n
|
|
3609
|
-
},
|
|
3610
|
-
default: () => [
|
|
3611
|
-
}), [[
|
|
3609
|
+
}, pa(p) ? p : {
|
|
3610
|
+
default: () => [p]
|
|
3611
|
+
}), [[it("loading"), l.cancel]]), T && ie(c(qe, {
|
|
3612
3612
|
type: "primary",
|
|
3613
3613
|
class: ee("footer-btn"),
|
|
3614
3614
|
onClick: r
|
|
3615
3615
|
}, {
|
|
3616
|
-
default: () => [l.confirm ? "" :
|
|
3617
|
-
}), [[
|
|
3616
|
+
default: () => [l.confirm ? "" : k]
|
|
3617
|
+
}), [[it("loading"), l.confirm]])])]), C && c("div", {
|
|
3618
3618
|
class: ee("close"),
|
|
3619
3619
|
onClick: () => i("close")
|
|
3620
|
-
}, [c(
|
|
3620
|
+
}, [c(Ve, {
|
|
3621
3621
|
name: "cross"
|
|
3622
3622
|
}, null)])])];
|
|
3623
3623
|
}
|
|
@@ -3625,22 +3625,22 @@ const [va, ee] = A("dialog"), ga = {
|
|
|
3625
3625
|
};
|
|
3626
3626
|
}
|
|
3627
3627
|
});
|
|
3628
|
-
let
|
|
3629
|
-
const
|
|
3630
|
-
const a = `dialog${
|
|
3631
|
-
|
|
3628
|
+
let Ue = ke({}), Sa = 0;
|
|
3629
|
+
const Qt = [], xa = (e, t) => {
|
|
3630
|
+
const a = `dialog${Sa += 1}`;
|
|
3631
|
+
Ue = ke({
|
|
3632
3632
|
setup() {
|
|
3633
|
-
const i =
|
|
3633
|
+
const i = B(!0), n = (r) => {
|
|
3634
3634
|
i.value = r;
|
|
3635
3635
|
};
|
|
3636
|
-
return () =>
|
|
3637
|
-
|
|
3636
|
+
return () => $e(
|
|
3637
|
+
Zt,
|
|
3638
3638
|
{
|
|
3639
3639
|
modelValue: i.value,
|
|
3640
3640
|
"onUpdate:modelValue": n,
|
|
3641
3641
|
...e,
|
|
3642
3642
|
onAfterLeave: () => {
|
|
3643
|
-
|
|
3643
|
+
wa(a);
|
|
3644
3644
|
}
|
|
3645
3645
|
},
|
|
3646
3646
|
{ ...t }
|
|
@@ -3648,13 +3648,13 @@ const Gt = [], pa = (e, t) => {
|
|
|
3648
3648
|
}
|
|
3649
3649
|
});
|
|
3650
3650
|
const o = document.createElement("div");
|
|
3651
|
-
|
|
3652
|
-
},
|
|
3653
|
-
|
|
3651
|
+
Qt.push({ id: a, app: Ue, el: o }), Ue.mount(o);
|
|
3652
|
+
}, wa = (e) => {
|
|
3653
|
+
Qt.forEach((t) => {
|
|
3654
3654
|
e === t.id && t.app.unmount();
|
|
3655
3655
|
});
|
|
3656
3656
|
};
|
|
3657
|
-
const
|
|
3657
|
+
const $a = A(Zt), Jt = {
|
|
3658
3658
|
// 是否显示
|
|
3659
3659
|
modelValue: {
|
|
3660
3660
|
type: Boolean,
|
|
@@ -3709,16 +3709,16 @@ const ba = M(qt), Kt = {
|
|
|
3709
3709
|
default: "top"
|
|
3710
3710
|
/* Top */
|
|
3711
3711
|
}
|
|
3712
|
-
}, [
|
|
3712
|
+
}, [Ca, je] = M("popper"), en = (e) => e.parentElement ? getComputedStyle(e.parentElement).position !== "static" ? e.parentElement : en(e.parentElement) : e, Qe = (e, t, a) => {
|
|
3713
3713
|
let l = t || e.offsetTop, o = a || e.offsetLeft;
|
|
3714
|
-
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), Qe(e.parentElement, l, o)) : {
|
|
3715
3715
|
offsetLeft: o,
|
|
3716
3716
|
offsetTop: l
|
|
3717
3717
|
};
|
|
3718
|
-
},
|
|
3719
|
-
name:
|
|
3718
|
+
}, Je = /* @__PURE__ */ z({
|
|
3719
|
+
name: Ca,
|
|
3720
3720
|
props: {
|
|
3721
|
-
...
|
|
3721
|
+
...Jt,
|
|
3722
3722
|
reference: {
|
|
3723
3723
|
type: Object,
|
|
3724
3724
|
default: null
|
|
@@ -3727,137 +3727,137 @@ const ba = M(qt), Kt = {
|
|
|
3727
3727
|
setup(e, {
|
|
3728
3728
|
slots: t
|
|
3729
3729
|
}) {
|
|
3730
|
-
const a = te(), l =
|
|
3730
|
+
const a = te(), l = B(e.modelValue), o = W({
|
|
3731
3731
|
placement: "",
|
|
3732
3732
|
align: ""
|
|
3733
|
-
}), i =
|
|
3733
|
+
}), i = W({
|
|
3734
3734
|
top: 0,
|
|
3735
3735
|
left: 0
|
|
3736
3736
|
}), n = () => {
|
|
3737
3737
|
var $;
|
|
3738
|
-
const
|
|
3739
|
-
if (!
|
|
3738
|
+
const v = e.reference, h = ($ = a == null ? void 0 : a.proxy) == null ? void 0 : $.$refs.popper;
|
|
3739
|
+
if (!v || !h)
|
|
3740
3740
|
return;
|
|
3741
3741
|
const {
|
|
3742
|
-
offsetWidth:
|
|
3743
|
-
offsetHeight:
|
|
3744
|
-
} =
|
|
3745
|
-
offsetTop:
|
|
3746
|
-
offsetLeft:
|
|
3747
|
-
} =
|
|
3748
|
-
offsetWidth:
|
|
3742
|
+
offsetWidth: u,
|
|
3743
|
+
offsetHeight: b
|
|
3744
|
+
} = v, {
|
|
3745
|
+
offsetTop: f,
|
|
3746
|
+
offsetLeft: g
|
|
3747
|
+
} = Qe(v), {
|
|
3748
|
+
offsetWidth: y,
|
|
3749
3749
|
offsetHeight: C
|
|
3750
|
-
} =
|
|
3751
|
-
placement:
|
|
3752
|
-
align:
|
|
3750
|
+
} = h, {
|
|
3751
|
+
placement: s,
|
|
3752
|
+
align: p
|
|
3753
3753
|
} = o, {
|
|
3754
3754
|
offsetLeft: T,
|
|
3755
|
-
offsetTop:
|
|
3756
|
-
} =
|
|
3755
|
+
offsetTop: k
|
|
3756
|
+
} = Qe(en(h)), x = {
|
|
3757
3757
|
x: 0,
|
|
3758
3758
|
y: 0,
|
|
3759
|
-
newPlacement:
|
|
3759
|
+
newPlacement: s
|
|
3760
3760
|
};
|
|
3761
|
-
e.autoFlipping && (
|
|
3762
|
-
const
|
|
3763
|
-
switch (
|
|
3761
|
+
e.autoFlipping && (s === "left" && g - y < pageXOffset ? x.newPlacement = "right" : s === "right" && g + u + y > pageXOffset + innerWidth ? x.newPlacement = "left" : s === "top" && f - C < pageYOffset ? x.newPlacement = "bottom" : s === "bottom" && f + b + C > pageYOffset + innerHeight && (x.newPlacement = "top"));
|
|
3762
|
+
const N = x.newPlacement === "top" ? -C : b, E = x.newPlacement === "left" ? -y : u;
|
|
3763
|
+
switch (x.newPlacement) {
|
|
3764
3764
|
case "top":
|
|
3765
3765
|
case "bottom":
|
|
3766
|
-
|
|
3766
|
+
x.y = f + N, p === "start" ? x.x = g : p === "end" ? x.x = g + u - y : x.x = g + u / 2 - y / 2;
|
|
3767
3767
|
break;
|
|
3768
3768
|
case "left":
|
|
3769
3769
|
case "right":
|
|
3770
|
-
|
|
3770
|
+
x.x = g + E, p === "start" ? x.y = f : p === "end" ? x.y = f + b - C : x.y = f + b / 2 - C / 2;
|
|
3771
3771
|
break;
|
|
3772
3772
|
}
|
|
3773
|
-
i.left =
|
|
3774
|
-
}, r = (
|
|
3775
|
-
var
|
|
3776
|
-
const
|
|
3777
|
-
|
|
3773
|
+
i.left = x.x - T, i.top = x.y - k, o.placement = x.newPlacement;
|
|
3774
|
+
}, r = (v) => {
|
|
3775
|
+
var b;
|
|
3776
|
+
const h = (b = a == null ? void 0 : a.proxy) == null ? void 0 : b.$refs.popper, u = e.reference;
|
|
3777
|
+
u && h && !u.contains(v.target) && !h.contains(v.target) && (l.value = !1);
|
|
3778
3778
|
}, d = () => {
|
|
3779
3779
|
l.value = !l.value;
|
|
3780
|
-
},
|
|
3781
|
-
const [
|
|
3782
|
-
o.align =
|
|
3783
|
-
},
|
|
3784
|
-
e.manual && (l.value = e.modelValue), e.modelValue || l.value ? se(n).catch((
|
|
3785
|
-
throw new Error(
|
|
3780
|
+
}, m = () => {
|
|
3781
|
+
const [v, h] = e.position.split("-");
|
|
3782
|
+
o.align = h, o.placement = v;
|
|
3783
|
+
}, S = () => {
|
|
3784
|
+
e.manual && (l.value = e.modelValue), e.modelValue || l.value ? se(n).catch((v) => {
|
|
3785
|
+
throw new Error(v);
|
|
3786
3786
|
}) : (i.left = 0, i.top = 0);
|
|
3787
3787
|
};
|
|
3788
3788
|
return X(() => e.position, () => {
|
|
3789
|
-
|
|
3790
|
-
}), X([() => l.value, () => e.modelValue, () => e.reference],
|
|
3791
|
-
var
|
|
3792
|
-
|
|
3793
|
-
}),
|
|
3794
|
-
var
|
|
3795
|
-
e.manual || ((
|
|
3789
|
+
m(), S();
|
|
3790
|
+
}), X([() => l.value, () => e.modelValue, () => e.reference], S), J(() => {
|
|
3791
|
+
var v;
|
|
3792
|
+
m(), S(), e.manual || ((v = e.reference) == null || v.addEventListener("click", d), document.addEventListener("touchstart", r), document.addEventListener("mousedown", r));
|
|
3793
|
+
}), Ne(() => {
|
|
3794
|
+
var v;
|
|
3795
|
+
e.manual || ((v = e.reference) == null || v.removeEventListener("click", d), document.removeEventListener("touchstart", r), document.removeEventListener("mousedown", r));
|
|
3796
3796
|
}), () => {
|
|
3797
3797
|
const {
|
|
3798
|
-
left:
|
|
3799
|
-
top:
|
|
3798
|
+
left: v,
|
|
3799
|
+
top: h
|
|
3800
3800
|
} = i, {
|
|
3801
|
-
width:
|
|
3802
|
-
color:
|
|
3803
|
-
bgColor:
|
|
3804
|
-
modelValue:
|
|
3805
|
-
minWidth:
|
|
3801
|
+
width: u,
|
|
3802
|
+
color: b,
|
|
3803
|
+
bgColor: f,
|
|
3804
|
+
modelValue: g,
|
|
3805
|
+
minWidth: y,
|
|
3806
3806
|
popperClass: C,
|
|
3807
|
-
popperStyle:
|
|
3808
|
-
text:
|
|
3807
|
+
popperStyle: s,
|
|
3808
|
+
text: p
|
|
3809
3809
|
} = e;
|
|
3810
|
-
return c(
|
|
3810
|
+
return c(Ct, {
|
|
3811
3811
|
to: e.teleport
|
|
3812
3812
|
}, {
|
|
3813
3813
|
default: () => {
|
|
3814
3814
|
var T;
|
|
3815
3815
|
return [ie(c("div", {
|
|
3816
|
-
class: [
|
|
3816
|
+
class: [je({
|
|
3817
3817
|
[o.placement]: o.placement
|
|
3818
3818
|
}), C],
|
|
3819
3819
|
ref: "popper",
|
|
3820
3820
|
style: {
|
|
3821
|
-
...
|
|
3822
|
-
left: `${
|
|
3823
|
-
top: `${
|
|
3821
|
+
...s,
|
|
3822
|
+
left: `${v}px`,
|
|
3823
|
+
top: `${h}px`
|
|
3824
3824
|
}
|
|
3825
3825
|
}, [c("div", {
|
|
3826
|
-
class:
|
|
3826
|
+
class: je("content"),
|
|
3827
3827
|
style: {
|
|
3828
|
-
color:
|
|
3829
|
-
width: F(
|
|
3830
|
-
minWidth: F(
|
|
3831
|
-
backgroundColor:
|
|
3828
|
+
color: b,
|
|
3829
|
+
width: F(u),
|
|
3830
|
+
minWidth: F(y),
|
|
3831
|
+
backgroundColor: f
|
|
3832
3832
|
}
|
|
3833
|
-
}, [((T = t.default) == null ? void 0 : T.call(t)) ||
|
|
3834
|
-
class:
|
|
3833
|
+
}, [((T = t.default) == null ? void 0 : T.call(t)) || p]), c("div", {
|
|
3834
|
+
class: je("arrow", [`${o.placement}${o.align ? `-${o.align}` : ""}`]),
|
|
3835
3835
|
style: {
|
|
3836
|
-
color:
|
|
3836
|
+
color: f
|
|
3837
3837
|
}
|
|
3838
|
-
}, null)]), [[
|
|
3838
|
+
}, null)]), [[De, g || l.value]])];
|
|
3839
3839
|
}
|
|
3840
3840
|
});
|
|
3841
3841
|
};
|
|
3842
3842
|
}
|
|
3843
3843
|
});
|
|
3844
|
-
function
|
|
3845
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" &&
|
|
3844
|
+
function Ta(e) {
|
|
3845
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Te(e);
|
|
3846
3846
|
}
|
|
3847
|
-
const [
|
|
3848
|
-
name:
|
|
3849
|
-
props:
|
|
3847
|
+
const [Na] = M("tooltip"), ka = /* @__PURE__ */ z({
|
|
3848
|
+
name: Na,
|
|
3849
|
+
props: Jt,
|
|
3850
3850
|
setup(e, {
|
|
3851
3851
|
slots: t
|
|
3852
3852
|
}) {
|
|
3853
|
-
const a = te(), l =
|
|
3853
|
+
const a = te(), l = B(), o = () => {
|
|
3854
3854
|
var n;
|
|
3855
3855
|
const i = (n = a == null ? void 0 : a.proxy) == null ? void 0 : n.$el;
|
|
3856
3856
|
return i == null ? void 0 : i.nextElementSibling;
|
|
3857
3857
|
};
|
|
3858
3858
|
return J(() => {
|
|
3859
3859
|
l.value = o();
|
|
3860
|
-
}),
|
|
3860
|
+
}), et(() => {
|
|
3861
3861
|
se(() => {
|
|
3862
3862
|
l.value = o();
|
|
3863
3863
|
}).catch((i) => {
|
|
@@ -3866,16 +3866,16 @@ const [wa] = A("tooltip"), $a = /* @__PURE__ */ P({
|
|
|
3866
3866
|
}), () => {
|
|
3867
3867
|
var n;
|
|
3868
3868
|
let i;
|
|
3869
|
-
return c(
|
|
3869
|
+
return c(tt, null, [(n = t.default) == null ? void 0 : n.call(t)[0], l.value && (t.popper ? c(Je, Ce(e, {
|
|
3870
3870
|
reference: l.value
|
|
3871
|
-
}),
|
|
3871
|
+
}), Ta(i = t.popper()) ? i : {
|
|
3872
3872
|
default: () => [i]
|
|
3873
|
-
}) : c(
|
|
3873
|
+
}) : c(Je, Ce(e, {
|
|
3874
3874
|
reference: l.value
|
|
3875
3875
|
}), null))]);
|
|
3876
3876
|
};
|
|
3877
3877
|
}
|
|
3878
|
-
}),
|
|
3878
|
+
}), Ea = {
|
|
3879
3879
|
install: (e) => {
|
|
3880
3880
|
e.directive("tooltip", {
|
|
3881
3881
|
getSSRProps: (t) => ({ ...t }),
|
|
@@ -3883,8 +3883,8 @@ const [wa] = A("tooltip"), $a = /* @__PURE__ */ P({
|
|
|
3883
3883
|
// 在绑定元素的 attribute 或事件监听器被应用之前调用
|
|
3884
3884
|
// 在绑定元素的父组件挂载之前调用
|
|
3885
3885
|
mounted: (t, a) => {
|
|
3886
|
-
const l =
|
|
3887
|
-
t.$popper = document.createElement("div"), document.body.appendChild(t.$popper), l.appContext = e._context,
|
|
3886
|
+
const l = $e(Je, { ...a.value, reference: t });
|
|
3887
|
+
t.$popper = document.createElement("div"), document.body.appendChild(t.$popper), l.appContext = e._context, on(l, t.$popper);
|
|
3888
3888
|
},
|
|
3889
3889
|
unmounted: (t) => {
|
|
3890
3890
|
t.$popper && t.$popper.remove();
|
|
@@ -3892,76 +3892,226 @@ const [wa] = A("tooltip"), $a = /* @__PURE__ */ P({
|
|
|
3892
3892
|
});
|
|
3893
3893
|
}
|
|
3894
3894
|
};
|
|
3895
|
-
const
|
|
3895
|
+
const Ba = A(ka), xe = (e, t, a) => ({
|
|
3896
|
+
number: e,
|
|
3897
|
+
text: t,
|
|
3898
|
+
active: a
|
|
3899
|
+
}), [La, me] = M("pagination"), Va = {
|
|
3900
|
+
modelValue: {
|
|
3901
|
+
type: Number,
|
|
3902
|
+
default: 1
|
|
3903
|
+
},
|
|
3904
|
+
mode: {
|
|
3905
|
+
type: String,
|
|
3906
|
+
default: Lt.multi
|
|
3907
|
+
},
|
|
3908
|
+
prevText: {
|
|
3909
|
+
type: String,
|
|
3910
|
+
default: "上一页"
|
|
3911
|
+
},
|
|
3912
|
+
nextText: {
|
|
3913
|
+
type: String,
|
|
3914
|
+
default: "下一页"
|
|
3915
|
+
},
|
|
3916
|
+
pageCount: {
|
|
3917
|
+
type: Number,
|
|
3918
|
+
default: 0
|
|
3919
|
+
},
|
|
3920
|
+
totalItems: {
|
|
3921
|
+
type: Number,
|
|
3922
|
+
default: 0
|
|
3923
|
+
},
|
|
3924
|
+
itemsPerPage: {
|
|
3925
|
+
type: Number,
|
|
3926
|
+
default: 10
|
|
3927
|
+
},
|
|
3928
|
+
showPageSize: {
|
|
3929
|
+
type: Number,
|
|
3930
|
+
default: 5
|
|
3931
|
+
},
|
|
3932
|
+
forceEllipses: {
|
|
3933
|
+
type: Boolean,
|
|
3934
|
+
default: !0
|
|
3935
|
+
},
|
|
3936
|
+
ellipsesWithInclusio: {
|
|
3937
|
+
type: Boolean,
|
|
3938
|
+
default: !0
|
|
3939
|
+
},
|
|
3940
|
+
showPrevButton: {
|
|
3941
|
+
type: Boolean,
|
|
3942
|
+
default: !0
|
|
3943
|
+
},
|
|
3944
|
+
showNextButton: {
|
|
3945
|
+
type: Boolean,
|
|
3946
|
+
default: !0
|
|
3947
|
+
}
|
|
3948
|
+
}, Ia = /* @__PURE__ */ z({
|
|
3949
|
+
name: La,
|
|
3950
|
+
props: Va,
|
|
3951
|
+
emits: ["change", "update:modelValue"],
|
|
3952
|
+
setup(e, {
|
|
3953
|
+
emit: t,
|
|
3954
|
+
slots: a
|
|
3955
|
+
}) {
|
|
3956
|
+
const l = V(() => {
|
|
3957
|
+
const {
|
|
3958
|
+
pageCount: n,
|
|
3959
|
+
totalItems: r,
|
|
3960
|
+
itemsPerPage: d
|
|
3961
|
+
} = e, m = Number(n) || Math.ceil(Number(r) / Number(d));
|
|
3962
|
+
return Math.max(1, m);
|
|
3963
|
+
}), o = V(() => {
|
|
3964
|
+
const n = [], r = l.value, d = Number(e.showPageSize), {
|
|
3965
|
+
modelValue: m,
|
|
3966
|
+
forceEllipses: S,
|
|
3967
|
+
ellipsesWithInclusio: v
|
|
3968
|
+
} = e;
|
|
3969
|
+
let h = 1, u = r;
|
|
3970
|
+
const b = d < r;
|
|
3971
|
+
b && (h = Math.max(m - Math.floor(d / 2), 1), u = h + d - 1, u > r && (u = r, h = u - d + 1));
|
|
3972
|
+
for (let f = h; f <= u; f++) {
|
|
3973
|
+
const g = xe(f, f, f === m);
|
|
3974
|
+
n.push(g);
|
|
3975
|
+
}
|
|
3976
|
+
if (b && d > 0 && S) {
|
|
3977
|
+
if (h > 1) {
|
|
3978
|
+
const f = xe(h - 1, "...");
|
|
3979
|
+
if (n.unshift(f), v) {
|
|
3980
|
+
const g = xe(1, "1");
|
|
3981
|
+
n.unshift(g);
|
|
3982
|
+
}
|
|
3983
|
+
}
|
|
3984
|
+
if (u < r) {
|
|
3985
|
+
const f = xe(u + 1, "...");
|
|
3986
|
+
if (n.push(f), v) {
|
|
3987
|
+
const g = xe(r, r);
|
|
3988
|
+
n.push(g);
|
|
3989
|
+
}
|
|
3990
|
+
}
|
|
3991
|
+
}
|
|
3992
|
+
return n;
|
|
3993
|
+
}), i = (n, r) => {
|
|
3994
|
+
const d = Math.min(Math.max(n, 1), l.value);
|
|
3995
|
+
e.modelValue !== d && (t("update:modelValue", d), r && t("change", d));
|
|
3996
|
+
};
|
|
3997
|
+
return rn(() => i(e.modelValue)), () => {
|
|
3998
|
+
const {
|
|
3999
|
+
mode: n,
|
|
4000
|
+
modelValue: r,
|
|
4001
|
+
showPrevButton: d,
|
|
4002
|
+
showNextButton: m
|
|
4003
|
+
} = e, S = a["prev-text"], v = r === 1, h = a["next-text"], u = r === l.value, b = a["simple-content"];
|
|
4004
|
+
return c("nav", {
|
|
4005
|
+
role: "navigation",
|
|
4006
|
+
class: me()
|
|
4007
|
+
}, [c("ul", {
|
|
4008
|
+
class: me("items")
|
|
4009
|
+
}, [d && c("li", {
|
|
4010
|
+
class: [me("item", {
|
|
4011
|
+
prevBtnDisabled: v,
|
|
4012
|
+
border: n === "simple",
|
|
4013
|
+
prev: !0
|
|
4014
|
+
})]
|
|
4015
|
+
}, [c("button", {
|
|
4016
|
+
type: "button",
|
|
4017
|
+
disabled: v,
|
|
4018
|
+
onClick: () => i(r - 1, !0)
|
|
4019
|
+
}, [S ? S() : e.prevText])]), e.mode === "simple" ? c("li", {
|
|
4020
|
+
class: me("page-desc")
|
|
4021
|
+
}, [b ? b() : `${e.modelValue}/${l.value}`]) : o.value.map((f) => c("li", {
|
|
4022
|
+
class: [me("item", {
|
|
4023
|
+
active: f.active,
|
|
4024
|
+
page: !0
|
|
4025
|
+
})]
|
|
4026
|
+
}, [c("button", {
|
|
4027
|
+
type: "button",
|
|
4028
|
+
onClick: () => i(f.number, !0)
|
|
4029
|
+
}, [a.page ? a.page(f) : f.text])])), m && c("li", {
|
|
4030
|
+
class: [me("item", {
|
|
4031
|
+
nextBtnDisabled: u,
|
|
4032
|
+
border: n === "simple",
|
|
4033
|
+
next: !0
|
|
4034
|
+
})]
|
|
4035
|
+
}, [c("button", {
|
|
4036
|
+
type: "button",
|
|
4037
|
+
disabled: u,
|
|
4038
|
+
onClick: () => i(r + 1, !0)
|
|
4039
|
+
}, [h ? h() : e.nextText])])])]);
|
|
4040
|
+
};
|
|
4041
|
+
}
|
|
4042
|
+
});
|
|
4043
|
+
const Pa = A(Ia), _a = [
|
|
3896
4044
|
// 组件
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
xn,
|
|
4045
|
+
Ve,
|
|
4046
|
+
Nt,
|
|
4047
|
+
Rn,
|
|
3901
4048
|
Tn,
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
Gn,
|
|
4049
|
+
Bn,
|
|
4050
|
+
zn,
|
|
4051
|
+
Fn,
|
|
4052
|
+
Wn,
|
|
3907
4053
|
Qn,
|
|
3908
|
-
|
|
4054
|
+
Jn,
|
|
4055
|
+
nl,
|
|
3909
4056
|
sl,
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
xl,
|
|
3918
|
-
Tl,
|
|
3919
|
-
Vl,
|
|
4057
|
+
ml,
|
|
4058
|
+
la,
|
|
4059
|
+
ua,
|
|
4060
|
+
qe,
|
|
4061
|
+
ma,
|
|
4062
|
+
wl,
|
|
4063
|
+
Pl,
|
|
3920
4064
|
Wt,
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
4065
|
+
Tl,
|
|
4066
|
+
Bl,
|
|
4067
|
+
Ml,
|
|
4068
|
+
Xt,
|
|
4069
|
+
jt,
|
|
4070
|
+
ea,
|
|
4071
|
+
ha,
|
|
4072
|
+
$a,
|
|
4073
|
+
Ba,
|
|
4074
|
+
Pa
|
|
4075
|
+
], tn = (e) => {
|
|
4076
|
+
tn.installed || (_a.forEach((t) => {
|
|
3928
4077
|
t.name && e.component(t.name, t);
|
|
3929
|
-
}), e.provide("loading",
|
|
3930
|
-
},
|
|
3931
|
-
install:
|
|
4078
|
+
}), e.provide("loading", yl), e.provide("toast", Fl), e.provide("dialog", xa), e.use(bl), e.use(Ea));
|
|
4079
|
+
}, Ma = {
|
|
4080
|
+
install: tn
|
|
3932
4081
|
};
|
|
3933
4082
|
export {
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
4083
|
+
qe as Button,
|
|
4084
|
+
ml as Cell,
|
|
4085
|
+
Qn as Checkbox,
|
|
4086
|
+
Jn as CheckboxGroup,
|
|
4087
|
+
Bl as Col,
|
|
4088
|
+
ha as CountDown,
|
|
4089
|
+
$a as Dialog,
|
|
4090
|
+
Pl as Empty,
|
|
4091
|
+
la as Form,
|
|
4092
|
+
ua as FormItem,
|
|
4093
|
+
Ve as Icon,
|
|
4094
|
+
ma as Input,
|
|
4095
|
+
Rn as List,
|
|
4096
|
+
wl as Loading,
|
|
4097
|
+
jt as Mask,
|
|
4098
|
+
Pa as Pagination,
|
|
4099
|
+
Xt as Popup,
|
|
4100
|
+
Ml as Progress,
|
|
4101
|
+
sl as Pullrefresh,
|
|
4102
|
+
Tl as Row,
|
|
4103
|
+
zn as Slider,
|
|
4104
|
+
ea as Stepper,
|
|
4105
|
+
Fn as Swipe,
|
|
4106
|
+
Wn as SwipeItem,
|
|
4107
|
+
nl as Switch,
|
|
4108
|
+
Bn as Tab,
|
|
4109
|
+
Tn as Tabs,
|
|
4110
|
+
Ba as Tooltip,
|
|
4111
|
+
yl as createLoading,
|
|
4112
|
+
Ma as default,
|
|
4113
|
+
Wt as empty,
|
|
4114
|
+
bl as loadingDirective,
|
|
4115
|
+
Nt as locale,
|
|
4116
|
+
Ea as tooltipDirective
|
|
3967
4117
|
};
|