y-design-ssr 1.1.4 → 1.1.6
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/dialog/index.css +1 -1
- package/libs/dialog/index.mjs +64 -62
- package/libs/dialog/index.umd.js +2 -2
- package/libs/dropdownItem/index.css +1 -1
- package/libs/dropdownItem/index.mjs +76 -74
- package/libs/dropdownItem/index.umd.js +2 -2
- package/libs/index.css +1 -1
- package/libs/index.d.ts +3 -1
- package/libs/index.mjs +1659 -1525
- package/libs/index.umd.js +2 -2
- package/libs/popup/index.css +1 -1
- package/libs/popup/index.mjs +59 -57
- package/libs/popup/index.umd.js +2 -2
- package/libs/radio/index.css +1 -0
- package/libs/radio/index.d.ts +59 -0
- package/libs/radio/index.mjs +241 -0
- package/libs/radio/index.umd.js +2 -0
- package/libs/radio/package.json +6 -0
- package/libs/radio/src/radio.d.ts +59 -0
- package/libs/radioGroup/index.css +1 -0
- package/libs/radioGroup/index.d.ts +51 -0
- package/libs/radioGroup/index.mjs +134 -0
- package/libs/radioGroup/index.umd.js +2 -0
- package/libs/radioGroup/package.json +6 -0
- package/libs/radioGroup/src/constants.d.ts +28 -0
- package/libs/radioGroup/src/radio-group.d.ts +51 -0
- package/package.json +1 -1
package/libs/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
const
|
|
1
|
+
import { ref as L, reactive as F, getCurrentInstance as ne, provide as Pt, isVNode as Se, inject as zt, onUnmounted as we, computed as B, defineComponent as _, createVNode as u, watch as U, onMounted as K, nextTick as re, onBeforeUnmount as xe, onBeforeUpdate as ut, onUpdated as pn, createTextVNode as yn, Fragment as He, createApp as Ce, h as Ve, Transition as We, withDirectives as ee, vShow as ye, Teleport as st, vModelText as _t, mergeProps as Ie, vModelDynamic as bn, resolveDirective as vt, watchEffect as Sn, unref as gt } from "vue";
|
|
2
|
+
const wn = {
|
|
3
3
|
"pull-refresh": {
|
|
4
4
|
pulling: "下拉刷新...",
|
|
5
5
|
loosing: "释放刷新...",
|
|
@@ -10,30 +10,30 @@ const yn = {
|
|
|
10
10
|
"form-item": {
|
|
11
11
|
validateMessage: "请输入正确内容"
|
|
12
12
|
}
|
|
13
|
-
},
|
|
14
|
-
"zh-CN":
|
|
15
|
-
}),
|
|
13
|
+
}, ht = L("zh-CN"), pt = F({
|
|
14
|
+
"zh-CN": wn
|
|
15
|
+
}), Dt = {
|
|
16
16
|
text() {
|
|
17
|
-
return pt[
|
|
17
|
+
return pt[ht.value];
|
|
18
18
|
},
|
|
19
19
|
use(e, t) {
|
|
20
|
-
|
|
20
|
+
ht.value = e, this.add({ [e]: t });
|
|
21
21
|
},
|
|
22
22
|
add(e = {}) {
|
|
23
23
|
Object.assign(pt, e);
|
|
24
24
|
}
|
|
25
|
-
},
|
|
26
|
-
(o,
|
|
25
|
+
}, Pe = (e) => (t) => Object.prototype.toString.call(t) === `[object ${e}]`, Mt = Pe("Function"), xn = Pe("String"), Cn = Pe("Number"), $n = Pe("Object"), kn = Pe("Promise"), Fe = (e, t) => t ? typeof t == "string" ? ` ${e}--${t}` : Array.isArray(t) ? t.reduce((o, a) => o + Fe(e, a), "") : Object.keys(t).reduce(
|
|
26
|
+
(o, a) => o + (t[a] ? Fe(e, a) : ""),
|
|
27
27
|
""
|
|
28
|
-
) : "",
|
|
29
|
-
let
|
|
30
|
-
return
|
|
31
|
-
},
|
|
28
|
+
) : "", Nn = (e) => (t, o) => {
|
|
29
|
+
let a = t, l = o;
|
|
30
|
+
return a && typeof a != "string" && (l = a, a = ""), a = a ? `${e}__${a}` : e, `${a}${Fe(a, l)}`;
|
|
31
|
+
}, En = () => (e, t) => t ? `${Fe(`y-${e}`, t)}` : `y-${e}`, D = (e) => {
|
|
32
32
|
const t = `y-${e}`;
|
|
33
|
-
return [t,
|
|
34
|
-
},
|
|
35
|
-
var
|
|
36
|
-
const
|
|
33
|
+
return [t, Nn(t), En()];
|
|
34
|
+
}, Ot = (e) => Dt.text()[e];
|
|
35
|
+
var At = /* @__PURE__ */ ((e) => (e.Mini = "mini", e.Small = "small", e.Middle = "middle", e.Large = "large", e))(At || {}), ct = /* @__PURE__ */ ((e) => (e.Top = "top", e.Middle = "middle", e.Bottom = "bottom", e))(ct || {}), Qe = /* @__PURE__ */ ((e) => (e.Top = "top", e.Right = "right", e.Bottom = "bottom", e.Left = "left", e.Center = "center", e))(Qe || {}), Rt = /* @__PURE__ */ ((e) => (e.simple = "simple", e.multi = "multi", e))(Rt || {}), Wt = /* @__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))(Wt || {}), Je = /* @__PURE__ */ ((e) => (e.left = "left", e.top = "top", e.bottom = "bottom", e.right = "right", e))(Je || {}), Re = /* @__PURE__ */ ((e) => (e.start = "start", e.center = "center", e.end = "end", e))(Re || {}), Ft = /* @__PURE__ */ ((e) => (e.Start = "start", e.Center = "center", e.End = "end", e.SpaceBetween = "space-between", e.SpaceAround = "space-around", e))(Ft || {}), Y = /* @__PURE__ */ ((e) => (e.DEFUALT = "normal", e.PULLING = "pulling", e.LOOSING = "loosing", e.LOADING = "loading", e.SUCCESS = "success", e.FAILED = "failed", e))(Y || {}), be = /* @__PURE__ */ ((e) => (e.UP = "up", e.DOWN = "down", e))(be || {});
|
|
36
|
+
const R = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, yt = (e, t) => typeof e == "string" && e.includes("%") && e.includes("%") ? t * Number(e.replace(/%/g, "")) / 100 : Number(e), Tn = (e) => {
|
|
37
37
|
switch (e) {
|
|
38
38
|
case "top":
|
|
39
39
|
return "column-reverse";
|
|
@@ -46,50 +46,50 @@ const W = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, ht = (
|
|
|
46
46
|
default:
|
|
47
47
|
return "column";
|
|
48
48
|
}
|
|
49
|
-
},
|
|
50
|
-
const t = [], o = (
|
|
51
|
-
Array.isArray(
|
|
49
|
+
}, Bn = (e) => {
|
|
50
|
+
const t = [], o = (a) => {
|
|
51
|
+
Array.isArray(a) && a.forEach((l) => {
|
|
52
52
|
var i;
|
|
53
|
-
|
|
53
|
+
Se(l) && (t.push(l), (i = l.component) != null && i.subTree && o(l.component.subTree.children), l.children && o(l.children));
|
|
54
54
|
});
|
|
55
55
|
};
|
|
56
56
|
return o(e), t;
|
|
57
|
-
},
|
|
58
|
-
const o =
|
|
59
|
-
e.sort((
|
|
60
|
-
},
|
|
57
|
+
}, Ln = (e, t) => {
|
|
58
|
+
const o = Bn(t.subTree.children);
|
|
59
|
+
e.sort((a, l) => o.indexOf(a.vnode) - o.indexOf(l.vnode));
|
|
60
|
+
}, fe = (e) => {
|
|
61
61
|
const t = ne(), o = F([]);
|
|
62
62
|
return {
|
|
63
63
|
children: o,
|
|
64
|
-
initProvide: (
|
|
65
|
-
|
|
64
|
+
initProvide: (l) => {
|
|
65
|
+
Pt(e, {
|
|
66
66
|
addChild: (r) => {
|
|
67
|
-
r.proxy && (o.push(r), t &&
|
|
67
|
+
r.proxy && (o.push(r), t && Ln(o, t));
|
|
68
68
|
},
|
|
69
69
|
removeChild: (r) => {
|
|
70
|
-
const
|
|
71
|
-
o.splice(
|
|
70
|
+
const f = o.indexOf(r);
|
|
71
|
+
o.splice(f, 1);
|
|
72
72
|
},
|
|
73
73
|
children: o,
|
|
74
|
-
...
|
|
74
|
+
...l
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
|
-
},
|
|
79
|
-
const t =
|
|
78
|
+
}, ce = (e) => {
|
|
79
|
+
const t = zt(e, null), o = ne();
|
|
80
80
|
if (t && o) {
|
|
81
|
-
const { children:
|
|
82
|
-
return
|
|
83
|
-
index:
|
|
81
|
+
const { children: a, addChild: l, removeChild: i } = t;
|
|
82
|
+
return l(o), we(() => i(o)), {
|
|
83
|
+
index: B(() => a.indexOf(o)),
|
|
84
84
|
parent: t
|
|
85
85
|
};
|
|
86
86
|
}
|
|
87
87
|
return {
|
|
88
88
|
parent: null,
|
|
89
|
-
index:
|
|
89
|
+
index: L(-1)
|
|
90
90
|
};
|
|
91
|
-
}, [
|
|
92
|
-
name:
|
|
91
|
+
}, [Vn, In] = D("swipe-item"), Le = /* @__PURE__ */ _({
|
|
92
|
+
name: Vn,
|
|
93
93
|
props: {
|
|
94
94
|
clonenNode: {
|
|
95
95
|
type: Object,
|
|
@@ -104,33 +104,33 @@ const W = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, ht = (
|
|
|
104
104
|
slots: t
|
|
105
105
|
}) {
|
|
106
106
|
const o = ne(), {
|
|
107
|
-
parent:
|
|
108
|
-
} =
|
|
109
|
-
!e.clonenNode && o && (
|
|
110
|
-
const
|
|
111
|
-
const n = `${(
|
|
107
|
+
parent: a
|
|
108
|
+
} = ce(Yt);
|
|
109
|
+
!e.clonenNode && o && (a == null || a.children.push(o));
|
|
110
|
+
const l = B(() => e.clonenNode ? e.index : a == null ? void 0 : a.children.findIndex((n) => n.proxy === (o == null ? void 0 : o.proxy))), i = B(() => {
|
|
111
|
+
const n = `${(a == null ? void 0 : a.itemDetail.size) || 0}px`;
|
|
112
112
|
let r = "auto";
|
|
113
|
-
const
|
|
114
|
-
return
|
|
113
|
+
const f = `${(a == null ? void 0 : a.itemDetail.space) || 0}px`;
|
|
114
|
+
return a != null && a.props.autoHeight && (a == null ? void 0 : a.activeIndex) !== l.value && (r = "0"), a != null && a.props.vertical ? {
|
|
115
115
|
height: n,
|
|
116
116
|
width: r,
|
|
117
|
-
marginBottom:
|
|
117
|
+
marginBottom: f
|
|
118
118
|
} : {
|
|
119
119
|
width: n,
|
|
120
120
|
height: r,
|
|
121
|
-
marginRight:
|
|
121
|
+
marginRight: f
|
|
122
122
|
};
|
|
123
123
|
});
|
|
124
124
|
return () => {
|
|
125
|
-
var r,
|
|
126
|
-
const n = ((r =
|
|
127
|
-
return
|
|
128
|
-
class:
|
|
125
|
+
var r, f;
|
|
126
|
+
const n = ((r = a == null ? void 0 : a.itemShowedList) == null ? void 0 : r.list[l.value || 0]) || !1;
|
|
127
|
+
return u("div", {
|
|
128
|
+
class: In(),
|
|
129
129
|
style: i.value
|
|
130
|
-
}, [n ? e.clonenNode || ((
|
|
130
|
+
}, [n ? e.clonenNode || ((f = t.default) == null ? void 0 : f.call(t)) : null]);
|
|
131
131
|
};
|
|
132
132
|
}
|
|
133
|
-
}),
|
|
133
|
+
}), Pn = {
|
|
134
134
|
autoplayTime: {
|
|
135
135
|
type: Number,
|
|
136
136
|
default: 0
|
|
@@ -195,121 +195,121 @@ const W = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, ht = (
|
|
|
195
195
|
type: String,
|
|
196
196
|
default: "center"
|
|
197
197
|
}
|
|
198
|
-
}, [
|
|
199
|
-
name:
|
|
198
|
+
}, [Ht, Ye] = D("swipe"), Yt = Ht, jt = /* @__PURE__ */ _({
|
|
199
|
+
name: Ht,
|
|
200
200
|
components: {
|
|
201
|
-
YSwipeItem:
|
|
201
|
+
YSwipeItem: Le
|
|
202
202
|
},
|
|
203
|
-
props:
|
|
203
|
+
props: Pn,
|
|
204
204
|
setup(e, {
|
|
205
205
|
slots: t,
|
|
206
206
|
emit: o,
|
|
207
|
-
expose:
|
|
207
|
+
expose: a
|
|
208
208
|
}) {
|
|
209
209
|
const {
|
|
210
|
-
initProvide:
|
|
211
|
-
} =
|
|
210
|
+
initProvide: l
|
|
211
|
+
} = fe(Yt), i = F([]), n = L(Number(e.initIndex)), r = F({
|
|
212
212
|
// 元素尺寸
|
|
213
213
|
size: 0,
|
|
214
214
|
// 间距
|
|
215
215
|
space: 0,
|
|
216
216
|
// 元素宽度比swipe小,占满整个视窗
|
|
217
217
|
isFillViewport: !1
|
|
218
|
-
}),
|
|
218
|
+
}), f = F({
|
|
219
219
|
// 偏移量
|
|
220
220
|
offset: 0,
|
|
221
221
|
// 视窗大小
|
|
222
222
|
viewportSize: 0,
|
|
223
223
|
// 重复节点个数
|
|
224
224
|
cloneNodeCount: 0
|
|
225
|
-
}), v =
|
|
226
|
-
const C = i.length,
|
|
227
|
-
for (let
|
|
228
|
-
|
|
229
|
-
return
|
|
230
|
-
},
|
|
225
|
+
}), v = L(), x = L(), s = () => {
|
|
226
|
+
const C = i.length, z = [];
|
|
227
|
+
for (let W = 0; W < C; W++)
|
|
228
|
+
z.push(!e.lazy);
|
|
229
|
+
return z;
|
|
230
|
+
}, h = () => {
|
|
231
231
|
if (!e.lazy)
|
|
232
232
|
return;
|
|
233
|
-
const C = r.size + r.space,
|
|
234
|
-
let
|
|
235
|
-
|
|
236
|
-
const q =
|
|
237
|
-
for (let
|
|
238
|
-
if (!
|
|
239
|
-
const Q = C *
|
|
240
|
-
(Q >=
|
|
233
|
+
const C = r.size + r.space, z = i.length * C;
|
|
234
|
+
let W = -(f.offset + V.offset) - f.cloneNodeCount * C;
|
|
235
|
+
W < 0 && (W += z);
|
|
236
|
+
const q = W + f.viewportSize;
|
|
237
|
+
for (let j = 0; j < i.length; j++)
|
|
238
|
+
if (!c.list[j]) {
|
|
239
|
+
const Q = C * j, ie = Q + r.size;
|
|
240
|
+
(Q >= W && Q < q || ie > W && ie < q || Q < W && ie > q) && (c.list[j] = !0);
|
|
241
241
|
}
|
|
242
|
-
},
|
|
243
|
-
list:
|
|
244
|
-
}),
|
|
245
|
-
|
|
242
|
+
}, c = F({
|
|
243
|
+
list: s()
|
|
244
|
+
}), y = () => {
|
|
245
|
+
c.list = s(), h();
|
|
246
246
|
};
|
|
247
|
-
|
|
248
|
-
const
|
|
249
|
-
C ? r.size =
|
|
250
|
-
},
|
|
251
|
-
if (
|
|
247
|
+
U(() => [...i], y);
|
|
248
|
+
const d = (C, z) => {
|
|
249
|
+
C ? r.size = yt(C, z) : r.size = z, r.space = Number(e.itemSpace) || 0, r.isFillViewport = r.size >= z, f.viewportSize = z, f.cloneNodeCount = g();
|
|
250
|
+
}, g = () => {
|
|
251
|
+
if (m.value) {
|
|
252
252
|
const C = r.size + r.space;
|
|
253
253
|
if (C === 0)
|
|
254
254
|
return 0;
|
|
255
|
-
const
|
|
256
|
-
return Math.min(
|
|
255
|
+
const z = f.viewportSize * 2 - C, W = Math.ceil(z / C);
|
|
256
|
+
return Math.min(W, i.length - 1);
|
|
257
257
|
}
|
|
258
258
|
return 0;
|
|
259
|
-
},
|
|
259
|
+
}, p = () => {
|
|
260
260
|
if (!v.value)
|
|
261
261
|
return;
|
|
262
262
|
const {
|
|
263
263
|
width: C,
|
|
264
|
-
height:
|
|
264
|
+
height: z
|
|
265
265
|
} = v.value.getBoundingClientRect();
|
|
266
|
-
e.vertical ?
|
|
266
|
+
e.vertical ? d(e.itemSize, z) : d(e.itemSize, C), n.value = n.value >= i.length ? i.length - 1 : n.value, n.value < 0 && (n.value = 0), S(n.value), y(), O();
|
|
267
267
|
};
|
|
268
268
|
K(() => {
|
|
269
|
-
if (re(
|
|
269
|
+
if (re(p).catch(() => {
|
|
270
270
|
}), e.touchable && v.value) {
|
|
271
271
|
const C = v.value;
|
|
272
|
-
C.addEventListener("touchstart", X, !1), C.addEventListener("mousedown", X, !1), C.addEventListener("touchmove", le, !1), C.addEventListener("mousemove", le, !1), C.addEventListener("touchend",
|
|
272
|
+
C.addEventListener("touchstart", X, !1), C.addEventListener("mousedown", X, !1), C.addEventListener("touchmove", le, !1), C.addEventListener("mousemove", le, !1), C.addEventListener("touchend", I, !1), C.addEventListener("mouseup", I, !1), C.addEventListener("mouseleave", I, !1), C.addEventListener("touchcancel", I, !1);
|
|
273
273
|
}
|
|
274
|
-
window.addEventListener("resize",
|
|
275
|
-
}),
|
|
274
|
+
window.addEventListener("resize", p, !1), window.addEventListener("orientationchange", p, !1);
|
|
275
|
+
}), xe(() => {
|
|
276
276
|
if (P(), e.touchable && v.value) {
|
|
277
277
|
const C = v.value;
|
|
278
|
-
C.removeEventListener("touchstart", X, !1), C.removeEventListener("mousedown", X, !1), C.removeEventListener("mousemove", le, !1), C.removeEventListener("touchmove", le, !1), C.removeEventListener("mouseup",
|
|
278
|
+
C.removeEventListener("touchstart", X, !1), C.removeEventListener("mousedown", X, !1), C.removeEventListener("mousemove", le, !1), C.removeEventListener("touchmove", le, !1), C.removeEventListener("mouseup", I, !1), C.removeEventListener("touchend", I, !1), C.removeEventListener("mouseleave", I, !1), C.removeEventListener("touchcancel", I, !1);
|
|
279
279
|
}
|
|
280
|
-
window.removeEventListener("resize",
|
|
280
|
+
window.removeEventListener("resize", p, !1), window.removeEventListener("orientationchange", p, !1);
|
|
281
281
|
});
|
|
282
|
-
const $ =
|
|
282
|
+
const $ = B(() => {
|
|
283
283
|
let C = 0;
|
|
284
284
|
switch (e.align) {
|
|
285
285
|
case Re.start:
|
|
286
286
|
C = 0;
|
|
287
287
|
break;
|
|
288
288
|
case Re.center:
|
|
289
|
-
C = (
|
|
289
|
+
C = (f.viewportSize - r.size) / 2;
|
|
290
290
|
break;
|
|
291
291
|
case Re.end:
|
|
292
|
-
C =
|
|
292
|
+
C = f.viewportSize - r.size;
|
|
293
293
|
break;
|
|
294
294
|
default:
|
|
295
295
|
C = 0;
|
|
296
296
|
}
|
|
297
297
|
return C;
|
|
298
|
-
}),
|
|
299
|
-
const
|
|
300
|
-
|
|
298
|
+
}), m = B(() => e.loop && i.length > 1), S = (C) => {
|
|
299
|
+
const z = r.size + r.space;
|
|
300
|
+
m.value ? f.offset = -z * (C + f.cloneNodeCount) + $.value : (f.offset = -z * C + $.value, e.align !== "center" && (C === 0 && (f.offset = 0), C === i.length - 1 && (f.offset = -z * C + f.viewportSize - r.size)));
|
|
301
301
|
}, w = () => {
|
|
302
302
|
S(n.value), o("afterChange", n.value);
|
|
303
|
-
}, N = (C) => (i.length + C) % i.length,
|
|
304
|
-
n.value = N(C), S(C),
|
|
305
|
-
|
|
303
|
+
}, N = (C) => (i.length + C) % i.length, b = (C, z = !0) => {
|
|
304
|
+
n.value = N(C), S(C), h(), o("change", n.value), z ? (V.transitionEnabled = !0, x.value && x.value.addEventListener("transitionend", () => {
|
|
305
|
+
V.transitionEnabled = !1, w();
|
|
306
306
|
}, {
|
|
307
307
|
once: !0
|
|
308
308
|
})) : w();
|
|
309
309
|
}, E = (C = !0) => {
|
|
310
|
-
|
|
310
|
+
b(n.value - 1, C);
|
|
311
311
|
}, T = (C = !0) => {
|
|
312
|
-
|
|
312
|
+
b(n.value + 1, C);
|
|
313
313
|
};
|
|
314
314
|
let k = null;
|
|
315
315
|
const P = () => {
|
|
@@ -318,7 +318,7 @@ const W = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, ht = (
|
|
|
318
318
|
e.autoplayTime && i.length > 1 && (k && clearInterval(k), k = setInterval(() => {
|
|
319
319
|
T();
|
|
320
320
|
}, Number(e.autoplayTime)));
|
|
321
|
-
},
|
|
321
|
+
}, V = F({
|
|
322
322
|
// 拖拽中
|
|
323
323
|
isDragging: !1,
|
|
324
324
|
// 是否首次拖动
|
|
@@ -336,95 +336,95 @@ const W = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, ht = (
|
|
|
336
336
|
// 当前次拖拽不满足翻页条件
|
|
337
337
|
isDissatisfy: !1
|
|
338
338
|
}), X = (C) => {
|
|
339
|
-
if (
|
|
339
|
+
if (V.transitionEnabled)
|
|
340
340
|
return;
|
|
341
|
-
let
|
|
342
|
-
"touches" in C ? (
|
|
341
|
+
let z = 0, W = 0;
|
|
342
|
+
"touches" in C ? (z = C.touches[0].clientX, W = C.touches[0].clientY) : (z = C.clientX, W = C.clientY), V.startX = z, V.startY = W, V.isDragging = !0, V.isFirstTouch = !0, V.startTime = /* @__PURE__ */ new Date(), P();
|
|
343
343
|
}, le = (C) => {
|
|
344
|
-
if (!
|
|
344
|
+
if (!V.isDragging)
|
|
345
345
|
return;
|
|
346
|
-
let
|
|
347
|
-
"touches" in C ? (
|
|
348
|
-
const q =
|
|
349
|
-
if (
|
|
350
|
-
|
|
346
|
+
let z = 0, W = 0;
|
|
347
|
+
"touches" in C ? (z = C.touches[0].clientX, W = C.touches[0].clientY) : (z = C.clientX, W = C.clientY);
|
|
348
|
+
const q = z - V.startX, j = W - V.startY;
|
|
349
|
+
if (V.isFirstTouch && (V.isFirstTouch = !1, Math.abs(q) < Math.abs(j) !== e.vertical)) {
|
|
350
|
+
V.isDragging = !1;
|
|
351
351
|
return;
|
|
352
352
|
}
|
|
353
|
-
C.preventDefault(),
|
|
354
|
-
percent:
|
|
355
|
-
offset:
|
|
356
|
-
}),
|
|
357
|
-
},
|
|
358
|
-
if (!
|
|
353
|
+
C.preventDefault(), V.offset = e.vertical ? j : q, h(), o("dragging", {
|
|
354
|
+
percent: V.offset / (r.size + r.space),
|
|
355
|
+
offset: V.offset
|
|
356
|
+
}), V.isDissatisfy = !1;
|
|
357
|
+
}, I = () => {
|
|
358
|
+
if (!V.isDragging)
|
|
359
359
|
return;
|
|
360
|
-
|
|
361
|
-
const
|
|
362
|
-
H() && (Math.abs(
|
|
363
|
-
}, A =
|
|
364
|
-
if (
|
|
360
|
+
V.isDragging = !1;
|
|
361
|
+
const z = (/* @__PURE__ */ new Date()).getTime() - V.startTime.getTime();
|
|
362
|
+
H() && (Math.abs(V.offset) > A.value || Math.abs(V.offset) / z > 0.5) ? (V.offset > 0 ? E() : T(), V.offset = 0, V.isDissatisfy = !1) : (V.offset = 0, V.isDissatisfy = !0), O();
|
|
363
|
+
}, A = B(() => yt(e.minSwipeDistance, r.size + r.space)), H = () => {
|
|
364
|
+
if (m.value)
|
|
365
365
|
return !0;
|
|
366
|
-
const C =
|
|
366
|
+
const C = V.offset > 0 ? n.value - 1 : n.value + 1;
|
|
367
367
|
return C >= 0 && C < i.length;
|
|
368
|
-
}, ue =
|
|
369
|
-
const C =
|
|
370
|
-
return e.vertical ? (
|
|
371
|
-
}), Z =
|
|
372
|
-
|
|
373
|
-
moveTo:
|
|
368
|
+
}, ue = B(() => {
|
|
369
|
+
const C = V.isDragging && !e.isFollowHand ? f.offset : f.offset + V.offset, z = {};
|
|
370
|
+
return e.vertical ? (z.transform = `translate3d(0, ${C}px, 0)`, z.transitionDuration = V.transitionEnabled || V.isDissatisfy ? `${e.duration}ms` : "0ms") : (z.transform = `translate3d(${C}px, 0, 0)`, z.transitionDuration = V.transitionEnabled || V.isDissatisfy ? `${e.duration}ms` : "0ms"), V.isDragging && (z.transition = "none"), e.vertical && (z.flexDirection = "column"), e.autoHeight && (z.display = "block", z.whiteSpace = "nowrap"), z;
|
|
371
|
+
}), Z = B(() => ["y-swipe__dots", `y-swipe__dots--${e.dotsPosition || (e.vertical ? Je.left : Je.bottom)}`]);
|
|
372
|
+
a({
|
|
373
|
+
moveTo: b,
|
|
374
374
|
next: T,
|
|
375
375
|
prev: E,
|
|
376
|
-
resize:
|
|
376
|
+
resize: p
|
|
377
377
|
});
|
|
378
378
|
const ae = F({
|
|
379
379
|
children: i,
|
|
380
380
|
activeIndex: n,
|
|
381
381
|
props: e,
|
|
382
382
|
itemDetail: r,
|
|
383
|
-
itemShowedList:
|
|
383
|
+
itemShowedList: c
|
|
384
384
|
});
|
|
385
|
-
|
|
386
|
-
const oe = () => e.dots ?
|
|
385
|
+
l(ae);
|
|
386
|
+
const oe = () => e.dots ? u("div", {
|
|
387
387
|
class: Z.value
|
|
388
|
-
}, [i.map((C,
|
|
389
|
-
const
|
|
390
|
-
active:
|
|
388
|
+
}, [i.map((C, z) => {
|
|
389
|
+
const W = Ye("dot", {
|
|
390
|
+
active: z === n.value
|
|
391
391
|
});
|
|
392
|
-
return
|
|
393
|
-
class:
|
|
392
|
+
return u("div", {
|
|
393
|
+
class: W,
|
|
394
394
|
style: {
|
|
395
395
|
backgroundColor: e.dotsColor
|
|
396
396
|
},
|
|
397
|
-
key:
|
|
397
|
+
key: z
|
|
398
398
|
}, null);
|
|
399
399
|
})]) : null;
|
|
400
400
|
return () => {
|
|
401
401
|
var C;
|
|
402
|
-
return
|
|
403
|
-
class:
|
|
402
|
+
return u("div", {
|
|
403
|
+
class: Ye(),
|
|
404
404
|
ref: v
|
|
405
|
-
}, [
|
|
406
|
-
class:
|
|
405
|
+
}, [u("div", {
|
|
406
|
+
class: Ye("track"),
|
|
407
407
|
style: ue.value,
|
|
408
408
|
ref: x
|
|
409
|
-
}, [Array(
|
|
410
|
-
var Q, ie,
|
|
411
|
-
const q = N(
|
|
412
|
-
return
|
|
413
|
-
clonenNode:
|
|
409
|
+
}, [Array(f.cloneNodeCount).fill("").map((z, W) => {
|
|
410
|
+
var Q, ie, $e;
|
|
411
|
+
const q = N(W - f.cloneNodeCount), j = ($e = (Q = i[q]) == null ? void 0 : (ie = Q.slots).default) == null ? void 0 : $e.call(ie);
|
|
412
|
+
return j ? u(Le, {
|
|
413
|
+
clonenNode: j,
|
|
414
414
|
index: q
|
|
415
415
|
}, null) : null;
|
|
416
|
-
}), (C = t.default) == null ? void 0 : C.call(t), Array(
|
|
417
|
-
var Q, ie,
|
|
418
|
-
const q = N(
|
|
419
|
-
return
|
|
420
|
-
clonenNode:
|
|
416
|
+
}), (C = t.default) == null ? void 0 : C.call(t), Array(f.cloneNodeCount).fill("").map((z, W) => {
|
|
417
|
+
var Q, ie, $e;
|
|
418
|
+
const q = N(W), j = ($e = (Q = i[q]) == null ? void 0 : (ie = Q.slots).default) == null ? void 0 : $e.call(ie);
|
|
419
|
+
return j ? u(Le, {
|
|
420
|
+
clonenNode: j,
|
|
421
421
|
index: q
|
|
422
422
|
}, null) : null;
|
|
423
423
|
})]), t.dots ? t.dots() : oe()]);
|
|
424
424
|
};
|
|
425
425
|
}
|
|
426
|
-
}), [
|
|
427
|
-
name:
|
|
426
|
+
}), [zn, bt] = D("tabs-title"), St = /* @__PURE__ */ _({
|
|
427
|
+
name: zn,
|
|
428
428
|
props: {
|
|
429
429
|
active: {
|
|
430
430
|
type: Boolean,
|
|
@@ -450,14 +450,14 @@ const W = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, ht = (
|
|
|
450
450
|
setup(e) {
|
|
451
451
|
const {
|
|
452
452
|
parent: t
|
|
453
|
-
} =
|
|
453
|
+
} = ce(dt), o = B(() => [{
|
|
454
454
|
"y-el--clickable": !e.disabled
|
|
455
|
-
},
|
|
455
|
+
}, bt({
|
|
456
456
|
scrollable: e.scrollable,
|
|
457
457
|
disabled: e.disabled
|
|
458
|
-
}),
|
|
458
|
+
}), bt(`${(t == null ? void 0 : t.props.size) || "middle"}`, {
|
|
459
459
|
active: e.active
|
|
460
|
-
}), t == null ? void 0 : t.props.titleClass, e.active ? t == null ? void 0 : t.props.titleActiveClass : ""]),
|
|
460
|
+
}), t == null ? void 0 : t.props.titleClass, e.active ? t == null ? void 0 : t.props.titleActiveClass : ""]), a = B(() => ({
|
|
461
461
|
...t == null ? void 0 : t.props.titleStyle,
|
|
462
462
|
...e.active ? {
|
|
463
463
|
...t == null ? void 0 : t.props.titleActiveStyle
|
|
@@ -465,18 +465,18 @@ const W = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, ht = (
|
|
|
465
465
|
}));
|
|
466
466
|
return () => {
|
|
467
467
|
const {
|
|
468
|
-
title:
|
|
468
|
+
title: l,
|
|
469
469
|
titleSlot: i
|
|
470
470
|
} = e;
|
|
471
|
-
return
|
|
471
|
+
return u("div", {
|
|
472
472
|
class: o.value,
|
|
473
|
-
title:
|
|
474
|
-
style:
|
|
473
|
+
title: l,
|
|
474
|
+
style: a.value,
|
|
475
475
|
role: "presentation"
|
|
476
|
-
}, [i ? i() :
|
|
476
|
+
}, [i ? i() : l]);
|
|
477
477
|
};
|
|
478
478
|
}
|
|
479
|
-
}),
|
|
479
|
+
}), je = null, _n = {
|
|
480
480
|
initIndex: {
|
|
481
481
|
type: Number,
|
|
482
482
|
default: 0
|
|
@@ -505,7 +505,7 @@ const W = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, ht = (
|
|
|
505
505
|
type: [Number, String],
|
|
506
506
|
default: "3px"
|
|
507
507
|
},
|
|
508
|
-
titleWrapperClass:
|
|
508
|
+
titleWrapperClass: je,
|
|
509
509
|
titleScrollThreshold: {
|
|
510
510
|
type: Number,
|
|
511
511
|
default: 5
|
|
@@ -515,7 +515,7 @@ const W = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, ht = (
|
|
|
515
515
|
default: null
|
|
516
516
|
},
|
|
517
517
|
titleClass: {
|
|
518
|
-
type:
|
|
518
|
+
type: je,
|
|
519
519
|
default: null
|
|
520
520
|
},
|
|
521
521
|
titleActiveStyle: {
|
|
@@ -523,7 +523,7 @@ const W = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, ht = (
|
|
|
523
523
|
default: null
|
|
524
524
|
},
|
|
525
525
|
titleActiveClass: {
|
|
526
|
-
type:
|
|
526
|
+
type: je,
|
|
527
527
|
default: null
|
|
528
528
|
},
|
|
529
529
|
touchable: {
|
|
@@ -543,71 +543,71 @@ const W = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, ht = (
|
|
|
543
543
|
default: "center"
|
|
544
544
|
}
|
|
545
545
|
};
|
|
546
|
-
function
|
|
547
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
546
|
+
function Dn(e) {
|
|
547
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Se(e);
|
|
548
548
|
}
|
|
549
|
-
const [
|
|
550
|
-
name:
|
|
549
|
+
const [et, Ue] = D("tabs"), dt = et, Mn = /* @__PURE__ */ _({
|
|
550
|
+
name: et,
|
|
551
551
|
components: {
|
|
552
|
-
YTabTitle:
|
|
552
|
+
YTabTitle: St
|
|
553
553
|
},
|
|
554
|
-
props:
|
|
554
|
+
props: _n,
|
|
555
555
|
setup(e, {
|
|
556
556
|
slots: t,
|
|
557
557
|
emit: o,
|
|
558
|
-
expose:
|
|
558
|
+
expose: a
|
|
559
559
|
}) {
|
|
560
560
|
const {
|
|
561
|
-
initProvide:
|
|
562
|
-
} =
|
|
561
|
+
initProvide: l
|
|
562
|
+
} = fe(dt), i = L(!1), n = F([]), r = L(), f = B(() => n.length > e.titleScrollThreshold), v = (k) => n.findIndex((P) => (P.$props ? P.$props.name : "") === k), x = L(e.initName ? v(e.initName) : e.initIndex), s = (k) => {
|
|
563
563
|
x.value = k;
|
|
564
564
|
const P = r.value;
|
|
565
565
|
P && (P == null || P.moveTo(k, e.changeWithAnimation));
|
|
566
566
|
};
|
|
567
|
-
|
|
567
|
+
a({
|
|
568
568
|
scrollToByIndex: (k) => {
|
|
569
|
-
|
|
569
|
+
s(k);
|
|
570
570
|
},
|
|
571
571
|
scrollToByName: (k) => {
|
|
572
572
|
const P = v(k);
|
|
573
|
-
|
|
573
|
+
s(P);
|
|
574
574
|
}
|
|
575
575
|
});
|
|
576
|
-
const
|
|
577
|
-
|
|
578
|
-
},
|
|
576
|
+
const y = L([]), d = L(), g = (k) => (P) => {
|
|
577
|
+
y.value[k] = P;
|
|
578
|
+
}, p = (k) => {
|
|
579
579
|
const {
|
|
580
580
|
title: P,
|
|
581
581
|
name: O,
|
|
582
|
-
disabled:
|
|
582
|
+
disabled: V
|
|
583
583
|
} = n[k].$props || {};
|
|
584
|
-
x.value !== k && (o(
|
|
584
|
+
x.value !== k && (o(V ? "disabledClick" : "click", k, P, O), !V && s(k));
|
|
585
585
|
}, $ = async () => {
|
|
586
586
|
await re(() => {
|
|
587
|
-
if (!
|
|
587
|
+
if (!f.value || !d.value)
|
|
588
588
|
return;
|
|
589
|
-
const k =
|
|
590
|
-
if (!k || !
|
|
589
|
+
const k = d.value;
|
|
590
|
+
if (!k || !y.value[x.value])
|
|
591
591
|
return;
|
|
592
|
-
const P =
|
|
592
|
+
const P = y.value[x.value].$el, O = P.offsetLeft - (k.offsetWidth - P.offsetWidth) / 2 - k.scrollLeft;
|
|
593
593
|
k.scrollBy({
|
|
594
594
|
left: O,
|
|
595
595
|
behavior: "smooth"
|
|
596
596
|
});
|
|
597
597
|
});
|
|
598
598
|
};
|
|
599
|
-
|
|
600
|
-
|
|
599
|
+
ut(() => {
|
|
600
|
+
y.value = [];
|
|
601
601
|
});
|
|
602
|
-
const
|
|
602
|
+
const m = F({
|
|
603
603
|
transform: "translateX(50%)",
|
|
604
604
|
transition: "all 0ms ease-out"
|
|
605
605
|
}), S = async () => {
|
|
606
606
|
await re(() => {
|
|
607
|
-
if (!
|
|
607
|
+
if (!y.value || y.value.length === 0)
|
|
608
608
|
return;
|
|
609
|
-
const k = x.value >=
|
|
610
|
-
|
|
609
|
+
const k = x.value >= y.value.length ? 0 : x.value, P = y.value[k].$el, O = P.offsetLeft + P.offsetWidth / 2;
|
|
610
|
+
m.transform = `translateX(${O}px) translateX(-50%)`, i.value && (m.transition = `all ${e.duration}ms ease-out`), i.value = !0;
|
|
611
611
|
});
|
|
612
612
|
}, w = (k) => {
|
|
613
613
|
const {
|
|
@@ -621,53 +621,53 @@ const [Je, je] = M("tabs"), ct = Je, _n = /* @__PURE__ */ z({
|
|
|
621
621
|
name: O
|
|
622
622
|
} = n[k].$props || {};
|
|
623
623
|
o("afterChange", k, P, O), x.value = k;
|
|
624
|
-
},
|
|
624
|
+
}, b = F({
|
|
625
625
|
children: n,
|
|
626
626
|
activeIndex: x,
|
|
627
627
|
props: e
|
|
628
628
|
});
|
|
629
|
-
|
|
629
|
+
l(b);
|
|
630
630
|
const E = (k) => T(k) && /^\d+(\.\d+)?$/.test(k) ? `${k}px` : k, T = (k) => Object.prototype.toString.call(k) === "[object String]";
|
|
631
631
|
return K(async () => {
|
|
632
632
|
await S();
|
|
633
|
-
}),
|
|
633
|
+
}), U(() => x.value, async () => {
|
|
634
634
|
await S(), await $();
|
|
635
|
-
}),
|
|
635
|
+
}), U(() => {
|
|
636
636
|
var k;
|
|
637
637
|
return (k = t.default) == null ? void 0 : k.length;
|
|
638
638
|
}, async () => {
|
|
639
639
|
await S();
|
|
640
640
|
}), () => {
|
|
641
641
|
let k;
|
|
642
|
-
return
|
|
643
|
-
class:
|
|
644
|
-
}, [
|
|
645
|
-
class:
|
|
646
|
-
}, [
|
|
647
|
-
ref:
|
|
648
|
-
class:
|
|
649
|
-
scrollable:
|
|
642
|
+
return u("div", {
|
|
643
|
+
class: et
|
|
644
|
+
}, [u("div", {
|
|
645
|
+
class: Ue("list")
|
|
646
|
+
}, [u("div", {
|
|
647
|
+
ref: d,
|
|
648
|
+
class: Ue("list-child-wrapper", {
|
|
649
|
+
scrollable: f.value,
|
|
650
650
|
[e.size]: e.size,
|
|
651
651
|
[e.align]: e.align
|
|
652
652
|
})
|
|
653
|
-
}, [n.length > 0 && n.map((P, O) =>
|
|
653
|
+
}, [n.length > 0 && n.map((P, O) => u(St, {
|
|
654
654
|
title: P.title,
|
|
655
655
|
disabled: P.disabled,
|
|
656
656
|
"title-slot": P.$slots.title,
|
|
657
657
|
key: O,
|
|
658
|
-
ref:
|
|
658
|
+
ref: g(O),
|
|
659
659
|
active: x.value === O,
|
|
660
|
-
scrollable:
|
|
661
|
-
onClick: () =>
|
|
662
|
-
}, null)),
|
|
663
|
-
class:
|
|
660
|
+
scrollable: f.value,
|
|
661
|
+
onClick: () => p(O)
|
|
662
|
+
}, null)), u("div", {
|
|
663
|
+
class: Ue("line"),
|
|
664
664
|
style: {
|
|
665
|
-
...
|
|
665
|
+
...m,
|
|
666
666
|
width: E(e.lineWidth),
|
|
667
667
|
height: E(e.lineHeight),
|
|
668
668
|
backgroundColor: e.lineColor
|
|
669
669
|
}
|
|
670
|
-
}, null)])]), t.default ?
|
|
670
|
+
}, null)])]), t.default ? u(jt, {
|
|
671
671
|
ref: r,
|
|
672
672
|
dots: !1,
|
|
673
673
|
loop: !1,
|
|
@@ -678,25 +678,25 @@ const [Je, je] = M("tabs"), ct = Je, _n = /* @__PURE__ */ z({
|
|
|
678
678
|
"is-follow-hand": e.changeWithAnimation,
|
|
679
679
|
onChange: w,
|
|
680
680
|
onAfterChange: N
|
|
681
|
-
},
|
|
681
|
+
}, Dn(k = t.default()) ? k : {
|
|
682
682
|
default: () => [k]
|
|
683
683
|
}) : null]);
|
|
684
684
|
};
|
|
685
685
|
}
|
|
686
686
|
});
|
|
687
|
-
function
|
|
687
|
+
function M(e) {
|
|
688
688
|
const t = e;
|
|
689
689
|
return t.install = (o) => {
|
|
690
|
-
const { name:
|
|
691
|
-
|
|
690
|
+
const { name: a } = e;
|
|
691
|
+
a && o.component(a, e);
|
|
692
692
|
}, t;
|
|
693
693
|
}
|
|
694
|
-
const
|
|
695
|
-
function
|
|
696
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
694
|
+
const On = M(Mn);
|
|
695
|
+
function An(e) {
|
|
696
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Se(e);
|
|
697
697
|
}
|
|
698
|
-
const [
|
|
699
|
-
name:
|
|
698
|
+
const [Rn] = D("tab"), Wn = /* @__PURE__ */ _({
|
|
699
|
+
name: Rn,
|
|
700
700
|
props: {
|
|
701
701
|
title: {
|
|
702
702
|
type: String,
|
|
@@ -716,42 +716,42 @@ const [Dn] = M("tab"), On = /* @__PURE__ */ z({
|
|
|
716
716
|
}) {
|
|
717
717
|
const {
|
|
718
718
|
parent: o
|
|
719
|
-
} =
|
|
720
|
-
return
|
|
721
|
-
o && (o.children = o.children.filter((
|
|
719
|
+
} = ce(dt), a = ne();
|
|
720
|
+
return a.proxy && (o == null || o.children.push(a.proxy)), xe(() => {
|
|
721
|
+
o && (o.children = o.children.filter((l) => l !== a.proxy));
|
|
722
722
|
}), () => {
|
|
723
|
-
let
|
|
724
|
-
return t.default ?
|
|
725
|
-
default: () => [
|
|
723
|
+
let l;
|
|
724
|
+
return t.default ? u(Le, null, An(l = t.default()) ? l : {
|
|
725
|
+
default: () => [l]
|
|
726
726
|
}) : null;
|
|
727
727
|
};
|
|
728
728
|
}
|
|
729
|
-
}),
|
|
730
|
-
const e =
|
|
731
|
-
o.value = 0,
|
|
729
|
+
}), Fn = M(Wn), wt = 10, Hn = (e, t) => e > t && e > wt ? "horizontal" : t > e && t > wt ? "vertical" : "", Yn = (e, t) => Math.abs(e) > Math.abs(t) ? e > 0 ? "right" : "left" : t > 0 ? "bottom" : "top", jn = () => {
|
|
730
|
+
const e = L(0), t = L(0), o = L(0), a = L(0), l = L(0), i = L(0), n = L(""), r = L(""), f = () => n.value === "vertical", v = () => n.value === "horizontal", x = () => {
|
|
731
|
+
o.value = 0, a.value = 0, l.value = 0, i.value = 0, n.value = "", r.value = "";
|
|
732
732
|
};
|
|
733
733
|
return {
|
|
734
|
-
move: (
|
|
735
|
-
const
|
|
736
|
-
o.value =
|
|
734
|
+
move: (c) => {
|
|
735
|
+
const y = c.touches[0];
|
|
736
|
+
o.value = y.clientX < 0 ? 0 : y.clientX - e.value, a.value = y.clientY - t.value, l.value = Math.abs(o.value), i.value = Math.abs(a.value), n.value || (n.value = Hn(l.value, i.value)), r.value = Yn(o.value, a.value);
|
|
737
737
|
},
|
|
738
|
-
start: (
|
|
739
|
-
x(), e.value =
|
|
738
|
+
start: (c) => {
|
|
739
|
+
x(), e.value = c.touches[0].clientX, t.value = c.touches[0].clientY;
|
|
740
740
|
},
|
|
741
741
|
reset: x,
|
|
742
742
|
startX: e,
|
|
743
743
|
startY: t,
|
|
744
744
|
deltaX: o,
|
|
745
|
-
deltaY:
|
|
746
|
-
offsetX:
|
|
745
|
+
deltaY: a,
|
|
746
|
+
offsetX: l,
|
|
747
747
|
offsetY: i,
|
|
748
748
|
direction: n,
|
|
749
749
|
touchDirection: r,
|
|
750
|
-
isVertical:
|
|
750
|
+
isVertical: f,
|
|
751
751
|
isHorizontal: v
|
|
752
752
|
};
|
|
753
|
-
}, [
|
|
754
|
-
name:
|
|
753
|
+
}, [Un, G] = D("slider"), Xn = /* @__PURE__ */ _({
|
|
754
|
+
name: Un,
|
|
755
755
|
props: {
|
|
756
756
|
modelValue: {
|
|
757
757
|
type: [Number, Array],
|
|
@@ -811,15 +811,15 @@ const [Dn] = M("tab"), On = /* @__PURE__ */ z({
|
|
|
811
811
|
emit: t,
|
|
812
812
|
slots: o
|
|
813
813
|
}) {
|
|
814
|
-
const
|
|
814
|
+
const a = L(), l = L(0), i = L(0), n = L(""), r = jn(), f = B(() => Array.isArray(e.modelValue)), v = (b) => {
|
|
815
815
|
const {
|
|
816
816
|
min: E,
|
|
817
817
|
max: T,
|
|
818
818
|
step: k
|
|
819
|
-
} = e, P = Math.max(E, Math.min(
|
|
819
|
+
} = e, P = Math.max(E, Math.min(b, T));
|
|
820
820
|
return Math.round(P / k) * k;
|
|
821
|
-
}, x = (
|
|
822
|
-
if (
|
|
821
|
+
}, x = (b) => {
|
|
822
|
+
if (b.stopPropagation(), e.disabled)
|
|
823
823
|
return;
|
|
824
824
|
const {
|
|
825
825
|
min: E,
|
|
@@ -827,116 +827,116 @@ const [Dn] = M("tab"), On = /* @__PURE__ */ z({
|
|
|
827
827
|
} = e, {
|
|
828
828
|
left: k,
|
|
829
829
|
width: P
|
|
830
|
-
} =
|
|
831
|
-
if (
|
|
832
|
-
const X = T[0], le = T[1],
|
|
833
|
-
|
|
830
|
+
} = a.value.getBoundingClientRect(), O = b.clientX - k, V = Math.floor(E + O / P * p.value);
|
|
831
|
+
if (f.value) {
|
|
832
|
+
const X = T[0], le = T[1], I = (X + le) / 2;
|
|
833
|
+
V <= I ? c([V, le]) : c([X, V]);
|
|
834
834
|
} else
|
|
835
|
-
|
|
836
|
-
},
|
|
835
|
+
c(V);
|
|
836
|
+
}, s = (b) => b[0] > b[1] ? [b[1], b[0]] : b, h = (b, E) => JSON.stringify(b) === JSON.stringify(E), c = (b, E) => {
|
|
837
837
|
let T = 0;
|
|
838
|
-
|
|
839
|
-
},
|
|
838
|
+
f.value ? T = s(b).map(v) : T = v(b), t("update:modelValue", T), typeof E > "u" && !h(l.value, i.value) && t("change", T);
|
|
839
|
+
}, y = B(() => {
|
|
840
840
|
const {
|
|
841
|
-
modelValue:
|
|
841
|
+
modelValue: b,
|
|
842
842
|
min: E
|
|
843
843
|
} = e;
|
|
844
844
|
let T = null;
|
|
845
|
-
return
|
|
846
|
-
}),
|
|
845
|
+
return f.value ? T = Math.floor((v(b[1]) - v(b[0])) * 100 / p.value) : T = Math.floor((v(b) - E) * 100 / p.value), `${T}%`;
|
|
846
|
+
}), d = B(() => {
|
|
847
847
|
const {
|
|
848
|
-
modelValue:
|
|
848
|
+
modelValue: b,
|
|
849
849
|
min: E
|
|
850
850
|
} = e;
|
|
851
|
-
return
|
|
852
|
-
}),
|
|
853
|
-
left:
|
|
851
|
+
return f.value ? `${Math.floor((v(b[0]) - E) * 100 / p.value)}%` : "0%";
|
|
852
|
+
}), g = B(() => ({
|
|
853
|
+
left: y.value,
|
|
854
854
|
transition: n.value === "moving" ? "none" : `${e.transitionTime}ms ease-in-out`
|
|
855
|
-
})),
|
|
856
|
-
e.disabled || (r.start(
|
|
857
|
-
},
|
|
855
|
+
})), p = B(() => e.max - e.min), $ = (b) => {
|
|
856
|
+
e.disabled || (r.start(b), n.value = "startMove", i.value = e.modelValue, f.value ? l.value = [...i.value] : l.value = i.value);
|
|
857
|
+
}, m = (b, E) => {
|
|
858
858
|
if (e.disabled)
|
|
859
859
|
return;
|
|
860
|
-
r.move(
|
|
860
|
+
r.move(b), n.value === "startMove" && t("drag-start"), n.value = "moving";
|
|
861
861
|
const {
|
|
862
862
|
width: T
|
|
863
|
-
} =
|
|
864
|
-
Array.isArray(
|
|
863
|
+
} = a.value.getBoundingClientRect(), k = r.deltaX.value, P = Math.floor(k / T * p.value);
|
|
864
|
+
Array.isArray(l.value) && Array.isArray(i.value) ? E === "left" ? i.value[0] = l.value[0] + P : i.value[1] = l.value[1] + P : i.value = l.value + P, c(i.value, !0);
|
|
865
865
|
}, S = () => {
|
|
866
|
-
e.disabled || (n.value === "moving" && (
|
|
867
|
-
}, w = (
|
|
866
|
+
e.disabled || (n.value === "moving" && (c(i.value), t("drag-end")), n.value = "endMove");
|
|
867
|
+
}, w = (b) => {
|
|
868
868
|
let E = "", T = {}, k = 0, P = G("button-wrapper");
|
|
869
|
-
return
|
|
870
|
-
left:
|
|
869
|
+
return b === 0 ? (E = "left", T = {
|
|
870
|
+
left: d.value,
|
|
871
871
|
backgroundColor: Array.isArray(e.buttonBgColor) ? e.buttonBgColor[0] : e.buttonBgColor
|
|
872
|
-
}, k = e.modelValue[
|
|
873
|
-
left: `${parseInt(
|
|
872
|
+
}, k = e.modelValue[b], P = G("button-wrapper", "left")) : b === 1 ? (E = "right", k = e.modelValue[b], T = {
|
|
873
|
+
left: `${parseInt(y.value) + parseInt(d.value)}%`,
|
|
874
874
|
backgroundColor: Array.isArray(e.buttonBgColor) ? e.buttonBgColor[1] : e.buttonBgColor
|
|
875
875
|
}, P = G("button-wrapper", "right")) : (k = e.modelValue, T = {
|
|
876
|
-
left:
|
|
876
|
+
left: y.value,
|
|
877
877
|
backgroundColor: e.buttonBgColor
|
|
878
|
-
}),
|
|
878
|
+
}), u("div", {
|
|
879
879
|
role: "slider",
|
|
880
880
|
"aria-valuemin": e.min,
|
|
881
881
|
"aria-valuemax": e.max,
|
|
882
882
|
"aria-valuenow": k,
|
|
883
883
|
class: P,
|
|
884
884
|
onTouchstart: $,
|
|
885
|
-
onTouchmove: (O) =>
|
|
885
|
+
onTouchmove: (O) => m(O, E),
|
|
886
886
|
onTouchend: S,
|
|
887
887
|
style: {
|
|
888
888
|
...T,
|
|
889
889
|
transition: n.value === "moving" ? "none" : `${e.transitionTime}ms ease-in-out`
|
|
890
890
|
}
|
|
891
|
-
}, [o.button ? o.button() :
|
|
891
|
+
}, [o.button ? o.button() : u("div", {
|
|
892
892
|
class: G("inner-button"),
|
|
893
893
|
style: T
|
|
894
894
|
}, null)]);
|
|
895
|
-
}, N =
|
|
895
|
+
}, N = B(() => Array((e.max - e.min) / e.step).fill({}).map((E, T) => ({
|
|
896
896
|
position: `${T * e.step}%`
|
|
897
897
|
})));
|
|
898
898
|
return () => {
|
|
899
|
-
var
|
|
900
|
-
return
|
|
899
|
+
var b;
|
|
900
|
+
return u("div", {
|
|
901
901
|
class: G()
|
|
902
|
-
}, [o.iconLeft &&
|
|
902
|
+
}, [o.iconLeft && u("div", {
|
|
903
903
|
class: G("icon", {
|
|
904
904
|
left: !0
|
|
905
905
|
})
|
|
906
|
-
}, [o.iconLeft()]),
|
|
906
|
+
}, [o.iconLeft()]), u("div", {
|
|
907
907
|
role: "presentation",
|
|
908
|
-
ref:
|
|
908
|
+
ref: a,
|
|
909
909
|
class: G("wrapper-main", {
|
|
910
910
|
disabled: e.disabled
|
|
911
911
|
}),
|
|
912
912
|
style: {
|
|
913
913
|
background: e.inactiveColor,
|
|
914
|
-
height:
|
|
914
|
+
height: R(e.barHeight)
|
|
915
915
|
},
|
|
916
916
|
onClick: x
|
|
917
|
-
}, [e.step !== 1 &&
|
|
917
|
+
}, [e.step !== 1 && u("div", {
|
|
918
918
|
class: G("dots")
|
|
919
|
-
}, [N.value.map((E) =>
|
|
919
|
+
}, [N.value.map((E) => u("div", {
|
|
920
920
|
class: G("dot"),
|
|
921
921
|
style: {
|
|
922
922
|
left: E.position,
|
|
923
923
|
background: e.gapColor,
|
|
924
|
-
width:
|
|
924
|
+
width: R(e.gapWidth)
|
|
925
925
|
}
|
|
926
|
-
}, null))]), e.showTooltip &&
|
|
926
|
+
}, null))]), e.showTooltip && u("div", {
|
|
927
927
|
class: G("tooltip", {
|
|
928
928
|
wrapper: o.toolTip
|
|
929
929
|
}),
|
|
930
|
-
style:
|
|
931
|
-
}, [((
|
|
930
|
+
style: g.value
|
|
931
|
+
}, [((b = o.toolTip) == null ? void 0 : b.call(o)) || e.modelValue]), u("div", {
|
|
932
932
|
style: {
|
|
933
|
-
left:
|
|
934
|
-
width:
|
|
933
|
+
left: d.value,
|
|
934
|
+
width: y.value,
|
|
935
935
|
background: e.activeColor,
|
|
936
936
|
transition: n.value === "moving" ? "none" : `${e.transitionTime}ms ease-in-out`
|
|
937
937
|
},
|
|
938
938
|
class: G("inner")
|
|
939
|
-
}, null),
|
|
939
|
+
}, null), f.value ? [w(0), w(1)] : w()]), o.iconRight && u("div", {
|
|
940
940
|
class: G("icon", {
|
|
941
941
|
right: !0
|
|
942
942
|
})
|
|
@@ -944,7 +944,7 @@ const [Dn] = M("tab"), On = /* @__PURE__ */ z({
|
|
|
944
944
|
};
|
|
945
945
|
}
|
|
946
946
|
});
|
|
947
|
-
const
|
|
947
|
+
const qn = M(Xn), [Gn, ge] = D("loading"), Kn = {
|
|
948
948
|
// Loading icon 的颜色
|
|
949
949
|
color: {
|
|
950
950
|
type: String,
|
|
@@ -1003,76 +1003,76 @@ const Yn = D(Un), [jn, fe] = M("loading"), Xn = {
|
|
|
1003
1003
|
type: String,
|
|
1004
1004
|
default: "relative"
|
|
1005
1005
|
}
|
|
1006
|
-
},
|
|
1007
|
-
name:
|
|
1008
|
-
props:
|
|
1006
|
+
}, ft = /* @__PURE__ */ _({
|
|
1007
|
+
name: Gn,
|
|
1008
|
+
props: Kn,
|
|
1009
1009
|
setup(e, {
|
|
1010
1010
|
slots: t
|
|
1011
1011
|
}) {
|
|
1012
1012
|
return () => {
|
|
1013
|
-
var
|
|
1013
|
+
var d, g;
|
|
1014
1014
|
const {
|
|
1015
1015
|
position: o,
|
|
1016
|
-
textLocation:
|
|
1017
|
-
bgColor:
|
|
1016
|
+
textLocation: a,
|
|
1017
|
+
bgColor: l,
|
|
1018
1018
|
bgBorderRadius: i,
|
|
1019
1019
|
size: n,
|
|
1020
1020
|
padding: r,
|
|
1021
|
-
color:
|
|
1021
|
+
color: f,
|
|
1022
1022
|
thick: v,
|
|
1023
1023
|
direction: x,
|
|
1024
|
-
text:
|
|
1025
|
-
textColor:
|
|
1026
|
-
textSize:
|
|
1027
|
-
} = e,
|
|
1028
|
-
return
|
|
1029
|
-
class:
|
|
1024
|
+
text: s,
|
|
1025
|
+
textColor: h,
|
|
1026
|
+
textSize: c
|
|
1027
|
+
} = e, y = ((d = t.default) == null ? void 0 : d.call(t)) || s;
|
|
1028
|
+
return u("div", {
|
|
1029
|
+
class: ge({
|
|
1030
1030
|
[o]: o !== "relative"
|
|
1031
1031
|
})
|
|
1032
|
-
}, [
|
|
1033
|
-
class:
|
|
1032
|
+
}, [u("div", {
|
|
1033
|
+
class: ge("bg", {
|
|
1034
1034
|
[o]: o !== "relative"
|
|
1035
1035
|
}),
|
|
1036
1036
|
style: {
|
|
1037
|
-
flexDirection:
|
|
1038
|
-
backgroundColor:
|
|
1039
|
-
borderRadius:
|
|
1040
|
-
padding:
|
|
1037
|
+
flexDirection: Tn(a),
|
|
1038
|
+
backgroundColor: l,
|
|
1039
|
+
borderRadius: R(i),
|
|
1040
|
+
padding: R(r)
|
|
1041
1041
|
}
|
|
1042
|
-
}, [
|
|
1043
|
-
class:
|
|
1042
|
+
}, [u("span", {
|
|
1043
|
+
class: ge("icon-wrapper"),
|
|
1044
1044
|
style: {
|
|
1045
|
-
width:
|
|
1046
|
-
height:
|
|
1045
|
+
width: R(n),
|
|
1046
|
+
height: R(n)
|
|
1047
1047
|
}
|
|
1048
|
-
}, [((
|
|
1049
|
-
class:
|
|
1048
|
+
}, [((g = t.icon) == null ? void 0 : g.call(t)) || u("svg", {
|
|
1049
|
+
class: ge("icon", {
|
|
1050
1050
|
[x]: x
|
|
1051
1051
|
}),
|
|
1052
1052
|
viewBox: "25 25 50 50"
|
|
1053
|
-
}, [
|
|
1054
|
-
class:
|
|
1053
|
+
}, [u("circle", {
|
|
1054
|
+
class: ge("icon-circle"),
|
|
1055
1055
|
style: {
|
|
1056
|
-
stroke:
|
|
1057
|
-
strokeWidth:
|
|
1056
|
+
stroke: f,
|
|
1057
|
+
strokeWidth: R(v)
|
|
1058
1058
|
},
|
|
1059
1059
|
cx: "50",
|
|
1060
1060
|
cy: "50",
|
|
1061
1061
|
r: "20",
|
|
1062
1062
|
fill: "none"
|
|
1063
|
-
}, null)])]),
|
|
1064
|
-
class:
|
|
1065
|
-
[
|
|
1063
|
+
}, null)])]), y && u("span", {
|
|
1064
|
+
class: ge("text", {
|
|
1065
|
+
[a]: a
|
|
1066
1066
|
}),
|
|
1067
1067
|
style: {
|
|
1068
|
-
color:
|
|
1069
|
-
fontSize:
|
|
1068
|
+
color: h,
|
|
1069
|
+
fontSize: R(c)
|
|
1070
1070
|
}
|
|
1071
|
-
}, [
|
|
1071
|
+
}, [y])])]);
|
|
1072
1072
|
};
|
|
1073
1073
|
}
|
|
1074
|
-
}), [
|
|
1075
|
-
name:
|
|
1074
|
+
}), [Zn, se] = D("list"), Qn = /* @__PURE__ */ _({
|
|
1075
|
+
name: Zn,
|
|
1076
1076
|
props: {
|
|
1077
1077
|
// 加载中 文案
|
|
1078
1078
|
loadingText: {
|
|
@@ -1139,18 +1139,18 @@ const Yn = D(Un), [jn, fe] = M("loading"), Xn = {
|
|
|
1139
1139
|
setup(e, {
|
|
1140
1140
|
slots: t,
|
|
1141
1141
|
emit: o,
|
|
1142
|
-
expose:
|
|
1142
|
+
expose: a
|
|
1143
1143
|
}) {
|
|
1144
|
-
const
|
|
1144
|
+
const l = L(0), i = L(!1), n = L("normal"), r = L(), f = L(), v = L(), x = L([]), s = L(0), h = L(0), c = L([]), y = B(() => Cn(e.height) ? `${e.height}px` : e.height), d = B(() => c.value.length ? c.value[c.value.length - 1].bottom : 0), g = B(() => {
|
|
1145
1145
|
if (e.virtual) {
|
|
1146
|
-
const
|
|
1147
|
-
return S.value.slice(
|
|
1146
|
+
const I = s.value - p.value, A = h.value + $.value;
|
|
1147
|
+
return S.value.slice(I, A);
|
|
1148
1148
|
}
|
|
1149
1149
|
return S.value;
|
|
1150
|
-
}),
|
|
1151
|
-
n.value !== "loading" && (n.value = "loading", o("load", (
|
|
1150
|
+
}), p = B(() => Math.min(s.value, e.bufferScale * m.value)), $ = B(() => Math.min(e.dataSource.length - h.value, e.bufferScale * m.value)), m = B(() => Math.ceil(l.value / parseInt(String(e.itemHeight)))), S = B(() => e.dataSource.map((I, A) => (I[e.keyName] = A, I))), w = () => i.value ? document.documentElement.scrollTop || document.body.scrollTop : r.value.scrollTop, N = () => i.value ? document.documentElement.scrollHeight : r.value.scrollHeight, b = () => {
|
|
1151
|
+
n.value !== "loading" && (n.value = "loading", o("load", (I) => {
|
|
1152
1152
|
if (n.value === "loading")
|
|
1153
|
-
switch (
|
|
1153
|
+
switch (I) {
|
|
1154
1154
|
case "error":
|
|
1155
1155
|
n.value = "error";
|
|
1156
1156
|
break;
|
|
@@ -1158,13 +1158,13 @@ const Yn = D(Un), [jn, fe] = M("loading"), Xn = {
|
|
|
1158
1158
|
n.value = "finished", e.virtual && T(), e.virtual && e.dynamicItemHeight && k();
|
|
1159
1159
|
break;
|
|
1160
1160
|
default:
|
|
1161
|
-
n.value = "normal", e.virtual && (k(), e.dataSource.length <
|
|
1161
|
+
n.value = "normal", e.virtual && (k(), e.dataSource.length < m.value + $.value && b());
|
|
1162
1162
|
}
|
|
1163
1163
|
}));
|
|
1164
1164
|
}, E = () => {
|
|
1165
|
-
n.value === "normal" && N() - w() -
|
|
1165
|
+
n.value === "normal" && N() - w() - l.value <= e.loadOffset && b();
|
|
1166
1166
|
}, T = () => {
|
|
1167
|
-
|
|
1167
|
+
c.value = S.value.map((I, A) => {
|
|
1168
1168
|
const H = parseInt(String(e.itemHeight));
|
|
1169
1169
|
return {
|
|
1170
1170
|
index: A,
|
|
@@ -1175,147 +1175,147 @@ const Yn = D(Un), [jn, fe] = M("loading"), Xn = {
|
|
|
1175
1175
|
});
|
|
1176
1176
|
}, k = () => {
|
|
1177
1177
|
T();
|
|
1178
|
-
for (let
|
|
1179
|
-
|
|
1180
|
-
}, P = (
|
|
1181
|
-
let H = 0, ue =
|
|
1178
|
+
for (let I = 1; I < c.value.length; I++)
|
|
1179
|
+
c.value[I].top = c.value[I - 1].bottom, c.value[I].bottom = c.value[I].top + c.value[I].height;
|
|
1180
|
+
}, P = (I, A) => {
|
|
1181
|
+
let H = 0, ue = I.length - 1, Z = -1;
|
|
1182
1182
|
for (; H <= ue; ) {
|
|
1183
|
-
const ae = Math.floor((H + ue) / 2), oe =
|
|
1183
|
+
const ae = Math.floor((H + ue) / 2), oe = I[ae].bottom;
|
|
1184
1184
|
if (oe === A)
|
|
1185
1185
|
return ae + 1;
|
|
1186
1186
|
oe < A ? H = ae + 1 : oe > A && ((Z === -1 || Z > ae) && (Z = ae), ue = ae - 1);
|
|
1187
1187
|
}
|
|
1188
1188
|
return Z;
|
|
1189
|
-
}, O = (
|
|
1189
|
+
}, O = (I) => P(c.value, I), V = () => {
|
|
1190
1190
|
if (E(), e.virtual) {
|
|
1191
|
-
const
|
|
1192
|
-
X(
|
|
1191
|
+
const I = w();
|
|
1192
|
+
X(I);
|
|
1193
1193
|
}
|
|
1194
|
-
}, X = (
|
|
1195
|
-
if (!
|
|
1194
|
+
}, X = (I) => {
|
|
1195
|
+
if (!f.value)
|
|
1196
1196
|
return;
|
|
1197
|
-
const A =
|
|
1197
|
+
const A = I || 0;
|
|
1198
1198
|
if (e.dynamicItemHeight) {
|
|
1199
|
-
|
|
1200
|
-
const H =
|
|
1201
|
-
|
|
1199
|
+
s.value = O(A), h.value = s.value + m.value;
|
|
1200
|
+
const H = c.value[s.value - p.value].top ? c.value[s.value - p.value].top : 0;
|
|
1201
|
+
f.value.style.transform = `translate3d(0, ${H}px, 0)`;
|
|
1202
1202
|
} else {
|
|
1203
|
-
|
|
1204
|
-
const H =
|
|
1205
|
-
|
|
1203
|
+
s.value = Math.floor(A / parseInt(String(e.itemHeight))), h.value = s.value + m.value;
|
|
1204
|
+
const H = s.value * parseInt(String(e.itemHeight)) - p.value * parseInt(String(e.itemHeight));
|
|
1205
|
+
f.value.style.transform = `translate3d(0, ${H}px, 0)`;
|
|
1206
1206
|
}
|
|
1207
1207
|
}, le = () => {
|
|
1208
|
-
if (!
|
|
1208
|
+
if (!f.value || !v.value)
|
|
1209
1209
|
return;
|
|
1210
|
-
const
|
|
1211
|
-
|
|
1210
|
+
const I = f.value.children;
|
|
1211
|
+
I && I.length > 0 && [...I].forEach((A) => {
|
|
1212
1212
|
if (A instanceof HTMLDivElement) {
|
|
1213
1213
|
const H = A.getBoundingClientRect(), {
|
|
1214
1214
|
height: ue
|
|
1215
|
-
} = H, Z = Number(A.dataset.index), oe =
|
|
1215
|
+
} = H, Z = Number(A.dataset.index), oe = c.value[Z].height - ue;
|
|
1216
1216
|
if (oe) {
|
|
1217
|
-
|
|
1218
|
-
for (let C = Z + 1; C <
|
|
1219
|
-
|
|
1217
|
+
c.value[Z].bottom -= oe, c.value[Z].height = ue;
|
|
1218
|
+
for (let C = Z + 1; C < c.value.length; C++)
|
|
1219
|
+
c.value[C].top = c.value[C - 1].bottom, c.value[C].bottom -= oe;
|
|
1220
1220
|
}
|
|
1221
1221
|
}
|
|
1222
1222
|
});
|
|
1223
1223
|
};
|
|
1224
|
-
return
|
|
1224
|
+
return a({
|
|
1225
1225
|
...e,
|
|
1226
1226
|
checkIsScrollToBottom: E,
|
|
1227
|
-
loadData:
|
|
1227
|
+
loadData: b
|
|
1228
1228
|
}), K(() => {
|
|
1229
|
-
e.height !== "auto" ? (i.value = !1,
|
|
1230
|
-
}),
|
|
1231
|
-
var
|
|
1229
|
+
e.height !== "auto" ? (i.value = !1, l.value = r.value.clientHeight) : e.height === "auto" && (i.value = !0, l.value = document.documentElement.clientHeight, document.addEventListener("scroll", V)), e.virtual && (T(), X()), e.immediateCheck && E();
|
|
1230
|
+
}), pn(async () => {
|
|
1231
|
+
var I, A;
|
|
1232
1232
|
if (e.virtual && e.dynamicItemHeight) {
|
|
1233
|
-
if (await re(), !((A = (
|
|
1233
|
+
if (await re(), !((A = (I = f.value) == null ? void 0 : I.children) != null && A.length))
|
|
1234
1234
|
return;
|
|
1235
1235
|
le();
|
|
1236
1236
|
}
|
|
1237
|
-
}),
|
|
1238
|
-
i.value && document.removeEventListener("scroll",
|
|
1239
|
-
}), () =>
|
|
1237
|
+
}), we(() => {
|
|
1238
|
+
i.value && document.removeEventListener("scroll", V);
|
|
1239
|
+
}), () => u("div", {
|
|
1240
1240
|
ref: r,
|
|
1241
1241
|
class: `${se()} ${e.virtual ? se({
|
|
1242
1242
|
virtual: !0
|
|
1243
1243
|
}) : ""}`,
|
|
1244
1244
|
style: {
|
|
1245
|
-
height:
|
|
1245
|
+
height: y.value
|
|
1246
1246
|
},
|
|
1247
|
-
onScroll:
|
|
1248
|
-
}, [e.virtual &&
|
|
1247
|
+
onScroll: V
|
|
1248
|
+
}, [e.virtual && u("div", {
|
|
1249
1249
|
ref: v,
|
|
1250
1250
|
class: se("phantom"),
|
|
1251
1251
|
style: {
|
|
1252
|
-
height: `${
|
|
1252
|
+
height: `${d.value}px`
|
|
1253
1253
|
}
|
|
1254
|
-
}, null),
|
|
1255
|
-
ref:
|
|
1254
|
+
}, null), u("div", {
|
|
1255
|
+
ref: f,
|
|
1256
1256
|
class: se("content")
|
|
1257
|
-
}, [
|
|
1257
|
+
}, [g.value.map((I) => {
|
|
1258
1258
|
var A;
|
|
1259
|
-
return
|
|
1259
|
+
return u("div", {
|
|
1260
1260
|
ref: x,
|
|
1261
1261
|
class: se("item"),
|
|
1262
|
-
"data-index":
|
|
1262
|
+
"data-index": I._index
|
|
1263
1263
|
}, [(A = t.default) == null ? void 0 : A.call(t, {
|
|
1264
|
-
item:
|
|
1264
|
+
item: I
|
|
1265
1265
|
})]);
|
|
1266
|
-
})]), n.value === "loading" &&
|
|
1266
|
+
})]), n.value === "loading" && u("div", {
|
|
1267
1267
|
class: se({
|
|
1268
1268
|
loading: !0
|
|
1269
1269
|
})
|
|
1270
|
-
}, [t.loading ? t.loading() :
|
|
1270
|
+
}, [t.loading ? t.loading() : u(ft, {
|
|
1271
1271
|
"text-location": "right"
|
|
1272
1272
|
}, {
|
|
1273
|
-
default: () => [
|
|
1274
|
-
})]), n.value === "finished" &&
|
|
1273
|
+
default: () => [yn("加载中...")]
|
|
1274
|
+
})]), n.value === "finished" && u("div", {
|
|
1275
1275
|
class: se({
|
|
1276
1276
|
finished: !0
|
|
1277
1277
|
})
|
|
1278
|
-
}, [e.finishedText]), n.value === "error" &&
|
|
1278
|
+
}, [e.finishedText]), n.value === "error" && u("div", {
|
|
1279
1279
|
class: se("error"),
|
|
1280
1280
|
role: "presentation",
|
|
1281
|
-
onClick:
|
|
1281
|
+
onClick: b
|
|
1282
1282
|
}, [e.errorText])]);
|
|
1283
1283
|
}
|
|
1284
1284
|
});
|
|
1285
|
-
const
|
|
1286
|
-
const
|
|
1287
|
-
const
|
|
1288
|
-
const e = ne(), t =
|
|
1285
|
+
const Jn = M(Qn);
|
|
1286
|
+
const el = M(jt);
|
|
1287
|
+
const tl = M(Le), Ut = "y-form-item", nl = () => {
|
|
1288
|
+
const e = ne(), t = L();
|
|
1289
1289
|
return {
|
|
1290
1290
|
filed: t,
|
|
1291
|
-
initProvide: (
|
|
1292
|
-
|
|
1291
|
+
initProvide: (a) => {
|
|
1292
|
+
Pt(Ut, {
|
|
1293
1293
|
setField: (i) => {
|
|
1294
1294
|
i != null && i.proxy && (t.value = i);
|
|
1295
1295
|
},
|
|
1296
1296
|
instance: e,
|
|
1297
|
-
...
|
|
1297
|
+
...a
|
|
1298
1298
|
});
|
|
1299
1299
|
}
|
|
1300
1300
|
};
|
|
1301
|
-
},
|
|
1302
|
-
const e =
|
|
1301
|
+
}, me = () => {
|
|
1302
|
+
const e = zt(Ut, null), t = ne();
|
|
1303
1303
|
if (e && (t != null && t.proxy)) {
|
|
1304
|
-
const { setField: o } = e, { resetValidation:
|
|
1305
|
-
return
|
|
1304
|
+
const { setField: o } = e, { resetValidation: a, change: l, validateWithTrigger: i } = e;
|
|
1305
|
+
return U(
|
|
1306
1306
|
() => t.proxy.modelValue,
|
|
1307
1307
|
() => {
|
|
1308
|
-
e.instance && e.instance.exposed && (
|
|
1308
|
+
e.instance && e.instance.exposed && (a(), l(), i("onChange"));
|
|
1309
1309
|
}
|
|
1310
|
-
), o(t),
|
|
1310
|
+
), o(t), we(() => o(null)), {
|
|
1311
1311
|
parent: e
|
|
1312
1312
|
};
|
|
1313
1313
|
}
|
|
1314
1314
|
return {
|
|
1315
1315
|
parent: null
|
|
1316
1316
|
};
|
|
1317
|
-
}, [
|
|
1318
|
-
name:
|
|
1317
|
+
}, [ll, ze] = D("icon"), al = (e) => new RegExp(/\.(https|png|jpg|gif|jpeg|webp|apng)$/).test(e.toLowerCase()), ol = /* @__PURE__ */ _({
|
|
1318
|
+
name: ll,
|
|
1319
1319
|
props: {
|
|
1320
1320
|
dot: {
|
|
1321
1321
|
type: Boolean,
|
|
@@ -1366,8 +1366,8 @@ const Qn = D(Be), Yt = "y-form-item", Jn = () => {
|
|
|
1366
1366
|
slots: t,
|
|
1367
1367
|
emit: o
|
|
1368
1368
|
}) {
|
|
1369
|
-
const
|
|
1370
|
-
fontSize:
|
|
1369
|
+
const a = al(e.name), l = () => ({
|
|
1370
|
+
fontSize: R(e.size),
|
|
1371
1371
|
color: e.color
|
|
1372
1372
|
}), i = (n) => {
|
|
1373
1373
|
o("click", n);
|
|
@@ -1376,43 +1376,43 @@ const Qn = D(Be), Yt = "y-form-item", Jn = () => {
|
|
|
1376
1376
|
const {
|
|
1377
1377
|
name: n,
|
|
1378
1378
|
classPrefix: r,
|
|
1379
|
-
badge:
|
|
1379
|
+
badge: f,
|
|
1380
1380
|
dot: v,
|
|
1381
1381
|
subColor: x,
|
|
1382
|
-
subBg:
|
|
1383
|
-
tag:
|
|
1382
|
+
subBg: s,
|
|
1383
|
+
tag: h
|
|
1384
1384
|
} = e;
|
|
1385
|
-
return
|
|
1386
|
-
class: `${r}${
|
|
1387
|
-
style:
|
|
1385
|
+
return u(h, {
|
|
1386
|
+
class: `${r}${a ? "" : ` y-icon--${n}`}`,
|
|
1387
|
+
style: l(),
|
|
1388
1388
|
onClick: i
|
|
1389
1389
|
}, {
|
|
1390
1390
|
default: () => {
|
|
1391
|
-
var
|
|
1392
|
-
return [
|
|
1393
|
-
class:
|
|
1394
|
-
}, [
|
|
1395
|
-
class:
|
|
1391
|
+
var c;
|
|
1392
|
+
return [a ? u("em", {
|
|
1393
|
+
class: ze("node")
|
|
1394
|
+
}, [u("img", {
|
|
1395
|
+
class: ze("image"),
|
|
1396
1396
|
src: n,
|
|
1397
1397
|
alt: "icon"
|
|
1398
|
-
}, null)]) : null, v ?
|
|
1399
|
-
class:
|
|
1398
|
+
}, null)]) : null, v ? u("em", {
|
|
1399
|
+
class: ze("dot"),
|
|
1400
1400
|
style: {
|
|
1401
|
-
backgroundColor:
|
|
1401
|
+
backgroundColor: s
|
|
1402
1402
|
}
|
|
1403
|
-
}, null) : null,
|
|
1404
|
-
class:
|
|
1403
|
+
}, null) : null, f ? u("em", {
|
|
1404
|
+
class: ze("badge"),
|
|
1405
1405
|
style: {
|
|
1406
1406
|
color: x,
|
|
1407
|
-
backgroundColor:
|
|
1407
|
+
backgroundColor: s
|
|
1408
1408
|
}
|
|
1409
|
-
}, [
|
|
1409
|
+
}, [f]) : null, ((c = t.default) == null ? void 0 : c.call(t)) || null];
|
|
1410
1410
|
}
|
|
1411
1411
|
});
|
|
1412
1412
|
};
|
|
1413
1413
|
}
|
|
1414
1414
|
});
|
|
1415
|
-
const
|
|
1415
|
+
const ve = M(ol), il = {
|
|
1416
1416
|
/**
|
|
1417
1417
|
* @ignore
|
|
1418
1418
|
*/
|
|
@@ -1462,51 +1462,51 @@ const xe = D(nl), ll = {
|
|
|
1462
1462
|
type: Boolean,
|
|
1463
1463
|
default: !1
|
|
1464
1464
|
}
|
|
1465
|
-
}, [
|
|
1466
|
-
name:
|
|
1467
|
-
props:
|
|
1465
|
+
}, [Xt, rl] = D("checkbox-group"), qt = Xt, ul = /* @__PURE__ */ _({
|
|
1466
|
+
name: Xt,
|
|
1467
|
+
props: il,
|
|
1468
1468
|
setup(e, {
|
|
1469
1469
|
slots: t,
|
|
1470
1470
|
emit: o,
|
|
1471
|
-
expose:
|
|
1471
|
+
expose: a
|
|
1472
1472
|
}) {
|
|
1473
1473
|
const {
|
|
1474
|
-
initProvide:
|
|
1475
|
-
} =
|
|
1476
|
-
|
|
1474
|
+
initProvide: l
|
|
1475
|
+
} = fe(qt), i = F([]);
|
|
1476
|
+
me();
|
|
1477
1477
|
const n = (v) => {
|
|
1478
1478
|
o("update:modelValue", v), o("change", v);
|
|
1479
1479
|
}, r = (v) => {
|
|
1480
|
-
const x = [...e.modelValue],
|
|
1481
|
-
if (
|
|
1480
|
+
const x = [...e.modelValue], s = x.indexOf(v);
|
|
1481
|
+
if (s >= 0) {
|
|
1482
1482
|
if (e.min !== null && x.length <= e.min)
|
|
1483
1483
|
return;
|
|
1484
|
-
x.splice(
|
|
1484
|
+
x.splice(s, 1), n(x);
|
|
1485
1485
|
} else {
|
|
1486
1486
|
if (e.max !== null && x.length >= e.max)
|
|
1487
1487
|
return;
|
|
1488
1488
|
n([...x, v]);
|
|
1489
1489
|
}
|
|
1490
1490
|
};
|
|
1491
|
-
return
|
|
1491
|
+
return a({
|
|
1492
1492
|
toggleAll: (v = null) => {
|
|
1493
1493
|
n(v === null ? e.modelValue.length === 0 ? i : [] : v ? i : []);
|
|
1494
1494
|
}
|
|
1495
|
-
}),
|
|
1495
|
+
}), l({
|
|
1496
1496
|
props: e,
|
|
1497
1497
|
onItemChange: r,
|
|
1498
1498
|
allItemNames: i
|
|
1499
1499
|
}), () => {
|
|
1500
1500
|
var v;
|
|
1501
|
-
return
|
|
1502
|
-
class:
|
|
1501
|
+
return u("div", {
|
|
1502
|
+
class: rl({
|
|
1503
1503
|
horizontal: e.horizontal
|
|
1504
1504
|
})
|
|
1505
1505
|
}, [(v = t.default) == null ? void 0 : v.call(t)]);
|
|
1506
1506
|
};
|
|
1507
1507
|
}
|
|
1508
|
-
}), [
|
|
1509
|
-
name:
|
|
1508
|
+
}), [sl, Xe] = D("checkbox"), cl = /* @__PURE__ */ _({
|
|
1509
|
+
name: sl,
|
|
1510
1510
|
props: {
|
|
1511
1511
|
modelValue: {
|
|
1512
1512
|
type: Boolean,
|
|
@@ -1536,62 +1536,62 @@ const xe = D(nl), ll = {
|
|
|
1536
1536
|
setup(e, {
|
|
1537
1537
|
slots: t,
|
|
1538
1538
|
emit: o,
|
|
1539
|
-
expose:
|
|
1539
|
+
expose: a
|
|
1540
1540
|
}) {
|
|
1541
1541
|
const {
|
|
1542
|
-
parent:
|
|
1543
|
-
} =
|
|
1544
|
-
|
|
1545
|
-
const n = (
|
|
1546
|
-
var
|
|
1547
|
-
r.value || typeof
|
|
1542
|
+
parent: l
|
|
1543
|
+
} = ce(qt), i = l === null ? me().parent : null;
|
|
1544
|
+
l && l.allItemNames.push(e.name);
|
|
1545
|
+
const n = (d, g = null) => B(() => l && l.props[d] !== null ? l.props[d] : Object.keys(e).includes(d) ? e[d] : g), r = n("disabled"), f = n("square"), v = n("checkedColor"), x = n("horizontal", !1), s = B(() => l ? l.props.modelValue.includes(e.name) : e.modelValue), h = (d) => {
|
|
1546
|
+
var g;
|
|
1547
|
+
r.value || typeof d < "u" && s.value === d || ((g = l == null ? void 0 : l.onItemChange) == null || g.call(l, e.name), o("update:modelValue", !e.modelValue), o("change", !e.modelValue));
|
|
1548
1548
|
};
|
|
1549
|
-
|
|
1550
|
-
toggle:
|
|
1549
|
+
a({
|
|
1550
|
+
toggle: h
|
|
1551
1551
|
});
|
|
1552
|
-
const
|
|
1553
|
-
const
|
|
1554
|
-
return
|
|
1552
|
+
const c = B(() => ["mini", "small", "middle", "large"].includes(e.size.toString() || (i == null ? void 0 : i.getProp("size"))) ? null : R(e.size)), y = B(() => {
|
|
1553
|
+
const d = {};
|
|
1554
|
+
return c.value && (d.width = c.value, d.height = c.value), s.value && v.value && (d.backgroundColor = v.value), d;
|
|
1555
1555
|
});
|
|
1556
|
-
return
|
|
1557
|
-
if (!
|
|
1556
|
+
return xe(() => {
|
|
1557
|
+
if (!l)
|
|
1558
1558
|
return;
|
|
1559
|
-
const
|
|
1560
|
-
|
|
1559
|
+
const d = l.allItemNames.indexOf(e.name);
|
|
1560
|
+
d >= 0 && l.allItemNames.splice(d, 1);
|
|
1561
1561
|
}), () => {
|
|
1562
|
-
var
|
|
1562
|
+
var g, p;
|
|
1563
1563
|
const {
|
|
1564
|
-
size:
|
|
1564
|
+
size: d
|
|
1565
1565
|
} = e;
|
|
1566
|
-
return
|
|
1566
|
+
return u("div", {
|
|
1567
1567
|
class: Xe({
|
|
1568
1568
|
disabled: r.value,
|
|
1569
|
-
checked:
|
|
1569
|
+
checked: s.value,
|
|
1570
1570
|
horizontal: x.value,
|
|
1571
|
-
[
|
|
1571
|
+
[d]: ["mini", "small", "middle", "large"].includes(d.toString())
|
|
1572
1572
|
}),
|
|
1573
|
-
onClick: () =>
|
|
1573
|
+
onClick: () => h(),
|
|
1574
1574
|
role: "checkbox",
|
|
1575
|
-
"aria-checked":
|
|
1576
|
-
}, [((
|
|
1577
|
-
checked:
|
|
1578
|
-
})) ||
|
|
1575
|
+
"aria-checked": s.value
|
|
1576
|
+
}, [((g = t.icon) == null ? void 0 : g.call(t, {
|
|
1577
|
+
checked: s.value
|
|
1578
|
+
})) || u("div", {
|
|
1579
1579
|
class: Xe("icon", {
|
|
1580
|
-
checked:
|
|
1581
|
-
square:
|
|
1580
|
+
checked: s.value,
|
|
1581
|
+
square: f.value
|
|
1582
1582
|
}),
|
|
1583
|
-
style:
|
|
1584
|
-
}, [
|
|
1583
|
+
style: y.value
|
|
1584
|
+
}, [s.value ? u(ve, {
|
|
1585
1585
|
name: "done"
|
|
1586
|
-
}, null) : null]),
|
|
1586
|
+
}, null) : null]), u("div", {
|
|
1587
1587
|
class: Xe("label")
|
|
1588
|
-
}, [(
|
|
1588
|
+
}, [(p = t.default) == null ? void 0 : p.call(t)])]);
|
|
1589
1589
|
};
|
|
1590
1590
|
}
|
|
1591
1591
|
});
|
|
1592
|
-
const
|
|
1593
|
-
const
|
|
1594
|
-
name:
|
|
1592
|
+
const dl = M(cl);
|
|
1593
|
+
const fl = M(ul), [ml, xt] = D("switch"), vl = /* @__PURE__ */ _({
|
|
1594
|
+
name: ml,
|
|
1595
1595
|
props: {
|
|
1596
1596
|
size: {
|
|
1597
1597
|
type: [Number, String],
|
|
@@ -1632,12 +1632,12 @@ const sl = D(ol), [cl, wt] = M("switch"), dl = /* @__PURE__ */ z({
|
|
|
1632
1632
|
}) {
|
|
1633
1633
|
const {
|
|
1634
1634
|
parent: o
|
|
1635
|
-
} =
|
|
1635
|
+
} = me(), a = B(() => e.modelValue === e.activeValue), l = () => {
|
|
1636
1636
|
if (!e.disabled && !e.readonly) {
|
|
1637
|
-
const n =
|
|
1637
|
+
const n = a.value ? e.inactiveValue : e.activeValue;
|
|
1638
1638
|
t("update:modelValue", n), t("change", n);
|
|
1639
1639
|
}
|
|
1640
|
-
}, i =
|
|
1640
|
+
}, i = B(() => {
|
|
1641
1641
|
switch (e.size || (o == null ? void 0 : o.getProp("size")) || "middle") {
|
|
1642
1642
|
case "large":
|
|
1643
1643
|
return "34px";
|
|
@@ -1646,70 +1646,70 @@ const sl = D(ol), [cl, wt] = M("switch"), dl = /* @__PURE__ */ z({
|
|
|
1646
1646
|
case "small":
|
|
1647
1647
|
return "24px";
|
|
1648
1648
|
default:
|
|
1649
|
-
return
|
|
1649
|
+
return R(e.size);
|
|
1650
1650
|
}
|
|
1651
1651
|
});
|
|
1652
1652
|
return () => {
|
|
1653
1653
|
const {
|
|
1654
1654
|
disabled: n,
|
|
1655
1655
|
activeColor: r,
|
|
1656
|
-
inactiveColor:
|
|
1656
|
+
inactiveColor: f
|
|
1657
1657
|
} = e;
|
|
1658
|
-
return
|
|
1659
|
-
class:
|
|
1660
|
-
on:
|
|
1658
|
+
return u("div", {
|
|
1659
|
+
class: xt("", {
|
|
1660
|
+
on: a.value,
|
|
1661
1661
|
disabled: n
|
|
1662
1662
|
}),
|
|
1663
1663
|
style: {
|
|
1664
1664
|
fontSize: i.value,
|
|
1665
|
-
backgroundColor:
|
|
1665
|
+
backgroundColor: a.value ? r : f
|
|
1666
1666
|
},
|
|
1667
|
-
"aria-checked":
|
|
1668
|
-
onClick:
|
|
1667
|
+
"aria-checked": a.value,
|
|
1668
|
+
onClick: l,
|
|
1669
1669
|
role: "switch"
|
|
1670
|
-
}, [
|
|
1671
|
-
class:
|
|
1672
|
-
on:
|
|
1670
|
+
}, [u("div", {
|
|
1671
|
+
class: xt("node", {
|
|
1672
|
+
on: a.value,
|
|
1673
1673
|
disabled: n
|
|
1674
1674
|
})
|
|
1675
1675
|
}, null)]);
|
|
1676
1676
|
};
|
|
1677
1677
|
}
|
|
1678
1678
|
});
|
|
1679
|
-
const
|
|
1680
|
-
const
|
|
1679
|
+
const gl = M(vl), hl = (e, t, o, a) => {
|
|
1680
|
+
const l = Math.abs(e - o), i = Math.abs(t - a), n = Math.sqrt(l * l + i * i);
|
|
1681
1681
|
return 90 - Math.round(Math.asin(i / n) / Math.PI * 180);
|
|
1682
|
-
},
|
|
1682
|
+
}, pl = (e) => {
|
|
1683
1683
|
const t = e.currentTarget, o = e.target;
|
|
1684
|
-
let
|
|
1684
|
+
let a = !1;
|
|
1685
1685
|
if (t === o)
|
|
1686
|
-
return
|
|
1687
|
-
const
|
|
1688
|
-
i.offsetHeight !== i.scrollHeight && i.scrollTop !== 0 ?
|
|
1686
|
+
return a;
|
|
1687
|
+
const l = (i) => {
|
|
1688
|
+
i.offsetHeight !== i.scrollHeight && i.scrollTop !== 0 ? a = !0 : i.parentElement && i.parentElement !== t && l(i.parentElement);
|
|
1689
1689
|
};
|
|
1690
|
-
return o &&
|
|
1691
|
-
}, [
|
|
1692
|
-
name:
|
|
1690
|
+
return o && l(o), a;
|
|
1691
|
+
}, [yl, Ct] = D("pull-refresh"), ke = Ot("pull-refresh"), bl = 30, $t = 0.5, Sl = (e) => e < 60 ? 1 : 1 - (e - 60) / 600, wl = /* @__PURE__ */ _({
|
|
1692
|
+
name: yl,
|
|
1693
1693
|
props: {
|
|
1694
1694
|
pullingText: {
|
|
1695
1695
|
type: String,
|
|
1696
|
-
default:
|
|
1696
|
+
default: ke.pulling
|
|
1697
1697
|
},
|
|
1698
1698
|
loosingText: {
|
|
1699
1699
|
type: String,
|
|
1700
|
-
default:
|
|
1700
|
+
default: ke.loosing
|
|
1701
1701
|
},
|
|
1702
1702
|
loadingText: {
|
|
1703
1703
|
type: String,
|
|
1704
|
-
default:
|
|
1704
|
+
default: ke.loading
|
|
1705
1705
|
},
|
|
1706
1706
|
successText: {
|
|
1707
1707
|
type: String,
|
|
1708
|
-
default:
|
|
1708
|
+
default: ke.success
|
|
1709
1709
|
},
|
|
1710
1710
|
failedText: {
|
|
1711
1711
|
type: String,
|
|
1712
|
-
default:
|
|
1712
|
+
default: ke.failed
|
|
1713
1713
|
},
|
|
1714
1714
|
statusHeight: {
|
|
1715
1715
|
type: Number,
|
|
@@ -1723,83 +1723,83 @@ const fl = D(dl), ml = (e, t, o, l) => {
|
|
|
1723
1723
|
setup(e, {
|
|
1724
1724
|
slots: t,
|
|
1725
1725
|
emit: o,
|
|
1726
|
-
expose:
|
|
1726
|
+
expose: a
|
|
1727
1727
|
}) {
|
|
1728
|
-
const
|
|
1729
|
-
let i = 0, n = 0, r = 0,
|
|
1730
|
-
const v =
|
|
1728
|
+
const l = ne();
|
|
1729
|
+
let i = 0, n = 0, r = 0, f = null;
|
|
1730
|
+
const v = L(0), x = L(0), s = L(Y.DEFUALT), h = B(() => {
|
|
1731
1731
|
var w;
|
|
1732
|
-
const S = [...((w =
|
|
1732
|
+
const S = [...((w = l == null ? void 0 : l.proxy) == null ? void 0 : w.$el).childNodes];
|
|
1733
1733
|
return S == null ? void 0 : S.filter((N) => N.nodeType !== 3 || N.nodeValue !== "");
|
|
1734
|
-
}),
|
|
1735
|
-
|
|
1734
|
+
}), c = (m = "success") => {
|
|
1735
|
+
s.value = m, setTimeout(() => {
|
|
1736
1736
|
v.value = 0;
|
|
1737
1737
|
}, 500), setTimeout(() => {
|
|
1738
|
-
|
|
1738
|
+
s.value = Y.DEFUALT;
|
|
1739
1739
|
}, 1e3);
|
|
1740
|
-
},
|
|
1741
|
-
v.value = e.statusHeight, x.value =
|
|
1742
|
-
},
|
|
1743
|
-
i =
|
|
1744
|
-
},
|
|
1745
|
-
const S =
|
|
1746
|
-
r = w - n, (
|
|
1747
|
-
},
|
|
1748
|
-
|
|
1740
|
+
}, y = () => {
|
|
1741
|
+
v.value = e.statusHeight, x.value = $t, s.value = Y.LOADING, o("load", c);
|
|
1742
|
+
}, d = (m) => {
|
|
1743
|
+
i = m instanceof TouchEvent ? m.touches[0].pageX : m.pageX, n = m instanceof TouchEvent ? m.touches[0].pageY : m.pageY, h.value.length !== 2 || h.value[1].nodeType === 3 ? f = l == null ? void 0 : l.vnode.el : f = h.value[1], !e.disabled && !pl(m) && f.scrollTop === 0 && s.value === Y.DEFUALT && (s.value = Y.PULLING, v.value = 0, x.value = 0);
|
|
1744
|
+
}, g = (m) => {
|
|
1745
|
+
const S = m instanceof TouchEvent ? m.touches[0].pageX : m.pageX, w = m instanceof TouchEvent ? m.touches[0].pageY : m.pageY, N = hl(i, n, S, w);
|
|
1746
|
+
r = w - n, (s.value === Y.PULLING || s.value === Y.LOOSING) && r > 0 && N < bl && (m.preventDefault(), v.value = r * Sl(r), r > e.statusHeight && s.value === Y.PULLING && (s.value = Y.LOOSING));
|
|
1747
|
+
}, p = (m) => {
|
|
1748
|
+
s.value === Y.LOOSING ? (v.value = e.statusHeight, x.value = $t, s.value = Y.LOADING, o("load", c, m)) : s.value === Y.PULLING && (v.value = 0, s.value = Y.DEFUALT);
|
|
1749
1749
|
};
|
|
1750
1750
|
K(() => {
|
|
1751
|
-
const
|
|
1752
|
-
|
|
1751
|
+
const m = l == null ? void 0 : l.vnode.el;
|
|
1752
|
+
m == null || m.addEventListener("touchstart", d, {
|
|
1753
1753
|
passive: !1
|
|
1754
|
-
}),
|
|
1754
|
+
}), m == null || m.addEventListener("touchmove", g, {
|
|
1755
1755
|
passive: !1
|
|
1756
|
-
}),
|
|
1756
|
+
}), m == null || m.addEventListener("touchend", p, {
|
|
1757
1757
|
passive: !1
|
|
1758
|
-
}),
|
|
1758
|
+
}), m == null || m.addEventListener("mousedown", d, {
|
|
1759
1759
|
passive: !1
|
|
1760
|
-
}),
|
|
1760
|
+
}), m == null || m.addEventListener("mousemove", g, {
|
|
1761
1761
|
passive: !1
|
|
1762
|
-
}),
|
|
1762
|
+
}), m == null || m.addEventListener("mouseup", p, {
|
|
1763
1763
|
passive: !1
|
|
1764
|
-
}),
|
|
1764
|
+
}), m == null || m.addEventListener("mouseout", p, {
|
|
1765
1765
|
passive: !1
|
|
1766
1766
|
});
|
|
1767
|
-
}),
|
|
1768
|
-
const
|
|
1769
|
-
|
|
1767
|
+
}), we(() => {
|
|
1768
|
+
const m = l == null ? void 0 : l.vnode.el;
|
|
1769
|
+
m == null || m.removeEventListener("touchstart", d), m == null || m.removeEventListener("touchmove", g), m == null || m.removeEventListener("touchend", p), m == null || m.removeEventListener("mousedown", d), m == null || m.removeEventListener("mousemove", g), m == null || m.removeEventListener("mouseup", p), m == null || m.removeEventListener("mouseout", p);
|
|
1770
1770
|
});
|
|
1771
1771
|
const $ = () => {
|
|
1772
|
-
var
|
|
1773
|
-
return
|
|
1772
|
+
var m;
|
|
1773
|
+
return s.value === Y.DEFUALT ? null : t[s.value] ? (m = t[s.value]) == null ? void 0 : m.call(t) : u("p", null, [e[`${s.value}Text`]]);
|
|
1774
1774
|
};
|
|
1775
|
-
return
|
|
1776
|
-
refresh:
|
|
1775
|
+
return a({
|
|
1776
|
+
refresh: y
|
|
1777
1777
|
}), () => {
|
|
1778
|
-
var
|
|
1778
|
+
var b;
|
|
1779
1779
|
const {
|
|
1780
|
-
statusHeight:
|
|
1781
|
-
} = e, S = v.value >
|
|
1782
|
-
return
|
|
1783
|
-
class:
|
|
1780
|
+
statusHeight: m
|
|
1781
|
+
} = e, S = v.value > m ? m : v.value, w = `all ${x.value}s ease 0s`, N = `translate3d(0, ${-v.value}px, 0)`;
|
|
1782
|
+
return u("div", {
|
|
1783
|
+
class: Ct(),
|
|
1784
1784
|
style: {
|
|
1785
1785
|
WebkitTransform: `translate3d(0, ${v.value}px, 0)`,
|
|
1786
1786
|
transform: `translate3d(0, ${v.value}px, 0)`,
|
|
1787
1787
|
transition: w
|
|
1788
1788
|
}
|
|
1789
|
-
}, [
|
|
1790
|
-
class:
|
|
1789
|
+
}, [u("div", {
|
|
1790
|
+
class: Ct("status"),
|
|
1791
1791
|
style: {
|
|
1792
1792
|
height: `${S}px`,
|
|
1793
|
-
WebkitTransform: `${N} scale(${S /
|
|
1794
|
-
transform: `${N} scale(${S /
|
|
1793
|
+
WebkitTransform: `${N} scale(${S / m})`,
|
|
1794
|
+
transform: `${N} scale(${S / m})`,
|
|
1795
1795
|
transition: w
|
|
1796
1796
|
}
|
|
1797
|
-
}, [$()]), (
|
|
1797
|
+
}, [$()]), (b = t.default) == null ? void 0 : b.call(t)]);
|
|
1798
1798
|
};
|
|
1799
1799
|
}
|
|
1800
1800
|
});
|
|
1801
|
-
const
|
|
1802
|
-
name:
|
|
1801
|
+
const xl = M(wl), [Cl, he, $l] = D("cell"), kl = /* @__PURE__ */ _({
|
|
1802
|
+
name: Cl,
|
|
1803
1803
|
props: {
|
|
1804
1804
|
tag: {
|
|
1805
1805
|
type: String,
|
|
@@ -1819,12 +1819,12 @@ const bl = D(yl), [Sl, me, wl] = M("cell"), xl = /* @__PURE__ */ z({
|
|
|
1819
1819
|
},
|
|
1820
1820
|
size: {
|
|
1821
1821
|
type: String,
|
|
1822
|
-
default:
|
|
1822
|
+
default: At.Middle
|
|
1823
1823
|
},
|
|
1824
1824
|
// 垂直对齐方式
|
|
1825
1825
|
vertical: {
|
|
1826
1826
|
type: String,
|
|
1827
|
-
default:
|
|
1827
|
+
default: ct.Middle
|
|
1828
1828
|
},
|
|
1829
1829
|
// 是否有 border
|
|
1830
1830
|
border: {
|
|
@@ -1846,54 +1846,54 @@ const bl = D(yl), [Sl, me, wl] = M("cell"), xl = /* @__PURE__ */ z({
|
|
|
1846
1846
|
slots: t,
|
|
1847
1847
|
emit: o
|
|
1848
1848
|
}) {
|
|
1849
|
-
const
|
|
1850
|
-
o("click",
|
|
1849
|
+
const a = (l) => {
|
|
1850
|
+
o("click", l);
|
|
1851
1851
|
};
|
|
1852
1852
|
return () => {
|
|
1853
1853
|
const {
|
|
1854
|
-
tag:
|
|
1854
|
+
tag: l,
|
|
1855
1855
|
vertical: i,
|
|
1856
1856
|
border: n,
|
|
1857
1857
|
size: r,
|
|
1858
|
-
title:
|
|
1858
|
+
title: f,
|
|
1859
1859
|
icon: v,
|
|
1860
1860
|
label: x,
|
|
1861
|
-
value:
|
|
1862
|
-
clickable:
|
|
1863
|
-
} = e,
|
|
1864
|
-
return
|
|
1865
|
-
class: [
|
|
1861
|
+
value: s,
|
|
1862
|
+
clickable: h
|
|
1863
|
+
} = e, c = l === "a" ? !0 : h;
|
|
1864
|
+
return u(l, {
|
|
1865
|
+
class: [he({
|
|
1866
1866
|
[`is-${i}`]: i,
|
|
1867
1867
|
[r]: r,
|
|
1868
1868
|
hairline: n
|
|
1869
|
-
}),
|
|
1870
|
-
clickable:
|
|
1869
|
+
}), $l("el", {
|
|
1870
|
+
clickable: c
|
|
1871
1871
|
})],
|
|
1872
|
-
onClick:
|
|
1872
|
+
onClick: a
|
|
1873
1873
|
}, {
|
|
1874
1874
|
default: () => {
|
|
1875
|
-
var
|
|
1876
|
-
return [(
|
|
1877
|
-
class:
|
|
1875
|
+
var y, d;
|
|
1876
|
+
return [(y = t.left) == null ? void 0 : y.call(t), u("div", {
|
|
1877
|
+
class: he("center", {
|
|
1878
1878
|
"has-left": t.left
|
|
1879
1879
|
})
|
|
1880
|
-
}, [t.center ? t.center() : [
|
|
1881
|
-
class:
|
|
1882
|
-
}, [
|
|
1883
|
-
class:
|
|
1884
|
-
}, [x])]]), t.default ? t.default() :
|
|
1885
|
-
class:
|
|
1886
|
-
}, [
|
|
1880
|
+
}, [t.center ? t.center() : [u("h4", {
|
|
1881
|
+
class: he("title")
|
|
1882
|
+
}, [f]), u("p", {
|
|
1883
|
+
class: he("label")
|
|
1884
|
+
}, [x])]]), t.default ? t.default() : u("div", {
|
|
1885
|
+
class: he("value")
|
|
1886
|
+
}, [s]), ((d = t.right) == null ? void 0 : d.call(t)) || v && u(ve, {
|
|
1887
1887
|
name: v,
|
|
1888
|
-
class:
|
|
1888
|
+
class: he("icon")
|
|
1889
1889
|
}, null)];
|
|
1890
1890
|
}
|
|
1891
1891
|
});
|
|
1892
1892
|
};
|
|
1893
1893
|
}
|
|
1894
1894
|
});
|
|
1895
|
-
const
|
|
1896
|
-
name:
|
|
1895
|
+
const Gt = M(kl), [Nl, Ne, El] = D("button"), Tl = /* @__PURE__ */ _({
|
|
1896
|
+
name: Nl,
|
|
1897
1897
|
props: {
|
|
1898
1898
|
// 标签
|
|
1899
1899
|
tag: {
|
|
@@ -1961,78 +1961,78 @@ const qt = D(xl), [Cl, ke, $l] = M("button"), kl = /* @__PURE__ */ z({
|
|
|
1961
1961
|
slots: t,
|
|
1962
1962
|
emit: o
|
|
1963
1963
|
}) {
|
|
1964
|
-
const
|
|
1965
|
-
o("click",
|
|
1964
|
+
const a = (l) => {
|
|
1965
|
+
o("click", l);
|
|
1966
1966
|
};
|
|
1967
1967
|
return () => {
|
|
1968
1968
|
let {
|
|
1969
|
-
tag:
|
|
1969
|
+
tag: l
|
|
1970
1970
|
} = e;
|
|
1971
1971
|
const {
|
|
1972
1972
|
radius: i,
|
|
1973
1973
|
type: n,
|
|
1974
1974
|
size: r,
|
|
1975
|
-
disabled:
|
|
1975
|
+
disabled: f,
|
|
1976
1976
|
shadow: v,
|
|
1977
1977
|
block: x,
|
|
1978
|
-
square:
|
|
1979
|
-
semicircle:
|
|
1980
|
-
danger:
|
|
1981
|
-
text:
|
|
1982
|
-
supplementText:
|
|
1983
|
-
} = e,
|
|
1984
|
-
return
|
|
1985
|
-
class: [
|
|
1978
|
+
square: s,
|
|
1979
|
+
semicircle: h,
|
|
1980
|
+
danger: c,
|
|
1981
|
+
text: y,
|
|
1982
|
+
supplementText: d
|
|
1983
|
+
} = e, g = t.default ? t.default() : y;
|
|
1984
|
+
return l = n === "link" ? "a" : l, u(l, {
|
|
1985
|
+
class: [Ne([n, r, {
|
|
1986
1986
|
block: x,
|
|
1987
|
-
square:
|
|
1988
|
-
semicircle:
|
|
1989
|
-
disabled:
|
|
1990
|
-
}, (n === "primary" || n === "secondary") && v ? `shadow_${v}` : "",
|
|
1987
|
+
square: s,
|
|
1988
|
+
semicircle: h,
|
|
1989
|
+
disabled: f && l === "a"
|
|
1990
|
+
}, (n === "primary" || n === "secondary") && v ? `shadow_${v}` : "", c ? `${n}_danger` : "", f ? `${n}_disabled` : ""]), El("el", "clickable")],
|
|
1991
1991
|
style: {
|
|
1992
|
-
borderRadius:
|
|
1992
|
+
borderRadius: R(i)
|
|
1993
1993
|
},
|
|
1994
|
-
disabled:
|
|
1995
|
-
onClick:
|
|
1994
|
+
disabled: f,
|
|
1995
|
+
onClick: a
|
|
1996
1996
|
}, {
|
|
1997
1997
|
default: () => {
|
|
1998
|
-
var
|
|
1999
|
-
return [
|
|
2000
|
-
class:
|
|
2001
|
-
}, [((
|
|
2002
|
-
class:
|
|
2003
|
-
}, [
|
|
2004
|
-
class:
|
|
2005
|
-
}, [
|
|
2006
|
-
class:
|
|
2007
|
-
}, [
|
|
1998
|
+
var p, $;
|
|
1999
|
+
return [u("div", {
|
|
2000
|
+
class: Ne("content")
|
|
2001
|
+
}, [((p = t.leftIcon) == null ? void 0 : p.call(t)) || null, g && u(He, null, [d ? u("div", {
|
|
2002
|
+
class: Ne("text")
|
|
2003
|
+
}, [u("p", null, [g]), u("p", {
|
|
2004
|
+
class: Ne("subtext")
|
|
2005
|
+
}, [d])]) : u("span", {
|
|
2006
|
+
class: Ne("text")
|
|
2007
|
+
}, [g])]), (($ = t.rightIcon) == null ? void 0 : $.call(t)) || null])];
|
|
2008
2008
|
}
|
|
2009
2009
|
});
|
|
2010
2010
|
};
|
|
2011
2011
|
}
|
|
2012
2012
|
});
|
|
2013
|
-
const
|
|
2013
|
+
const tt = M(Tl), Bl = {
|
|
2014
2014
|
position: "fixed"
|
|
2015
2015
|
};
|
|
2016
|
-
let
|
|
2017
|
-
const
|
|
2018
|
-
const
|
|
2019
|
-
render: () =>
|
|
2020
|
-
}),
|
|
2021
|
-
return
|
|
2022
|
-
},
|
|
2016
|
+
let Ee = null;
|
|
2017
|
+
const Kt = (e, t) => {
|
|
2018
|
+
const a = Ce({
|
|
2019
|
+
render: () => Ve(ft, { ...e }, { ...t })
|
|
2020
|
+
}), l = document.createElement("div");
|
|
2021
|
+
return a.mount(l);
|
|
2022
|
+
}, Ll = {
|
|
2023
2023
|
/**
|
|
2024
2024
|
* @description: show
|
|
2025
2025
|
* @param {LoadingPropsType} options
|
|
2026
2026
|
* @return {*}
|
|
2027
2027
|
*/
|
|
2028
2028
|
show: (e, t) => {
|
|
2029
|
-
|
|
2029
|
+
Ee || (Ee = Kt(
|
|
2030
2030
|
{
|
|
2031
|
-
...
|
|
2031
|
+
...Bl,
|
|
2032
2032
|
...e
|
|
2033
2033
|
},
|
|
2034
2034
|
t
|
|
2035
|
-
)), document.body.appendChild(
|
|
2035
|
+
)), document.body.appendChild(Ee.$el);
|
|
2036
2036
|
},
|
|
2037
2037
|
/**
|
|
2038
2038
|
* @description: hide
|
|
@@ -2040,38 +2040,38 @@ const Gt = (e, t) => {
|
|
|
2040
2040
|
* @return {*}
|
|
2041
2041
|
*/
|
|
2042
2042
|
hide: () => {
|
|
2043
|
-
|
|
2043
|
+
Ee && Ee.$el.remove();
|
|
2044
2044
|
}
|
|
2045
|
-
},
|
|
2045
|
+
}, kt = (e, t) => {
|
|
2046
2046
|
t.value ? (e.classList.add("y-loading__wrap"), e.appendChild(e.instance.$el)) : (e.classList.remove("y-loading__wrap"), e.removeChild(e.instance.$el));
|
|
2047
|
-
},
|
|
2047
|
+
}, Vl = {
|
|
2048
2048
|
install: (e) => {
|
|
2049
|
-
e.directive("loading",
|
|
2049
|
+
e.directive("loading", Zt), e.directive("loading-props", Il), e.directive("loading-slots", Pl);
|
|
2050
2050
|
}
|
|
2051
|
-
},
|
|
2051
|
+
}, Zt = {
|
|
2052
2052
|
getSSRProps: (e) => ({ ...e }),
|
|
2053
2053
|
mounted: (e, t) => {
|
|
2054
|
-
e.instance =
|
|
2054
|
+
e.instance = Kt({ ...e.customProps }, { ...e.customSlots }), t.value && kt(e, t);
|
|
2055
2055
|
},
|
|
2056
2056
|
updated: (e, t) => {
|
|
2057
|
-
t.oldValue !== t.value &&
|
|
2057
|
+
t.oldValue !== t.value && kt(e, t);
|
|
2058
2058
|
},
|
|
2059
2059
|
unmounted: (e) => {
|
|
2060
2060
|
e.instance && e.instance.$el.remove();
|
|
2061
2061
|
}
|
|
2062
|
-
},
|
|
2062
|
+
}, Il = {
|
|
2063
2063
|
getSSRProps: (e) => ({ ...e }),
|
|
2064
2064
|
beforeMount: (e, t) => {
|
|
2065
2065
|
e.customProps = { ...t.value };
|
|
2066
2066
|
}
|
|
2067
|
-
},
|
|
2067
|
+
}, Pl = {
|
|
2068
2068
|
getSSRProps: (e) => ({ ...e }),
|
|
2069
2069
|
beforeMount: (e, t) => {
|
|
2070
2070
|
e.customSlots = { ...t.value };
|
|
2071
2071
|
}
|
|
2072
2072
|
};
|
|
2073
|
-
const
|
|
2074
|
-
name:
|
|
2073
|
+
const zl = M(ft), [Qt, _l] = D("row"), Jt = Qt, Dl = /* @__PURE__ */ _({
|
|
2074
|
+
name: Qt,
|
|
2075
2075
|
props: {
|
|
2076
2076
|
type: {
|
|
2077
2077
|
type: String,
|
|
@@ -2084,11 +2084,11 @@ const Il = D(dt), [Zt, Vl] = M("row"), Qt = Zt, Pl = /* @__PURE__ */ z({
|
|
|
2084
2084
|
},
|
|
2085
2085
|
align: {
|
|
2086
2086
|
type: String,
|
|
2087
|
-
default:
|
|
2087
|
+
default: ct.Top
|
|
2088
2088
|
},
|
|
2089
2089
|
justify: {
|
|
2090
2090
|
type: String,
|
|
2091
|
-
default:
|
|
2091
|
+
default: Ft.Start
|
|
2092
2092
|
}
|
|
2093
2093
|
},
|
|
2094
2094
|
setup(e, {
|
|
@@ -2096,55 +2096,55 @@ const Il = D(dt), [Zt, Vl] = M("row"), Qt = Zt, Pl = /* @__PURE__ */ z({
|
|
|
2096
2096
|
}) {
|
|
2097
2097
|
const {
|
|
2098
2098
|
children: o,
|
|
2099
|
-
initProvide:
|
|
2100
|
-
} =
|
|
2099
|
+
initProvide: a
|
|
2100
|
+
} = fe(Jt), l = B(() => {
|
|
2101
2101
|
const n = [[]];
|
|
2102
2102
|
let r = 0;
|
|
2103
|
-
return o.forEach((
|
|
2103
|
+
return o.forEach((f, v) => {
|
|
2104
2104
|
var x;
|
|
2105
|
-
r += Number((x =
|
|
2105
|
+
r += Number((x = f.proxy) == null ? void 0 : x.span), r > 24 ? (n.push([v]), r -= 24) : n[n.length - 1].push(v);
|
|
2106
2106
|
}), n;
|
|
2107
|
-
}), i =
|
|
2107
|
+
}), i = B(() => {
|
|
2108
2108
|
const n = Number(e.gutter), r = [];
|
|
2109
|
-
return n &&
|
|
2110
|
-
const v = n * (
|
|
2111
|
-
|
|
2112
|
-
if (
|
|
2109
|
+
return n && l.value.forEach((f) => {
|
|
2110
|
+
const v = n * (f.length - 1) / f.length;
|
|
2111
|
+
f.forEach((x, s) => {
|
|
2112
|
+
if (s === 0)
|
|
2113
2113
|
r.push({
|
|
2114
2114
|
right: v,
|
|
2115
2115
|
left: 0
|
|
2116
2116
|
});
|
|
2117
2117
|
else {
|
|
2118
|
-
const
|
|
2118
|
+
const h = n - r[x - 1].right, c = v - h;
|
|
2119
2119
|
r.push({
|
|
2120
|
-
left:
|
|
2121
|
-
right:
|
|
2120
|
+
left: h,
|
|
2121
|
+
right: c
|
|
2122
2122
|
});
|
|
2123
2123
|
}
|
|
2124
2124
|
});
|
|
2125
2125
|
}), r;
|
|
2126
2126
|
});
|
|
2127
|
-
return
|
|
2127
|
+
return a({
|
|
2128
2128
|
spaceList: i
|
|
2129
2129
|
}), () => {
|
|
2130
2130
|
var v;
|
|
2131
2131
|
const {
|
|
2132
2132
|
type: n,
|
|
2133
2133
|
align: r,
|
|
2134
|
-
justify:
|
|
2134
|
+
justify: f
|
|
2135
2135
|
} = e;
|
|
2136
|
-
return
|
|
2137
|
-
class:
|
|
2136
|
+
return u("div", {
|
|
2137
|
+
class: _l({
|
|
2138
2138
|
[n]: n,
|
|
2139
2139
|
[`align-${r}`]: n && r,
|
|
2140
|
-
[`justify-${
|
|
2140
|
+
[`justify-${f}`]: n && f
|
|
2141
2141
|
})
|
|
2142
2142
|
}, [(v = t.default) == null ? void 0 : v.call(t)]);
|
|
2143
2143
|
};
|
|
2144
2144
|
}
|
|
2145
2145
|
});
|
|
2146
|
-
const
|
|
2147
|
-
name:
|
|
2146
|
+
const Ml = M(Dl), [Ol, Al] = D("col"), Rl = /* @__PURE__ */ _({
|
|
2147
|
+
name: Ol,
|
|
2148
2148
|
props: {
|
|
2149
2149
|
// 列数
|
|
2150
2150
|
span: {
|
|
@@ -2162,8 +2162,8 @@ const _l = D(Pl), [zl, Ml] = M("col"), Dl = /* @__PURE__ */ z({
|
|
|
2162
2162
|
}) {
|
|
2163
2163
|
const {
|
|
2164
2164
|
parent: o,
|
|
2165
|
-
index:
|
|
2166
|
-
} =
|
|
2165
|
+
index: a
|
|
2166
|
+
} = ce(Jt), l = B(() => {
|
|
2167
2167
|
if (!o)
|
|
2168
2168
|
return {};
|
|
2169
2169
|
const {
|
|
@@ -2173,11 +2173,11 @@ const _l = D(Pl), [zl, Ml] = M("col"), Dl = /* @__PURE__ */ z({
|
|
|
2173
2173
|
return {};
|
|
2174
2174
|
const {
|
|
2175
2175
|
left: r,
|
|
2176
|
-
right:
|
|
2177
|
-
} = n[
|
|
2176
|
+
right: f
|
|
2177
|
+
} = n[a.value] || {};
|
|
2178
2178
|
return {
|
|
2179
2179
|
paddingLeft: r ? `${r}px` : 0,
|
|
2180
|
-
paddingRight:
|
|
2180
|
+
paddingRight: f ? `${f}px` : 0
|
|
2181
2181
|
};
|
|
2182
2182
|
});
|
|
2183
2183
|
return () => {
|
|
@@ -2186,9 +2186,9 @@ const _l = D(Pl), [zl, Ml] = M("col"), Dl = /* @__PURE__ */ z({
|
|
|
2186
2186
|
span: i,
|
|
2187
2187
|
offset: n
|
|
2188
2188
|
} = e;
|
|
2189
|
-
return
|
|
2190
|
-
style:
|
|
2191
|
-
class:
|
|
2189
|
+
return u("div", {
|
|
2190
|
+
style: l.value,
|
|
2191
|
+
class: Al({
|
|
2192
2192
|
[i]: i,
|
|
2193
2193
|
[`offset-${n}`]: n
|
|
2194
2194
|
})
|
|
@@ -2196,15 +2196,15 @@ const _l = D(Pl), [zl, Ml] = M("col"), Dl = /* @__PURE__ */ z({
|
|
|
2196
2196
|
};
|
|
2197
2197
|
}
|
|
2198
2198
|
});
|
|
2199
|
-
const
|
|
2199
|
+
const Wl = M(Rl), Nt = F({}), en = {
|
|
2200
2200
|
add(e, t) {
|
|
2201
|
-
Object.assign(
|
|
2201
|
+
Object.assign(Nt, { [e]: t });
|
|
2202
2202
|
},
|
|
2203
2203
|
use(e) {
|
|
2204
|
-
return
|
|
2204
|
+
return Nt[e];
|
|
2205
2205
|
}
|
|
2206
|
-
}, [
|
|
2207
|
-
name:
|
|
2206
|
+
}, [Fl, Te] = D("empty"), Hl = "https://imgservices-1252317822.image.myqcloud.com/image/20200820/q4wu13xxky.png", Yl = /* @__PURE__ */ _({
|
|
2207
|
+
name: Fl,
|
|
2208
2208
|
props: {
|
|
2209
2209
|
type: {
|
|
2210
2210
|
type: String,
|
|
@@ -2229,27 +2229,27 @@ const Ol = D(Dl), kt = F({}), Jt = {
|
|
|
2229
2229
|
return () => {
|
|
2230
2230
|
const {
|
|
2231
2231
|
type: o
|
|
2232
|
-
} = e,
|
|
2233
|
-
return
|
|
2234
|
-
class:
|
|
2235
|
-
}, [
|
|
2236
|
-
class:
|
|
2237
|
-
src:
|
|
2232
|
+
} = e, a = en.use(o), l = e.imgUrl || (a == null ? void 0 : a.imgUrl) || Hl, i = e.title || (a == null ? void 0 : a.title), n = e.subTitle || (a == null ? void 0 : a.subTitle), r = t.default || (a == null ? void 0 : a.slot), f = t.img || (a == null ? void 0 : a.imgSlot), v = t.titleIcon || (a == null ? void 0 : a.titleIconSlot);
|
|
2233
|
+
return u("div", {
|
|
2234
|
+
class: Te()
|
|
2235
|
+
}, [f ? f() : l && u("img", {
|
|
2236
|
+
class: Te("img"),
|
|
2237
|
+
src: l,
|
|
2238
2238
|
alt: "状态"
|
|
2239
|
-
}, null),
|
|
2240
|
-
class:
|
|
2241
|
-
}, [
|
|
2242
|
-
class:
|
|
2239
|
+
}, null), u("h6", {
|
|
2240
|
+
class: Te("title")
|
|
2241
|
+
}, [u("span", {
|
|
2242
|
+
class: Te("title-text", {
|
|
2243
2243
|
"has-icon": v
|
|
2244
2244
|
})
|
|
2245
|
-
}, [i]), v == null ? void 0 : v()]),
|
|
2246
|
-
class:
|
|
2245
|
+
}, [i]), v == null ? void 0 : v()]), u("p", {
|
|
2246
|
+
class: Te("sub-title")
|
|
2247
2247
|
}, [n]), r == null ? void 0 : r()]);
|
|
2248
2248
|
};
|
|
2249
2249
|
}
|
|
2250
2250
|
});
|
|
2251
|
-
const
|
|
2252
|
-
name:
|
|
2251
|
+
const jl = M(Yl), [Ul, de] = D("progress"), Xl = /* @__PURE__ */ _({
|
|
2252
|
+
name: Ul,
|
|
2253
2253
|
props: {
|
|
2254
2254
|
// 进度
|
|
2255
2255
|
percent: {
|
|
@@ -2325,7 +2325,7 @@ const Fl = D(Wl), [Hl, ce] = M("progress"), Ul = /* @__PURE__ */ z({
|
|
|
2325
2325
|
setup(e, {
|
|
2326
2326
|
slots: t
|
|
2327
2327
|
}) {
|
|
2328
|
-
const o =
|
|
2328
|
+
const o = L(null), a = L(null), l = L([]), i = F({
|
|
2329
2329
|
progressWidth: 0,
|
|
2330
2330
|
pivotContentWidth: 0,
|
|
2331
2331
|
mileageWidth: []
|
|
@@ -2335,131 +2335,131 @@ const Fl = D(Wl), [Hl, ce] = M("progress"), Ul = /* @__PURE__ */ z({
|
|
|
2335
2335
|
timer: 0
|
|
2336
2336
|
});
|
|
2337
2337
|
K(() => {
|
|
2338
|
-
|
|
2339
|
-
}),
|
|
2340
|
-
|
|
2341
|
-
}),
|
|
2342
|
-
n.timer && cancelAnimationFrame(n.timer), window.removeEventListener("resize",
|
|
2343
|
-
}),
|
|
2338
|
+
f(), e.animation && r(), window.addEventListener("resize", f);
|
|
2339
|
+
}), ut(() => {
|
|
2340
|
+
l.value = [];
|
|
2341
|
+
}), we(() => {
|
|
2342
|
+
n.timer && cancelAnimationFrame(n.timer), window.removeEventListener("resize", f);
|
|
2343
|
+
}), U(() => e.percent, () => {
|
|
2344
2344
|
r(), v();
|
|
2345
2345
|
});
|
|
2346
2346
|
const r = () => {
|
|
2347
2347
|
const {
|
|
2348
|
-
duration:
|
|
2349
|
-
percent:
|
|
2350
|
-
} = e,
|
|
2351
|
-
if (
|
|
2348
|
+
duration: c,
|
|
2349
|
+
percent: y
|
|
2350
|
+
} = e, d = Math.abs(y - n.oldPercent) / (c / 16);
|
|
2351
|
+
if (d === 0)
|
|
2352
2352
|
return;
|
|
2353
|
-
let
|
|
2354
|
-
const
|
|
2355
|
-
|
|
2353
|
+
let g = Number(n.oldPercent);
|
|
2354
|
+
const p = () => {
|
|
2355
|
+
y > n.oldPercent ? g += d : g -= d, y > n.oldPercent && g > y || y < n.oldPercent && g < y ? g = y : n.timer = requestAnimationFrame(p), n.oldPercent = g, n.number = parseInt(g.toString());
|
|
2356
2356
|
};
|
|
2357
|
-
n.timer && cancelAnimationFrame(n.timer), n.timer = requestAnimationFrame(
|
|
2357
|
+
n.timer && cancelAnimationFrame(n.timer), n.timer = requestAnimationFrame(p);
|
|
2358
2358
|
};
|
|
2359
|
-
|
|
2360
|
-
const
|
|
2359
|
+
U(() => e.mileages, () => x);
|
|
2360
|
+
const f = () => {
|
|
2361
2361
|
v(), x();
|
|
2362
2362
|
}, v = () => {
|
|
2363
2363
|
re(() => {
|
|
2364
|
-
i.progressWidth = o.value && o.value.offsetWidth || 0, i.pivotContentWidth =
|
|
2365
|
-
}).catch((
|
|
2366
|
-
throw new Error(
|
|
2364
|
+
i.progressWidth = o.value && o.value.offsetWidth || 0, i.pivotContentWidth = a.value && a.value.offsetWidth || 0;
|
|
2365
|
+
}).catch((c) => {
|
|
2366
|
+
throw new Error(c);
|
|
2367
2367
|
});
|
|
2368
2368
|
}, x = () => {
|
|
2369
2369
|
re(() => {
|
|
2370
|
-
e.mileages.forEach((
|
|
2371
|
-
i.mileageWidth[
|
|
2370
|
+
e.mileages.forEach((c, y) => {
|
|
2371
|
+
i.mileageWidth[y] = l.value[y] && l.value[y].offsetWidth || 0;
|
|
2372
2372
|
});
|
|
2373
|
-
}).catch((
|
|
2374
|
-
throw new Error(
|
|
2373
|
+
}).catch((c) => {
|
|
2374
|
+
throw new Error(c);
|
|
2375
2375
|
});
|
|
2376
|
-
},
|
|
2377
|
-
var
|
|
2376
|
+
}, s = () => {
|
|
2377
|
+
var p;
|
|
2378
2378
|
const {
|
|
2379
|
-
mileages:
|
|
2380
|
-
percent:
|
|
2381
|
-
animation:
|
|
2382
|
-
} = e,
|
|
2383
|
-
for (let $ = 0; $ <
|
|
2384
|
-
|
|
2385
|
-
ref: (
|
|
2386
|
-
|
|
2379
|
+
mileages: c,
|
|
2380
|
+
percent: y,
|
|
2381
|
+
animation: d
|
|
2382
|
+
} = e, g = [];
|
|
2383
|
+
for (let $ = 0; $ < c.length; $++)
|
|
2384
|
+
g[$] = u("div", {
|
|
2385
|
+
ref: (m) => {
|
|
2386
|
+
m && (l.value[$] = m);
|
|
2387
2387
|
},
|
|
2388
|
-
class: [
|
|
2388
|
+
class: [de("pivot-content", (d ? n.number : y) >= c[$] ? "arrive" : "no-arrive")],
|
|
2389
2389
|
key: `mileage${$}`,
|
|
2390
2390
|
style: {
|
|
2391
|
-
left: `${(i.progressWidth - i.mileageWidth[$]) *
|
|
2391
|
+
left: `${(i.progressWidth - i.mileageWidth[$]) * c[$] / 100}px`
|
|
2392
2392
|
}
|
|
2393
|
-
}, [((
|
|
2394
|
-
class:
|
|
2395
|
-
}, [`${
|
|
2396
|
-
return
|
|
2397
|
-
},
|
|
2393
|
+
}, [((p = t.mileage) == null ? void 0 : p.call(t)) || u("div", {
|
|
2394
|
+
class: de("pivot")
|
|
2395
|
+
}, [`${c[$]}%`])]);
|
|
2396
|
+
return g;
|
|
2397
|
+
}, h = () => {
|
|
2398
2398
|
var $;
|
|
2399
2399
|
const {
|
|
2400
|
-
defaultPivot:
|
|
2401
|
-
textColor:
|
|
2402
|
-
percent:
|
|
2403
|
-
animation:
|
|
2404
|
-
unit:
|
|
2400
|
+
defaultPivot: c,
|
|
2401
|
+
textColor: y,
|
|
2402
|
+
percent: d,
|
|
2403
|
+
animation: g,
|
|
2404
|
+
unit: p
|
|
2405
2405
|
} = e;
|
|
2406
|
-
return
|
|
2407
|
-
class:
|
|
2406
|
+
return u(He, null, [(($ = t.pivot) == null ? void 0 : $.call(t)) || c && u("div", {
|
|
2407
|
+
class: de("pivot"),
|
|
2408
2408
|
style: {
|
|
2409
|
-
color:
|
|
2409
|
+
color: y
|
|
2410
2410
|
}
|
|
2411
|
-
}, [
|
|
2412
|
-
class:
|
|
2413
|
-
}, [
|
|
2411
|
+
}, [g ? u("div", {
|
|
2412
|
+
class: de("number")
|
|
2413
|
+
}, [u("span", null, [n.number, p])]) : `${d}${p}`])]);
|
|
2414
2414
|
};
|
|
2415
2415
|
return () => {
|
|
2416
2416
|
const {
|
|
2417
|
-
strokeWidth:
|
|
2418
|
-
trackColor:
|
|
2419
|
-
radius:
|
|
2420
|
-
percent:
|
|
2421
|
-
color:
|
|
2417
|
+
strokeWidth: c,
|
|
2418
|
+
trackColor: y,
|
|
2419
|
+
radius: d,
|
|
2420
|
+
percent: g,
|
|
2421
|
+
color: p,
|
|
2422
2422
|
animation: $,
|
|
2423
|
-
duration:
|
|
2423
|
+
duration: m,
|
|
2424
2424
|
timing: S,
|
|
2425
2425
|
defaultPivot: w,
|
|
2426
2426
|
pivotColor: N,
|
|
2427
|
-
modeMilestone:
|
|
2427
|
+
modeMilestone: b
|
|
2428
2428
|
} = e;
|
|
2429
|
-
return
|
|
2430
|
-
class:
|
|
2429
|
+
return u("div", {
|
|
2430
|
+
class: de(),
|
|
2431
2431
|
ref: o,
|
|
2432
2432
|
style: {
|
|
2433
|
-
height:
|
|
2434
|
-
background:
|
|
2435
|
-
borderRadius:
|
|
2433
|
+
height: R(c),
|
|
2434
|
+
background: y,
|
|
2435
|
+
borderRadius: R(d)
|
|
2436
2436
|
}
|
|
2437
|
-
}, [
|
|
2438
|
-
class:
|
|
2437
|
+
}, [u("span", {
|
|
2438
|
+
class: de("portion", {
|
|
2439
2439
|
animation: $
|
|
2440
2440
|
}),
|
|
2441
2441
|
style: {
|
|
2442
|
-
width: `${i.progressWidth *
|
|
2443
|
-
background:
|
|
2444
|
-
transitionDuration: `${
|
|
2442
|
+
width: `${i.progressWidth * g / 100}px`,
|
|
2443
|
+
background: p,
|
|
2444
|
+
transitionDuration: `${m}ms`,
|
|
2445
2445
|
transitionTimingFunction: S
|
|
2446
2446
|
}
|
|
2447
|
-
}, [
|
|
2448
|
-
ref:
|
|
2449
|
-
class:
|
|
2447
|
+
}, [u("div", {
|
|
2448
|
+
ref: a,
|
|
2449
|
+
class: de("pivot-content", {
|
|
2450
2450
|
animation: $
|
|
2451
2451
|
}),
|
|
2452
2452
|
style: {
|
|
2453
|
-
left: `${(i.progressWidth - i.pivotContentWidth) *
|
|
2454
|
-
background: w ? N ||
|
|
2455
|
-
transitionDuration: `${
|
|
2453
|
+
left: `${(i.progressWidth - i.pivotContentWidth) * g / 100}px`,
|
|
2454
|
+
background: w ? N || p : "none",
|
|
2455
|
+
transitionDuration: `${m}ms`,
|
|
2456
2456
|
transitionTimingFunction: S
|
|
2457
2457
|
}
|
|
2458
|
-
}, [
|
|
2458
|
+
}, [h()])]), b && s()]);
|
|
2459
2459
|
};
|
|
2460
2460
|
}
|
|
2461
2461
|
});
|
|
2462
|
-
const
|
|
2462
|
+
const ql = M(Xl), [Gl, _e, Kl] = D("toast"), Zl = {
|
|
2463
2463
|
// 主文案
|
|
2464
2464
|
title: {
|
|
2465
2465
|
type: String,
|
|
@@ -2490,74 +2490,74 @@ const Yl = D(Ul), [jl, ze, Xl] = M("toast"), ql = {
|
|
|
2490
2490
|
type: [Number, String],
|
|
2491
2491
|
default: 300
|
|
2492
2492
|
}
|
|
2493
|
-
},
|
|
2494
|
-
name:
|
|
2495
|
-
props:
|
|
2493
|
+
}, tn = /* @__PURE__ */ _({
|
|
2494
|
+
name: Gl,
|
|
2495
|
+
props: Zl,
|
|
2496
2496
|
setup(e, {
|
|
2497
2497
|
slots: t
|
|
2498
2498
|
}) {
|
|
2499
2499
|
const o = F({
|
|
2500
2500
|
visible: !1
|
|
2501
2501
|
// 控制v-show
|
|
2502
|
-
}),
|
|
2503
|
-
const
|
|
2504
|
-
o.visible = !1, clearTimeout(
|
|
2502
|
+
}), a = () => {
|
|
2503
|
+
const l = setTimeout(() => {
|
|
2504
|
+
o.visible = !1, clearTimeout(l);
|
|
2505
2505
|
}, Number(e.duration));
|
|
2506
2506
|
};
|
|
2507
2507
|
return K(() => {
|
|
2508
|
-
o.visible = !0,
|
|
2508
|
+
o.visible = !0, a();
|
|
2509
2509
|
}), () => {
|
|
2510
2510
|
const {
|
|
2511
|
-
title:
|
|
2511
|
+
title: l,
|
|
2512
2512
|
message: i,
|
|
2513
2513
|
position: n,
|
|
2514
2514
|
animationDuration: r,
|
|
2515
|
-
onClose:
|
|
2515
|
+
onClose: f
|
|
2516
2516
|
} = e;
|
|
2517
|
-
return
|
|
2518
|
-
name:
|
|
2519
|
-
onAfterLeave:
|
|
2517
|
+
return u(We, {
|
|
2518
|
+
name: Kl("animation", "fade"),
|
|
2519
|
+
onAfterLeave: f
|
|
2520
2520
|
}, {
|
|
2521
2521
|
default: () => {
|
|
2522
2522
|
var v;
|
|
2523
|
-
return [ee(
|
|
2524
|
-
class:
|
|
2523
|
+
return [ee(u("div", {
|
|
2524
|
+
class: _e({
|
|
2525
2525
|
[n]: !0
|
|
2526
2526
|
}),
|
|
2527
2527
|
style: {
|
|
2528
2528
|
animationDuration: typeof r == "number" ? `${r}ms` : r
|
|
2529
2529
|
}
|
|
2530
|
-
}, [
|
|
2531
|
-
class:
|
|
2532
|
-
}, [((v = t.icon) == null ? void 0 : v.call(t)) || null,
|
|
2533
|
-
class:
|
|
2534
|
-
}, [
|
|
2535
|
-
class:
|
|
2536
|
-
}, [i])])]), [[
|
|
2530
|
+
}, [u("div", {
|
|
2531
|
+
class: _e("content")
|
|
2532
|
+
}, [((v = t.icon) == null ? void 0 : v.call(t)) || null, u("div", {
|
|
2533
|
+
class: _e("text")
|
|
2534
|
+
}, [l]), i && u("div", {
|
|
2535
|
+
class: _e("message")
|
|
2536
|
+
}, [i])])]), [[ye, o.visible]])];
|
|
2537
2537
|
}
|
|
2538
2538
|
});
|
|
2539
2539
|
};
|
|
2540
2540
|
}
|
|
2541
2541
|
});
|
|
2542
|
-
let qe =
|
|
2543
|
-
const
|
|
2544
|
-
const o = `toast${
|
|
2545
|
-
qe =
|
|
2546
|
-
render: () =>
|
|
2547
|
-
|
|
2548
|
-
{ ...e, onClose: () =>
|
|
2549
|
-
{ icon: () =>
|
|
2542
|
+
let qe = Ce({}), Ql = 0;
|
|
2543
|
+
const nn = [], Jl = (e, t) => {
|
|
2544
|
+
const o = `toast${Ql += 1}`;
|
|
2545
|
+
qe = Ce({
|
|
2546
|
+
render: () => Ve(
|
|
2547
|
+
tn,
|
|
2548
|
+
{ ...e, onClose: () => ea(o, e.onClose) },
|
|
2549
|
+
{ icon: () => Ve(ve, { ...t }) }
|
|
2550
2550
|
)
|
|
2551
2551
|
});
|
|
2552
|
-
const
|
|
2553
|
-
|
|
2554
|
-
},
|
|
2555
|
-
|
|
2552
|
+
const l = document.createElement("div");
|
|
2553
|
+
nn.push({ id: o, app: qe, el: l }), qe.mount(l), document.body.appendChild(l);
|
|
2554
|
+
}, ea = (e, t) => {
|
|
2555
|
+
nn.forEach((o) => {
|
|
2556
2556
|
e === o.id && (o.app.unmount(), document.body.removeChild(o.el), t == null || t());
|
|
2557
2557
|
});
|
|
2558
2558
|
};
|
|
2559
|
-
|
|
2560
|
-
const [
|
|
2559
|
+
M(tn);
|
|
2560
|
+
const [ta, na, la] = D("mask"), aa = {
|
|
2561
2561
|
// 控制显示
|
|
2562
2562
|
modelValue: {
|
|
2563
2563
|
type: Boolean,
|
|
@@ -2593,29 +2593,29 @@ const [Ql, Jl, ea] = M("mask"), ta = {
|
|
|
2593
2593
|
default: null
|
|
2594
2594
|
}
|
|
2595
2595
|
}, J = F([]);
|
|
2596
|
-
let
|
|
2597
|
-
const
|
|
2598
|
-
name:
|
|
2599
|
-
props:
|
|
2596
|
+
let Et = 0;
|
|
2597
|
+
const oa = /* @__PURE__ */ _({
|
|
2598
|
+
name: ta,
|
|
2599
|
+
props: aa,
|
|
2600
2600
|
emits: ["update:modelValue"],
|
|
2601
2601
|
setup(e, {
|
|
2602
2602
|
slots: t
|
|
2603
2603
|
}) {
|
|
2604
|
-
const o =
|
|
2604
|
+
const o = L("");
|
|
2605
2605
|
K(() => {
|
|
2606
|
-
o.value = `mask${
|
|
2607
|
-
}),
|
|
2606
|
+
o.value = `mask${Et}`, Et += 1, a(e.modelValue, !0);
|
|
2607
|
+
}), we(() => {
|
|
2608
2608
|
const n = J.findIndex((r) => r._id === o.value);
|
|
2609
2609
|
n >= 0 && J.splice(n, 1);
|
|
2610
|
-
}),
|
|
2611
|
-
|
|
2610
|
+
}), U(() => e.modelValue, (n) => {
|
|
2611
|
+
a(n);
|
|
2612
2612
|
});
|
|
2613
|
-
const
|
|
2613
|
+
const a = (n, r) => {
|
|
2614
2614
|
n ? (J.unshift({
|
|
2615
2615
|
_id: o.value,
|
|
2616
2616
|
_state: n
|
|
2617
2617
|
}), J.length > 1 && (J[1]._state = !1)) : r || (J.splice(0, 1), J.length > 0 && (J[0]._state = !0));
|
|
2618
|
-
},
|
|
2618
|
+
}, l = () => {
|
|
2619
2619
|
let n = !1;
|
|
2620
2620
|
for (let r = 0; r < J.length; r++)
|
|
2621
2621
|
J[r]._id === o.value && (n = J[r]._state);
|
|
@@ -2632,33 +2632,33 @@ const na = /* @__PURE__ */ z({
|
|
|
2632
2632
|
const {
|
|
2633
2633
|
customClass: n,
|
|
2634
2634
|
duration: r,
|
|
2635
|
-
zIndex:
|
|
2635
|
+
zIndex: f,
|
|
2636
2636
|
customStyle: v,
|
|
2637
2637
|
onAfterLeave: x
|
|
2638
2638
|
} = e, {
|
|
2639
|
-
_state:
|
|
2640
|
-
} =
|
|
2641
|
-
return
|
|
2642
|
-
name:
|
|
2639
|
+
_state: s
|
|
2640
|
+
} = l();
|
|
2641
|
+
return u(We, {
|
|
2642
|
+
name: la("animation", "fade"),
|
|
2643
2643
|
onAfterLeave: x
|
|
2644
2644
|
}, {
|
|
2645
2645
|
default: () => {
|
|
2646
|
-
var
|
|
2647
|
-
return [ee(
|
|
2646
|
+
var h;
|
|
2647
|
+
return [ee(u("div", {
|
|
2648
2648
|
style: {
|
|
2649
2649
|
animationDuration: `${r}ms`,
|
|
2650
|
-
zIndex:
|
|
2650
|
+
zIndex: f,
|
|
2651
2651
|
...v
|
|
2652
2652
|
},
|
|
2653
|
-
class: [
|
|
2653
|
+
class: [na(), n],
|
|
2654
2654
|
onTouchmove: i
|
|
2655
|
-
}, [(
|
|
2655
|
+
}, [(h = t.default) == null ? void 0 : h.call(t)]), [[ye, s]])];
|
|
2656
2656
|
}
|
|
2657
2657
|
});
|
|
2658
2658
|
};
|
|
2659
2659
|
}
|
|
2660
2660
|
});
|
|
2661
|
-
const
|
|
2661
|
+
const nt = M(oa), [ia, Tt, Bt] = D("popup"), ra = {
|
|
2662
2662
|
// 控制显示
|
|
2663
2663
|
modelValue: {
|
|
2664
2664
|
type: Boolean,
|
|
@@ -2721,117 +2721,119 @@ const tt = D(na), [la, Et, Tt] = M("popup"), aa = {
|
|
|
2721
2721
|
type: Number,
|
|
2722
2722
|
default: 100
|
|
2723
2723
|
}
|
|
2724
|
-
},
|
|
2725
|
-
name:
|
|
2726
|
-
props:
|
|
2724
|
+
}, ua = /* @__PURE__ */ _({
|
|
2725
|
+
name: ia,
|
|
2726
|
+
props: ra,
|
|
2727
2727
|
emits: ["clickMask", "update:modelValue"],
|
|
2728
2728
|
setup(e, {
|
|
2729
2729
|
slots: t,
|
|
2730
2730
|
emit: o
|
|
2731
2731
|
}) {
|
|
2732
|
-
const
|
|
2732
|
+
const a = B(() => {
|
|
2733
2733
|
const {
|
|
2734
2734
|
position: n,
|
|
2735
2735
|
borderRadius: r,
|
|
2736
|
-
customStyle:
|
|
2736
|
+
customStyle: f,
|
|
2737
2737
|
duration: v,
|
|
2738
2738
|
zIndex: x
|
|
2739
|
-
} = e,
|
|
2740
|
-
let
|
|
2739
|
+
} = e, s = R(r);
|
|
2740
|
+
let h = "0";
|
|
2741
2741
|
switch (n) {
|
|
2742
2742
|
case "top":
|
|
2743
|
-
|
|
2743
|
+
h = ` 0 0 ${s} ${s}`;
|
|
2744
2744
|
break;
|
|
2745
2745
|
case "bottom":
|
|
2746
|
-
|
|
2746
|
+
h = `${s} ${s} 0 0`;
|
|
2747
2747
|
break;
|
|
2748
2748
|
case "left":
|
|
2749
|
-
|
|
2749
|
+
h = `0 ${s} ${s} 0`;
|
|
2750
2750
|
break;
|
|
2751
2751
|
case "right":
|
|
2752
|
-
|
|
2752
|
+
h = `${s} 0 0 ${s}`;
|
|
2753
2753
|
break;
|
|
2754
2754
|
default:
|
|
2755
|
-
|
|
2755
|
+
h = `${s}`;
|
|
2756
2756
|
}
|
|
2757
2757
|
return {
|
|
2758
|
-
borderRadius:
|
|
2758
|
+
borderRadius: h,
|
|
2759
2759
|
animationDuration: `${v}ms`,
|
|
2760
|
-
...
|
|
2760
|
+
...f,
|
|
2761
2761
|
zIndex: x + 1
|
|
2762
2762
|
};
|
|
2763
|
-
}),
|
|
2763
|
+
}), l = (n) => {
|
|
2764
2764
|
o("clickMask", n), e.isCloseOnClickMask && (i.value = !1);
|
|
2765
|
-
}, i =
|
|
2765
|
+
}, i = B({
|
|
2766
2766
|
get: () => e.modelValue,
|
|
2767
2767
|
set: (n) => o("update:modelValue", n)
|
|
2768
2768
|
});
|
|
2769
|
-
return () => {
|
|
2769
|
+
return U(() => i.value, (n, r) => {
|
|
2770
|
+
n !== r && (n && e.lockScroll ? document.body.style.overflow = "hidden" : document.body.style.overflow = "");
|
|
2771
|
+
}), () => {
|
|
2770
2772
|
const {
|
|
2771
2773
|
teleport: n,
|
|
2772
2774
|
position: r,
|
|
2773
|
-
customClass:
|
|
2775
|
+
customClass: f,
|
|
2774
2776
|
duration: v,
|
|
2775
2777
|
onAfterLeave: x,
|
|
2776
|
-
lockScroll:
|
|
2777
|
-
zIndex:
|
|
2778
|
-
maskCustomClass:
|
|
2779
|
-
maskCustomStyle:
|
|
2778
|
+
lockScroll: s,
|
|
2779
|
+
zIndex: h,
|
|
2780
|
+
maskCustomClass: c,
|
|
2781
|
+
maskCustomStyle: y
|
|
2780
2782
|
} = e;
|
|
2781
|
-
return n ?
|
|
2783
|
+
return n ? u(st, {
|
|
2782
2784
|
to: n
|
|
2783
2785
|
}, {
|
|
2784
|
-
default: () => [
|
|
2786
|
+
default: () => [u(nt, {
|
|
2785
2787
|
modelValue: i.value,
|
|
2786
|
-
"onUpdate:modelValue": (
|
|
2788
|
+
"onUpdate:modelValue": (d) => i.value = d,
|
|
2787
2789
|
duration: v,
|
|
2788
|
-
lockScroll:
|
|
2789
|
-
onClick:
|
|
2790
|
+
lockScroll: s,
|
|
2791
|
+
onClick: l,
|
|
2790
2792
|
onAfterLeave: x,
|
|
2791
|
-
zIndex:
|
|
2792
|
-
customClass:
|
|
2793
|
-
customStyle:
|
|
2794
|
-
}, null),
|
|
2795
|
-
name:
|
|
2793
|
+
zIndex: h,
|
|
2794
|
+
customClass: c,
|
|
2795
|
+
customStyle: y
|
|
2796
|
+
}, null), u(We, {
|
|
2797
|
+
name: Bt("animation", `slide-${r}`)
|
|
2796
2798
|
}, {
|
|
2797
2799
|
default: () => {
|
|
2798
|
-
var
|
|
2799
|
-
return [ee(
|
|
2800
|
-
style:
|
|
2801
|
-
class: [
|
|
2800
|
+
var d;
|
|
2801
|
+
return [ee(u("div", {
|
|
2802
|
+
style: a.value,
|
|
2803
|
+
class: [Tt("content", {
|
|
2802
2804
|
[r]: r
|
|
2803
|
-
}),
|
|
2804
|
-
}, [((
|
|
2805
|
+
}), f]
|
|
2806
|
+
}, [((d = t.default) == null ? void 0 : d.call(t)) || null]), [[ye, i.value]])];
|
|
2805
2807
|
}
|
|
2806
2808
|
})]
|
|
2807
|
-
}) :
|
|
2809
|
+
}) : u(He, null, [u(nt, {
|
|
2808
2810
|
modelValue: i.value,
|
|
2809
|
-
"onUpdate:modelValue": (
|
|
2811
|
+
"onUpdate:modelValue": (d) => i.value = d,
|
|
2810
2812
|
duration: v,
|
|
2811
|
-
lockScroll:
|
|
2812
|
-
onClick:
|
|
2813
|
+
lockScroll: s,
|
|
2814
|
+
onClick: l,
|
|
2813
2815
|
onAfterLeave: x,
|
|
2814
|
-
zIndex:
|
|
2815
|
-
customClass:
|
|
2816
|
-
customStyle:
|
|
2817
|
-
}, null),
|
|
2818
|
-
name:
|
|
2816
|
+
zIndex: h,
|
|
2817
|
+
customClass: c,
|
|
2818
|
+
customStyle: y
|
|
2819
|
+
}, null), u(We, {
|
|
2820
|
+
name: Bt("animation", `slide-${r}`)
|
|
2819
2821
|
}, {
|
|
2820
2822
|
default: () => {
|
|
2821
|
-
var
|
|
2822
|
-
return [ee(
|
|
2823
|
-
style:
|
|
2824
|
-
class: [
|
|
2823
|
+
var d;
|
|
2824
|
+
return [ee(u("div", {
|
|
2825
|
+
style: a.value,
|
|
2826
|
+
class: [Tt("content", {
|
|
2825
2827
|
[r]: r
|
|
2826
|
-
}),
|
|
2827
|
-
}, [((
|
|
2828
|
+
}), f]
|
|
2829
|
+
}, [((d = t.default) == null ? void 0 : d.call(t)) || null]), [[ye, i.value]])];
|
|
2828
2830
|
}
|
|
2829
2831
|
})]);
|
|
2830
2832
|
};
|
|
2831
2833
|
}
|
|
2832
2834
|
});
|
|
2833
|
-
const
|
|
2834
|
-
name:
|
|
2835
|
+
const mt = M(ua), [sa, De, Lt] = D("stepper"), ca = /* @__PURE__ */ _({
|
|
2836
|
+
name: sa,
|
|
2835
2837
|
props: {
|
|
2836
2838
|
modelValue: {
|
|
2837
2839
|
type: [Number, String],
|
|
@@ -2880,91 +2882,91 @@ const ft = D(oa), [ia, Me, Bt] = M("stepper"), ra = /* @__PURE__ */ z({
|
|
|
2880
2882
|
emit: o
|
|
2881
2883
|
}) {
|
|
2882
2884
|
const {
|
|
2883
|
-
parent:
|
|
2884
|
-
} =
|
|
2885
|
-
let
|
|
2886
|
-
return
|
|
2887
|
-
}, v = (
|
|
2888
|
-
const
|
|
2889
|
-
|
|
2885
|
+
parent: a
|
|
2886
|
+
} = me(), l = L(e.modelValue), i = B(() => e.size || (a == null ? void 0 : a.getProp("size"))), n = B(() => e.modelValue <= e.min || e.disabled), r = B(() => e.modelValue >= e.max || e.disabled), f = (d) => {
|
|
2887
|
+
let g = e.integer;
|
|
2888
|
+
return d.toString().replace(/([^0-9\.\-])/g, "").replace(/\./g, (p) => g ? "" : (g = !0, p)).replace(/\-/g, (p, $) => $ === 0 ? "-" : "");
|
|
2889
|
+
}, v = (d) => {
|
|
2890
|
+
const g = f(d);
|
|
2891
|
+
l.value = g, o("update:modelValue", g), o("change", g);
|
|
2890
2892
|
};
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
+
U(() => e.modelValue, (d) => {
|
|
2894
|
+
l.value = d;
|
|
2893
2895
|
});
|
|
2894
|
-
const x = (
|
|
2896
|
+
const x = (d) => o("focus", d), s = (d) => {
|
|
2895
2897
|
const {
|
|
2896
|
-
value:
|
|
2897
|
-
} =
|
|
2898
|
-
v(
|
|
2899
|
-
},
|
|
2898
|
+
value: g
|
|
2899
|
+
} = d.target;
|
|
2900
|
+
v(g);
|
|
2901
|
+
}, h = (d) => {
|
|
2900
2902
|
const {
|
|
2901
|
-
value:
|
|
2902
|
-
} =
|
|
2903
|
-
if (
|
|
2903
|
+
value: g
|
|
2904
|
+
} = d.target, p = Number(f(g));
|
|
2905
|
+
if (p && p < e.min ? v(e.min) : p && p > e.max ? v(e.max) : p && v(p), a) {
|
|
2904
2906
|
const {
|
|
2905
2907
|
validateWithTrigger: $
|
|
2906
|
-
} =
|
|
2908
|
+
} = a;
|
|
2907
2909
|
$("onBlur");
|
|
2908
2910
|
}
|
|
2909
|
-
o("blur",
|
|
2910
|
-
},
|
|
2911
|
-
const
|
|
2912
|
-
v(
|
|
2913
|
-
},
|
|
2914
|
-
const
|
|
2915
|
-
v(
|
|
2911
|
+
o("blur", d);
|
|
2912
|
+
}, c = () => {
|
|
2913
|
+
const d = Number(e.modelValue) - e.step;
|
|
2914
|
+
v(d), o("subtract", d);
|
|
2915
|
+
}, y = () => {
|
|
2916
|
+
const d = Number(e.modelValue) + e.step;
|
|
2917
|
+
v(d), o("addit", d);
|
|
2916
2918
|
};
|
|
2917
2919
|
return () => {
|
|
2918
2920
|
const {
|
|
2919
|
-
min:
|
|
2920
|
-
max:
|
|
2921
|
-
inputWidth:
|
|
2921
|
+
min: d,
|
|
2922
|
+
max: g,
|
|
2923
|
+
inputWidth: p,
|
|
2922
2924
|
placeholder: $,
|
|
2923
|
-
disabled:
|
|
2925
|
+
disabled: m,
|
|
2924
2926
|
disableInput: S
|
|
2925
2927
|
} = e;
|
|
2926
|
-
return
|
|
2927
|
-
class:
|
|
2928
|
+
return u("div", {
|
|
2929
|
+
class: De({
|
|
2928
2930
|
[i.value]: i.value
|
|
2929
2931
|
})
|
|
2930
|
-
}, [t.subtraction ? t.subtraction() :
|
|
2932
|
+
}, [t.subtraction ? t.subtraction() : u("button", {
|
|
2931
2933
|
type: "button",
|
|
2932
2934
|
disabled: n.value,
|
|
2933
|
-
class: [
|
|
2935
|
+
class: [De("subtraction"), Lt("el", {
|
|
2934
2936
|
clickable: !n.value
|
|
2935
2937
|
})],
|
|
2936
|
-
onClick:
|
|
2937
|
-
}, null), ee(
|
|
2938
|
+
onClick: c
|
|
2939
|
+
}, null), ee(u("input", {
|
|
2938
2940
|
type: "text",
|
|
2939
|
-
class:
|
|
2941
|
+
class: De("input", {
|
|
2940
2942
|
"only-disable": S
|
|
2941
2943
|
}),
|
|
2942
2944
|
style: {
|
|
2943
|
-
width:
|
|
2945
|
+
width: R(p)
|
|
2944
2946
|
},
|
|
2945
|
-
"onUpdate:modelValue": (w) =>
|
|
2947
|
+
"onUpdate:modelValue": (w) => l.value = w,
|
|
2946
2948
|
role: "spinbutton",
|
|
2947
2949
|
inputmode: "decimal",
|
|
2948
|
-
"aria-min":
|
|
2949
|
-
"aria-max":
|
|
2950
|
-
"aria-valuenow":
|
|
2951
|
-
onInput:
|
|
2952
|
-
onBlur:
|
|
2950
|
+
"aria-min": d,
|
|
2951
|
+
"aria-max": g,
|
|
2952
|
+
"aria-valuenow": l.value,
|
|
2953
|
+
onInput: s,
|
|
2954
|
+
onBlur: h,
|
|
2953
2955
|
onFocus: x,
|
|
2954
2956
|
placeholder: $,
|
|
2955
|
-
disabled:
|
|
2956
|
-
}, null), [[_t,
|
|
2957
|
+
disabled: m || S
|
|
2958
|
+
}, null), [[_t, l.value]]), t.addition ? t.addition() : u("button", {
|
|
2957
2959
|
type: "button",
|
|
2958
2960
|
disabled: r.value,
|
|
2959
|
-
class: [
|
|
2961
|
+
class: [De("addition"), Lt("el", {
|
|
2960
2962
|
clickable: !r.value
|
|
2961
2963
|
})],
|
|
2962
|
-
onClick:
|
|
2964
|
+
onClick: y
|
|
2963
2965
|
}, null)]);
|
|
2964
2966
|
};
|
|
2965
2967
|
}
|
|
2966
2968
|
});
|
|
2967
|
-
const
|
|
2969
|
+
const da = M(ca), ln = {
|
|
2968
2970
|
size: {
|
|
2969
2971
|
type: String,
|
|
2970
2972
|
default: null
|
|
@@ -3002,10 +3004,10 @@ const ua = D(ra), nn = {
|
|
|
3002
3004
|
type: [Object, Array],
|
|
3003
3005
|
default: null
|
|
3004
3006
|
}
|
|
3005
|
-
}, [
|
|
3006
|
-
name:
|
|
3007
|
+
}, [an, fa] = D("form"), on = an, ma = /* @__PURE__ */ _({
|
|
3008
|
+
name: an,
|
|
3007
3009
|
props: {
|
|
3008
|
-
...
|
|
3010
|
+
...ln,
|
|
3009
3011
|
validateFirst: {
|
|
3010
3012
|
// 是否在某一项校验不通过时停止校验
|
|
3011
3013
|
type: Boolean,
|
|
@@ -3029,93 +3031,93 @@ const ua = D(ra), nn = {
|
|
|
3029
3031
|
setup(e, {
|
|
3030
3032
|
slots: t,
|
|
3031
3033
|
emit: o,
|
|
3032
|
-
expose:
|
|
3034
|
+
expose: a
|
|
3033
3035
|
}) {
|
|
3034
3036
|
const {
|
|
3035
|
-
initProvide:
|
|
3037
|
+
initProvide: l,
|
|
3036
3038
|
children: i
|
|
3037
|
-
} =
|
|
3038
|
-
const
|
|
3039
|
-
return i.forEach((
|
|
3040
|
-
const $ =
|
|
3041
|
-
p
|
|
3042
|
-
}),
|
|
3043
|
-
}, r = (
|
|
3044
|
-
const
|
|
3045
|
-
return new Promise(($,
|
|
3046
|
-
if (
|
|
3047
|
-
|
|
3039
|
+
} = fe(on), n = () => {
|
|
3040
|
+
const g = {};
|
|
3041
|
+
return i.forEach((p) => {
|
|
3042
|
+
const $ = p.exposed;
|
|
3043
|
+
g[p.props.prop] = $.formValue;
|
|
3044
|
+
}), g;
|
|
3045
|
+
}, r = (g) => {
|
|
3046
|
+
const p = i.filter(($) => $.props.prop === g);
|
|
3047
|
+
return new Promise(($, m) => {
|
|
3048
|
+
if (p.length === 0)
|
|
3049
|
+
m(new Error('【YUI】form method "validateField": no field, please check your param: "propName"!'));
|
|
3048
3050
|
else {
|
|
3049
|
-
const S =
|
|
3051
|
+
const S = p[0].exposed;
|
|
3050
3052
|
S == null || S.validate().then((w) => {
|
|
3051
|
-
w ?
|
|
3053
|
+
w ? m(w) : $();
|
|
3052
3054
|
});
|
|
3053
3055
|
}
|
|
3054
3056
|
});
|
|
3055
|
-
},
|
|
3056
|
-
const
|
|
3057
|
-
if (await i.reduce((
|
|
3058
|
-
if (!
|
|
3059
|
-
const
|
|
3060
|
-
return
|
|
3061
|
-
S &&
|
|
3057
|
+
}, f = async () => {
|
|
3058
|
+
const g = [];
|
|
3059
|
+
if (await i.reduce((p, $) => p.then(() => {
|
|
3060
|
+
if (!g.length) {
|
|
3061
|
+
const m = $.exposed;
|
|
3062
|
+
return m == null ? void 0 : m.validate().then((S) => {
|
|
3063
|
+
S && g.push(S);
|
|
3062
3064
|
});
|
|
3063
3065
|
}
|
|
3064
3066
|
return null;
|
|
3065
|
-
}), Promise.resolve()),
|
|
3066
|
-
throw
|
|
3067
|
+
}), Promise.resolve()), g.length)
|
|
3068
|
+
throw g;
|
|
3067
3069
|
}, v = async () => {
|
|
3068
|
-
const
|
|
3069
|
-
if (
|
|
3070
|
-
throw
|
|
3071
|
-
}, x = (
|
|
3072
|
-
const $ = i.find((S) => S.props.prop ===
|
|
3073
|
-
($ == null ? void 0 : $.vnode.el).scrollIntoView(
|
|
3074
|
-
},
|
|
3075
|
-
const
|
|
3070
|
+
const p = (await Promise.all(i.map(($) => $.exposed.validate()))).filter(($) => $);
|
|
3071
|
+
if (p.length)
|
|
3072
|
+
throw p;
|
|
3073
|
+
}, x = (g) => g ? r(g) : e.validateFirst ? f() : v(), s = (g, p) => {
|
|
3074
|
+
const $ = i.find((S) => S.props.prop === g);
|
|
3075
|
+
($ == null ? void 0 : $.vnode.el).scrollIntoView(p);
|
|
3076
|
+
}, h = () => {
|
|
3077
|
+
const g = n();
|
|
3076
3078
|
x().then(() => {
|
|
3077
|
-
o("submit",
|
|
3078
|
-
}).catch((
|
|
3079
|
+
o("submit", g);
|
|
3080
|
+
}).catch((p) => {
|
|
3079
3081
|
o("failed", {
|
|
3080
|
-
values:
|
|
3081
|
-
errors:
|
|
3082
|
-
}), Array.isArray(
|
|
3082
|
+
values: g,
|
|
3083
|
+
errors: p
|
|
3084
|
+
}), Array.isArray(p) && e.scrollToError && s(p == null ? void 0 : p[0].name);
|
|
3083
3085
|
});
|
|
3084
|
-
},
|
|
3085
|
-
|
|
3086
|
-
},
|
|
3086
|
+
}, c = (g) => {
|
|
3087
|
+
g.preventDefault(), h();
|
|
3088
|
+
}, y = () => {
|
|
3087
3089
|
o("change", n());
|
|
3088
|
-
},
|
|
3089
|
-
i.forEach((
|
|
3090
|
+
}, d = (g) => {
|
|
3091
|
+
i.forEach((p) => {
|
|
3090
3092
|
var $;
|
|
3091
|
-
if (!
|
|
3092
|
-
const
|
|
3093
|
-
($ =
|
|
3093
|
+
if (!g || p.props.prop === g) {
|
|
3094
|
+
const m = p.exposed;
|
|
3095
|
+
($ = m.resetValidation) == null || $.call(m);
|
|
3094
3096
|
}
|
|
3095
3097
|
});
|
|
3096
3098
|
};
|
|
3097
|
-
return
|
|
3099
|
+
return l({
|
|
3098
3100
|
props: e,
|
|
3099
|
-
change:
|
|
3100
|
-
}),
|
|
3101
|
-
submit:
|
|
3102
|
-
scrollToField:
|
|
3101
|
+
change: y
|
|
3102
|
+
}), a({
|
|
3103
|
+
submit: h,
|
|
3104
|
+
scrollToField: s,
|
|
3103
3105
|
validate: x,
|
|
3104
|
-
change:
|
|
3105
|
-
resetValidation:
|
|
3106
|
+
change: y,
|
|
3107
|
+
resetValidation: d
|
|
3106
3108
|
}), () => {
|
|
3107
|
-
var
|
|
3108
|
-
return
|
|
3109
|
-
onSubmit:
|
|
3110
|
-
class: [
|
|
3111
|
-
}, [(
|
|
3109
|
+
var g;
|
|
3110
|
+
return u("form", {
|
|
3111
|
+
onSubmit: c,
|
|
3112
|
+
class: [fa()]
|
|
3113
|
+
}, [(g = t.default) == null ? void 0 : g.call(t)]);
|
|
3112
3114
|
};
|
|
3113
3115
|
}
|
|
3114
3116
|
});
|
|
3115
|
-
const
|
|
3116
|
-
name:
|
|
3117
|
+
const va = M(ma), rn = "form-item", [ga, Me, ha] = D(rn), pa = Ot(rn), ya = /* @__PURE__ */ _({
|
|
3118
|
+
name: ga,
|
|
3117
3119
|
props: {
|
|
3118
|
-
...
|
|
3120
|
+
...ln,
|
|
3119
3121
|
label: {
|
|
3120
3122
|
type: [Number, String],
|
|
3121
3123
|
default: ""
|
|
@@ -3135,97 +3137,97 @@ const da = D(ca), on = "form-item", [fa, De, ma] = M(on), va = Dt(on), ga = /* @
|
|
|
3135
3137
|
expose: o
|
|
3136
3138
|
}) {
|
|
3137
3139
|
const {
|
|
3138
|
-
parent:
|
|
3139
|
-
} =
|
|
3140
|
-
initProvide:
|
|
3140
|
+
parent: a
|
|
3141
|
+
} = ce(on), {
|
|
3142
|
+
initProvide: l,
|
|
3141
3143
|
filed: i
|
|
3142
|
-
} =
|
|
3144
|
+
} = nl(), n = L(!1), r = L(pa.validateMessage), f = (S) => {
|
|
3143
3145
|
if (e[S] && e[S] !== null)
|
|
3144
3146
|
return e[S];
|
|
3145
|
-
const w =
|
|
3147
|
+
const w = a && a.props;
|
|
3146
3148
|
return w && w[S] || null;
|
|
3147
|
-
}, v =
|
|
3148
|
-
const S =
|
|
3149
|
-
return
|
|
3150
|
-
}), x =
|
|
3149
|
+
}, v = B(() => {
|
|
3150
|
+
const S = a && a.props.rules, w = e.rules || (S == null ? void 0 : S[e.prop]);
|
|
3151
|
+
return $n(w) ? [w] : w;
|
|
3152
|
+
}), x = B(() => v.value && v.value.some((S) => S.required)), s = B(() => i.value ? i.value.proxy.modelValue : null), h = B(() => f("showError") && n.value), c = (S, w) => !(w.required && (i.value && i.value.exposed && typeof i.value.exposed.isRequired < "u" && !i.value.exposed.isRequired || !(Array.isArray(S) ? S.length : S)) || w.pattern && xn(S) && !w.pattern.test(S)), y = (S, w) => {
|
|
3151
3153
|
const {
|
|
3152
3154
|
message: N
|
|
3153
3155
|
} = w;
|
|
3154
3156
|
return Mt(N) ? N(S, w) : N;
|
|
3155
|
-
},
|
|
3157
|
+
}, d = (S) => S.reduce((w, N) => w.then(() => {
|
|
3156
3158
|
if (n.value)
|
|
3157
3159
|
return null;
|
|
3158
|
-
const
|
|
3159
|
-
if (!
|
|
3160
|
-
return n.value = !0, r.value = b
|
|
3160
|
+
const b = N.formatter ? N.formatter(s.value, N) : s.value;
|
|
3161
|
+
if (!c(b, N))
|
|
3162
|
+
return n.value = !0, r.value = y(b, N), null;
|
|
3161
3163
|
if (N.validator) {
|
|
3162
|
-
const E = N.validator(
|
|
3163
|
-
return typeof E == "boolean" ? (E || (n.value = !0, r.value = b
|
|
3164
|
+
const E = N.validator(b, N);
|
|
3165
|
+
return typeof E == "boolean" ? (E || (n.value = !0, r.value = y(b, N)), Promise.resolve(E)) : E.then((T) => (T || (n.value = !0, r.value = y(b, N)), T));
|
|
3164
3166
|
}
|
|
3165
3167
|
return null;
|
|
3166
|
-
}), Promise.resolve()),
|
|
3168
|
+
}), Promise.resolve()), g = async (S) => {
|
|
3167
3169
|
const w = S || v.value;
|
|
3168
|
-
return w ? (await
|
|
3170
|
+
return w ? (await d(w), n.value ? {
|
|
3169
3171
|
name: e.prop,
|
|
3170
3172
|
message: r.value
|
|
3171
3173
|
} : null) : Promise.resolve();
|
|
3172
|
-
},
|
|
3174
|
+
}, p = (S) => {
|
|
3173
3175
|
var w;
|
|
3174
|
-
if (
|
|
3175
|
-
const N = ((w =
|
|
3176
|
-
return
|
|
3176
|
+
if (a && v.value) {
|
|
3177
|
+
const N = ((w = a.props) == null ? void 0 : w.validateTrigger) === S, b = v.value.filter((E) => E.trigger ? E.trigger === S : N);
|
|
3178
|
+
return g(b);
|
|
3177
3179
|
}
|
|
3178
3180
|
return Promise.resolve(null);
|
|
3179
3181
|
}, $ = () => {
|
|
3180
3182
|
n.value && (n.value = !1, r.value = "");
|
|
3181
3183
|
};
|
|
3182
|
-
|
|
3183
|
-
getProp:
|
|
3184
|
-
validateWithTrigger:
|
|
3184
|
+
l({
|
|
3185
|
+
getProp: f,
|
|
3186
|
+
validateWithTrigger: p,
|
|
3185
3187
|
resetValidation: $,
|
|
3186
|
-
change:
|
|
3188
|
+
change: a == null ? void 0 : a.change
|
|
3187
3189
|
}), o({
|
|
3188
3190
|
resetValidation: $,
|
|
3189
|
-
formValue:
|
|
3190
|
-
validate:
|
|
3191
|
+
formValue: s,
|
|
3192
|
+
validate: g
|
|
3191
3193
|
});
|
|
3192
|
-
const
|
|
3193
|
-
class:
|
|
3194
|
+
const m = () => h.value ? t.error ? t.error() : f("showErrorMessage") ? u("p", {
|
|
3195
|
+
class: Me("error"),
|
|
3194
3196
|
style: {
|
|
3195
3197
|
textAlign: "left"
|
|
3196
3198
|
}
|
|
3197
3199
|
}, [r.value]) : null : null;
|
|
3198
3200
|
return () => {
|
|
3199
|
-
var
|
|
3201
|
+
var b, E, T;
|
|
3200
3202
|
const {
|
|
3201
3203
|
label: S,
|
|
3202
3204
|
border: w,
|
|
3203
3205
|
colon: N
|
|
3204
3206
|
} = e;
|
|
3205
|
-
return
|
|
3206
|
-
class: [
|
|
3207
|
-
"is-error":
|
|
3208
|
-
[
|
|
3207
|
+
return u("div", {
|
|
3208
|
+
class: [Me({
|
|
3209
|
+
"is-error": h.value,
|
|
3210
|
+
[f("size")]: f("size"),
|
|
3209
3211
|
hairline: w
|
|
3210
|
-
}),
|
|
3212
|
+
}), ha("el", {
|
|
3211
3213
|
"hairline-bottom": w
|
|
3212
3214
|
})]
|
|
3213
|
-
}, [
|
|
3214
|
-
class:
|
|
3215
|
+
}, [u("label", {
|
|
3216
|
+
class: Me("label", {
|
|
3215
3217
|
"is-required": x.value
|
|
3216
3218
|
}),
|
|
3217
3219
|
style: {
|
|
3218
|
-
width:
|
|
3219
|
-
textAlign:
|
|
3220
|
+
width: f("labelWidth"),
|
|
3221
|
+
textAlign: f("labelAlign") || "left"
|
|
3220
3222
|
}
|
|
3221
|
-
}, [(
|
|
3222
|
-
class:
|
|
3223
|
-
}, [(E = t.default) == null ? void 0 : E.call(t),
|
|
3223
|
+
}, [(b = t.labelIcon) == null ? void 0 : b.call(t), S, N ? " :" : ""]), u("div", {
|
|
3224
|
+
class: Me("content")
|
|
3225
|
+
}, [(E = t.default) == null ? void 0 : E.call(t), m()]), (T = t.extra) == null ? void 0 : T.call(t)]);
|
|
3224
3226
|
};
|
|
3225
3227
|
}
|
|
3226
3228
|
});
|
|
3227
|
-
const
|
|
3228
|
-
name:
|
|
3229
|
+
const ba = M(ya), [Sa, wa] = D("input"), xa = 13, Ca = /* @__PURE__ */ _({
|
|
3230
|
+
name: Sa,
|
|
3229
3231
|
props: {
|
|
3230
3232
|
modelValue: {
|
|
3231
3233
|
type: [String, Number],
|
|
@@ -3281,80 +3283,80 @@ const pa = D(ga), [ha, ya] = M("input"), ba = 13, Sa = /* @__PURE__ */ z({
|
|
|
3281
3283
|
emit: t
|
|
3282
3284
|
}) {
|
|
3283
3285
|
const o = ne(), {
|
|
3284
|
-
parent:
|
|
3285
|
-
} =
|
|
3286
|
-
let
|
|
3287
|
-
const i = (
|
|
3288
|
-
|
|
3289
|
-
}, n = (
|
|
3290
|
-
|
|
3286
|
+
parent: a
|
|
3287
|
+
} = me();
|
|
3288
|
+
let l = null;
|
|
3289
|
+
const i = (c, y) => {
|
|
3290
|
+
c !== y && l && (l.innerHTML = `${e.modelValue.toString().length}/${e.maxLength}`);
|
|
3291
|
+
}, n = (c, y) => {
|
|
3292
|
+
c !== y && (c ? (l = document.createElement("div"), l.className = "y-input__limit-num", (o == null ? void 0 : o.vnode.el).insertAdjacentElement("afterend", l), e.maxLength && i(e.maxLength)) : (l && l.remove(), l = null));
|
|
3291
3293
|
};
|
|
3292
|
-
|
|
3293
|
-
const r = (
|
|
3294
|
-
if (
|
|
3294
|
+
U(() => e.showWordLimit, n), U(() => e.modelValue, i), U(() => e.maxLength, i);
|
|
3295
|
+
const r = (c) => t("focus", c), f = (c) => t("click", c), v = (c) => {
|
|
3296
|
+
if (a) {
|
|
3295
3297
|
const {
|
|
3296
|
-
validateWithTrigger:
|
|
3297
|
-
} =
|
|
3298
|
-
|
|
3298
|
+
validateWithTrigger: y
|
|
3299
|
+
} = a;
|
|
3300
|
+
y("onBlur");
|
|
3299
3301
|
}
|
|
3300
|
-
t("blur",
|
|
3301
|
-
}, x = (
|
|
3302
|
-
t("update:modelValue",
|
|
3303
|
-
},
|
|
3304
|
-
|
|
3302
|
+
t("blur", c);
|
|
3303
|
+
}, x = (c) => {
|
|
3304
|
+
t("update:modelValue", c.target.value), t("input", c);
|
|
3305
|
+
}, s = (c) => {
|
|
3306
|
+
c.keyCode === xa && (a != null && a.getProp("enterable") || c.preventDefault(), e.type === "search" && (o == null ? void 0 : o.vnode.el).blur()), t("keypress", c);
|
|
3305
3307
|
};
|
|
3306
3308
|
K(() => {
|
|
3307
3309
|
n(e.showWordLimit), i(e.maxLength);
|
|
3308
|
-
}),
|
|
3309
|
-
|
|
3310
|
+
}), xe(() => {
|
|
3311
|
+
l && l.remove(), l = null;
|
|
3310
3312
|
});
|
|
3311
|
-
const
|
|
3313
|
+
const h = B({
|
|
3312
3314
|
get: () => e.modelValue,
|
|
3313
|
-
set: (
|
|
3315
|
+
set: (c) => t("update:modelValue", c)
|
|
3314
3316
|
});
|
|
3315
3317
|
return () => {
|
|
3316
3318
|
const {
|
|
3317
|
-
type:
|
|
3318
|
-
rows:
|
|
3319
|
-
align:
|
|
3320
|
-
disabled:
|
|
3321
|
-
maxLength:
|
|
3319
|
+
type: c,
|
|
3320
|
+
rows: y,
|
|
3321
|
+
align: d,
|
|
3322
|
+
disabled: g,
|
|
3323
|
+
maxLength: p,
|
|
3322
3324
|
size: $,
|
|
3323
|
-
border:
|
|
3325
|
+
border: m,
|
|
3324
3326
|
readonly: S,
|
|
3325
3327
|
autocomplete: w,
|
|
3326
3328
|
placeholder: N
|
|
3327
|
-
} = e,
|
|
3328
|
-
class:
|
|
3329
|
-
[
|
|
3330
|
-
border:
|
|
3329
|
+
} = e, b = $ || (a == null ? void 0 : a.getProp("size")), E = {
|
|
3330
|
+
class: wa({
|
|
3331
|
+
[b]: b,
|
|
3332
|
+
border: m
|
|
3331
3333
|
}),
|
|
3332
3334
|
style: {
|
|
3333
|
-
"text-align":
|
|
3335
|
+
"text-align": d
|
|
3334
3336
|
},
|
|
3335
|
-
disabled:
|
|
3337
|
+
disabled: g,
|
|
3336
3338
|
readonly: S,
|
|
3337
3339
|
placeholder: N,
|
|
3338
|
-
maxlength:
|
|
3340
|
+
maxlength: p,
|
|
3339
3341
|
onInput: x,
|
|
3340
3342
|
autocomplete: w,
|
|
3341
3343
|
onFocus: r,
|
|
3342
|
-
onClick:
|
|
3343
|
-
onKeypress:
|
|
3344
|
+
onClick: f,
|
|
3345
|
+
onKeypress: s,
|
|
3344
3346
|
onBlur: v
|
|
3345
3347
|
};
|
|
3346
|
-
return
|
|
3347
|
-
rows:
|
|
3348
|
-
"onUpdate:modelValue": (T) =>
|
|
3349
|
-
}), null), [[_t,
|
|
3350
|
-
"onUpdate:modelValue": (T) =>
|
|
3351
|
-
type:
|
|
3352
|
-
}), null), [[
|
|
3348
|
+
return c === "textarea" ? ee(u("textarea", Ie(E, {
|
|
3349
|
+
rows: y,
|
|
3350
|
+
"onUpdate:modelValue": (T) => h.value = T
|
|
3351
|
+
}), null), [[_t, h.value]]) : ee(u("input", Ie(E, {
|
|
3352
|
+
"onUpdate:modelValue": (T) => h.value = T,
|
|
3353
|
+
type: c
|
|
3354
|
+
}), null), [[bn, h.value]]);
|
|
3353
3355
|
};
|
|
3354
3356
|
}
|
|
3355
3357
|
});
|
|
3356
|
-
const
|
|
3357
|
-
name:
|
|
3358
|
+
const $a = M(Ca), lt = 1e3, at = 60 * lt, ot = 60 * at, Vt = 24 * ot, [ka] = D("count-down"), Na = /* @__PURE__ */ _({
|
|
3359
|
+
name: ka,
|
|
3358
3360
|
props: {
|
|
3359
3361
|
time: {
|
|
3360
3362
|
type: [Number, String],
|
|
@@ -3379,69 +3381,69 @@ const wa = D(Sa), nt = 1e3, lt = 60 * nt, at = 60 * lt, Lt = 24 * at, [xa] = M("
|
|
|
3379
3381
|
setup(e, {
|
|
3380
3382
|
slots: t,
|
|
3381
3383
|
emit: o,
|
|
3382
|
-
expose:
|
|
3384
|
+
expose: a
|
|
3383
3385
|
}) {
|
|
3384
|
-
const
|
|
3386
|
+
const l = L(), i = L(!1), n = L(Number(e.time)), r = L(0), f = B(() => g(n.value));
|
|
3385
3387
|
K(() => {
|
|
3386
3388
|
e.autoStart && v();
|
|
3387
3389
|
});
|
|
3388
3390
|
const v = () => {
|
|
3389
|
-
i.value = !0, r.value = n.value + Date.now(),
|
|
3391
|
+
i.value = !0, r.value = n.value + Date.now(), h();
|
|
3390
3392
|
}, x = () => {
|
|
3391
|
-
|
|
3392
|
-
},
|
|
3393
|
-
i.value = !1, window.cancelAnimationFrame(
|
|
3394
|
-
},
|
|
3395
|
-
i.value && (e.millisecond ?
|
|
3396
|
-
},
|
|
3397
|
-
if (n.value =
|
|
3393
|
+
s(), n.value = Number(e.time), e.autoStart && v();
|
|
3394
|
+
}, s = () => {
|
|
3395
|
+
i.value = !1, window.cancelAnimationFrame(l.value);
|
|
3396
|
+
}, h = () => {
|
|
3397
|
+
i.value && (e.millisecond ? c() : d(n.value, y()) || c(), l.value = window.requestAnimationFrame(h));
|
|
3398
|
+
}, c = () => {
|
|
3399
|
+
if (n.value = y(), e.millisecond && n.value === 0 || !e.millisecond && Math.floor(n.value / 1e3) === 0) {
|
|
3398
3400
|
i.value = !1, o("finish");
|
|
3399
3401
|
return;
|
|
3400
3402
|
}
|
|
3401
|
-
o("change",
|
|
3402
|
-
},
|
|
3403
|
-
const S = Math.floor(
|
|
3403
|
+
o("change", f.value);
|
|
3404
|
+
}, y = () => Math.max(r.value - Date.now(), 0), d = (m, S) => Math.floor(m / 1e3) === Math.floor(S / 1e3), g = (m) => {
|
|
3405
|
+
const S = Math.floor(m / Vt), w = Math.floor(m % Vt / ot), N = Math.floor(m % ot / at), b = Math.floor(m % at / lt), E = Math.floor(m % lt);
|
|
3404
3406
|
return {
|
|
3405
3407
|
days: S,
|
|
3406
3408
|
hours: w,
|
|
3407
3409
|
minutes: N,
|
|
3408
|
-
seconds:
|
|
3410
|
+
seconds: b,
|
|
3409
3411
|
milliseconds: E,
|
|
3410
|
-
timestamp:
|
|
3412
|
+
timestamp: m
|
|
3411
3413
|
};
|
|
3412
|
-
},
|
|
3413
|
-
let S =
|
|
3414
|
+
}, p = (m) => {
|
|
3415
|
+
let S = m;
|
|
3414
3416
|
const {
|
|
3415
3417
|
days: w
|
|
3416
|
-
} =
|
|
3418
|
+
} = f.value;
|
|
3417
3419
|
let {
|
|
3418
3420
|
hours: N,
|
|
3419
|
-
minutes:
|
|
3421
|
+
minutes: b,
|
|
3420
3422
|
seconds: E,
|
|
3421
3423
|
milliseconds: T
|
|
3422
|
-
} =
|
|
3423
|
-
return S.indexOf("DD") === -1 ? N += w * 24 : S = S.replace("DD", $(w)), S.indexOf("HH") === -1 ?
|
|
3424
|
-
}, $ = (
|
|
3425
|
-
let w = `${
|
|
3424
|
+
} = f.value;
|
|
3425
|
+
return S.indexOf("DD") === -1 ? N += w * 24 : S = S.replace("DD", $(w)), S.indexOf("HH") === -1 ? b += N * 60 : S = S.replace("HH", $(N)), S.indexOf("mm") === -1 ? E += b * 60 : S = S.replace("mm", $(b)), S.indexOf("ss") === -1 ? T += E * 1e3 : S = S.replace("ss", $(E)), S.indexOf("S") !== -1 && (S = S.replace(/S+/, (k) => $(T, k.length).slice(0, k.length))), S;
|
|
3426
|
+
}, $ = (m, S = 2) => {
|
|
3427
|
+
let w = `${m}`;
|
|
3426
3428
|
for (; w.length < S; )
|
|
3427
3429
|
w = `0${w}`;
|
|
3428
3430
|
return w;
|
|
3429
3431
|
};
|
|
3430
|
-
return
|
|
3432
|
+
return a({
|
|
3431
3433
|
start: v,
|
|
3432
3434
|
reset: x,
|
|
3433
|
-
suspend:
|
|
3435
|
+
suspend: s
|
|
3434
3436
|
}), () => {
|
|
3435
|
-
var
|
|
3436
|
-
return ((
|
|
3437
|
+
var m;
|
|
3438
|
+
return ((m = t.default) == null ? void 0 : m.call(t, f.value)) || u("div", null, [p(e.format)]);
|
|
3437
3439
|
};
|
|
3438
3440
|
}
|
|
3439
3441
|
});
|
|
3440
|
-
const
|
|
3441
|
-
function
|
|
3442
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
3442
|
+
const Ea = M(Na);
|
|
3443
|
+
function Ta(e) {
|
|
3444
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Se(e);
|
|
3443
3445
|
}
|
|
3444
|
-
const [
|
|
3446
|
+
const [Ba, te] = D("dialog"), La = {
|
|
3445
3447
|
// 控制显示
|
|
3446
3448
|
modelValue: {
|
|
3447
3449
|
type: Boolean,
|
|
@@ -3512,140 +3514,140 @@ const [Na, te] = M("dialog"), Ea = {
|
|
|
3512
3514
|
type: String,
|
|
3513
3515
|
default: "body"
|
|
3514
3516
|
}
|
|
3515
|
-
},
|
|
3516
|
-
name:
|
|
3517
|
+
}, un = /* @__PURE__ */ _({
|
|
3518
|
+
name: Ba,
|
|
3517
3519
|
directives: {
|
|
3518
|
-
loading:
|
|
3520
|
+
loading: Zt
|
|
3519
3521
|
},
|
|
3520
|
-
props:
|
|
3522
|
+
props: La,
|
|
3521
3523
|
emits: ["update:modelValue", "cancel", "confirm"],
|
|
3522
3524
|
setup(e, {
|
|
3523
3525
|
emit: t,
|
|
3524
3526
|
slots: o
|
|
3525
3527
|
}) {
|
|
3526
|
-
const
|
|
3528
|
+
const a = F({
|
|
3527
3529
|
cancel: !1,
|
|
3528
3530
|
confirm: !1
|
|
3529
|
-
}),
|
|
3530
|
-
|
|
3531
|
-
}, i = (
|
|
3532
|
-
var
|
|
3533
|
-
|
|
3534
|
-
}, n = (
|
|
3535
|
-
t("cancel",
|
|
3536
|
-
}, r = (
|
|
3537
|
-
t("confirm",
|
|
3538
|
-
},
|
|
3531
|
+
}), l = (h) => {
|
|
3532
|
+
s.value = h;
|
|
3533
|
+
}, i = (h) => {
|
|
3534
|
+
var c;
|
|
3535
|
+
l(!1), (c = e.callback) == null || c.call(e, h);
|
|
3536
|
+
}, n = (h) => {
|
|
3537
|
+
t("cancel", h, f("cancel"));
|
|
3538
|
+
}, r = (h) => {
|
|
3539
|
+
t("confirm", h, f("confirm"));
|
|
3540
|
+
}, f = (h) => {
|
|
3539
3541
|
const {
|
|
3540
|
-
modelValue:
|
|
3541
|
-
beforeClose:
|
|
3542
|
+
modelValue: c,
|
|
3543
|
+
beforeClose: y
|
|
3542
3544
|
} = e;
|
|
3543
|
-
if (
|
|
3544
|
-
if (Mt(
|
|
3545
|
-
|
|
3546
|
-
const
|
|
3547
|
-
|
|
3548
|
-
v(
|
|
3549
|
-
}).catch((
|
|
3550
|
-
throw new Error(
|
|
3551
|
-
}) : v(
|
|
3545
|
+
if (c)
|
|
3546
|
+
if (Mt(y)) {
|
|
3547
|
+
a[h] = !0;
|
|
3548
|
+
const d = y(h);
|
|
3549
|
+
kn(d) ? d.then((p) => {
|
|
3550
|
+
v(p, h);
|
|
3551
|
+
}).catch((p) => {
|
|
3552
|
+
throw new Error(p);
|
|
3553
|
+
}) : v(d, h);
|
|
3552
3554
|
} else
|
|
3553
|
-
i(
|
|
3554
|
-
}, v = (
|
|
3555
|
-
|
|
3556
|
-
}, x = (
|
|
3557
|
-
let
|
|
3558
|
-
return
|
|
3559
|
-
},
|
|
3555
|
+
i(h);
|
|
3556
|
+
}, v = (h, c) => {
|
|
3557
|
+
h && i(c), a[c] = !1;
|
|
3558
|
+
}, x = (h, c, y) => {
|
|
3559
|
+
let d = Number(h.substring(0, h.length - 2));
|
|
3560
|
+
return d /= c || 2, y ? `${y(d)}px` : `${d}px`;
|
|
3561
|
+
}, s = B({
|
|
3560
3562
|
get: () => e.modelValue,
|
|
3561
|
-
set: (
|
|
3563
|
+
set: (h) => t("update:modelValue", h)
|
|
3562
3564
|
});
|
|
3563
3565
|
return () => {
|
|
3564
3566
|
const {
|
|
3565
|
-
width:
|
|
3566
|
-
title:
|
|
3567
|
-
titleAlign:
|
|
3568
|
-
message:
|
|
3569
|
-
messageAlign:
|
|
3570
|
-
isCloseOnClickMask:
|
|
3567
|
+
width: h,
|
|
3568
|
+
title: c,
|
|
3569
|
+
titleAlign: y,
|
|
3570
|
+
message: d,
|
|
3571
|
+
messageAlign: g,
|
|
3572
|
+
isCloseOnClickMask: p,
|
|
3571
3573
|
showCloseIcon: $,
|
|
3572
|
-
showCancelBtn:
|
|
3574
|
+
showCancelBtn: m,
|
|
3573
3575
|
cancelButtonText: S,
|
|
3574
3576
|
showConfirmBtn: w,
|
|
3575
3577
|
confirmButtonText: N,
|
|
3576
|
-
imgSrc:
|
|
3578
|
+
imgSrc: b,
|
|
3577
3579
|
circleImg: E,
|
|
3578
3580
|
teleport: T
|
|
3579
3581
|
} = e;
|
|
3580
|
-
return
|
|
3581
|
-
modelValue:
|
|
3582
|
-
"onUpdate:modelValue": (k) =>
|
|
3582
|
+
return u(mt, Ie({
|
|
3583
|
+
modelValue: s.value,
|
|
3584
|
+
"onUpdate:modelValue": (k) => s.value = k,
|
|
3583
3585
|
customClass: te(),
|
|
3584
3586
|
customStyle: {
|
|
3585
|
-
width:
|
|
3587
|
+
width: R(h)
|
|
3586
3588
|
}
|
|
3587
3589
|
}, {
|
|
3588
|
-
"onUpdate:modelValue":
|
|
3590
|
+
"onUpdate:modelValue": l
|
|
3589
3591
|
}, {
|
|
3590
|
-
isCloseOnClickMask:
|
|
3592
|
+
isCloseOnClickMask: p,
|
|
3591
3593
|
teleport: T
|
|
3592
3594
|
}), {
|
|
3593
3595
|
default: () => {
|
|
3594
|
-
var k, P, O,
|
|
3595
|
-
return [((k = o.img) == null ? void 0 : k.call(o)) ||
|
|
3596
|
+
var k, P, O, V;
|
|
3597
|
+
return [((k = o.img) == null ? void 0 : k.call(o)) || b && u("div", {
|
|
3596
3598
|
class: te("img", {
|
|
3597
3599
|
circle: E
|
|
3598
3600
|
}),
|
|
3599
3601
|
style: {
|
|
3600
|
-
top: E ? `-${x(
|
|
3601
|
-
left: E ? `calc(50% - ${x(
|
|
3602
|
+
top: E ? `-${x(R(h), 4)}` : "auto",
|
|
3603
|
+
left: E ? `calc(50% - ${x(R(h), 4)})` : "auto"
|
|
3602
3604
|
}
|
|
3603
|
-
}, [
|
|
3605
|
+
}, [u("div", {
|
|
3604
3606
|
style: {
|
|
3605
|
-
width: E ? x(
|
|
3606
|
-
height: x(
|
|
3607
|
-
background: `url(${
|
|
3607
|
+
width: E ? x(R(h)) : R(h),
|
|
3608
|
+
height: x(R(h)),
|
|
3609
|
+
background: `url(${b}) center`,
|
|
3608
3610
|
borderRadius: E ? "50%" : "20px 20px 0 0"
|
|
3609
3611
|
}
|
|
3610
|
-
}, null)]),
|
|
3612
|
+
}, null)]), u("div", {
|
|
3611
3613
|
class: te("container")
|
|
3612
|
-
}, [
|
|
3614
|
+
}, [u("div", {
|
|
3613
3615
|
style: {
|
|
3614
|
-
height: E ? x(
|
|
3616
|
+
height: E ? x(R(h), 4, (X) => X + 20) : "24px"
|
|
3615
3617
|
}
|
|
3616
|
-
}, null), ((P = o.title) == null ? void 0 : P.call(o)) ||
|
|
3618
|
+
}, null), ((P = o.title) == null ? void 0 : P.call(o)) || u("div", {
|
|
3617
3619
|
class: te("title"),
|
|
3618
3620
|
style: {
|
|
3619
|
-
textAlign:
|
|
3621
|
+
textAlign: y
|
|
3620
3622
|
}
|
|
3621
|
-
}, [
|
|
3623
|
+
}, [c]), u("div", {
|
|
3622
3624
|
class: te("content")
|
|
3623
|
-
}, [
|
|
3625
|
+
}, [u("div", {
|
|
3624
3626
|
class: te("message"),
|
|
3625
3627
|
style: {
|
|
3626
|
-
textAlign:
|
|
3628
|
+
textAlign: g
|
|
3627
3629
|
}
|
|
3628
|
-
}, [((O = o.default) == null ? void 0 : O.call(o)) ||
|
|
3630
|
+
}, [((O = o.default) == null ? void 0 : O.call(o)) || d]), ((V = o.footer) == null ? void 0 : V.call(o)) || u("div", {
|
|
3629
3631
|
class: te("footer"),
|
|
3630
3632
|
style: {
|
|
3631
|
-
paddingTop:
|
|
3633
|
+
paddingTop: m || w ? "20px" : "0px"
|
|
3632
3634
|
}
|
|
3633
|
-
}, [
|
|
3635
|
+
}, [m && ee(u(tt, {
|
|
3634
3636
|
type: "secondary",
|
|
3635
3637
|
class: te("footer-btn"),
|
|
3636
3638
|
onClick: n
|
|
3637
|
-
},
|
|
3639
|
+
}, Ta(S) ? S : {
|
|
3638
3640
|
default: () => [S]
|
|
3639
|
-
}), [[
|
|
3641
|
+
}), [[vt("loading"), a.cancel]]), w && ee(u(tt, {
|
|
3640
3642
|
type: "primary",
|
|
3641
3643
|
class: te("footer-btn"),
|
|
3642
3644
|
onClick: r
|
|
3643
3645
|
}, {
|
|
3644
|
-
default: () => [
|
|
3645
|
-
}), [[
|
|
3646
|
+
default: () => [a.confirm ? "" : N]
|
|
3647
|
+
}), [[vt("loading"), a.confirm]])])]), $ && u("div", {
|
|
3646
3648
|
class: te("close"),
|
|
3647
3649
|
onClick: () => i("close")
|
|
3648
|
-
}, [
|
|
3650
|
+
}, [u(ve, {
|
|
3649
3651
|
name: "cross"
|
|
3650
3652
|
}, null)])])];
|
|
3651
3653
|
}
|
|
@@ -3653,36 +3655,36 @@ const [Na, te] = M("dialog"), Ea = {
|
|
|
3653
3655
|
};
|
|
3654
3656
|
}
|
|
3655
3657
|
});
|
|
3656
|
-
let Ge =
|
|
3657
|
-
const
|
|
3658
|
-
const o = `dialog${
|
|
3659
|
-
Ge =
|
|
3658
|
+
let Ge = Ce({}), Va = 0;
|
|
3659
|
+
const sn = [], Ia = (e, t) => {
|
|
3660
|
+
const o = `dialog${Va += 1}`;
|
|
3661
|
+
Ge = Ce({
|
|
3660
3662
|
setup() {
|
|
3661
|
-
const i =
|
|
3663
|
+
const i = L(!0), n = (r) => {
|
|
3662
3664
|
i.value = r;
|
|
3663
3665
|
};
|
|
3664
|
-
return () =>
|
|
3665
|
-
|
|
3666
|
+
return () => Ve(
|
|
3667
|
+
un,
|
|
3666
3668
|
{
|
|
3667
3669
|
modelValue: i.value,
|
|
3668
3670
|
"onUpdate:modelValue": n,
|
|
3669
3671
|
...e,
|
|
3670
3672
|
onAfterLeave: () => {
|
|
3671
|
-
|
|
3673
|
+
Pa(o);
|
|
3672
3674
|
}
|
|
3673
3675
|
},
|
|
3674
3676
|
{ ...t }
|
|
3675
3677
|
);
|
|
3676
3678
|
}
|
|
3677
3679
|
});
|
|
3678
|
-
const
|
|
3679
|
-
|
|
3680
|
-
},
|
|
3681
|
-
|
|
3680
|
+
const l = document.createElement("div");
|
|
3681
|
+
sn.push({ id: o, app: Ge, el: l }), Ge.mount(l);
|
|
3682
|
+
}, Pa = (e) => {
|
|
3683
|
+
sn.forEach((t) => {
|
|
3682
3684
|
e === t.id && t.app.unmount();
|
|
3683
3685
|
});
|
|
3684
3686
|
};
|
|
3685
|
-
const
|
|
3687
|
+
const za = M(un), cn = {
|
|
3686
3688
|
// 是否显示
|
|
3687
3689
|
modelValue: {
|
|
3688
3690
|
type: Boolean,
|
|
@@ -3734,18 +3736,18 @@ const Ia = D(rn), sn = {
|
|
|
3734
3736
|
// 展示位置
|
|
3735
3737
|
position: {
|
|
3736
3738
|
type: String,
|
|
3737
|
-
default:
|
|
3739
|
+
default: Wt.Top
|
|
3738
3740
|
}
|
|
3739
|
-
}, [
|
|
3740
|
-
let
|
|
3741
|
-
return e.parentElement ? (getComputedStyle(e.parentElement).position !== "static" && (
|
|
3742
|
-
offsetLeft:
|
|
3743
|
-
offsetTop:
|
|
3741
|
+
}, [_a, Ke] = D("popper"), dn = (e) => e.parentElement ? getComputedStyle(e.parentElement).position !== "static" ? e.parentElement : dn(e.parentElement) : e, it = (e, t, o) => {
|
|
3742
|
+
let a = t || e.offsetTop, l = o || e.offsetLeft;
|
|
3743
|
+
return e.parentElement ? (getComputedStyle(e.parentElement).position !== "static" && (a += e.parentElement.offsetTop, l += e.parentElement.offsetLeft), it(e.parentElement, a, l)) : {
|
|
3744
|
+
offsetLeft: l,
|
|
3745
|
+
offsetTop: a
|
|
3744
3746
|
};
|
|
3745
|
-
},
|
|
3746
|
-
name:
|
|
3747
|
+
}, rt = /* @__PURE__ */ _({
|
|
3748
|
+
name: _a,
|
|
3747
3749
|
props: {
|
|
3748
|
-
...
|
|
3750
|
+
...cn,
|
|
3749
3751
|
reference: {
|
|
3750
3752
|
type: Object,
|
|
3751
3753
|
default: null
|
|
@@ -3754,7 +3756,7 @@ const Ia = D(rn), sn = {
|
|
|
3754
3756
|
setup(e, {
|
|
3755
3757
|
slots: t
|
|
3756
3758
|
}) {
|
|
3757
|
-
const o = ne(),
|
|
3759
|
+
const o = ne(), a = L(e.modelValue), l = F({
|
|
3758
3760
|
placement: "",
|
|
3759
3761
|
align: ""
|
|
3760
3762
|
}), i = F({
|
|
@@ -3762,162 +3764,162 @@ const Ia = D(rn), sn = {
|
|
|
3762
3764
|
left: 0
|
|
3763
3765
|
}), n = () => {
|
|
3764
3766
|
var k;
|
|
3765
|
-
const
|
|
3766
|
-
if (!
|
|
3767
|
+
const s = e.reference, h = (k = o == null ? void 0 : o.proxy) == null ? void 0 : k.$refs.popper;
|
|
3768
|
+
if (!s || !h)
|
|
3767
3769
|
return;
|
|
3768
3770
|
const {
|
|
3769
|
-
offsetWidth:
|
|
3770
|
-
offsetHeight:
|
|
3771
|
-
} =
|
|
3772
|
-
offsetTop:
|
|
3773
|
-
offsetLeft:
|
|
3774
|
-
} =
|
|
3775
|
-
offsetWidth:
|
|
3771
|
+
offsetWidth: c,
|
|
3772
|
+
offsetHeight: y
|
|
3773
|
+
} = s, {
|
|
3774
|
+
offsetTop: d,
|
|
3775
|
+
offsetLeft: g
|
|
3776
|
+
} = it(s), {
|
|
3777
|
+
offsetWidth: p,
|
|
3776
3778
|
offsetHeight: $
|
|
3777
|
-
} =
|
|
3778
|
-
placement:
|
|
3779
|
+
} = h, {
|
|
3780
|
+
placement: m,
|
|
3779
3781
|
align: S
|
|
3780
|
-
} =
|
|
3782
|
+
} = l, {
|
|
3781
3783
|
offsetLeft: w,
|
|
3782
3784
|
offsetTop: N
|
|
3783
|
-
} =
|
|
3785
|
+
} = it(dn(h)), b = {
|
|
3784
3786
|
x: 0,
|
|
3785
3787
|
y: 0,
|
|
3786
|
-
newPlacement:
|
|
3788
|
+
newPlacement: m
|
|
3787
3789
|
};
|
|
3788
|
-
e.autoFlipping && (
|
|
3789
|
-
const E =
|
|
3790
|
-
switch (
|
|
3790
|
+
e.autoFlipping && (m === "left" && g - p < pageXOffset ? b.newPlacement = "right" : m === "right" && g + c + p > pageXOffset + innerWidth ? b.newPlacement = "left" : m === "top" && d - $ < pageYOffset ? b.newPlacement = "bottom" : m === "bottom" && d + y + $ > pageYOffset + innerHeight && (b.newPlacement = "top"));
|
|
3791
|
+
const E = b.newPlacement === "top" ? -$ : y, T = b.newPlacement === "left" ? -p : c;
|
|
3792
|
+
switch (b.newPlacement) {
|
|
3791
3793
|
case "top":
|
|
3792
3794
|
case "bottom":
|
|
3793
|
-
|
|
3795
|
+
b.y = d + E, S === "start" ? b.x = g : S === "end" ? b.x = g + c - p : b.x = g + c / 2 - p / 2;
|
|
3794
3796
|
break;
|
|
3795
3797
|
case "left":
|
|
3796
3798
|
case "right":
|
|
3797
|
-
|
|
3799
|
+
b.x = g + T, S === "start" ? b.y = d : S === "end" ? b.y = d + y - $ : b.y = d + y / 2 - $ / 2;
|
|
3798
3800
|
break;
|
|
3799
3801
|
}
|
|
3800
|
-
i.left =
|
|
3801
|
-
}, r = (
|
|
3802
|
-
var
|
|
3803
|
-
const
|
|
3804
|
-
|
|
3805
|
-
},
|
|
3806
|
-
|
|
3802
|
+
i.left = b.x - w, i.top = b.y - N, l.placement = b.newPlacement;
|
|
3803
|
+
}, r = (s) => {
|
|
3804
|
+
var y;
|
|
3805
|
+
const h = (y = o == null ? void 0 : o.proxy) == null ? void 0 : y.$refs.popper, c = e.reference;
|
|
3806
|
+
c && h && !c.contains(s.target) && !h.contains(s.target) && (a.value = !1);
|
|
3807
|
+
}, f = () => {
|
|
3808
|
+
a.value = !a.value;
|
|
3807
3809
|
}, v = () => {
|
|
3808
|
-
const [
|
|
3809
|
-
|
|
3810
|
+
const [s, h] = e.position.split("-");
|
|
3811
|
+
l.align = h, l.placement = s;
|
|
3810
3812
|
}, x = () => {
|
|
3811
|
-
e.manual && (
|
|
3812
|
-
throw new Error(
|
|
3813
|
+
e.manual && (a.value = e.modelValue), e.modelValue || a.value ? re(n).catch((s) => {
|
|
3814
|
+
throw new Error(s);
|
|
3813
3815
|
}) : (i.left = 0, i.top = 0);
|
|
3814
3816
|
};
|
|
3815
|
-
return
|
|
3817
|
+
return U(() => e.position, () => {
|
|
3816
3818
|
v(), x();
|
|
3817
|
-
}),
|
|
3818
|
-
var
|
|
3819
|
-
v(), x(), e.manual || ((
|
|
3820
|
-
}),
|
|
3821
|
-
var
|
|
3822
|
-
e.manual || ((
|
|
3819
|
+
}), U([() => a.value, () => e.modelValue, () => e.reference], x), K(() => {
|
|
3820
|
+
var s;
|
|
3821
|
+
v(), x(), e.manual || ((s = e.reference) == null || s.addEventListener("click", f), document.addEventListener("touchstart", r), document.addEventListener("mousedown", r));
|
|
3822
|
+
}), xe(() => {
|
|
3823
|
+
var s;
|
|
3824
|
+
e.manual || ((s = e.reference) == null || s.removeEventListener("click", f), document.removeEventListener("touchstart", r), document.removeEventListener("mousedown", r));
|
|
3823
3825
|
}), () => {
|
|
3824
3826
|
const {
|
|
3825
|
-
left:
|
|
3826
|
-
top:
|
|
3827
|
+
left: s,
|
|
3828
|
+
top: h
|
|
3827
3829
|
} = i, {
|
|
3828
|
-
width:
|
|
3829
|
-
color:
|
|
3830
|
-
bgColor:
|
|
3831
|
-
modelValue:
|
|
3832
|
-
minWidth:
|
|
3830
|
+
width: c,
|
|
3831
|
+
color: y,
|
|
3832
|
+
bgColor: d,
|
|
3833
|
+
modelValue: g,
|
|
3834
|
+
minWidth: p,
|
|
3833
3835
|
popperClass: $,
|
|
3834
|
-
popperStyle:
|
|
3836
|
+
popperStyle: m,
|
|
3835
3837
|
text: S
|
|
3836
3838
|
} = e;
|
|
3837
|
-
return
|
|
3839
|
+
return u(st, {
|
|
3838
3840
|
to: e.teleport
|
|
3839
3841
|
}, {
|
|
3840
3842
|
default: () => {
|
|
3841
3843
|
var w;
|
|
3842
|
-
return [ee(
|
|
3844
|
+
return [ee(u("div", {
|
|
3843
3845
|
class: [Ke({
|
|
3844
|
-
[
|
|
3846
|
+
[l.placement]: l.placement
|
|
3845
3847
|
}), $],
|
|
3846
3848
|
ref: "popper",
|
|
3847
3849
|
style: {
|
|
3848
|
-
...
|
|
3849
|
-
left: `${
|
|
3850
|
-
top: `${
|
|
3850
|
+
...m,
|
|
3851
|
+
left: `${s}px`,
|
|
3852
|
+
top: `${h}px`
|
|
3851
3853
|
}
|
|
3852
|
-
}, [
|
|
3854
|
+
}, [u("div", {
|
|
3853
3855
|
class: Ke("content"),
|
|
3854
3856
|
style: {
|
|
3855
|
-
color:
|
|
3856
|
-
width:
|
|
3857
|
-
minWidth:
|
|
3858
|
-
backgroundColor:
|
|
3857
|
+
color: y,
|
|
3858
|
+
width: R(c),
|
|
3859
|
+
minWidth: R(p),
|
|
3860
|
+
backgroundColor: d
|
|
3859
3861
|
}
|
|
3860
|
-
}, [((w = t.default) == null ? void 0 : w.call(t)) || S]),
|
|
3861
|
-
class: Ke("arrow", [`${
|
|
3862
|
+
}, [((w = t.default) == null ? void 0 : w.call(t)) || S]), u("div", {
|
|
3863
|
+
class: Ke("arrow", [`${l.placement}${l.align ? `-${l.align}` : ""}`]),
|
|
3862
3864
|
style: {
|
|
3863
|
-
color:
|
|
3865
|
+
color: d
|
|
3864
3866
|
}
|
|
3865
|
-
}, null)]), [[
|
|
3867
|
+
}, null)]), [[ye, g || a.value]])];
|
|
3866
3868
|
}
|
|
3867
3869
|
});
|
|
3868
3870
|
};
|
|
3869
3871
|
}
|
|
3870
3872
|
});
|
|
3871
|
-
function
|
|
3872
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
3873
|
+
function Da(e) {
|
|
3874
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Se(e);
|
|
3873
3875
|
}
|
|
3874
|
-
const [
|
|
3875
|
-
name:
|
|
3876
|
-
props:
|
|
3876
|
+
const [Ma] = D("tooltip"), Oa = /* @__PURE__ */ _({
|
|
3877
|
+
name: Ma,
|
|
3878
|
+
props: cn,
|
|
3877
3879
|
setup(e, {
|
|
3878
3880
|
slots: t
|
|
3879
3881
|
}) {
|
|
3880
|
-
const o = ne(),
|
|
3882
|
+
const o = ne(), a = L(), l = () => {
|
|
3881
3883
|
var n;
|
|
3882
3884
|
const i = (n = o == null ? void 0 : o.proxy) == null ? void 0 : n.$el;
|
|
3883
3885
|
return i == null ? void 0 : i.nextElementSibling;
|
|
3884
3886
|
};
|
|
3885
3887
|
return K(() => {
|
|
3886
|
-
|
|
3887
|
-
}),
|
|
3888
|
+
a.value = l();
|
|
3889
|
+
}), ut(() => {
|
|
3888
3890
|
re(() => {
|
|
3889
|
-
|
|
3891
|
+
a.value = l();
|
|
3890
3892
|
}).catch((i) => {
|
|
3891
3893
|
throw Error(i);
|
|
3892
3894
|
});
|
|
3893
3895
|
}), () => {
|
|
3894
3896
|
var n;
|
|
3895
3897
|
let i;
|
|
3896
|
-
return
|
|
3897
|
-
reference:
|
|
3898
|
-
}),
|
|
3898
|
+
return u(He, null, [(n = t.default) == null ? void 0 : n.call(t)[0], a.value && (t.popper ? u(rt, Ie(e, {
|
|
3899
|
+
reference: a.value
|
|
3900
|
+
}), Da(i = t.popper()) ? i : {
|
|
3899
3901
|
default: () => [i]
|
|
3900
|
-
}) :
|
|
3901
|
-
reference:
|
|
3902
|
+
}) : u(rt, Ie(e, {
|
|
3903
|
+
reference: a.value
|
|
3902
3904
|
}), null))]);
|
|
3903
3905
|
};
|
|
3904
3906
|
}
|
|
3905
3907
|
}), It = (e, t) => {
|
|
3906
3908
|
t.value ? (e.classList.add("y-popper__wrap"), e.appendChild(e.instance.$el)) : (e.classList.remove("y-popper__wrap"), e.removeChild(e.instance.$el));
|
|
3907
|
-
},
|
|
3909
|
+
}, Aa = {
|
|
3908
3910
|
install: (e) => {
|
|
3909
|
-
e.directive("tooltip",
|
|
3911
|
+
e.directive("tooltip", Ra);
|
|
3910
3912
|
}
|
|
3911
|
-
},
|
|
3913
|
+
}, Ra = {
|
|
3912
3914
|
getSSRProps: (e) => ({ ...e }),
|
|
3913
3915
|
// 指令是具有一组生命周期的钩子:
|
|
3914
3916
|
// 在绑定元素的 attribute 或事件监听器被应用之前调用
|
|
3915
3917
|
// 在绑定元素的父组件挂载之前调用
|
|
3916
3918
|
mounted: (e, t) => {
|
|
3917
|
-
const
|
|
3918
|
-
render: () =>
|
|
3919
|
-
}),
|
|
3920
|
-
e.instance =
|
|
3919
|
+
const a = Ce({
|
|
3920
|
+
render: () => Ve(rt, { ...t.value, reference: e })
|
|
3921
|
+
}), l = document.createElement("div");
|
|
3922
|
+
e.instance = a.mount(l), t.value && It(e, t);
|
|
3921
3923
|
},
|
|
3922
3924
|
updated: (e, t) => {
|
|
3923
3925
|
t.oldValue !== t.value && It(e, t);
|
|
@@ -3926,18 +3928,18 @@ const [_a] = M("tooltip"), za = /* @__PURE__ */ z({
|
|
|
3926
3928
|
e.instance && e.instance.$el.remove();
|
|
3927
3929
|
}
|
|
3928
3930
|
};
|
|
3929
|
-
const
|
|
3931
|
+
const Wa = M(Oa), Be = (e, t, o) => ({
|
|
3930
3932
|
number: e,
|
|
3931
3933
|
text: t,
|
|
3932
3934
|
active: o
|
|
3933
|
-
}), [
|
|
3935
|
+
}), [Fa, pe] = D("pagination"), Ha = {
|
|
3934
3936
|
modelValue: {
|
|
3935
3937
|
type: Number,
|
|
3936
3938
|
default: 1
|
|
3937
3939
|
},
|
|
3938
3940
|
mode: {
|
|
3939
3941
|
type: String,
|
|
3940
|
-
default:
|
|
3942
|
+
default: Rt.multi
|
|
3941
3943
|
},
|
|
3942
3944
|
prevText: {
|
|
3943
3945
|
type: String,
|
|
@@ -3983,111 +3985,111 @@ const Oa = D(za), Te = (e, t, o) => ({
|
|
|
3983
3985
|
type: Boolean,
|
|
3984
3986
|
default: !1
|
|
3985
3987
|
}
|
|
3986
|
-
},
|
|
3987
|
-
name:
|
|
3988
|
-
props:
|
|
3988
|
+
}, Ya = /* @__PURE__ */ _({
|
|
3989
|
+
name: Fa,
|
|
3990
|
+
props: Ha,
|
|
3989
3991
|
emits: ["change", "update:modelValue"],
|
|
3990
3992
|
setup(e, {
|
|
3991
3993
|
emit: t,
|
|
3992
3994
|
slots: o
|
|
3993
3995
|
}) {
|
|
3994
|
-
const
|
|
3996
|
+
const a = B(() => {
|
|
3995
3997
|
const {
|
|
3996
3998
|
pageCount: n,
|
|
3997
3999
|
totalItems: r,
|
|
3998
|
-
itemsPerPage:
|
|
3999
|
-
} = e, v = Number(n) || Math.ceil(Number(r) / Number(
|
|
4000
|
+
itemsPerPage: f
|
|
4001
|
+
} = e, v = Number(n) || Math.ceil(Number(r) / Number(f));
|
|
4000
4002
|
return Math.max(1, v);
|
|
4001
|
-
}),
|
|
4002
|
-
const n = [], r =
|
|
4003
|
+
}), l = B(() => {
|
|
4004
|
+
const n = [], r = a.value, f = Number(e.showPageSize), {
|
|
4003
4005
|
modelValue: v,
|
|
4004
4006
|
forceEllipses: x,
|
|
4005
|
-
ellipsesWithInclusio:
|
|
4007
|
+
ellipsesWithInclusio: s
|
|
4006
4008
|
} = e;
|
|
4007
|
-
let
|
|
4008
|
-
const
|
|
4009
|
-
|
|
4010
|
-
for (let
|
|
4011
|
-
const
|
|
4012
|
-
n.push(
|
|
4009
|
+
let h = 1, c = r;
|
|
4010
|
+
const y = f < r;
|
|
4011
|
+
y && (h = Math.max(v - Math.floor(f / 2), 1), c = h + f - 1, c > r && (c = r, h = c - f + 1));
|
|
4012
|
+
for (let d = h; d <= c; d++) {
|
|
4013
|
+
const g = Be(d, d, d === v);
|
|
4014
|
+
n.push(g);
|
|
4013
4015
|
}
|
|
4014
|
-
if (
|
|
4015
|
-
if (
|
|
4016
|
-
const
|
|
4017
|
-
if (n.unshift(
|
|
4018
|
-
const
|
|
4019
|
-
n.unshift(
|
|
4016
|
+
if (y && f > 0 && x) {
|
|
4017
|
+
if (h > 1) {
|
|
4018
|
+
const d = Be(h - 1, "...");
|
|
4019
|
+
if (n.unshift(d), s) {
|
|
4020
|
+
const g = Be(1, "1");
|
|
4021
|
+
n.unshift(g);
|
|
4020
4022
|
}
|
|
4021
4023
|
}
|
|
4022
|
-
if (
|
|
4023
|
-
const
|
|
4024
|
-
if (n.push(
|
|
4025
|
-
const
|
|
4026
|
-
n.push(
|
|
4024
|
+
if (c < r) {
|
|
4025
|
+
const d = Be(c + 1, "...");
|
|
4026
|
+
if (n.push(d), s) {
|
|
4027
|
+
const g = Be(r, r);
|
|
4028
|
+
n.push(g);
|
|
4027
4029
|
}
|
|
4028
4030
|
}
|
|
4029
4031
|
}
|
|
4030
4032
|
return n;
|
|
4031
4033
|
}), i = (n, r) => {
|
|
4032
|
-
const
|
|
4033
|
-
e.modelValue !==
|
|
4034
|
+
const f = Math.min(Math.max(n, 1), a.value);
|
|
4035
|
+
e.modelValue !== f && (!e.isBlockUpdate && t("update:modelValue", f), r && t("change", f));
|
|
4034
4036
|
};
|
|
4035
|
-
return
|
|
4037
|
+
return Sn(() => i(e.modelValue)), () => {
|
|
4036
4038
|
const {
|
|
4037
4039
|
mode: n,
|
|
4038
4040
|
modelValue: r,
|
|
4039
|
-
showPrevButton:
|
|
4041
|
+
showPrevButton: f,
|
|
4040
4042
|
showNextButton: v,
|
|
4041
4043
|
prevText: x,
|
|
4042
|
-
nextText:
|
|
4043
|
-
} = e,
|
|
4044
|
-
return
|
|
4044
|
+
nextText: s
|
|
4045
|
+
} = e, h = o["prev-text"], c = r === 1, y = o["next-text"], d = r === a.value, g = o["simple-page"];
|
|
4046
|
+
return u("nav", {
|
|
4045
4047
|
role: "navigation",
|
|
4046
|
-
class:
|
|
4047
|
-
}, [
|
|
4048
|
-
class:
|
|
4049
|
-
}, [
|
|
4050
|
-
class: [
|
|
4051
|
-
prevBtnDisabled:
|
|
4048
|
+
class: pe()
|
|
4049
|
+
}, [u("ul", {
|
|
4050
|
+
class: pe("items")
|
|
4051
|
+
}, [f && u("li", {
|
|
4052
|
+
class: [pe("item", {
|
|
4053
|
+
prevBtnDisabled: c,
|
|
4052
4054
|
prev: !0
|
|
4053
4055
|
})],
|
|
4054
4056
|
onClick: () => i(r - 1, !0)
|
|
4055
|
-
}, [
|
|
4056
|
-
disabled:
|
|
4057
|
+
}, [h ? h({
|
|
4058
|
+
disabled: c,
|
|
4057
4059
|
text: x
|
|
4058
|
-
}) :
|
|
4060
|
+
}) : u("button", {
|
|
4059
4061
|
type: "button",
|
|
4060
|
-
disabled:
|
|
4061
|
-
}, [x])]), n === "simple" ?
|
|
4062
|
-
class:
|
|
4063
|
-
}, [
|
|
4062
|
+
disabled: c
|
|
4063
|
+
}, [x])]), n === "simple" ? u("li", {
|
|
4064
|
+
class: pe("page-desc")
|
|
4065
|
+
}, [g ? g({
|
|
4064
4066
|
current: r,
|
|
4065
|
-
total:
|
|
4066
|
-
}) : `${r}/${
|
|
4067
|
-
class: [
|
|
4068
|
-
active:
|
|
4067
|
+
total: a.value
|
|
4068
|
+
}) : `${r}/${a.value}`]) : l.value.map((p) => u("li", {
|
|
4069
|
+
class: [pe("item", {
|
|
4070
|
+
active: p.active,
|
|
4069
4071
|
page: !0
|
|
4070
4072
|
})],
|
|
4071
|
-
onClick: () => i(
|
|
4072
|
-
}, [o.page ? o.page(
|
|
4073
|
+
onClick: () => i(p.number, !0)
|
|
4074
|
+
}, [o.page ? o.page(p) : u("button", {
|
|
4073
4075
|
type: "button"
|
|
4074
|
-
}, [
|
|
4075
|
-
class: [
|
|
4076
|
-
nextBtnDisabled:
|
|
4076
|
+
}, [p.text])])), v && u("li", {
|
|
4077
|
+
class: [pe("item", {
|
|
4078
|
+
nextBtnDisabled: d,
|
|
4077
4079
|
next: !0
|
|
4078
4080
|
})],
|
|
4079
4081
|
onClick: () => i(r + 1, !0)
|
|
4080
|
-
}, [
|
|
4081
|
-
disabled:
|
|
4082
|
-
text:
|
|
4083
|
-
}) :
|
|
4082
|
+
}, [y ? y({
|
|
4083
|
+
disabled: d,
|
|
4084
|
+
text: s
|
|
4085
|
+
}) : u("button", {
|
|
4084
4086
|
type: "button",
|
|
4085
|
-
disabled:
|
|
4086
|
-
}, [
|
|
4087
|
+
disabled: d
|
|
4088
|
+
}, [s])])])]);
|
|
4087
4089
|
};
|
|
4088
4090
|
}
|
|
4089
4091
|
});
|
|
4090
|
-
const
|
|
4092
|
+
const ja = M(Ya), [fn, Oe] = D("dropdown"), mn = fn, Ua = {
|
|
4091
4093
|
zIndex: {
|
|
4092
4094
|
type: Number,
|
|
4093
4095
|
default: 100
|
|
@@ -4098,7 +4100,7 @@ const Fa = D(Wa), [dn, Oe] = M("dropdown"), fn = dn, Ha = {
|
|
|
4098
4100
|
},
|
|
4099
4101
|
direction: {
|
|
4100
4102
|
type: String,
|
|
4101
|
-
default:
|
|
4103
|
+
default: be.DOWN
|
|
4102
4104
|
},
|
|
4103
4105
|
activeColor: {
|
|
4104
4106
|
type: String,
|
|
@@ -4116,30 +4118,30 @@ const Fa = D(Wa), [dn, Oe] = M("dropdown"), fn = dn, Ha = {
|
|
|
4116
4118
|
type: Number,
|
|
4117
4119
|
default: 0
|
|
4118
4120
|
}
|
|
4119
|
-
},
|
|
4120
|
-
name:
|
|
4121
|
-
props:
|
|
4121
|
+
}, Xa = /* @__PURE__ */ _({
|
|
4122
|
+
name: fn,
|
|
4123
|
+
props: Ua,
|
|
4122
4124
|
setup(e, {
|
|
4123
4125
|
slots: t,
|
|
4124
4126
|
expose: o
|
|
4125
4127
|
}) {
|
|
4126
|
-
const
|
|
4128
|
+
const a = `dropdown-${Math.ceil(Math.random() * 100)}`, l = L(), i = L(null), n = L(0), {
|
|
4127
4129
|
initProvide: r,
|
|
4128
|
-
children:
|
|
4129
|
-
} =
|
|
4130
|
+
children: f
|
|
4131
|
+
} = fe(mn), v = B(() => f.some((w) => w.exposed.state.showPopup)), x = B(() => e.swipeThreshold && f.length > Number(e.swipeThreshold)), s = B(() => v.value && e.zIndex ? {
|
|
4130
4132
|
zIndex: Number(e.zIndex) + 1
|
|
4131
|
-
} : {}),
|
|
4132
|
-
let
|
|
4133
|
-
for (;
|
|
4133
|
+
} : {}), h = (w) => w.tagName !== "HTML" && w.tagName !== "BODY" && w.nodeType === 1, c = (w, N = window) => {
|
|
4134
|
+
let b = w;
|
|
4135
|
+
for (; b && b !== N && h(b); ) {
|
|
4134
4136
|
const {
|
|
4135
4137
|
overflowY: E
|
|
4136
|
-
} = window.getComputedStyle(
|
|
4138
|
+
} = window.getComputedStyle(b);
|
|
4137
4139
|
if (/scroll|auto|overlay/i.test(E))
|
|
4138
|
-
return
|
|
4139
|
-
|
|
4140
|
+
return b;
|
|
4141
|
+
b = b.parentNode;
|
|
4140
4142
|
}
|
|
4141
4143
|
return N;
|
|
4142
|
-
},
|
|
4144
|
+
}, y = L(), d = () => {
|
|
4143
4145
|
if (i.value) {
|
|
4144
4146
|
let w = {
|
|
4145
4147
|
top: 0,
|
|
@@ -4149,96 +4151,96 @@ const Fa = D(Wa), [dn, Oe] = M("dropdown"), fn = dn, Ha = {
|
|
|
4149
4151
|
width: 0,
|
|
4150
4152
|
height: 0
|
|
4151
4153
|
};
|
|
4152
|
-
const N =
|
|
4153
|
-
N === window && (w.width = window.innerWidth, w.height = window.innerHeight), N && (N != null && N.getBoundingClientRect) && (w = N.getBoundingClientRect()), e.direction ===
|
|
4154
|
+
const N = gt(i);
|
|
4155
|
+
N === window && (w.width = window.innerWidth, w.height = window.innerHeight), N && (N != null && N.getBoundingClientRect) && (w = N.getBoundingClientRect()), e.direction === be.DOWN ? n.value = w.bottom : n.value = window.innerHeight - w.top;
|
|
4154
4156
|
}
|
|
4157
|
+
}, g = () => {
|
|
4158
|
+
v.value && d();
|
|
4155
4159
|
}, p = () => {
|
|
4156
|
-
|
|
4157
|
-
}, y = () => {
|
|
4158
|
-
c.forEach((w) => {
|
|
4160
|
+
f.forEach((w) => {
|
|
4159
4161
|
w.exposed.toggle(!1);
|
|
4160
4162
|
});
|
|
4161
4163
|
}, $ = (w) => {
|
|
4162
|
-
(Array.isArray(
|
|
4163
|
-
const T =
|
|
4164
|
+
(Array.isArray(l) ? l : [l]).every((E) => {
|
|
4165
|
+
const T = gt(E);
|
|
4164
4166
|
return T && !T.contains(w.target);
|
|
4165
|
-
}) && e.isCloseOnClickOutside &&
|
|
4167
|
+
}) && e.isCloseOnClickOutside && p();
|
|
4166
4168
|
};
|
|
4167
4169
|
K(() => {
|
|
4168
4170
|
var w;
|
|
4169
|
-
|
|
4171
|
+
l.value && (y.value = c(l.value)), (w = y.value) == null || w.addEventListener("scroll", g, {
|
|
4170
4172
|
passive: !0
|
|
4171
4173
|
}), document.addEventListener("click", $);
|
|
4172
|
-
}),
|
|
4174
|
+
}), xe(() => {
|
|
4173
4175
|
var w;
|
|
4174
|
-
(w =
|
|
4176
|
+
(w = y.value) == null || w.removeEventListener("scroll", g), document.removeEventListener("click", $);
|
|
4175
4177
|
});
|
|
4176
|
-
const
|
|
4178
|
+
const m = (w) => {
|
|
4177
4179
|
const N = [-1, -1];
|
|
4178
|
-
|
|
4179
|
-
const T =
|
|
4180
|
+
f.forEach((b, E) => {
|
|
4181
|
+
const T = b.exposed;
|
|
4180
4182
|
E === w ? N[1] = E : T.state.showPopup && (N[0] = E);
|
|
4181
|
-
}), N[0] !== -1 &&
|
|
4183
|
+
}), N[0] !== -1 && f[N[0]].exposed.toggle(!1, {
|
|
4182
4184
|
immediate: !0
|
|
4183
4185
|
}), re(() => {
|
|
4184
|
-
N[1] !== -1 &&
|
|
4185
|
-
}).catch((
|
|
4186
|
-
throw new Error(
|
|
4186
|
+
N[1] !== -1 && f[N[1]].exposed.toggle();
|
|
4187
|
+
}).catch((b) => {
|
|
4188
|
+
throw new Error(b);
|
|
4187
4189
|
});
|
|
4188
4190
|
}, S = (w, N) => {
|
|
4189
|
-
const
|
|
4191
|
+
const b = w.exposed, {
|
|
4190
4192
|
disabled: E,
|
|
4191
4193
|
titleClass: T
|
|
4192
4194
|
} = w.proxy;
|
|
4193
|
-
return
|
|
4194
|
-
id: `${
|
|
4195
|
+
return u("div", {
|
|
4196
|
+
id: `${a}-${N}`,
|
|
4195
4197
|
class: [Oe("item", {
|
|
4196
4198
|
disabled: E,
|
|
4197
4199
|
grow: x.value
|
|
4198
4200
|
})],
|
|
4199
4201
|
onClick: () => {
|
|
4200
|
-
E ||
|
|
4202
|
+
E || m(N);
|
|
4201
4203
|
}
|
|
4202
|
-
}, [
|
|
4204
|
+
}, [u("span", {
|
|
4203
4205
|
class: [Oe("title", {
|
|
4204
|
-
down:
|
|
4205
|
-
active:
|
|
4206
|
+
down: b.state.showPopup === (e.direction === be.DOWN),
|
|
4207
|
+
active: b.state.showPopup
|
|
4206
4208
|
}), T],
|
|
4207
4209
|
style: {
|
|
4208
|
-
color:
|
|
4210
|
+
color: b.state.showPopup ? e.activeColor : ""
|
|
4209
4211
|
}
|
|
4210
|
-
}, [
|
|
4212
|
+
}, [u("div", {
|
|
4211
4213
|
class: "y-el--ellipsis"
|
|
4212
|
-
}, [
|
|
4214
|
+
}, [b.renderItemTitle()])])]);
|
|
4213
4215
|
};
|
|
4214
4216
|
return o({
|
|
4215
|
-
close:
|
|
4217
|
+
close: p
|
|
4216
4218
|
}), r({
|
|
4217
|
-
id:
|
|
4219
|
+
id: a,
|
|
4218
4220
|
props: e,
|
|
4219
4221
|
offset: n,
|
|
4220
|
-
updateOffset:
|
|
4222
|
+
updateOffset: d
|
|
4221
4223
|
}), () => {
|
|
4222
4224
|
var w;
|
|
4223
|
-
return
|
|
4224
|
-
ref:
|
|
4225
|
+
return u("div", {
|
|
4226
|
+
ref: l,
|
|
4225
4227
|
class: Oe()
|
|
4226
|
-
}, [
|
|
4228
|
+
}, [u("div", {
|
|
4227
4229
|
ref: i,
|
|
4228
|
-
style:
|
|
4230
|
+
style: s.value,
|
|
4229
4231
|
class: Oe("bar", {
|
|
4230
4232
|
opened: v.value,
|
|
4231
4233
|
scrollable: x.value
|
|
4232
4234
|
})
|
|
4233
|
-
}, [
|
|
4235
|
+
}, [f.map(S)]), (w = t.default) == null ? void 0 : w.call(t)]);
|
|
4234
4236
|
};
|
|
4235
4237
|
}
|
|
4236
4238
|
});
|
|
4237
|
-
const
|
|
4238
|
-
function
|
|
4239
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
4239
|
+
const qa = M(Xa);
|
|
4240
|
+
function Ga(e) {
|
|
4241
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Se(e);
|
|
4240
4242
|
}
|
|
4241
|
-
const [
|
|
4243
|
+
const [Ka, Ae] = D("dropdown-item"), Za = {
|
|
4242
4244
|
modelValue: {
|
|
4243
4245
|
type: [Number, String],
|
|
4244
4246
|
default: ""
|
|
@@ -4259,185 +4261,317 @@ const [Xa, Ae] = M("dropdown-item"), qa = {
|
|
|
4259
4261
|
type: String,
|
|
4260
4262
|
default: ""
|
|
4261
4263
|
}
|
|
4262
|
-
},
|
|
4263
|
-
name:
|
|
4264
|
-
props:
|
|
4264
|
+
}, Qa = /* @__PURE__ */ _({
|
|
4265
|
+
name: Ka,
|
|
4266
|
+
props: Za,
|
|
4265
4267
|
emits: ["change", "update:modelValue"],
|
|
4266
4268
|
setup(e, {
|
|
4267
4269
|
slots: t,
|
|
4268
4270
|
emit: o,
|
|
4269
|
-
expose:
|
|
4271
|
+
expose: a
|
|
4270
4272
|
}) {
|
|
4271
|
-
const
|
|
4273
|
+
const l = F({
|
|
4272
4274
|
showPopup: !1,
|
|
4273
4275
|
transition: !0,
|
|
4274
4276
|
id: Math.random().toString(36).slice(2)
|
|
4275
4277
|
}), {
|
|
4276
4278
|
parent: i
|
|
4277
|
-
} =
|
|
4279
|
+
} = ce(mn);
|
|
4278
4280
|
if (!i) {
|
|
4279
4281
|
console.error("<YDropdownItem> must be a child component of <YDropdown>.");
|
|
4280
4282
|
return;
|
|
4281
4283
|
}
|
|
4282
|
-
const n = (
|
|
4283
|
-
e.teleport &&
|
|
4284
|
-
}, r = (
|
|
4285
|
-
|
|
4286
|
-
},
|
|
4284
|
+
const n = (s) => {
|
|
4285
|
+
e.teleport && s.stopPropagation();
|
|
4286
|
+
}, r = (s = !l.showPopup, h = {}) => {
|
|
4287
|
+
s !== l.showPopup && (l.showPopup = s, l.transition = !h.immediate, s && i.updateOffset());
|
|
4288
|
+
}, f = () => {
|
|
4287
4289
|
if (t.title)
|
|
4288
4290
|
return t.title();
|
|
4289
4291
|
if (e.title)
|
|
4290
4292
|
return e.title;
|
|
4291
|
-
const
|
|
4292
|
-
return
|
|
4293
|
-
}, v = (
|
|
4293
|
+
const s = e.options.find((h) => h.value === e.modelValue);
|
|
4294
|
+
return s ? s.text : "";
|
|
4295
|
+
}, v = (s) => {
|
|
4294
4296
|
const {
|
|
4295
|
-
activeColor:
|
|
4296
|
-
} = i.props,
|
|
4297
|
-
|
|
4298
|
-
},
|
|
4297
|
+
activeColor: h
|
|
4298
|
+
} = i.props, c = s.value === e.modelValue, y = () => {
|
|
4299
|
+
l.showPopup = !1, s.value !== e.modelValue && (o("update:modelValue", s.value), o("change", s.value));
|
|
4300
|
+
}, d = () => c ? u(ve, {
|
|
4299
4301
|
class: Ae("icon"),
|
|
4300
|
-
color:
|
|
4301
|
-
name:
|
|
4302
|
+
color: h,
|
|
4303
|
+
name: s.icon || "done"
|
|
4302
4304
|
}, null) : null;
|
|
4303
|
-
return
|
|
4304
|
-
key: String(
|
|
4305
|
-
title:
|
|
4305
|
+
return u(Gt, {
|
|
4306
|
+
key: String(s.value),
|
|
4307
|
+
title: s.text,
|
|
4306
4308
|
class: Ae("option", {
|
|
4307
|
-
active:
|
|
4309
|
+
active: c
|
|
4308
4310
|
}),
|
|
4309
4311
|
style: {
|
|
4310
|
-
color:
|
|
4312
|
+
color: c ? h : ""
|
|
4311
4313
|
},
|
|
4312
4314
|
clickable: !0,
|
|
4313
|
-
onClick:
|
|
4315
|
+
onClick: y
|
|
4314
4316
|
}, {
|
|
4315
|
-
right:
|
|
4317
|
+
right: d
|
|
4316
4318
|
});
|
|
4317
4319
|
}, x = () => {
|
|
4318
4320
|
const {
|
|
4319
|
-
offset:
|
|
4321
|
+
offset: s
|
|
4320
4322
|
} = i, {
|
|
4321
|
-
zIndex:
|
|
4322
|
-
duration:
|
|
4323
|
-
direction:
|
|
4324
|
-
isCloseOnClickMask:
|
|
4325
|
-
} = i.props,
|
|
4326
|
-
return
|
|
4327
|
-
style:
|
|
4328
|
-
class: Ae([
|
|
4323
|
+
zIndex: h,
|
|
4324
|
+
duration: c,
|
|
4325
|
+
direction: y,
|
|
4326
|
+
isCloseOnClickMask: d
|
|
4327
|
+
} = i.props, g = {};
|
|
4328
|
+
return g.zIndex = h, y === be.DOWN ? g.top = `${s.value}px` : g.bottom = `${s.value}px`, ee(u("div", {
|
|
4329
|
+
style: g,
|
|
4330
|
+
class: Ae([y]),
|
|
4329
4331
|
onClick: n,
|
|
4330
|
-
id:
|
|
4331
|
-
}, [
|
|
4332
|
-
modelValue:
|
|
4333
|
-
"onUpdate:modelValue": (
|
|
4332
|
+
id: l.id
|
|
4333
|
+
}, [u(mt, {
|
|
4334
|
+
modelValue: l.showPopup,
|
|
4335
|
+
"onUpdate:modelValue": (p) => l.showPopup = p,
|
|
4334
4336
|
customClass: Ae("content"),
|
|
4335
4337
|
maskCustomStyle: {
|
|
4336
4338
|
position: "absolute"
|
|
4337
4339
|
},
|
|
4338
|
-
position:
|
|
4339
|
-
duration:
|
|
4340
|
-
isCloseOnClickMask:
|
|
4340
|
+
position: y === be.DOWN ? Qe.Top : Qe.Bottom,
|
|
4341
|
+
duration: l.transition ? c : 0,
|
|
4342
|
+
isCloseOnClickMask: d,
|
|
4341
4343
|
teleport: e.teleport
|
|
4342
4344
|
}, {
|
|
4343
4345
|
default: () => {
|
|
4344
|
-
var
|
|
4345
|
-
return [e.options.map(v), (
|
|
4346
|
+
var p;
|
|
4347
|
+
return [e.options.map(v), (p = t.default) == null ? void 0 : p.call(t)];
|
|
4346
4348
|
}
|
|
4347
|
-
})]), [[
|
|
4349
|
+
})]), [[ye, l.showPopup]]);
|
|
4348
4350
|
};
|
|
4349
|
-
return
|
|
4350
|
-
state:
|
|
4351
|
+
return a({
|
|
4352
|
+
state: l,
|
|
4351
4353
|
toggle: r,
|
|
4352
|
-
renderItemTitle:
|
|
4354
|
+
renderItemTitle: f
|
|
4353
4355
|
}), () => {
|
|
4354
|
-
let
|
|
4355
|
-
return e.teleport ?
|
|
4356
|
+
let s;
|
|
4357
|
+
return e.teleport ? u(st, {
|
|
4356
4358
|
to: e.teleport
|
|
4357
|
-
},
|
|
4358
|
-
default: () => [
|
|
4359
|
+
}, Ga(s = x()) ? s : {
|
|
4360
|
+
default: () => [s]
|
|
4359
4361
|
}) : x();
|
|
4360
4362
|
};
|
|
4361
4363
|
}
|
|
4362
4364
|
});
|
|
4363
|
-
const
|
|
4365
|
+
const Ja = M(Qa), eo = {
|
|
4366
|
+
modelValue: {
|
|
4367
|
+
type: [String, Number],
|
|
4368
|
+
default: ""
|
|
4369
|
+
},
|
|
4370
|
+
disabled: {
|
|
4371
|
+
type: Boolean,
|
|
4372
|
+
default: !1
|
|
4373
|
+
},
|
|
4374
|
+
square: {
|
|
4375
|
+
type: Boolean,
|
|
4376
|
+
default: null
|
|
4377
|
+
},
|
|
4378
|
+
horizontal: {
|
|
4379
|
+
type: Boolean,
|
|
4380
|
+
default: !1
|
|
4381
|
+
},
|
|
4382
|
+
checkedColor: {
|
|
4383
|
+
type: String,
|
|
4384
|
+
default: null
|
|
4385
|
+
}
|
|
4386
|
+
}, [vn, to] = D("radio-group"), gn = vn, no = /* @__PURE__ */ _({
|
|
4387
|
+
name: vn,
|
|
4388
|
+
props: eo,
|
|
4389
|
+
setup(e, {
|
|
4390
|
+
slots: t,
|
|
4391
|
+
emit: o
|
|
4392
|
+
}) {
|
|
4393
|
+
const {
|
|
4394
|
+
initProvide: a
|
|
4395
|
+
} = fe(gn);
|
|
4396
|
+
me();
|
|
4397
|
+
const l = (n) => {
|
|
4398
|
+
o("update:modelValue", n), o("change", n);
|
|
4399
|
+
};
|
|
4400
|
+
return a({
|
|
4401
|
+
props: e,
|
|
4402
|
+
onItemChange: (n) => {
|
|
4403
|
+
e.modelValue !== n && l(n);
|
|
4404
|
+
}
|
|
4405
|
+
}), () => {
|
|
4406
|
+
var n;
|
|
4407
|
+
return u("div", {
|
|
4408
|
+
class: to({
|
|
4409
|
+
horizontal: e.horizontal
|
|
4410
|
+
}),
|
|
4411
|
+
role: "radiogroup"
|
|
4412
|
+
}, [(n = t.default) == null ? void 0 : n.call(t)]);
|
|
4413
|
+
};
|
|
4414
|
+
}
|
|
4415
|
+
}), [lo, Ze] = D("radio"), ao = /* @__PURE__ */ _({
|
|
4416
|
+
name: lo,
|
|
4417
|
+
props: {
|
|
4418
|
+
modelValue: {
|
|
4419
|
+
type: [Boolean, String, Number],
|
|
4420
|
+
default: !1
|
|
4421
|
+
},
|
|
4422
|
+
name: {
|
|
4423
|
+
type: String,
|
|
4424
|
+
default: null
|
|
4425
|
+
},
|
|
4426
|
+
disabled: {
|
|
4427
|
+
type: Boolean,
|
|
4428
|
+
default: !1
|
|
4429
|
+
},
|
|
4430
|
+
square: {
|
|
4431
|
+
type: Boolean,
|
|
4432
|
+
default: !0
|
|
4433
|
+
},
|
|
4434
|
+
checkedColor: {
|
|
4435
|
+
type: String,
|
|
4436
|
+
default: null
|
|
4437
|
+
},
|
|
4438
|
+
size: {
|
|
4439
|
+
type: [Number, String],
|
|
4440
|
+
default: 20
|
|
4441
|
+
}
|
|
4442
|
+
},
|
|
4443
|
+
setup(e, {
|
|
4444
|
+
slots: t,
|
|
4445
|
+
emit: o,
|
|
4446
|
+
expose: a
|
|
4447
|
+
}) {
|
|
4448
|
+
const {
|
|
4449
|
+
parent: l
|
|
4450
|
+
} = ce(gn), i = l === null ? me().parent : null, n = (d, g = null) => B(() => l && l.props[d] !== null ? l.props[d] : Object.keys(e).includes(d) ? e[d] : g), r = n("disabled"), f = n("square"), v = n("checkedColor"), x = n("horizontal", !1), s = B(() => l ? l.props.modelValue === e.name : typeof e.modelValue == "boolean" ? e.modelValue : e.modelValue === e.name), h = (d) => {
|
|
4451
|
+
var g;
|
|
4452
|
+
r.value || typeof d < "u" && s.value === d || ((g = l == null ? void 0 : l.onItemChange) == null || g.call(l, e.name), o("update:modelValue", !e.modelValue), o("change", !e.modelValue));
|
|
4453
|
+
};
|
|
4454
|
+
a({
|
|
4455
|
+
toggle: h
|
|
4456
|
+
});
|
|
4457
|
+
const c = B(() => ["mini", "small", "middle", "large"].includes(e.size.toString() || (i == null ? void 0 : i.getProp("size"))) ? null : R(e.size)), y = B(() => {
|
|
4458
|
+
const d = {};
|
|
4459
|
+
return c.value && (d.width = c.value, d.height = c.value), s.value && v.value && (d.backgroundColor = v.value), d;
|
|
4460
|
+
});
|
|
4461
|
+
return () => {
|
|
4462
|
+
var g, p;
|
|
4463
|
+
const {
|
|
4464
|
+
size: d
|
|
4465
|
+
} = e;
|
|
4466
|
+
return u("div", {
|
|
4467
|
+
class: Ze({
|
|
4468
|
+
disabled: r.value,
|
|
4469
|
+
checked: s.value,
|
|
4470
|
+
horizontal: x.value,
|
|
4471
|
+
[d]: ["mini", "small", "middle", "large"].includes(d.toString())
|
|
4472
|
+
}),
|
|
4473
|
+
onClick: () => h(),
|
|
4474
|
+
role: "radio",
|
|
4475
|
+
"aria-checked": s.value
|
|
4476
|
+
}, [((g = t.icon) == null ? void 0 : g.call(t, {
|
|
4477
|
+
checked: s.value
|
|
4478
|
+
})) || u("div", {
|
|
4479
|
+
class: Ze("icon", {
|
|
4480
|
+
checked: s.value,
|
|
4481
|
+
square: f.value
|
|
4482
|
+
}),
|
|
4483
|
+
style: y.value
|
|
4484
|
+
}, [s.value ? u(ve, {
|
|
4485
|
+
name: "done"
|
|
4486
|
+
}, null) : null]), u("div", {
|
|
4487
|
+
class: Ze("label")
|
|
4488
|
+
}, [(p = t.default) == null ? void 0 : p.call(t)])]);
|
|
4489
|
+
};
|
|
4490
|
+
}
|
|
4491
|
+
});
|
|
4492
|
+
const oo = M(ao);
|
|
4493
|
+
const io = M(no), ro = [
|
|
4364
4494
|
// 组件
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
sl,
|
|
4495
|
+
ve,
|
|
4496
|
+
Dt,
|
|
4497
|
+
Jn,
|
|
4498
|
+
On,
|
|
4499
|
+
Fn,
|
|
4500
|
+
qn,
|
|
4501
|
+
el,
|
|
4502
|
+
tl,
|
|
4503
|
+
dl,
|
|
4375
4504
|
fl,
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
wa,
|
|
4382
|
-
Il,
|
|
4383
|
-
Fl,
|
|
4384
|
-
Jt,
|
|
4385
|
-
_l,
|
|
4386
|
-
Ol,
|
|
4387
|
-
Yl,
|
|
4388
|
-
ft,
|
|
4505
|
+
gl,
|
|
4506
|
+
xl,
|
|
4507
|
+
Gt,
|
|
4508
|
+
va,
|
|
4509
|
+
ba,
|
|
4389
4510
|
tt,
|
|
4390
|
-
ua,
|
|
4391
4511
|
$a,
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4512
|
+
zl,
|
|
4513
|
+
jl,
|
|
4514
|
+
en,
|
|
4515
|
+
Ml,
|
|
4516
|
+
Wl,
|
|
4517
|
+
ql,
|
|
4518
|
+
mt,
|
|
4519
|
+
nt,
|
|
4520
|
+
da,
|
|
4521
|
+
Ea,
|
|
4522
|
+
za,
|
|
4523
|
+
Wa,
|
|
4524
|
+
ja,
|
|
4525
|
+
qa,
|
|
4526
|
+
Ja,
|
|
4527
|
+
oo,
|
|
4528
|
+
io
|
|
4529
|
+
], hn = (e) => {
|
|
4530
|
+
hn.installed || (ro.forEach((t) => {
|
|
4399
4531
|
t.name && e.component(t.name, t);
|
|
4400
|
-
}), e.provide("loading",
|
|
4401
|
-
},
|
|
4402
|
-
install:
|
|
4532
|
+
}), e.provide("loading", Ll), e.provide("toast", Jl), e.provide("dialog", Ia), e.use(Vl), e.use(Aa));
|
|
4533
|
+
}, so = {
|
|
4534
|
+
install: hn
|
|
4403
4535
|
};
|
|
4404
4536
|
export {
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4537
|
+
tt as Button,
|
|
4538
|
+
Gt as Cell,
|
|
4539
|
+
dl as Checkbox,
|
|
4540
|
+
fl as CheckboxGroup,
|
|
4541
|
+
Wl as Col,
|
|
4542
|
+
Ea as CountDown,
|
|
4543
|
+
za as Dialog,
|
|
4544
|
+
qa as Dropdown,
|
|
4545
|
+
Ja as DropdownItem,
|
|
4546
|
+
jl as Empty,
|
|
4547
|
+
va as Form,
|
|
4548
|
+
ba as FormItem,
|
|
4549
|
+
ve as Icon,
|
|
4550
|
+
$a as Input,
|
|
4551
|
+
Jn as List,
|
|
4552
|
+
zl as Loading,
|
|
4553
|
+
nt as Mask,
|
|
4554
|
+
ja as Pagination,
|
|
4555
|
+
mt as Popup,
|
|
4556
|
+
ql as Progress,
|
|
4557
|
+
xl as PullRefresh,
|
|
4558
|
+
oo as Radio,
|
|
4559
|
+
io as RadioGroup,
|
|
4560
|
+
Ml as Row,
|
|
4561
|
+
qn as Slider,
|
|
4562
|
+
da as Stepper,
|
|
4563
|
+
el as Swipe,
|
|
4564
|
+
tl as SwipeItem,
|
|
4565
|
+
gl as Switch,
|
|
4566
|
+
Fn as Tab,
|
|
4567
|
+
On as Tabs,
|
|
4568
|
+
Wa as Tooltip,
|
|
4569
|
+
Ia as createDialog,
|
|
4570
|
+
Ll as createLoading,
|
|
4571
|
+
Jl as createToast,
|
|
4572
|
+
so as default,
|
|
4573
|
+
en as empty,
|
|
4574
|
+
Dt as locale,
|
|
4575
|
+
Vl as vLoading,
|
|
4576
|
+
Aa as vTooltip
|
|
4443
4577
|
};
|