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