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