y-design-ssr 0.2.15 → 0.2.17
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 +91 -7
- package/libs/form/index.mjs +67 -70
- package/libs/form/index.umd.js +1 -1
- package/libs/form/src/constants.d.ts +33 -8
- package/libs/form/src/form.d.ts +92 -7
- package/libs/formItem/index.d.ts +91 -7
- package/libs/formItem/src/formItem.d.ts +92 -8
- package/libs/index.mjs +470 -479
- package/libs/index.umd.js +2 -2
- package/libs/layout/index.mjs +29 -33
- package/libs/layout/index.umd.js +2 -2
- 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,8 +11,8 @@ const un = {
|
|
|
11
11
|
validateMessage: "请输入正确内容"
|
|
12
12
|
}
|
|
13
13
|
}, rt = B("zh-CN"), ut = W({
|
|
14
|
-
"zh-CN":
|
|
15
|
-
}),
|
|
14
|
+
"zh-CN": sn
|
|
15
|
+
}), Nt = {
|
|
16
16
|
text() {
|
|
17
17
|
return ut[rt.value];
|
|
18
18
|
},
|
|
@@ -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,
|
|
34
|
-
}, Et = (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),
|
|
33
|
+
return [t, vn(t), gn()];
|
|
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 || {}), 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
|
// 间距
|
|
@@ -225,21 +223,21 @@ const Sn = {
|
|
|
225
223
|
// 重复节点个数
|
|
226
224
|
cloneNodeCount: 0
|
|
227
225
|
}), f = B(), S = B(), v = () => {
|
|
228
|
-
const w = i.length,
|
|
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,14 +245,14 @@ const Sn = {
|
|
|
247
245
|
u.list = v(), h();
|
|
248
246
|
};
|
|
249
247
|
X(() => [...i], b);
|
|
250
|
-
const m = (w,
|
|
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;
|
|
@@ -263,9 +261,9 @@ const Sn = {
|
|
|
263
261
|
return;
|
|
264
262
|
const {
|
|
265
263
|
width: w,
|
|
266
|
-
height:
|
|
264
|
+
height: z
|
|
267
265
|
} = f.value.getBoundingClientRect();
|
|
268
|
-
e.vertical ? m(e.itemSize,
|
|
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
269
|
if (se(p).catch(() => {
|
|
@@ -274,7 +272,7 @@ const Sn = {
|
|
|
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
274
|
window.addEventListener("resize", p, !1), window.addEventListener("orientationchange", p, !1);
|
|
277
|
-
}),
|
|
275
|
+
}), Ne(() => {
|
|
278
276
|
if (I(), e.touchable && f.value) {
|
|
279
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);
|
|
@@ -284,13 +282,13 @@ const Sn = {
|
|
|
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:
|
|
@@ -298,17 +296,17 @@ const Sn = {
|
|
|
298
296
|
}
|
|
299
297
|
return w;
|
|
300
298
|
}), s = V(() => e.loop && i.length > 1), y = (w) => {
|
|
301
|
-
const
|
|
302
|
-
s.value ? d.offset = -
|
|
303
|
-
},
|
|
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 = () => {
|
|
304
302
|
y(n.value), a("afterChange", n.value);
|
|
305
|
-
},
|
|
306
|
-
n.value =
|
|
307
|
-
|
|
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
|
-
})) :
|
|
311
|
-
},
|
|
308
|
+
})) : k();
|
|
309
|
+
}, N = (w = !0) => {
|
|
312
310
|
x(n.value - 1, w);
|
|
313
311
|
}, E = (w = !0) => {
|
|
314
312
|
x(n.value + 1, w);
|
|
@@ -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,43 +334,43 @@ 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
|
-
prev:
|
|
373
|
+
prev: N,
|
|
376
374
|
resize: p
|
|
377
375
|
});
|
|
378
376
|
const le = W({
|
|
@@ -385,16 +383,16 @@ 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 () => {
|
|
@@ -406,25 +404,25 @@ const Sn = {
|
|
|
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,
|
|
@@ -579,9 +577,9 @@ const [Ye, Fe] = M("tabs"), at = Ye, Cn = /* @__PURE__ */ z({
|
|
|
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
585
|
if (!d.value || !m.value)
|
|
@@ -609,13 +607,13 @@ const [Ye, Fe] = M("tabs"), at = Ye, Cn = /* @__PURE__ */ z({
|
|
|
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
|
|
@@ -627,7 +625,7 @@ const [Ye, Fe] = M("tabs"), at = Ye, Cn = /* @__PURE__ */ z({
|
|
|
627
625
|
props: e
|
|
628
626
|
});
|
|
629
627
|
o(x);
|
|
630
|
-
const
|
|
628
|
+
const N = ($) => E($) && /^\d+(\.\d+)?$/.test($) ? `${$}px` : $, E = ($) => Object.prototype.toString.call($) === "[object String]";
|
|
631
629
|
return J(async () => {
|
|
632
630
|
await y();
|
|
633
631
|
}), X(() => S.value, async () => {
|
|
@@ -663,11 +661,11 @@ const [Ye, Fe] = M("tabs"), at = Ye, Cn = /* @__PURE__ */ z({
|
|
|
663
661
|
class: Fe("line"),
|
|
664
662
|
style: {
|
|
665
663
|
...s,
|
|
666
|
-
width:
|
|
667
|
-
height:
|
|
664
|
+
width: N(e.lineWidth),
|
|
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,
|
|
@@ -717,23 +715,23 @@ const [Nn] = M("tab"), En = /* @__PURE__ */ z({
|
|
|
717
715
|
const {
|
|
718
716
|
parent: a
|
|
719
717
|
} = ge(at), l = te();
|
|
720
|
-
return l.proxy && (a == null || a.children.push(l.proxy)),
|
|
718
|
+
return l.proxy && (a == null || a.children.push(l.proxy)), Ne(() => {
|
|
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
|
-
}),
|
|
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 = () => {
|
|
730
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;
|
|
@@ -750,8 +748,8 @@ const [Nn] = M("tab"), En = /* @__PURE__ */ z({
|
|
|
750
748
|
isVertical: d,
|
|
751
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,65 +809,65 @@ const [Nn] = 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
|
-
min:
|
|
814
|
+
min: N,
|
|
817
815
|
max: E,
|
|
818
816
|
step: $
|
|
819
|
-
} = e, I = Math.max(
|
|
817
|
+
} = e, I = Math.max(N, Math.min(x, E));
|
|
820
818
|
return Math.round(I / $) * $;
|
|
821
819
|
}, S = (x) => {
|
|
822
820
|
if (x.stopPropagation(), e.disabled)
|
|
823
821
|
return;
|
|
824
822
|
const {
|
|
825
|
-
min:
|
|
823
|
+
min: N,
|
|
826
824
|
modelValue: E
|
|
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(
|
|
836
|
-
}, v = (x) => x[0] > x[1] ? [x[1], x[0]] : x, h = (x,
|
|
833
|
+
u(_);
|
|
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(f) : E = f(x), t("update:modelValue", E), typeof
|
|
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
|
-
min:
|
|
840
|
+
min: N
|
|
843
841
|
} = e;
|
|
844
842
|
let E = null;
|
|
845
|
-
return d.value ? E = Math.floor((f(x[1]) - f(x[0])) * 100 / p.value) : E = Math.floor((f(x) -
|
|
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}%`;
|
|
846
844
|
}), m = V(() => {
|
|
847
845
|
const {
|
|
848
846
|
modelValue: x,
|
|
849
|
-
min:
|
|
847
|
+
min: N
|
|
850
848
|
} = e;
|
|
851
|
-
return d.value ? `${Math.floor((f(x[0]) -
|
|
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
|
-
}, s = (x,
|
|
855
|
+
}, s = (x, N) => {
|
|
858
856
|
if (e.disabled)
|
|
859
857
|
return;
|
|
860
858
|
r.move(x), n.value === "startMove" && t("drag-start"), n.value = "moving";
|
|
861
859
|
const {
|
|
862
860
|
width: E
|
|
863
861
|
} = l.value.getBoundingClientRect(), $ = r.deltaX.value, I = Math.floor($ / E * p.value);
|
|
864
|
-
Array.isArray(o.value) && Array.isArray(i.value) ?
|
|
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
|
-
},
|
|
868
|
-
let
|
|
869
|
-
return x === 0 ? (
|
|
865
|
+
}, k = (x) => {
|
|
866
|
+
let N = "", E = {}, $ = 0, I = G("button-wrapper");
|
|
867
|
+
return x === 0 ? (N = "left", E = {
|
|
870
868
|
left: m.value,
|
|
871
869
|
backgroundColor: Array.isArray(e.buttonBgColor) ? e.buttonBgColor[0] : e.buttonBgColor
|
|
872
|
-
}, $ = e.modelValue[x], I = G("button-wrapper", "left")) : x === 1 ? (
|
|
870
|
+
}, $ = e.modelValue[x], I = G("button-wrapper", "left")) : x === 1 ? (N = "right", $ = e.modelValue[x], E = {
|
|
873
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 = {
|
|
@@ -882,7 +880,7 @@ const [Nn] = M("tab"), En = /* @__PURE__ */ z({
|
|
|
882
880
|
"aria-valuenow": $,
|
|
883
881
|
class: I,
|
|
884
882
|
onTouchstart: C,
|
|
885
|
-
onTouchmove: (D) => s(D,
|
|
883
|
+
onTouchmove: (D) => s(D, N),
|
|
886
884
|
onTouchend: y,
|
|
887
885
|
style: {
|
|
888
886
|
...E,
|
|
@@ -892,7 +890,7 @@ const [Nn] = 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,10 +914,10 @@ const [Nn] = 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
|
-
left:
|
|
920
|
+
left: N.position,
|
|
923
921
|
background: e.gapColor,
|
|
924
922
|
width: F(e.gapWidth)
|
|
925
923
|
}
|
|
@@ -936,7 +934,7 @@ const [Nn] = M("tab"), En = /* @__PURE__ */ z({
|
|
|
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 [Nn] = 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,9 +1001,9 @@ 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
|
}) {
|
|
@@ -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)
|
|
@@ -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(), f = B(), S = B([]), v = B(0), h = B(0), u = B([]), b = V(() =>
|
|
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
1144
|
const L = v.value - p.value, O = h.value + C.value;
|
|
1147
1145
|
return y.value.slice(L, O);
|
|
1148
1146
|
}
|
|
1149
1147
|
return y.value;
|
|
1150
|
-
}), 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))),
|
|
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) {
|
|
@@ -1161,8 +1159,8 @@ const zn = A(_n), [Mn, de] = M("loading"), An = {
|
|
|
1161
1159
|
n.value = "normal", e.virtual && ($(), e.dataSource.length < s.value + C.value && x());
|
|
1162
1160
|
}
|
|
1163
1161
|
}));
|
|
1164
|
-
},
|
|
1165
|
-
n.value === "normal" &&
|
|
1162
|
+
}, N = () => {
|
|
1163
|
+
n.value === "normal" && T() - k() - o.value <= e.loadOffset && x();
|
|
1166
1164
|
}, E = () => {
|
|
1167
1165
|
u.value = y.value.map((L, O) => {
|
|
1168
1166
|
const H = parseInt(String(e.itemHeight));
|
|
@@ -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),
|
|
1190
|
-
if (
|
|
1191
|
-
const L =
|
|
1187
|
+
}, D = (L) => I(u.value, L), _ = () => {
|
|
1188
|
+
if (N(), e.virtual) {
|
|
1189
|
+
const L = k();
|
|
1192
1190
|
Y(L);
|
|
1193
1191
|
}
|
|
1194
1192
|
}, Y = (L) => {
|
|
@@ -1223,11 +1221,11 @@ const zn = A(_n), [Mn, de] = M("loading"), An = {
|
|
|
1223
1221
|
};
|
|
1224
1222
|
return l({
|
|
1225
1223
|
...e,
|
|
1226
|
-
checkIsScrollToBottom:
|
|
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,7 +1242,7 @@ 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
1247
|
ref: f,
|
|
1250
1248
|
class: ue("phantom"),
|
|
@@ -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) => {
|
|
@@ -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,7 +1470,7 @@ 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
1475
|
const n = (f) => {
|
|
1478
1476
|
a("update:modelValue", f), a("change", f);
|
|
@@ -1499,14 +1497,14 @@ const Ve = A(Xn), Yn = {
|
|
|
1499
1497
|
}), () => {
|
|
1500
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,7 +1538,7 @@ 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
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;
|
|
@@ -1553,7 +1551,7 @@ const Ve = A(Xn), Yn = {
|
|
|
1553
1551
|
const m = {};
|
|
1554
1552
|
return u.value && (m.width = u.value, m.height = u.value), v.value && f.value && (m.backgroundColor = f.value), m;
|
|
1555
1553
|
});
|
|
1556
|
-
return
|
|
1554
|
+
return Ne(() => {
|
|
1557
1555
|
if (!o)
|
|
1558
1556
|
return;
|
|
1559
1557
|
const m = o.allItemNames.indexOf(e.name);
|
|
@@ -1589,9 +1587,9 @@ const Ve = A(Xn), Yn = {
|
|
|
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,25 +1725,25 @@ 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 f = B(0), S = B(0), v = B(
|
|
1735
|
-
var
|
|
1736
|
-
const y = [...((
|
|
1737
|
-
return y == null ? void 0 : y.filter((
|
|
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
|
-
f.value = e.statusHeight, S.value = gt, v.value =
|
|
1739
|
+
f.value = e.statusHeight, S.value = gt, v.value = U.LOADING, a("load", u);
|
|
1746
1740
|
}, m = (s) => {
|
|
1747
|
-
i = s instanceof TouchEvent ? s.touches[0].pageX : s.pageX, n = s instanceof TouchEvent ? s.touches[0].pageY : s.pageY, h.value.length !== 2 || h.value[1].nodeType === 3 ? d = o == null ? void 0 : o.vnode.el : d = h.value[1], !e.disabled && !
|
|
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 y = s instanceof TouchEvent ? s.touches[0].pageX : s.pageX,
|
|
1750
|
-
r =
|
|
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));
|
|
1751
1745
|
}, p = (s) => {
|
|
1752
|
-
v.value ===
|
|
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;
|
|
@@ -1774,7 +1768,7 @@ const rl = (e) => e < 60 ? 1 : 1 - (e - 60) / 600, ul = /* @__PURE__ */ z({
|
|
|
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, y = f.value > s ? s : f.value,
|
|
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
1783
|
WebkitTransform: `translate3d(0, ${f.value}px, 0)`,
|
|
1790
1784
|
transform: `translate3d(0, ${f.value}px, 0)`,
|
|
1791
|
-
transition:
|
|
1785
|
+
transition: k
|
|
1792
1786
|
}
|
|
1793
1787
|
}, [c("div", {
|
|
1794
1788
|
class: vt("status"),
|
|
1795
1789
|
style: {
|
|
1796
1790
|
height: `${y}px`,
|
|
1797
|
-
WebkitTransform: `${
|
|
1798
|
-
transform: `${
|
|
1799
|
-
transition:
|
|
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,
|
|
@@ -1870,7 +1864,7 @@ 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
|
|
@@ -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: {
|
|
@@ -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") && f ? `shadow_${f}` : "", u ? `${n}_danger` : "", d ? `${n}_disabled` : ""]),
|
|
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
|
},
|
|
@@ -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,7 +2095,7 @@ 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
2101
|
return a.forEach((d, f) => {
|
|
@@ -2140,7 +2132,7 @@ const [Rt, $l] = M("row"), Ft = Rt, Cl = /* @__PURE__ */ z({
|
|
|
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
|
|
@@ -2149,8 +2141,8 @@ const [Rt, $l] = M("row"), Ft = Rt, Cl = /* @__PURE__ */ z({
|
|
|
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), [kl, Nl] = 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), [kl, Nl] = 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), [kl, Nl] = 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", {
|
|
@@ -2254,8 +2246,8 @@ const Bl = A(El), pt = W({}), Wt = {
|
|
|
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: {
|
|
@@ -2428,8 +2420,8 @@ const Pl = A(Il), [_l, ce] = M("progress"), zl = /* @__PURE__ */ z({
|
|
|
2428
2420
|
animation: C,
|
|
2429
2421
|
duration: s,
|
|
2430
2422
|
timing: y,
|
|
2431
|
-
defaultPivot:
|
|
2432
|
-
pivotColor:
|
|
2423
|
+
defaultPivot: k,
|
|
2424
|
+
pivotColor: T,
|
|
2433
2425
|
modeMilestone: x
|
|
2434
2426
|
} = e;
|
|
2435
2427
|
return c("div", {
|
|
@@ -2457,7 +2449,7 @@ 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
2454
|
transitionTimingFunction: y
|
|
2463
2455
|
}
|
|
@@ -2465,7 +2457,7 @@ const Pl = A(Il), [_l, ce] = M("progress"), zl = /* @__PURE__ */ z({
|
|
|
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
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:
|
|
2529
|
+
class: _e("content")
|
|
2538
2530
|
}, [((f = t.icon) == null ? void 0 : f.call(t)) || null, c("div", {
|
|
2539
|
-
class:
|
|
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
|
|
@@ -2645,7 +2637,7 @@ const Yl = /* @__PURE__ */ z({
|
|
|
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: () => {
|
|
@@ -2656,7 +2648,7 @@ const Yl = /* @__PURE__ */ z({
|
|
|
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,
|
|
@@ -2778,7 +2770,7 @@ 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
2776
|
duration: f,
|
|
@@ -2786,7 +2778,7 @@ const jt = A(Yl), [ql, bt, Gl] = M("popup"), Kl = {
|
|
|
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],
|
|
@@ -2896,25 +2888,25 @@ const Xt = A(Zl), [Ql, _e, St] = M("stepper"), Jl = /* @__PURE__ */ z({
|
|
|
2896
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:
|
|
2903
|
+
class: ze("input", {
|
|
2912
2904
|
"only-disable": y
|
|
2913
2905
|
}),
|
|
2914
2906
|
style: {
|
|
2915
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
2912
|
"aria-min": m,
|
|
@@ -2925,10 +2917,10 @@ const Xt = A(Zl), [Ql, _e, St] = M("stepper"), Jl = /* @__PURE__ */ z({
|
|
|
2925
2917
|
onFocus: S,
|
|
2926
2918
|
placeholder: C,
|
|
2927
2919
|
disabled: s || y
|
|
2928
|
-
}, null), [[
|
|
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,7 +2998,7 @@ 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
3003
|
return i.forEach((p) => {
|
|
3012
3004
|
const C = p.exposed;
|
|
@@ -3019,8 +3011,8 @@ const ea = A(Jl), Yt = {
|
|
|
3019
3011
|
s(new Error('【YUI】form method "validateField": no field, please check your param: "propName"!'));
|
|
3020
3012
|
else {
|
|
3021
3013
|
const y = p[0].exposed;
|
|
3022
|
-
y == null || y.validate().then((
|
|
3023
|
-
|
|
3014
|
+
y == null || y.validate().then((k) => {
|
|
3015
|
+
k ? s(k) : C();
|
|
3024
3016
|
});
|
|
3025
3017
|
}
|
|
3026
3018
|
});
|
|
@@ -3079,15 +3071,15 @@ const ea = A(Jl), Yt = {
|
|
|
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
|
-
} =
|
|
3106
|
+
} = Un(), n = B(!1), r = B(ra.validateMessage), d = (y) => {
|
|
3115
3107
|
if (e[y] && e[y] !== null)
|
|
3116
3108
|
return e[y];
|
|
3117
|
-
const
|
|
3118
|
-
return
|
|
3109
|
+
const k = l && l.props;
|
|
3110
|
+
return k && k[y] || null;
|
|
3119
3111
|
}, f = V(() => {
|
|
3120
|
-
const y = l && l.props.rules,
|
|
3121
|
-
return
|
|
3122
|
-
}), 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,
|
|
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
|
-
}, m = (y) => y.reduce((
|
|
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
|
|
3135
|
-
return typeof
|
|
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
3130
|
}), Promise.resolve()), g = async (y) => {
|
|
3139
|
-
const
|
|
3140
|
-
return
|
|
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
3136
|
}, p = (y) => {
|
|
3145
|
-
var
|
|
3137
|
+
var k;
|
|
3146
3138
|
if (l && f.value) {
|
|
3147
|
-
const
|
|
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);
|
|
@@ -3162,42 +3154,42 @@ 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
|
}
|
|
3169
3161
|
}, [r.value]) : null : null;
|
|
3170
3162
|
return () => {
|
|
3171
|
-
var x,
|
|
3163
|
+
var x, N, E;
|
|
3172
3164
|
const {
|
|
3173
3165
|
label: y,
|
|
3174
|
-
border:
|
|
3175
|
-
colon:
|
|
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), y,
|
|
3194
|
-
class:
|
|
3195
|
-
}, [(
|
|
3185
|
+
}, [(x = t.labelIcon) == null ? void 0 : x.call(t), y, T ? " :" : ""]), c("div", {
|
|
3186
|
+
class: Me("content")
|
|
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],
|
|
@@ -3273,11 +3265,11 @@ 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);
|
|
3280
|
-
}),
|
|
3272
|
+
}), Ne(() => {
|
|
3281
3273
|
o && o.remove(), o = null;
|
|
3282
3274
|
});
|
|
3283
3275
|
const h = V({
|
|
@@ -3294,10 +3286,10 @@ const ua = A(ra), [sa, ca] = M("input"), da = 13, fa = /* @__PURE__ */ z({
|
|
|
3294
3286
|
size: C,
|
|
3295
3287
|
border: s,
|
|
3296
3288
|
readonly: y,
|
|
3297
|
-
autocomplete:
|
|
3298
|
-
placeholder:
|
|
3299
|
-
} = e, x = C || (l == null ? void 0 : l.getProp("size")),
|
|
3300
|
-
class:
|
|
3289
|
+
autocomplete: k,
|
|
3290
|
+
placeholder: T
|
|
3291
|
+
} = e, x = C || (l == null ? void 0 : l.getProp("size")), N = {
|
|
3292
|
+
class: da({
|
|
3301
3293
|
[x]: x,
|
|
3302
3294
|
border: s
|
|
3303
3295
|
}),
|
|
@@ -3306,27 +3298,27 @@ const ua = A(ra), [sa, ca] = M("input"), da = 13, fa = /* @__PURE__ */ z({
|
|
|
3306
3298
|
},
|
|
3307
3299
|
disabled: g,
|
|
3308
3300
|
readonly: y,
|
|
3309
|
-
placeholder:
|
|
3301
|
+
placeholder: T,
|
|
3310
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
3308
|
onBlur: f
|
|
3317
3309
|
};
|
|
3318
|
-
return u === "textarea" ? ie(c("textarea", Ce(
|
|
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],
|
|
@@ -3372,32 +3364,32 @@ const ma = A(fa), Ge = 1e3, Ke = 60 * Ge, Ze = 60 * Ke, xt = 24 * Ze, [va] = M("
|
|
|
3372
3364
|
}
|
|
3373
3365
|
a("change", d.value);
|
|
3374
3366
|
}, b = () => Math.max(r.value - Date.now(), 0), m = (s, y) => Math.floor(s / 1e3) === Math.floor(y / 1e3), g = (s) => {
|
|
3375
|
-
const y = Math.floor(s / xt),
|
|
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
3369
|
days: y,
|
|
3378
|
-
hours:
|
|
3379
|
-
minutes:
|
|
3370
|
+
hours: k,
|
|
3371
|
+
minutes: T,
|
|
3380
3372
|
seconds: x,
|
|
3381
|
-
milliseconds:
|
|
3373
|
+
milliseconds: N,
|
|
3382
3374
|
timestamp: s
|
|
3383
3375
|
};
|
|
3384
3376
|
}, p = (s) => {
|
|
3385
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
|
-
seconds:
|
|
3384
|
+
seconds: N,
|
|
3393
3385
|
milliseconds: E
|
|
3394
3386
|
} = d.value;
|
|
3395
|
-
return y.indexOf("DD") === -1 ?
|
|
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;
|
|
3396
3388
|
}, C = (s, y = 2) => {
|
|
3397
|
-
let
|
|
3398
|
-
for (;
|
|
3399
|
-
|
|
3400
|
-
return
|
|
3389
|
+
let k = `${s}`;
|
|
3390
|
+
for (; k.length < y; )
|
|
3391
|
+
k = `0${k}`;
|
|
3392
|
+
return k;
|
|
3401
3393
|
};
|
|
3402
3394
|
return l({
|
|
3403
3395
|
start: f,
|
|
@@ -3409,11 +3401,11 @@ const ma = A(fa), Ge = 1e3, Ke = 60 * Ge, Ze = 60 * Ke, xt = 24 * Ze, [va] = M("
|
|
|
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,10 +3505,10 @@ 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
3510
|
const m = b(h);
|
|
3519
|
-
|
|
3511
|
+
mn(m) ? m.then((p) => {
|
|
3520
3512
|
f(p, h);
|
|
3521
3513
|
}).catch((p) => {
|
|
3522
3514
|
throw new Error(p);
|
|
@@ -3543,13 +3535,13 @@ const [ya, ee] = M("dialog"), ba = {
|
|
|
3543
3535
|
showCloseIcon: C,
|
|
3544
3536
|
showCancelBtn: s,
|
|
3545
3537
|
cancelButtonText: y,
|
|
3546
|
-
showConfirmBtn:
|
|
3547
|
-
confirmButtonText:
|
|
3538
|
+
showConfirmBtn: k,
|
|
3539
|
+
confirmButtonText: T,
|
|
3548
3540
|
imgSrc: x,
|
|
3549
|
-
circleImg:
|
|
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(),
|
|
@@ -3563,27 +3555,27 @@ const [ya, ee] = M("dialog"), ba = {
|
|
|
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
|
-
circle:
|
|
3561
|
+
circle: N
|
|
3570
3562
|
}),
|
|
3571
3563
|
style: {
|
|
3572
|
-
top:
|
|
3573
|
-
left:
|
|
3564
|
+
top: N ? `-${S(F(h), 4)}` : "auto",
|
|
3565
|
+
left: N ? `calc(50% - ${S(F(h), 4)})` : "auto"
|
|
3574
3566
|
}
|
|
3575
3567
|
}, [c("div", {
|
|
3576
3568
|
style: {
|
|
3577
|
-
width:
|
|
3569
|
+
width: N ? S(F(h)) : F(h),
|
|
3578
3570
|
height: S(F(h)),
|
|
3579
3571
|
background: `url(${x}) center`,
|
|
3580
|
-
borderRadius:
|
|
3572
|
+
borderRadius: N ? "50%" : "20px 20px 0 0"
|
|
3581
3573
|
}
|
|
3582
3574
|
}, null)]), c("div", {
|
|
3583
3575
|
class: ee("container")
|
|
3584
3576
|
}, [c("div", {
|
|
3585
3577
|
style: {
|
|
3586
|
-
height:
|
|
3578
|
+
height: N ? S(F(h), 4, (Y) => Y + 20) : "24px"
|
|
3587
3579
|
}
|
|
3588
3580
|
}, null), ((I = a.title) == null ? void 0 : I.call(a)) || c("div", {
|
|
3589
3581
|
class: ee("title"),
|
|
@@ -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)) || m]), ((
|
|
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
|
-
},
|
|
3601
|
+
}, ya(y) ? y : {
|
|
3610
3602
|
default: () => [y]
|
|
3611
|
-
}), [[it("loading"), l.cancel]]),
|
|
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
|
|
@@ -3751,26 +3742,26 @@ const $a = A(Zt), Jt = {
|
|
|
3751
3742
|
placement: s,
|
|
3752
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
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"));
|
|
3762
|
-
const
|
|
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 = m +
|
|
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
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;
|
|
@@ -3790,7 +3781,7 @@ const $a = A(Zt), Jt = {
|
|
|
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));
|
|
3796
3787
|
}), () => {
|
|
@@ -3811,7 +3802,7 @@ const $a = A(Zt), Jt = {
|
|
|
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
|
|
@@ -3830,7 +3821,7 @@ const $a = A(Zt), Jt = {
|
|
|
3830
3821
|
minWidth: F(p),
|
|
3831
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
3827
|
color: m
|
|
@@ -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 [ka] = M("tooltip"), Na = /* @__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 [ka] = M("tooltip"), Na = /* @__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 [ka] = M("tooltip"), Na = /* @__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
|
|
@@ -3949,9 +3940,9 @@ const Ba = A(Na), xe = (e, t, a) => ({
|
|
|
3949
3940
|
type: Boolean,
|
|
3950
3941
|
default: !1
|
|
3951
3942
|
}
|
|
3952
|
-
},
|
|
3953
|
-
name:
|
|
3954
|
-
props:
|
|
3943
|
+
}, _a = /* @__PURE__ */ M({
|
|
3944
|
+
name: Va,
|
|
3945
|
+
props: Ia,
|
|
3955
3946
|
emits: ["change", "update:modelValue"],
|
|
3956
3947
|
setup(e, {
|
|
3957
3948
|
emit: t,
|
|
@@ -3998,7 +3989,7 @@ const Ba = A(Na), xe = (e, t, a) => ({
|
|
|
3998
3989
|
const d = Math.min(Math.max(n, 1), l.value);
|
|
3999
3990
|
e.modelValue !== d && (!e.isBlockUpdate && t("update:modelValue", d), r && t("change", d));
|
|
4000
3991
|
};
|
|
4001
|
-
return
|
|
3992
|
+
return un(() => i(e.modelValue)), () => {
|
|
4002
3993
|
const {
|
|
4003
3994
|
mode: n,
|
|
4004
3995
|
modelValue: r,
|
|
@@ -4053,78 +4044,78 @@ const Ba = A(Na), xe = (e, t, a) => ({
|
|
|
4053
4044
|
};
|
|
4054
4045
|
}
|
|
4055
4046
|
});
|
|
4056
|
-
const
|
|
4047
|
+
const za = A(_a), Ma = [
|
|
4057
4048
|
// 组件
|
|
4058
4049
|
Ve,
|
|
4059
|
-
|
|
4060
|
-
Rn,
|
|
4061
|
-
Tn,
|
|
4062
|
-
Bn,
|
|
4063
|
-
zn,
|
|
4050
|
+
Nt,
|
|
4064
4051
|
Fn,
|
|
4052
|
+
Nn,
|
|
4053
|
+
Ln,
|
|
4054
|
+
Pn,
|
|
4065
4055
|
Wn,
|
|
4066
|
-
|
|
4056
|
+
Hn,
|
|
4067
4057
|
Jn,
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4058
|
+
el,
|
|
4059
|
+
ll,
|
|
4060
|
+
cl,
|
|
4061
|
+
vl,
|
|
4062
|
+
aa,
|
|
4063
|
+
sa,
|
|
4073
4064
|
qe,
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4065
|
+
va,
|
|
4066
|
+
$l,
|
|
4067
|
+
zl,
|
|
4068
|
+
Ht,
|
|
4069
|
+
Nl,
|
|
4070
|
+
Ll,
|
|
4071
|
+
Al,
|
|
4072
|
+
Yt,
|
|
4081
4073
|
Xt,
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
tn.installed || (_a.forEach((t) => {
|
|
4074
|
+
ta,
|
|
4075
|
+
pa,
|
|
4076
|
+
Ca,
|
|
4077
|
+
La,
|
|
4078
|
+
za
|
|
4079
|
+
], nn = (e) => {
|
|
4080
|
+
nn.installed || (Ma.forEach((t) => {
|
|
4090
4081
|
t.name && e.component(t.name, t);
|
|
4091
|
-
}), e.provide("loading",
|
|
4092
|
-
},
|
|
4093
|
-
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
|
|
4094
4085
|
};
|
|
4095
4086
|
export {
|
|
4096
4087
|
qe as Button,
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
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,
|
|
4106
4097
|
Ve as Icon,
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
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,
|
|
4119
|
+
Nt as locale,
|
|
4120
|
+
Ba as tooltipDirective
|
|
4130
4121
|
};
|