@lazycatcloud/lzc-toolkit 0.0.66 → 0.0.69
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/dist/index.es.js
CHANGED
|
@@ -1,168 +1,168 @@
|
|
|
1
|
-
import { ref as h, watch as
|
|
1
|
+
import { ref as h, watch as K, customRef as tt, getCurrentScope as lt, onScopeDispose as nt, getCurrentInstance as Be, onMounted as oe, nextTick as _e, unref as $, onUpdated as ot, readonly as st, shallowRef as at, computed as S, onUnmounted as Ie, inject as j, provide as W, defineComponent as U, h as Y, render as ue, openBlock as I, createBlock as Me, Transition as He, withCtx as Pe, createElementBlock as P, createElementVNode as C, withModifiers as rt, normalizeClass as Ae, renderSlot as ye, createCommentVNode as ut, normalizeProps as he, guardReactiveProps as pe, pushScopeId as ce, popScopeId as de, normalizeStyle as z, toDisplayString as Fe, useSlots as it, withDirectives as ct, vShow as dt, toRef as vt, Fragment as Ee, createVNode as ft, mergeProps as ht, renderList as pt, useCssVars as mt } from "vue";
|
|
2
2
|
var Ce;
|
|
3
|
-
const
|
|
4
|
-
|
|
3
|
+
const we = typeof window < "u", xe = (e) => typeof e == "function";
|
|
4
|
+
we && ((Ce = window?.navigator) == null ? void 0 : Ce.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
5
5
|
function ie(e) {
|
|
6
|
-
return typeof e == "function" ? e() :
|
|
6
|
+
return typeof e == "function" ? e() : $(e);
|
|
7
7
|
}
|
|
8
8
|
function ke(e, t) {
|
|
9
|
-
function
|
|
10
|
-
e(() => t.apply(this,
|
|
9
|
+
function l(...n) {
|
|
10
|
+
e(() => t.apply(this, n), { fn: t, thisArg: this, args: n });
|
|
11
11
|
}
|
|
12
|
-
return
|
|
12
|
+
return l;
|
|
13
13
|
}
|
|
14
14
|
function gt(e, t = {}) {
|
|
15
|
-
let
|
|
16
|
-
return (
|
|
17
|
-
const s = ie(e),
|
|
18
|
-
if (
|
|
19
|
-
return
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
|
|
15
|
+
let l, n;
|
|
16
|
+
return (a) => {
|
|
17
|
+
const s = ie(e), i = ie(t.maxWait);
|
|
18
|
+
if (l && clearTimeout(l), s <= 0 || i !== void 0 && i <= 0)
|
|
19
|
+
return n && (clearTimeout(n), n = null), a();
|
|
20
|
+
i && !n && (n = setTimeout(() => {
|
|
21
|
+
l && clearTimeout(l), n = null, a();
|
|
22
|
+
}, i)), l = setTimeout(() => {
|
|
23
|
+
n && clearTimeout(n), n = null, a();
|
|
24
24
|
}, s);
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
function _t(e, t = !0,
|
|
28
|
-
let
|
|
27
|
+
function _t(e, t = !0, l = !0) {
|
|
28
|
+
let n = 0, o, a = !0;
|
|
29
29
|
const s = () => {
|
|
30
30
|
o && (clearTimeout(o), o = void 0);
|
|
31
31
|
};
|
|
32
|
-
return (
|
|
33
|
-
const
|
|
34
|
-
if (s(),
|
|
35
|
-
return
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
},
|
|
32
|
+
return (f) => {
|
|
33
|
+
const d = ie(e), v = Date.now() - n;
|
|
34
|
+
if (s(), d <= 0)
|
|
35
|
+
return n = Date.now(), f();
|
|
36
|
+
v > d && (l || !a) ? (n = Date.now(), f()) : t && (o = setTimeout(() => {
|
|
37
|
+
n = Date.now(), a = !0, s(), f();
|
|
38
|
+
}, d)), !l && !o && (o = setTimeout(() => a = !0, d)), a = !1;
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
41
|
function yt(e) {
|
|
42
42
|
return e;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
45
|
-
let
|
|
46
|
-
const
|
|
47
|
-
|
|
44
|
+
function wt(e, t) {
|
|
45
|
+
let l, n, o;
|
|
46
|
+
const a = h(!0), s = () => {
|
|
47
|
+
a.value = !0, o();
|
|
48
48
|
};
|
|
49
|
-
|
|
50
|
-
const
|
|
49
|
+
K(e, s, { flush: "sync" });
|
|
50
|
+
const i = xe(t) ? t : t.get, f = xe(t) ? void 0 : t.set, d = tt((v, c) => (n = v, o = c, {
|
|
51
51
|
get() {
|
|
52
|
-
return
|
|
52
|
+
return a.value && (l = i(), a.value = !1), n(), l;
|
|
53
53
|
},
|
|
54
|
-
set(
|
|
55
|
-
|
|
54
|
+
set(u) {
|
|
55
|
+
f?.(u);
|
|
56
56
|
}
|
|
57
57
|
}));
|
|
58
|
-
return Object.isExtensible(
|
|
58
|
+
return Object.isExtensible(d) && (d.trigger = s), d;
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function We(e) {
|
|
61
61
|
return lt() ? (nt(e), !0) : !1;
|
|
62
62
|
}
|
|
63
|
-
function
|
|
64
|
-
return ke(gt(t,
|
|
63
|
+
function ze(e, t = 200, l = {}) {
|
|
64
|
+
return ke(gt(t, l), e);
|
|
65
65
|
}
|
|
66
|
-
function Te(e, t = 200,
|
|
67
|
-
return ke(_t(t,
|
|
66
|
+
function Te(e, t = 200, l = !1, n = !0) {
|
|
67
|
+
return ke(_t(t, l, n), e);
|
|
68
68
|
}
|
|
69
69
|
function Ne(e, t = !0) {
|
|
70
70
|
Be() ? oe(e) : t ? e() : _e(e);
|
|
71
71
|
}
|
|
72
72
|
function Ve(e) {
|
|
73
73
|
var t;
|
|
74
|
-
const
|
|
75
|
-
return (t =
|
|
74
|
+
const l = ie(e);
|
|
75
|
+
return (t = l?.$el) != null ? t : l;
|
|
76
76
|
}
|
|
77
|
-
const
|
|
77
|
+
const bt = we ? window : void 0, St = we ? window.document : void 0;
|
|
78
78
|
function Et(e, t = !1) {
|
|
79
|
-
const
|
|
80
|
-
return
|
|
79
|
+
const l = h(), n = () => l.value = Boolean(e());
|
|
80
|
+
return n(), Ne(n, t), l;
|
|
81
81
|
}
|
|
82
82
|
const me = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, ge = "__vueuse_ssr_handlers__";
|
|
83
83
|
me[ge] = me[ge] || {};
|
|
84
84
|
me[ge];
|
|
85
85
|
function Ct() {
|
|
86
|
-
const e = Be(), t =
|
|
86
|
+
const e = Be(), t = wt(() => null, () => e.proxy.$el);
|
|
87
87
|
return ot(t.trigger), oe(t.trigger), t;
|
|
88
88
|
}
|
|
89
89
|
var Le = Object.getOwnPropertySymbols, xt = Object.prototype.hasOwnProperty, Tt = Object.prototype.propertyIsEnumerable, Lt = (e, t) => {
|
|
90
|
-
var
|
|
91
|
-
for (var
|
|
92
|
-
xt.call(e,
|
|
90
|
+
var l = {};
|
|
91
|
+
for (var n in e)
|
|
92
|
+
xt.call(e, n) && t.indexOf(n) < 0 && (l[n] = e[n]);
|
|
93
93
|
if (e != null && Le)
|
|
94
|
-
for (var
|
|
95
|
-
t.indexOf(
|
|
96
|
-
return
|
|
94
|
+
for (var n of Le(e))
|
|
95
|
+
t.indexOf(n) < 0 && Tt.call(e, n) && (l[n] = e[n]);
|
|
96
|
+
return l;
|
|
97
97
|
};
|
|
98
|
-
function
|
|
99
|
-
const
|
|
98
|
+
function Ot(e, t, l = {}) {
|
|
99
|
+
const n = l, { window: o = bt } = n, a = Lt(n, ["window"]);
|
|
100
100
|
let s;
|
|
101
|
-
const
|
|
101
|
+
const i = Et(() => o && "ResizeObserver" in o), f = () => {
|
|
102
102
|
s && (s.disconnect(), s = void 0);
|
|
103
|
-
},
|
|
104
|
-
|
|
105
|
-
}, { immediate: !0, flush: "post" }),
|
|
106
|
-
|
|
103
|
+
}, d = K(() => Ve(e), (c) => {
|
|
104
|
+
f(), i.value && o && c && (s = new ResizeObserver(t), s.observe(c, a));
|
|
105
|
+
}, { immediate: !0, flush: "post" }), v = () => {
|
|
106
|
+
f(), d();
|
|
107
107
|
};
|
|
108
|
-
return
|
|
109
|
-
isSupported:
|
|
110
|
-
stop:
|
|
108
|
+
return We(v), {
|
|
109
|
+
isSupported: i,
|
|
110
|
+
stop: v
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
|
-
function
|
|
114
|
-
const { box:
|
|
115
|
-
return
|
|
116
|
-
const
|
|
117
|
-
|
|
118
|
-
},
|
|
119
|
-
o.value = s ? t.width : 0,
|
|
113
|
+
function $t(e, t = { width: 0, height: 0 }, l = {}) {
|
|
114
|
+
const { box: n = "content-box" } = l, o = h(t.width), a = h(t.height);
|
|
115
|
+
return Ot(e, ([s]) => {
|
|
116
|
+
const i = n === "border-box" ? s.borderBoxSize : n === "content-box" ? s.contentBoxSize : s.devicePixelContentBoxSize;
|
|
117
|
+
i ? (o.value = i.reduce((f, { inlineSize: d }) => f + d, 0), a.value = i.reduce((f, { blockSize: d }) => f + d, 0)) : (o.value = s.contentRect.width, a.value = s.contentRect.height);
|
|
118
|
+
}, l), K(() => Ve(e), (s) => {
|
|
119
|
+
o.value = s ? t.width : 0, a.value = s ? t.height : 0;
|
|
120
120
|
}), {
|
|
121
121
|
width: o,
|
|
122
|
-
height:
|
|
122
|
+
height: a
|
|
123
123
|
};
|
|
124
124
|
}
|
|
125
|
-
var
|
|
125
|
+
var Oe;
|
|
126
126
|
(function(e) {
|
|
127
127
|
e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
|
|
128
|
-
})(
|
|
128
|
+
})(Oe || (Oe = {}));
|
|
129
129
|
let Rt = 0;
|
|
130
130
|
function Dt(e, t = {}) {
|
|
131
|
-
const
|
|
132
|
-
document:
|
|
131
|
+
const l = h(!1), {
|
|
132
|
+
document: n = St,
|
|
133
133
|
immediate: o = !0,
|
|
134
|
-
manual:
|
|
134
|
+
manual: a = !1,
|
|
135
135
|
id: s = `vueuse_styletag_${++Rt}`
|
|
136
|
-
} = t,
|
|
137
|
-
let
|
|
136
|
+
} = t, i = h(e);
|
|
137
|
+
let f = () => {
|
|
138
138
|
};
|
|
139
|
-
const
|
|
140
|
-
if (!
|
|
139
|
+
const d = () => {
|
|
140
|
+
if (!n)
|
|
141
141
|
return;
|
|
142
|
-
const c =
|
|
143
|
-
c.type = "text/css", c.id = s, t.media && (c.media = t.media),
|
|
144
|
-
c.innerText =
|
|
145
|
-
}, { immediate: !0 }),
|
|
146
|
-
},
|
|
147
|
-
!
|
|
142
|
+
const c = n.getElementById(s) || n.createElement("style");
|
|
143
|
+
c.type = "text/css", c.id = s, t.media && (c.media = t.media), n.head.appendChild(c), !l.value && (f = K(i, (u) => {
|
|
144
|
+
c.innerText = u;
|
|
145
|
+
}, { immediate: !0 }), l.value = !0);
|
|
146
|
+
}, v = () => {
|
|
147
|
+
!n || !l.value || (f(), n.head.removeChild(n.getElementById(s)), l.value = !1);
|
|
148
148
|
};
|
|
149
|
-
return o && !
|
|
149
|
+
return o && !a && Ne(d), a || We(v), {
|
|
150
150
|
id: s,
|
|
151
|
-
css:
|
|
152
|
-
unload:
|
|
153
|
-
load:
|
|
154
|
-
isLoaded: st(
|
|
151
|
+
css: i,
|
|
152
|
+
unload: v,
|
|
153
|
+
load: d,
|
|
154
|
+
isLoaded: st(l)
|
|
155
155
|
};
|
|
156
156
|
}
|
|
157
|
-
var Bt = Object.defineProperty,
|
|
158
|
-
for (var
|
|
159
|
-
It.call(t,
|
|
160
|
-
if (
|
|
161
|
-
for (var
|
|
162
|
-
|
|
157
|
+
var Bt = Object.defineProperty, $e = Object.getOwnPropertySymbols, It = Object.prototype.hasOwnProperty, Mt = Object.prototype.propertyIsEnumerable, Re = (e, t, l) => t in e ? Bt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: l }) : e[t] = l, Ht = (e, t) => {
|
|
158
|
+
for (var l in t || (t = {}))
|
|
159
|
+
It.call(t, l) && Re(e, l, t[l]);
|
|
160
|
+
if ($e)
|
|
161
|
+
for (var l of $e(t))
|
|
162
|
+
Mt.call(t, l) && Re(e, l, t[l]);
|
|
163
163
|
return e;
|
|
164
164
|
};
|
|
165
|
-
const
|
|
165
|
+
const Pt = {
|
|
166
166
|
easeInSine: [0.12, 0, 0.39, 0],
|
|
167
167
|
easeOutSine: [0.61, 1, 0.88, 1],
|
|
168
168
|
easeInOutSine: [0.37, 0, 0.63, 1],
|
|
@@ -188,179 +188,179 @@ const At = {
|
|
|
188
188
|
easeOutBack: [0.34, 1.56, 0.64, 1],
|
|
189
189
|
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
|
|
190
190
|
};
|
|
191
|
-
|
|
191
|
+
Ht({
|
|
192
192
|
linear: yt
|
|
193
|
-
},
|
|
194
|
-
function
|
|
195
|
-
const { scrollEndHook:
|
|
196
|
-
let
|
|
197
|
-
const
|
|
198
|
-
let
|
|
199
|
-
const
|
|
200
|
-
let { sum:
|
|
201
|
-
return
|
|
202
|
-
}),
|
|
203
|
-
let
|
|
204
|
-
return
|
|
193
|
+
}, Pt);
|
|
194
|
+
function At(e, t) {
|
|
195
|
+
const { scrollEndHook: l, itemHeight: n, overscan: o = 5 } = t, a = h(null), s = $t(a), i = h(!0), f = ze(M, 100);
|
|
196
|
+
let d;
|
|
197
|
+
const v = at(e), c = h(0), u = h({ start: 0, end: 10 });
|
|
198
|
+
let r = 0;
|
|
199
|
+
const m = h([]), E = S(() => {
|
|
200
|
+
let { sum: g, height: b } = { sum: 0, height: 0 };
|
|
201
|
+
return v.value.map((A, H) => (typeof n == "number" ? b = n : b = n(H), g += b, { height: b, sum: g }));
|
|
202
|
+
}), y = S(() => G(u.value.start)), w = S(() => typeof n == "number" ? E.value.length * n : E.value[E.value.length - 1]?.sum || 0), T = S(() => {
|
|
203
|
+
let g = m.value.length - o, b = Math.max(g - r, 0);
|
|
204
|
+
return m.value.slice(b, g);
|
|
205
205
|
});
|
|
206
206
|
oe(() => {
|
|
207
|
-
}), Ie(() => cancelAnimationFrame(
|
|
208
|
-
[s.width, s.height,
|
|
209
|
-
([
|
|
210
|
-
(
|
|
207
|
+
}), Ie(() => cancelAnimationFrame(d)), K(
|
|
208
|
+
[s.width, s.height, v],
|
|
209
|
+
([g, b]) => {
|
|
210
|
+
(g || b) && R();
|
|
211
211
|
},
|
|
212
212
|
{ deep: !0 }
|
|
213
|
-
),
|
|
214
|
-
|
|
213
|
+
), K(c, () => {
|
|
214
|
+
F(), f();
|
|
215
215
|
});
|
|
216
|
-
function
|
|
217
|
-
|
|
216
|
+
function F() {
|
|
217
|
+
i.value = !1;
|
|
218
218
|
}
|
|
219
|
-
function
|
|
220
|
-
|
|
219
|
+
function M() {
|
|
220
|
+
i.value = !0, l?.();
|
|
221
221
|
}
|
|
222
|
-
function
|
|
223
|
-
cancelAnimationFrame(
|
|
222
|
+
function R() {
|
|
223
|
+
cancelAnimationFrame(d), d = requestAnimationFrame(D);
|
|
224
224
|
}
|
|
225
|
-
function
|
|
226
|
-
if (
|
|
227
|
-
c.value =
|
|
228
|
-
let
|
|
229
|
-
|
|
225
|
+
function D() {
|
|
226
|
+
if (a.value) {
|
|
227
|
+
c.value = a.value.scrollTop, r = q();
|
|
228
|
+
let g = N(c.value), b = g + r + o;
|
|
229
|
+
g = g - o, g = g < 0 ? 0 : g, b = b > v.value.length ? v.value.length : b, u.value = { start: g, end: b }, m.value = v.value.slice(g, b).map((A, H) => ({
|
|
230
230
|
data: A,
|
|
231
|
-
index:
|
|
231
|
+
index: H + g
|
|
232
232
|
}));
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
|
-
function
|
|
236
|
-
let b = 0, A =
|
|
235
|
+
function N(g) {
|
|
236
|
+
let b = 0, A = E.value.length - 1, H = -1;
|
|
237
237
|
for (; b <= A; ) {
|
|
238
|
-
const
|
|
239
|
-
|
|
238
|
+
const O = Math.floor((b + A) / 2);
|
|
239
|
+
E.value[O].sum >= g ? (H = O, A = O - 1) : b = O + 1;
|
|
240
240
|
}
|
|
241
|
-
return Math.max(0,
|
|
241
|
+
return Math.max(0, H);
|
|
242
242
|
}
|
|
243
|
-
function
|
|
244
|
-
let
|
|
245
|
-
for (let
|
|
243
|
+
function q() {
|
|
244
|
+
let g = 0, b = 0, A = k();
|
|
245
|
+
for (let H = A; H < E.value.length && (g++, b += E.value[H].height, !(b >= s.height.value)); H++)
|
|
246
246
|
;
|
|
247
|
-
return
|
|
247
|
+
return g;
|
|
248
248
|
}
|
|
249
|
-
function
|
|
250
|
-
if (typeof
|
|
251
|
-
return
|
|
252
|
-
let b =
|
|
249
|
+
function G(g) {
|
|
250
|
+
if (typeof n == "number")
|
|
251
|
+
return g * n;
|
|
252
|
+
let b = E.value[g];
|
|
253
253
|
return b ? b.sum - b.height : 0;
|
|
254
254
|
}
|
|
255
|
-
function
|
|
256
|
-
return
|
|
255
|
+
function X(g) {
|
|
256
|
+
return E.value[g] || { sum: 0, height: 0 };
|
|
257
257
|
}
|
|
258
|
-
function
|
|
259
|
-
let
|
|
260
|
-
return
|
|
258
|
+
function k() {
|
|
259
|
+
let g = u.value.start;
|
|
260
|
+
return g >= o && (g += o), g;
|
|
261
261
|
}
|
|
262
|
-
function ee(
|
|
263
|
-
if (
|
|
264
|
-
const b =
|
|
265
|
-
|
|
262
|
+
function ee(g) {
|
|
263
|
+
if (a.value) {
|
|
264
|
+
const b = X(g);
|
|
265
|
+
a.value.scrollTop = b.sum - b.height, D();
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
268
|
const se = S(() => ({
|
|
269
269
|
style: {
|
|
270
270
|
width: "100%",
|
|
271
|
-
height: `${
|
|
272
|
-
pointerEvents:
|
|
271
|
+
height: `${w.value}px`,
|
|
272
|
+
pointerEvents: i.value ? void 0 : "none"
|
|
273
273
|
}
|
|
274
|
-
})),
|
|
274
|
+
})), Z = S(() => ({
|
|
275
275
|
style: {
|
|
276
|
-
transform: `translate3d(0, ${
|
|
276
|
+
transform: `translate3d(0, ${y.value}px, 0)`,
|
|
277
277
|
"will-change": "transform"
|
|
278
278
|
}
|
|
279
279
|
})), te = {
|
|
280
280
|
overflowY: "auto"
|
|
281
281
|
};
|
|
282
282
|
return {
|
|
283
|
-
list:
|
|
283
|
+
list: m,
|
|
284
284
|
visiableList: T,
|
|
285
|
-
getItemHeightData:
|
|
286
|
-
getoffsetTopIndex:
|
|
287
|
-
totalHeight:
|
|
285
|
+
getItemHeightData: X,
|
|
286
|
+
getoffsetTopIndex: N,
|
|
287
|
+
totalHeight: w,
|
|
288
288
|
clientHeight: s.height,
|
|
289
289
|
scrollTo: ee,
|
|
290
290
|
scrollTop: c,
|
|
291
|
-
isScrollEnd:
|
|
291
|
+
isScrollEnd: i,
|
|
292
292
|
containerProps: {
|
|
293
|
-
ref:
|
|
293
|
+
ref: a,
|
|
294
294
|
onScroll: () => {
|
|
295
|
-
|
|
295
|
+
R();
|
|
296
296
|
},
|
|
297
297
|
style: te
|
|
298
298
|
},
|
|
299
299
|
wrapperProps: se,
|
|
300
|
-
innerProps:
|
|
300
|
+
innerProps: Z
|
|
301
301
|
};
|
|
302
302
|
}
|
|
303
303
|
const je = Symbol(), Ke = Symbol(), Ue = Symbol(), qe = Symbol(), Qe = Symbol(), Ye = Symbol(), Ge = Symbol(), Xe = Symbol(), Ze = Symbol();
|
|
304
|
-
function
|
|
305
|
-
const { voidFn: e, boolFn: t, boolRef:
|
|
306
|
-
voidFn: (
|
|
304
|
+
function wl() {
|
|
305
|
+
const { voidFn: e, boolFn: t, boolRef: l, arrayRef: n } = {
|
|
306
|
+
voidFn: (r) => {
|
|
307
307
|
},
|
|
308
|
-
boolFn: (
|
|
308
|
+
boolFn: (r) => !1,
|
|
309
309
|
boolRef: S(() => !1),
|
|
310
310
|
arrayRef: S(() => [])
|
|
311
|
-
}, o =
|
|
311
|
+
}, o = j(qe, n), a = j(Ue, t), s = j(Xe, l), i = j(Ke, e), f = j(je, e), d = j(Qe, e), v = j(Ye, e), c = j(Ge, e), u = j(Ze, e);
|
|
312
312
|
return {
|
|
313
313
|
selected: o,
|
|
314
|
-
isSelected:
|
|
314
|
+
isSelected: a,
|
|
315
315
|
isAllSelected: s,
|
|
316
|
-
toggle:
|
|
317
|
-
toggleAll:
|
|
318
|
-
select:
|
|
319
|
-
selectAll:
|
|
316
|
+
toggle: i,
|
|
317
|
+
toggleAll: f,
|
|
318
|
+
select: d,
|
|
319
|
+
selectAll: v,
|
|
320
320
|
unselect: c,
|
|
321
|
-
unselectAll:
|
|
321
|
+
unselectAll: u
|
|
322
322
|
};
|
|
323
323
|
}
|
|
324
|
-
function
|
|
325
|
-
const
|
|
326
|
-
function
|
|
327
|
-
e.value.forEach((
|
|
328
|
-
|
|
324
|
+
function bl(e, t) {
|
|
325
|
+
const l = h({}), n = S(() => e.value.filter((u) => l.value[u[t]])), o = S(() => n.value.length != 0 && Object.keys(l.value).length == e.value.length);
|
|
326
|
+
function a() {
|
|
327
|
+
e.value.forEach((u) => {
|
|
328
|
+
l.value[u[t]] = !0;
|
|
329
329
|
});
|
|
330
330
|
}
|
|
331
331
|
function s() {
|
|
332
|
-
|
|
332
|
+
l.value = {};
|
|
333
333
|
}
|
|
334
|
-
function
|
|
335
|
-
|
|
336
|
-
|
|
334
|
+
function i(u) {
|
|
335
|
+
u.forEach((r) => {
|
|
336
|
+
l.value[r[t]] || (l.value[r[t]] = !0);
|
|
337
337
|
});
|
|
338
338
|
}
|
|
339
|
-
function
|
|
340
|
-
|
|
341
|
-
|
|
339
|
+
function f(u) {
|
|
340
|
+
u.forEach((r) => {
|
|
341
|
+
l.value[r[t]] && delete l.value[r[t]];
|
|
342
342
|
});
|
|
343
343
|
}
|
|
344
|
-
function u
|
|
345
|
-
return !!
|
|
344
|
+
function d(u) {
|
|
345
|
+
return !!l.value[u[t]];
|
|
346
346
|
}
|
|
347
|
-
function
|
|
348
|
-
|
|
349
|
-
|
|
347
|
+
function v(u) {
|
|
348
|
+
u.forEach((r) => {
|
|
349
|
+
d(r) ? delete l.value[r[t]] : l.value[r[t]] = !0;
|
|
350
350
|
});
|
|
351
351
|
}
|
|
352
352
|
function c() {
|
|
353
|
-
o.value ? s() :
|
|
353
|
+
o.value ? s() : a();
|
|
354
354
|
}
|
|
355
|
-
return
|
|
356
|
-
selected:
|
|
357
|
-
select:
|
|
358
|
-
selectAll:
|
|
359
|
-
unselect:
|
|
355
|
+
return W(je, c), W(Ke, v), W(Ue, d), W(qe, n), W(Qe, i), W(Ye, a), W(Ge, f), W(Xe, o), W(Ze, s), {
|
|
356
|
+
selected: n,
|
|
357
|
+
select: i,
|
|
358
|
+
selectAll: a,
|
|
359
|
+
unselect: f,
|
|
360
360
|
unselectAll: s,
|
|
361
|
-
toggle:
|
|
361
|
+
toggle: v,
|
|
362
362
|
toggleAll: c,
|
|
363
|
-
isSelected:
|
|
363
|
+
isSelected: d,
|
|
364
364
|
isAllSelected: o
|
|
365
365
|
};
|
|
366
366
|
}
|
|
@@ -372,231 +372,231 @@ function fe(e) {
|
|
|
372
372
|
function Je({
|
|
373
373
|
attribute: e,
|
|
374
374
|
selectWay: t = "colum",
|
|
375
|
-
scrollOptions:
|
|
376
|
-
getSelectMap:
|
|
375
|
+
scrollOptions: l = {},
|
|
376
|
+
getSelectMap: n = () => ({})
|
|
377
377
|
}) {
|
|
378
378
|
const {
|
|
379
379
|
select: o = fe("\u9009\u62E9"),
|
|
380
|
-
unselect:
|
|
380
|
+
unselect: a = fe("\u53D6\u6D88\u9009\u62E9"),
|
|
381
381
|
unselectAll: s = fe("\u53D6\u6D88\u5168\u9009")
|
|
382
|
-
} =
|
|
383
|
-
let
|
|
384
|
-
const
|
|
385
|
-
() => Te(t === "colum" ?
|
|
386
|
-
),
|
|
387
|
-
(p) =>
|
|
388
|
-
),
|
|
382
|
+
} = n();
|
|
383
|
+
let i = {};
|
|
384
|
+
const f = S(
|
|
385
|
+
() => Te(t === "colum" ? Q : ae, 50)
|
|
386
|
+
), d = /* @__PURE__ */ new Set(), v = h(!0), c = h(), u = h(!1), r = h({ x: 0, y: 0 }), m = h({ x: 0, y: 0, scrollTop: 0 }), E = new ResizeObserver(
|
|
387
|
+
(p) => y.value = p[0].target.getBoundingClientRect()
|
|
388
|
+
), y = h({}), w = h({
|
|
389
389
|
top: 0,
|
|
390
390
|
height: 0,
|
|
391
391
|
sync(p = !1) {
|
|
392
|
-
|
|
392
|
+
w.value.top = c.value?.scrollTop || 0, p && (w.value.height = c.value?.scrollHeight || 0);
|
|
393
393
|
}
|
|
394
|
-
}), T = S(() =>
|
|
395
|
-
left: Math.min(
|
|
396
|
-
top: Math.min(
|
|
397
|
-
width: Math.abs(
|
|
398
|
-
height: Math.abs(
|
|
399
|
-
} : { left: 0, top: 0, width: 0, height: 0 }), { margin:
|
|
400
|
-
let
|
|
401
|
-
const
|
|
402
|
-
let
|
|
394
|
+
}), T = S(() => u.value ? {
|
|
395
|
+
left: Math.min(r.value.x, m.value.x) - y.value.left,
|
|
396
|
+
top: Math.min(r.value.y, m.value.y) - y.value.top,
|
|
397
|
+
width: Math.abs(r.value.x - m.value.x),
|
|
398
|
+
height: Math.abs(r.value.y - m.value.y)
|
|
399
|
+
} : { left: 0, top: 0, width: 0, height: 0 }), { margin: F = 50, startSpeed: M = 30, maxSpeed: R = 30 } = l;
|
|
400
|
+
let D;
|
|
401
|
+
const N = F, q = M, G = R, X = (p) => p ** 1;
|
|
402
|
+
let k = 0;
|
|
403
403
|
function ee(p) {
|
|
404
|
-
if (cancelAnimationFrame(
|
|
405
|
-
Math.min(
|
|
406
|
-
-
|
|
407
|
-
),
|
|
408
|
-
const
|
|
409
|
-
if (!
|
|
404
|
+
if (cancelAnimationFrame(D), k = se(p), k = Math.max(
|
|
405
|
+
Math.min(k, G),
|
|
406
|
+
-G
|
|
407
|
+
), k !== 0) {
|
|
408
|
+
const _ = c.value;
|
|
409
|
+
if (!_ || !u.value)
|
|
410
410
|
return;
|
|
411
|
-
const
|
|
412
|
-
let x =
|
|
413
|
-
x = Math.min(Math.max(0, x),
|
|
411
|
+
const B = w.value.height - y.value.height;
|
|
412
|
+
let x = w.value.top + Number(k);
|
|
413
|
+
x = Math.min(Math.max(0, x), B), _.scrollTop = x, te(), D = requestAnimationFrame(() => ee(p));
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
416
|
function se(p) {
|
|
417
417
|
if (c.value) {
|
|
418
|
-
const
|
|
419
|
-
if (x <
|
|
420
|
-
return
|
|
421
|
-
const
|
|
422
|
-
if (
|
|
423
|
-
return -
|
|
418
|
+
const B = y.value, x = B.bottom - p;
|
|
419
|
+
if (x < N)
|
|
420
|
+
return q * X(1 - x / N);
|
|
421
|
+
const V = p - B.top;
|
|
422
|
+
if (V < N)
|
|
423
|
+
return -q * X(1 - V / N);
|
|
424
424
|
}
|
|
425
425
|
return 0;
|
|
426
426
|
}
|
|
427
|
-
function
|
|
428
|
-
const
|
|
429
|
-
return
|
|
427
|
+
function Z(p) {
|
|
428
|
+
const _ = { ...T.value, right: 0, bottom: 0 };
|
|
429
|
+
return _.left += y.value.left, _.top += y.value.top - w.value.top, _.right = _.width + _.left, _.bottom = _.height + _.top, _.left < p.right && _.right > p.left && _.top < p.bottom && _.bottom > p.top;
|
|
430
430
|
}
|
|
431
431
|
function te() {
|
|
432
|
-
|
|
433
|
-
const { top: p, height:
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
),
|
|
438
|
-
}
|
|
439
|
-
function
|
|
440
|
-
let x = document.getElementById(
|
|
441
|
-
x || (x = document.createElement("style"), x.id =
|
|
442
|
-
const
|
|
432
|
+
w.value.sync();
|
|
433
|
+
const { top: p, height: _ } = w.value;
|
|
434
|
+
m.value.y = Math.min(
|
|
435
|
+
_ + y.value.top,
|
|
436
|
+
m.value.y + p - m.value.scrollTop
|
|
437
|
+
), m.value.scrollTop = p;
|
|
438
|
+
}
|
|
439
|
+
function g(p, _, B = "dynamic-styles") {
|
|
440
|
+
let x = document.getElementById(B);
|
|
441
|
+
x || (x = document.createElement("style"), x.id = B, document.head.appendChild(x));
|
|
442
|
+
const V = x.sheet.cssRules, ne = V.length, et = `${p} { ${_} }`;
|
|
443
443
|
for (let ve = 0; ve < ne; ve++) {
|
|
444
|
-
const Se =
|
|
445
|
-
if (Se.selectorText === p && Se.style.cssText ===
|
|
444
|
+
const Se = V[ve];
|
|
445
|
+
if (Se.selectorText === p && Se.style.cssText === _)
|
|
446
446
|
return;
|
|
447
447
|
}
|
|
448
448
|
x.sheet.insertRule(et, ne);
|
|
449
449
|
}
|
|
450
|
-
function b(p,
|
|
451
|
-
|
|
450
|
+
function b(p, _) {
|
|
451
|
+
v.value = !0, u.value = !0, w.value.height ? w.value.sync() : w.value.sync(!0), r.value.x = p, r.value.y = _ + w.value.top, m.value.x = r.value.x, m.value.y = r.value.y, c.value?.classList.add("disable-scroll-behavior"), d.clear();
|
|
452
452
|
}
|
|
453
|
-
function A(p,
|
|
454
|
-
!
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
),
|
|
453
|
+
function A(p, _, B) {
|
|
454
|
+
!u.value || (v.value && t === "colum" && !L() && (s(), v.value = !1), B?.(), ee(_), m.value.x = Math.max(p, y.value.left), m.value.y = Math.min(
|
|
455
|
+
_ + w.value.top,
|
|
456
|
+
w.value.height + y.value.top
|
|
457
|
+
), m.value.scrollTop = w.value.top, f.value());
|
|
458
458
|
}
|
|
459
|
-
function
|
|
460
|
-
|
|
461
|
-
}
|
|
462
|
-
function R() {
|
|
463
|
-
!i.value || (F || te(), v.value());
|
|
459
|
+
function H() {
|
|
460
|
+
u.value = !1, c.value?.classList.remove("disable-scroll-behavior");
|
|
464
461
|
}
|
|
465
462
|
function O() {
|
|
466
|
-
|
|
463
|
+
!u.value || (k || te(), f.value());
|
|
464
|
+
}
|
|
465
|
+
function L() {
|
|
466
|
+
if (!u.value)
|
|
467
467
|
return !1;
|
|
468
|
-
const { width: p, height:
|
|
469
|
-
return !(Math.max(p,
|
|
468
|
+
const { width: p, height: _ } = T.value;
|
|
469
|
+
return !(Math.max(p, _) > 5);
|
|
470
470
|
}
|
|
471
471
|
function le() {
|
|
472
|
-
|
|
472
|
+
L() && s();
|
|
473
473
|
}
|
|
474
|
-
function
|
|
475
|
-
|
|
476
|
-
|
|
474
|
+
function Q() {
|
|
475
|
+
L() || c.value?.querySelectorAll(`[${e}]`).forEach((p) => {
|
|
476
|
+
i[`${e}`] = p.getAttribute(`${e}`), Z(p.getBoundingClientRect()) ? o([i]) : a([i]);
|
|
477
477
|
});
|
|
478
478
|
}
|
|
479
|
-
function
|
|
479
|
+
function ae() {
|
|
480
480
|
const p = [];
|
|
481
|
-
let
|
|
482
|
-
c.value?.querySelectorAll(`[${e}]`).forEach((x,
|
|
481
|
+
let _ = null, B = 0;
|
|
482
|
+
c.value?.querySelectorAll(`[${e}]`).forEach((x, V) => {
|
|
483
483
|
const ne = x.getAttribute(`${e}`);
|
|
484
|
-
p.push(ne),
|
|
484
|
+
p.push(ne), Z(x.getBoundingClientRect()) ? (_ === null && (_ = V), _ = Math.min(_, V), B = Math.max(B, V)) : (i[`${e}`] = ne, d.has(ne) && a([i]));
|
|
485
485
|
});
|
|
486
|
-
for (let x =
|
|
487
|
-
|
|
486
|
+
for (let x = _; x < B + 1; x++)
|
|
487
|
+
i[`${e}`] = p[x], o([i]), d.add(p[x]);
|
|
488
488
|
}
|
|
489
|
-
function
|
|
490
|
-
return !p?.value || (c.value = p.value, !c?.value) ? !1 : (
|
|
489
|
+
function re(p) {
|
|
490
|
+
return !p?.value || (c.value = p.value, !c?.value) ? !1 : (E.observe(c.value), g(
|
|
491
491
|
".disable-scroll-behavior",
|
|
492
492
|
"scroll-behavior: unset !important;"
|
|
493
493
|
), !0);
|
|
494
494
|
}
|
|
495
495
|
return {
|
|
496
|
-
init:
|
|
496
|
+
init: re,
|
|
497
497
|
dragStart: b,
|
|
498
498
|
dragMove: A,
|
|
499
|
-
dragEnd:
|
|
500
|
-
onScroll:
|
|
501
|
-
isSingleClick:
|
|
499
|
+
dragEnd: H,
|
|
500
|
+
onScroll: O,
|
|
501
|
+
isSingleClick: L,
|
|
502
502
|
cancelSelectAllBySingleClick: le,
|
|
503
|
-
selectFn:
|
|
503
|
+
selectFn: f,
|
|
504
504
|
selectRange: T,
|
|
505
|
-
isPressing:
|
|
505
|
+
isPressing: u,
|
|
506
506
|
containerEl: c,
|
|
507
|
-
observer:
|
|
507
|
+
observer: E
|
|
508
508
|
};
|
|
509
509
|
}
|
|
510
|
-
function
|
|
511
|
-
const t = Je(e), { observer:
|
|
510
|
+
function Sl(e) {
|
|
511
|
+
const t = Je(e), { observer: l, selectRange: n } = t, {
|
|
512
512
|
onScroll: o,
|
|
513
|
-
dragStart:
|
|
513
|
+
dragStart: a,
|
|
514
514
|
dragMove: s,
|
|
515
|
-
dragEnd:
|
|
516
|
-
cancelSelectAllBySingleClick:
|
|
517
|
-
} = t,
|
|
518
|
-
left: `${
|
|
519
|
-
top: `${
|
|
520
|
-
width: `${
|
|
521
|
-
height: `${
|
|
522
|
-
})),
|
|
515
|
+
dragEnd: i,
|
|
516
|
+
cancelSelectAllBySingleClick: f
|
|
517
|
+
} = t, d = S(() => ({
|
|
518
|
+
left: `${n.value.left}px`,
|
|
519
|
+
top: `${n.value.top}px`,
|
|
520
|
+
width: `${n.value.width}px`,
|
|
521
|
+
height: `${n.value.height}px`
|
|
522
|
+
})), v = U({
|
|
523
523
|
render() {
|
|
524
|
-
return
|
|
524
|
+
return Y("div", {
|
|
525
525
|
id: "selectBoxEl",
|
|
526
526
|
class: "absolute z-50 bg-blue-200 opacity-50",
|
|
527
|
-
style:
|
|
527
|
+
style: d.value
|
|
528
528
|
});
|
|
529
529
|
}
|
|
530
530
|
});
|
|
531
|
-
function c(
|
|
532
|
-
|
|
531
|
+
function c(y) {
|
|
532
|
+
y.button === 0 && a(y.x, y.y);
|
|
533
533
|
}
|
|
534
|
-
function
|
|
535
|
-
s(
|
|
534
|
+
function u(y) {
|
|
535
|
+
s(y.x, y.y);
|
|
536
536
|
}
|
|
537
|
-
function
|
|
538
|
-
|
|
537
|
+
function r(y) {
|
|
538
|
+
y.composedPath().some((T) => T?.getAttribute?.(e.attribute)) || f(), i();
|
|
539
539
|
}
|
|
540
|
-
function
|
|
540
|
+
function m(y) {
|
|
541
541
|
try {
|
|
542
|
-
if (!t.init(
|
|
542
|
+
if (!t.init(y))
|
|
543
543
|
throw "\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";
|
|
544
544
|
if (!t.containerEl?.value)
|
|
545
545
|
return !1;
|
|
546
|
-
ue(
|
|
547
|
-
} catch (
|
|
548
|
-
console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25",
|
|
546
|
+
ue(Y(v), t.containerEl.value), t.containerEl.value?.addEventListener("scroll", o), t.containerEl.value?.addEventListener("mousedown", c), window.addEventListener("mousemove", u), window.addEventListener("mouseup", r);
|
|
547
|
+
} catch (w) {
|
|
548
|
+
console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25", w);
|
|
549
549
|
}
|
|
550
550
|
}
|
|
551
|
-
function
|
|
552
|
-
|
|
551
|
+
function E() {
|
|
552
|
+
l.disconnect(), t.containerEl.value?.removeEventListener("scroll", o), t.containerEl.value?.removeEventListener("mousedown", c), window.removeEventListener("mousemove", u), window.removeEventListener("mouseup", r);
|
|
553
553
|
}
|
|
554
|
-
return { init:
|
|
554
|
+
return { init: m, unMount: E };
|
|
555
555
|
}
|
|
556
|
-
function
|
|
557
|
-
const
|
|
556
|
+
function El(e, t, l = 600) {
|
|
557
|
+
const n = Je({
|
|
558
558
|
...e,
|
|
559
559
|
selectWay: "row",
|
|
560
560
|
scrollOptions: {
|
|
561
561
|
startSpeed: 5,
|
|
562
562
|
maxSpeed: 5
|
|
563
563
|
}
|
|
564
|
-
}), { observer: o } =
|
|
565
|
-
let
|
|
566
|
-
function
|
|
567
|
-
clearTimeout(
|
|
564
|
+
}), { observer: o } = n, { onScroll: a, dragStart: s, dragMove: i, dragEnd: f } = n;
|
|
565
|
+
let d;
|
|
566
|
+
function v() {
|
|
567
|
+
clearTimeout(d);
|
|
568
568
|
}
|
|
569
|
-
function c(
|
|
570
|
-
|
|
571
|
-
const { clientX: T, clientY:
|
|
572
|
-
s(T,
|
|
573
|
-
},
|
|
569
|
+
function c(y) {
|
|
570
|
+
v(), y.composedPath().some((T) => !!T?.getAttribute?.(e.attribute)) && (d = setTimeout(() => {
|
|
571
|
+
const { clientX: T, clientY: F } = y.targetTouches[0];
|
|
572
|
+
s(T, F), t?.(), i(T, F, () => y.preventDefault()), y.preventDefault();
|
|
573
|
+
}, l));
|
|
574
574
|
}
|
|
575
|
-
function
|
|
576
|
-
|
|
577
|
-
const { clientX:
|
|
578
|
-
|
|
575
|
+
function u(y) {
|
|
576
|
+
v();
|
|
577
|
+
const { clientX: w, clientY: T } = y.targetTouches[0];
|
|
578
|
+
i(w, T, () => y.preventDefault());
|
|
579
579
|
}
|
|
580
|
-
function
|
|
581
|
-
|
|
580
|
+
function r() {
|
|
581
|
+
v(), f();
|
|
582
582
|
}
|
|
583
|
-
function
|
|
583
|
+
function m(y) {
|
|
584
584
|
try {
|
|
585
|
-
if (!
|
|
585
|
+
if (!n.init(y))
|
|
586
586
|
throw "\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";
|
|
587
|
-
if (!
|
|
587
|
+
if (!n.containerEl?.value)
|
|
588
588
|
return !1;
|
|
589
|
-
|
|
590
|
-
} catch (
|
|
591
|
-
console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25",
|
|
589
|
+
n.containerEl.value?.addEventListener("scroll", a), n.containerEl.value?.addEventListener("touchstart", c), n.containerEl.value?.addEventListener("touchmove", u), window.addEventListener("touchcancel", r), window.addEventListener("touchend", r);
|
|
590
|
+
} catch (w) {
|
|
591
|
+
console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25", w);
|
|
592
592
|
}
|
|
593
593
|
}
|
|
594
|
-
function
|
|
595
|
-
o.disconnect(),
|
|
594
|
+
function E() {
|
|
595
|
+
o.disconnect(), n.containerEl.value?.removeEventListener("scroll", a), n.containerEl.value?.removeEventListener("touchstart", c), n.containerEl.value?.removeEventListener("touchmove", u), window.removeEventListener("touchcancel", r), window.removeEventListener("touchEnd", r);
|
|
596
596
|
}
|
|
597
|
-
return { init:
|
|
597
|
+
return { init: m, unMount: E };
|
|
598
598
|
}
|
|
599
|
-
const
|
|
599
|
+
const Ft = Symbol(), kt = /* @__PURE__ */ U({
|
|
600
600
|
__name: "Dialog",
|
|
601
601
|
props: {
|
|
602
602
|
visiable: { type: Boolean, default: !1 },
|
|
@@ -605,20 +605,20 @@ const Mt = Symbol(), kt = /* @__PURE__ */ j({
|
|
|
605
605
|
},
|
|
606
606
|
emits: ["update:visiable"],
|
|
607
607
|
setup(e, { emit: t }) {
|
|
608
|
-
const
|
|
609
|
-
|
|
608
|
+
const l = e, n = () => {
|
|
609
|
+
l.closeOnClickOverlay && t("update:visiable", !1);
|
|
610
610
|
};
|
|
611
|
-
return
|
|
612
|
-
default:
|
|
613
|
-
e.visiable ? (
|
|
611
|
+
return W(Ft, () => t("update:visiable", !1)), (o, a) => (I(), Me(He, { name: "modal" }, {
|
|
612
|
+
default: Pe(() => [
|
|
613
|
+
e.visiable ? (I(), P("div", {
|
|
614
614
|
key: 0,
|
|
615
|
-
onClick:
|
|
615
|
+
onClick: n,
|
|
616
616
|
class: "lzc-modal"
|
|
617
617
|
}, [
|
|
618
|
-
|
|
619
|
-
onClick:
|
|
618
|
+
C("div", {
|
|
619
|
+
onClick: a[0] || (a[0] = rt(() => {
|
|
620
620
|
}, ["stop"])),
|
|
621
|
-
class:
|
|
621
|
+
class: Ae(["lzc-dialog", e.dialogClass])
|
|
622
622
|
}, [
|
|
623
623
|
ye(o.$slots, "default", {}, void 0, !0)
|
|
624
624
|
], 2)
|
|
@@ -628,18 +628,18 @@ const Mt = Symbol(), kt = /* @__PURE__ */ j({
|
|
|
628
628
|
}));
|
|
629
629
|
}
|
|
630
630
|
});
|
|
631
|
-
const
|
|
632
|
-
const
|
|
633
|
-
for (const [
|
|
634
|
-
n
|
|
635
|
-
return
|
|
636
|
-
},
|
|
637
|
-
function
|
|
638
|
-
function t(
|
|
639
|
-
const o = document.createElement("div"),
|
|
631
|
+
const J = (e, t) => {
|
|
632
|
+
const l = e.__vccOpts || e;
|
|
633
|
+
for (const [n, o] of t)
|
|
634
|
+
l[n] = o;
|
|
635
|
+
return l;
|
|
636
|
+
}, Wt = /* @__PURE__ */ J(kt, [["__scopeId", "data-v-e171c24d"]]);
|
|
637
|
+
function Cl(e) {
|
|
638
|
+
function t(l, n) {
|
|
639
|
+
const o = document.createElement("div"), a = {
|
|
640
640
|
setup() {
|
|
641
|
-
return () =>
|
|
642
|
-
|
|
641
|
+
return () => Y(
|
|
642
|
+
Wt,
|
|
643
643
|
{
|
|
644
644
|
visiable: !0,
|
|
645
645
|
"onUpdate:visiable": () => {
|
|
@@ -648,12 +648,12 @@ function Rl(e) {
|
|
|
648
648
|
...e
|
|
649
649
|
},
|
|
650
650
|
{
|
|
651
|
-
default: () =>
|
|
651
|
+
default: () => Y(l, n)
|
|
652
652
|
}
|
|
653
653
|
);
|
|
654
654
|
}
|
|
655
655
|
};
|
|
656
|
-
return document.body.appendChild(o), ue(
|
|
656
|
+
return document.body.appendChild(o), ue(Y(a), o), {
|
|
657
657
|
close: () => o?.remove()
|
|
658
658
|
};
|
|
659
659
|
}
|
|
@@ -661,12 +661,12 @@ function Rl(e) {
|
|
|
661
661
|
create: t
|
|
662
662
|
};
|
|
663
663
|
}
|
|
664
|
-
function
|
|
664
|
+
function xl({
|
|
665
665
|
component: e,
|
|
666
666
|
componentProps: t,
|
|
667
|
-
delay:
|
|
667
|
+
delay: l = 300
|
|
668
668
|
}) {
|
|
669
|
-
const
|
|
669
|
+
const n = `${l}ms`, o = h(!1), { load: a } = Dt(
|
|
670
670
|
`@keyframes delayLoad {
|
|
671
671
|
to {
|
|
672
672
|
opacity: 1;
|
|
@@ -674,47 +674,40 @@ function Dl({
|
|
|
674
674
|
}
|
|
675
675
|
.delay-load {
|
|
676
676
|
opacity: 0;
|
|
677
|
-
animation: delayLoad 0s ${
|
|
677
|
+
animation: delayLoad 0s ${n} forwards;
|
|
678
678
|
}`
|
|
679
|
-
), s =
|
|
679
|
+
), s = U({
|
|
680
680
|
setup() {
|
|
681
|
-
const
|
|
681
|
+
const d = Ct();
|
|
682
682
|
return oe(() => {
|
|
683
|
-
|
|
684
|
-
}), () => o.value &&
|
|
683
|
+
a(), d.value.classList.add("delay-load");
|
|
684
|
+
}), () => o.value && Y(e, t);
|
|
685
685
|
}
|
|
686
686
|
});
|
|
687
|
-
function
|
|
687
|
+
function i() {
|
|
688
688
|
o.value = !0;
|
|
689
689
|
}
|
|
690
|
-
function
|
|
690
|
+
function f() {
|
|
691
691
|
o.value = !1;
|
|
692
692
|
}
|
|
693
|
-
return { LoadingComp: s, loading: o, load:
|
|
693
|
+
return { LoadingComp: s, loading: o, load: i, unload: f };
|
|
694
694
|
}
|
|
695
|
-
const
|
|
695
|
+
const zt = {}, Nt = (e) => (ce("data-v-76a2728a"), e = e(), de(), e), Vt = /* @__PURE__ */ Nt(() => /* @__PURE__ */ C("div", { class: "ldio-mm5gwljcryb" }, [
|
|
696
|
+
/* @__PURE__ */ C("div")
|
|
697
|
+
], -1)), jt = [
|
|
696
698
|
Vt
|
|
697
699
|
];
|
|
698
700
|
function Kt(e, t) {
|
|
699
|
-
return
|
|
700
|
-
}
|
|
701
|
-
const Bl = /* @__PURE__ */ Q(Wt, [["render", Kt]]);
|
|
702
|
-
const Ut = {}, qt = (e) => (ce("data-v-9d3ce674"), e = e(), de(), e), Qt = /* @__PURE__ */ qt(() => /* @__PURE__ */ E("div", { class: "ldio-mm5gwljcryb" }, [
|
|
703
|
-
/* @__PURE__ */ E("div")
|
|
704
|
-
], -1)), Yt = [
|
|
705
|
-
Qt
|
|
706
|
-
];
|
|
707
|
-
function Gt(e, t) {
|
|
708
|
-
return B(), H("div", he(pe(e.$attrs)), Yt, 16);
|
|
701
|
+
return I(), P("div", he(pe(e.$attrs)), jt, 16);
|
|
709
702
|
}
|
|
710
|
-
const
|
|
703
|
+
const Tl = /* @__PURE__ */ J(zt, [["render", Kt], ["__scopeId", "data-v-76a2728a"]]), Ut = /* @__PURE__ */ U({
|
|
711
704
|
__name: "Toast",
|
|
712
705
|
props: {
|
|
713
706
|
message: null,
|
|
714
707
|
position: null
|
|
715
708
|
},
|
|
716
709
|
setup(e) {
|
|
717
|
-
const t = e,
|
|
710
|
+
const t = e, l = h(), n = h(), o = h(), a = S(() => {
|
|
718
711
|
switch (t.position) {
|
|
719
712
|
case "top":
|
|
720
713
|
return 10;
|
|
@@ -728,9 +721,9 @@ const Il = /* @__PURE__ */ Q(Ut, [["render", Gt], ["__scopeId", "data-v-9d3ce674
|
|
|
728
721
|
borderRadius: "10px",
|
|
729
722
|
backgroundColor: "rgba(0, 0, 0, 0.8)",
|
|
730
723
|
padding: "14px 19px",
|
|
731
|
-
top: `calc(${
|
|
732
|
-
left: `calc(50% - ${
|
|
733
|
-
})),
|
|
724
|
+
top: `calc(${a.value}% - ${o.value}px)`,
|
|
725
|
+
left: `calc(50% - ${n.value}px)`
|
|
726
|
+
})), i = S(() => ({
|
|
734
727
|
width: "fit-content",
|
|
735
728
|
display: "flex",
|
|
736
729
|
justifyContent: "center",
|
|
@@ -739,40 +732,40 @@ const Il = /* @__PURE__ */ Q(Ut, [["render", Gt], ["__scopeId", "data-v-9d3ce674
|
|
|
739
732
|
fontSize: "14px"
|
|
740
733
|
}));
|
|
741
734
|
return _e(() => {
|
|
742
|
-
|
|
743
|
-
}), (
|
|
735
|
+
n.value = l.value.offsetWidth / 2, o.value = l.value.offsetHeight / 2;
|
|
736
|
+
}), (f, d) => (I(), P("div", {
|
|
744
737
|
id: "toastWrapper",
|
|
745
738
|
ref_key: "toastWrapper",
|
|
746
|
-
ref:
|
|
739
|
+
ref: l,
|
|
747
740
|
class: "toastWrapper",
|
|
748
|
-
style:
|
|
741
|
+
style: z([$(s), { zIndex: 9999 }])
|
|
749
742
|
}, [
|
|
750
|
-
|
|
751
|
-
style:
|
|
743
|
+
C("div", {
|
|
744
|
+
style: z($(i))
|
|
752
745
|
}, [
|
|
753
|
-
|
|
746
|
+
C("span", null, Fe(e.message), 1)
|
|
754
747
|
], 4)
|
|
755
748
|
], 4));
|
|
756
749
|
}
|
|
757
750
|
});
|
|
758
|
-
const
|
|
751
|
+
const qt = /* @__PURE__ */ J(Ut, [["__scopeId", "data-v-15ab4094"]]), De = {
|
|
759
752
|
message: "\u61D2\u732B\u4E91 Yes!!!",
|
|
760
753
|
position: "middle",
|
|
761
754
|
duration: 1500
|
|
762
755
|
};
|
|
763
|
-
class
|
|
756
|
+
class Ll {
|
|
764
757
|
options;
|
|
765
758
|
container;
|
|
766
759
|
constructor(t) {
|
|
767
760
|
this.options = t, this.container = document.createElement("div");
|
|
768
761
|
}
|
|
769
762
|
present() {
|
|
770
|
-
const t =
|
|
763
|
+
const t = Y(Y(qt), { ...De, ...this.options });
|
|
771
764
|
ue(t, this.container), document.body.insertBefore(this.container, document.body.firstChild);
|
|
772
|
-
const
|
|
765
|
+
const l = this.options.duration || De.duration;
|
|
773
766
|
setTimeout(() => {
|
|
774
767
|
this.dismiss();
|
|
775
|
-
},
|
|
768
|
+
}, l);
|
|
776
769
|
}
|
|
777
770
|
dismiss() {
|
|
778
771
|
if (this.container) {
|
|
@@ -785,7 +778,7 @@ class Hl {
|
|
|
785
778
|
}
|
|
786
779
|
}
|
|
787
780
|
}
|
|
788
|
-
const
|
|
781
|
+
const Qt = ["xlink:href", "fill", "color"], Ol = /* @__PURE__ */ U({
|
|
789
782
|
__name: "SvgIcon",
|
|
790
783
|
props: {
|
|
791
784
|
name: null,
|
|
@@ -795,132 +788,132 @@ const Jt = ["xlink:href", "fill", "color"], Pl = /* @__PURE__ */ j({
|
|
|
795
788
|
height: null
|
|
796
789
|
},
|
|
797
790
|
setup(e) {
|
|
798
|
-
const t = e,
|
|
791
|
+
const t = e, l = S(() => `#${t.prefix}-${t.name}`), n = S(() => ({
|
|
799
792
|
width: `${t.width ?? t.height}px`,
|
|
800
793
|
height: `${t.height ?? t.width}px`,
|
|
801
794
|
aspectRatio: t.width && t.height ? void 0 : "1/1"
|
|
802
795
|
}));
|
|
803
|
-
return (o,
|
|
796
|
+
return (o, a) => (I(), P("svg", {
|
|
804
797
|
"aria-hidden": "",
|
|
805
|
-
style:
|
|
798
|
+
style: z($(n))
|
|
806
799
|
}, [
|
|
807
|
-
|
|
808
|
-
"xlink:href":
|
|
800
|
+
C("use", {
|
|
801
|
+
"xlink:href": $(l),
|
|
809
802
|
fill: e.color,
|
|
810
803
|
color: e.color
|
|
811
|
-
}, null, 8,
|
|
804
|
+
}, null, 8, Qt)
|
|
812
805
|
], 4));
|
|
813
806
|
}
|
|
814
807
|
});
|
|
815
|
-
function
|
|
808
|
+
function Yt(e) {
|
|
816
809
|
const {
|
|
817
810
|
containerEl: t,
|
|
818
|
-
sliderEl:
|
|
819
|
-
autoHeight:
|
|
811
|
+
sliderEl: l,
|
|
812
|
+
autoHeight: n,
|
|
820
813
|
performance: o = {},
|
|
821
|
-
maxHeightRatio:
|
|
822
|
-
} = e, s = h(!0),
|
|
823
|
-
let
|
|
824
|
-
const
|
|
814
|
+
maxHeightRatio: a = 0.9
|
|
815
|
+
} = e, s = h(!0), i = ze(G, 100);
|
|
816
|
+
let f, d = "";
|
|
817
|
+
const v = h(0), c = h(0), u = h(0), r = h({
|
|
825
818
|
top: 0,
|
|
826
819
|
scrollTop: 0,
|
|
827
820
|
scrollHeight: 0,
|
|
828
821
|
clientHeight: 0
|
|
829
|
-
}),
|
|
822
|
+
}), m = h({
|
|
830
823
|
clientHeight: 0
|
|
831
|
-
}),
|
|
832
|
-
|
|
824
|
+
}), E = S(() => !!c.value), y = S(() => r.value.scrollHeight > r.value.clientHeight), w = S(() => r.value.clientHeight - m.value.clientHeight), T = S(() => r.value.scrollHeight - r.value.clientHeight), F = S(() => Math.max(
|
|
825
|
+
r.value.clientHeight / r.value.scrollHeight,
|
|
833
826
|
0.05
|
|
834
|
-
)),
|
|
827
|
+
)), M = S(() => F.value > a ? 0 : F.value * r.value.clientHeight), R = S(() => ({
|
|
835
828
|
willChange: "transform",
|
|
836
|
-
transform: `translate3d(0,${
|
|
837
|
-
height:
|
|
829
|
+
transform: `translate3d(0,${u.value}px,0)`,
|
|
830
|
+
height: n ? `${M.value}px` : void 0
|
|
838
831
|
}));
|
|
839
|
-
function
|
|
840
|
-
|
|
832
|
+
function D(O) {
|
|
833
|
+
q(), c.value = O.clientY - l.value.getBoundingClientRect().top || 1, d = getComputedStyle(t.value).scrollBehavior, d === "smooth" && (t.value.style.scrollBehavior = "unset");
|
|
841
834
|
}
|
|
842
|
-
function
|
|
843
|
-
t.value.style.scrollBehavior =
|
|
835
|
+
function N() {
|
|
836
|
+
t.value.style.scrollBehavior = d, c.value = 0, i();
|
|
844
837
|
}
|
|
845
|
-
function
|
|
838
|
+
function q() {
|
|
846
839
|
s.value = !1;
|
|
847
840
|
}
|
|
848
|
-
function
|
|
849
|
-
|
|
841
|
+
function G() {
|
|
842
|
+
E.value || (s.value = !0);
|
|
850
843
|
}
|
|
851
|
-
function
|
|
852
|
-
if (!
|
|
844
|
+
function X(O) {
|
|
845
|
+
if (!E.value)
|
|
853
846
|
return;
|
|
854
|
-
let
|
|
855
|
-
|
|
856
|
-
top:
|
|
847
|
+
let L = O.clientY - r.value.top - c.value;
|
|
848
|
+
L < 0 ? u.value = 0 : L >= w.value ? u.value = w.value : u.value = L, t.value.scrollTo({
|
|
849
|
+
top: u.value / w.value * T.value
|
|
857
850
|
});
|
|
858
851
|
}
|
|
859
|
-
function
|
|
860
|
-
|
|
852
|
+
function k() {
|
|
853
|
+
E.value || ee();
|
|
861
854
|
}
|
|
862
855
|
function ee() {
|
|
863
|
-
cancelAnimationFrame(
|
|
856
|
+
cancelAnimationFrame(f), f = requestAnimationFrame(se);
|
|
864
857
|
}
|
|
865
858
|
function se() {
|
|
866
|
-
t.value && (
|
|
859
|
+
t.value && (v.value = o.scrollTop?.value ?? t.value.scrollTop, u.value = v.value / T.value * w.value);
|
|
867
860
|
}
|
|
868
|
-
function
|
|
869
|
-
let
|
|
870
|
-
|
|
861
|
+
function Z(O) {
|
|
862
|
+
let L = "addEventListener";
|
|
863
|
+
O === "add" ? L = "addEventListener" : L = "removeEventListener", l.value?.[L]("pointerdown", D, {
|
|
871
864
|
passive: !0
|
|
872
|
-
}), window[
|
|
865
|
+
}), window[L]("pointermove", X, { passive: !0 }), window[L]("pointerup", N, { passive: !0 });
|
|
873
866
|
}
|
|
874
|
-
const te = new MutationObserver((
|
|
875
|
-
|
|
867
|
+
const te = new MutationObserver((O) => {
|
|
868
|
+
O.map((le) => le.oldValue).join().includes("height") && g();
|
|
876
869
|
});
|
|
877
|
-
function
|
|
878
|
-
|
|
870
|
+
function g() {
|
|
871
|
+
r.value.top = t.value?.getBoundingClientRect().top ?? 0, r.value.scrollHeight = t.value?.scrollHeight ?? 0, r.value.clientHeight = t.value?.clientHeight ?? 0;
|
|
879
872
|
}
|
|
880
873
|
function b() {
|
|
881
|
-
|
|
882
|
-
|
|
874
|
+
q(), setTimeout(() => {
|
|
875
|
+
m.value.clientHeight = l.value?.clientHeight ?? 0, G();
|
|
883
876
|
}, 150);
|
|
884
877
|
}
|
|
885
|
-
function A(
|
|
886
|
-
let
|
|
887
|
-
|
|
888
|
-
const
|
|
889
|
-
for (let
|
|
890
|
-
const
|
|
891
|
-
if (
|
|
878
|
+
function A(O, L, le = "dynamic-styles") {
|
|
879
|
+
let Q = document.getElementById(le);
|
|
880
|
+
Q || (Q = document.createElement("style"), Q.id = le, document.head.appendChild(Q));
|
|
881
|
+
const ae = Q.sheet.cssRules, re = ae.length, p = `${O} { ${L} }`;
|
|
882
|
+
for (let _ = 0; _ < re; _++) {
|
|
883
|
+
const B = ae[_];
|
|
884
|
+
if (B.selectorText === O && B.style.cssText === L)
|
|
892
885
|
return;
|
|
893
886
|
}
|
|
894
|
-
|
|
887
|
+
Q.sheet.insertRule(p, re);
|
|
895
888
|
}
|
|
896
|
-
function
|
|
897
|
-
t.value &&
|
|
889
|
+
function H() {
|
|
890
|
+
t.value && l.value ? (A(
|
|
898
891
|
".hide-scrollbar",
|
|
899
892
|
"scrollbar-width: none; -ms-overflow-style: none;"
|
|
900
|
-
), A(".hide-scrollbar::-webkit-scrollbar", "display: none"), t.value.classList.add("hide-scrollbar"), t.value.addEventListener("scroll",
|
|
893
|
+
), A(".hide-scrollbar::-webkit-scrollbar", "display: none"), t.value.classList.add("hide-scrollbar"), t.value.addEventListener("scroll", k, {
|
|
901
894
|
passive: !0
|
|
902
|
-
}),
|
|
895
|
+
}), Z("add"), te.observe(t.value, {
|
|
903
896
|
subtree: !0,
|
|
904
897
|
attributeOldValue: !0,
|
|
905
898
|
attributeFilter: ["style"]
|
|
906
899
|
}), setTimeout(() => {
|
|
907
|
-
|
|
908
|
-
}, 100), b()) : console.error("useScrollBar:", "\u521D\u59CB\u5316\u5931\u8D25!", { containerEl: t, sliderEl:
|
|
900
|
+
g();
|
|
901
|
+
}, 100), b()) : console.error("useScrollBar:", "\u521D\u59CB\u5316\u5931\u8D25!", { containerEl: t, sliderEl: l });
|
|
909
902
|
}
|
|
910
|
-
return
|
|
911
|
-
|
|
903
|
+
return K(v, () => {
|
|
904
|
+
q(), i();
|
|
912
905
|
}), {
|
|
913
906
|
isScrollEnd: s,
|
|
914
|
-
isDragSlider:
|
|
915
|
-
offsetTop:
|
|
916
|
-
scrollTop:
|
|
917
|
-
scrollable:
|
|
918
|
-
sliderPos:
|
|
919
|
-
init:
|
|
920
|
-
modifySliderEventListener:
|
|
907
|
+
isDragSlider: E,
|
|
908
|
+
offsetTop: u,
|
|
909
|
+
scrollTop: v,
|
|
910
|
+
scrollable: y,
|
|
911
|
+
sliderPos: R,
|
|
912
|
+
init: H,
|
|
913
|
+
modifySliderEventListener: Z
|
|
921
914
|
};
|
|
922
915
|
}
|
|
923
|
-
const
|
|
916
|
+
const Gt = (e) => (ce("data-v-edec7292"), e = e(), de(), e), Xt = /* @__PURE__ */ Gt(() => /* @__PURE__ */ C("div", { class: "default-slider" }, null, -1)), Zt = /* @__PURE__ */ U({
|
|
924
917
|
__name: "ScrollBar",
|
|
925
918
|
props: {
|
|
926
919
|
containerEl: null,
|
|
@@ -929,12 +922,12 @@ const tl = (e) => (ce("data-v-edec7292"), e = e(), de(), e), ll = /* @__PURE__ *
|
|
|
929
922
|
performance: null
|
|
930
923
|
},
|
|
931
924
|
setup(e, { expose: t }) {
|
|
932
|
-
const
|
|
933
|
-
containerEl:
|
|
925
|
+
const l = e, n = !!it().default, o = h(null), a = S(() => l.containerEl), s = Yt({
|
|
926
|
+
containerEl: a,
|
|
934
927
|
sliderEl: o,
|
|
935
|
-
autoHeight:
|
|
936
|
-
performance:
|
|
937
|
-
}), { scrollable:
|
|
928
|
+
autoHeight: n ? l.autoHeight : !0,
|
|
929
|
+
performance: l.performance
|
|
930
|
+
}), { scrollable: i, isScrollEnd: f, sliderPos: d } = s, v = h(!1), c = l.autoHide ? S(() => v.value || !f.value) : S(() => i.value);
|
|
938
931
|
oe(() => {
|
|
939
932
|
_e(() => {
|
|
940
933
|
s.init();
|
|
@@ -942,40 +935,40 @@ const tl = (e) => (ce("data-v-edec7292"), e = e(), de(), e), ll = /* @__PURE__ *
|
|
|
942
935
|
}), Ie(() => {
|
|
943
936
|
s.modifySliderEventListener("remove");
|
|
944
937
|
});
|
|
945
|
-
function
|
|
946
|
-
|
|
938
|
+
function u() {
|
|
939
|
+
v.value = !0;
|
|
947
940
|
}
|
|
948
|
-
function
|
|
949
|
-
|
|
941
|
+
function r() {
|
|
942
|
+
v.value = !1;
|
|
950
943
|
}
|
|
951
|
-
return t({ uScrollBarReturn: s }), (
|
|
952
|
-
default:
|
|
953
|
-
ct(
|
|
944
|
+
return t({ uScrollBarReturn: s }), (m, E) => (I(), Me(He, null, {
|
|
945
|
+
default: Pe(() => [
|
|
946
|
+
ct(C("div", {
|
|
954
947
|
ref_key: "sliderRef",
|
|
955
948
|
ref: o,
|
|
956
949
|
class: "slider-wrapper",
|
|
957
|
-
onMouseenter:
|
|
958
|
-
onMouseleave:
|
|
959
|
-
style:
|
|
950
|
+
onMouseenter: u,
|
|
951
|
+
onMouseleave: r,
|
|
952
|
+
style: z($(d))
|
|
960
953
|
}, [
|
|
961
|
-
ye(
|
|
962
|
-
|
|
954
|
+
ye(m.$slots, "default", {}, () => [
|
|
955
|
+
Xt
|
|
963
956
|
], !0)
|
|
964
957
|
], 36), [
|
|
965
|
-
[dt,
|
|
958
|
+
[dt, $(c)]
|
|
966
959
|
])
|
|
967
960
|
]),
|
|
968
961
|
_: 3
|
|
969
962
|
}));
|
|
970
963
|
}
|
|
971
964
|
});
|
|
972
|
-
const
|
|
965
|
+
const $l = /* @__PURE__ */ J(Zt, [["__scopeId", "data-v-edec7292"]]), Jt = (e) => (ce("data-v-9bfa9cae"), e = e(), de(), e), el = { class: "pull-refresh" }, tl = {
|
|
973
966
|
key: 0,
|
|
974
967
|
class: "pull-arrow-circle"
|
|
975
|
-
},
|
|
968
|
+
}, ll = {
|
|
976
969
|
key: 0,
|
|
977
970
|
class: "box-load"
|
|
978
|
-
},
|
|
971
|
+
}, nl = { class: "left-load" }, ol = { class: "right-load" }, sl = /* @__PURE__ */ Jt(() => /* @__PURE__ */ C("div", { class: "among-load" }, null, -1)), al = { class: "pull-arrow" }, rl = { key: 1 }, ul = /* @__PURE__ */ U({
|
|
979
972
|
__name: "PullRefresh",
|
|
980
973
|
props: {
|
|
981
974
|
refresh: null,
|
|
@@ -984,68 +977,78 @@ const Al = /* @__PURE__ */ Q(nl, [["__scopeId", "data-v-edec7292"]]), ol = (e) =
|
|
|
984
977
|
pullRefreshContainer: null
|
|
985
978
|
},
|
|
986
979
|
setup(e) {
|
|
987
|
-
const t = e, n = "#2EC1CC",
|
|
988
|
-
transition: `${
|
|
989
|
-
transform: `translate3d(0,${
|
|
990
|
-
})),
|
|
980
|
+
const t = e, l = 0.7, n = "#2EC1CC", o = h(-999), a = h(1), s = h(0), i = h(0.3), f = h(!1), d = h(0), v = h(0), c = h(0), u = h(0), r = h(0), m = h(), E = S(() => t.scrollTop), y = S(() => ({
|
|
981
|
+
transition: `${u.value}ms`,
|
|
982
|
+
transform: `translate3d(0,${o.value}px, 0) scale(${a.value})`
|
|
983
|
+
})), w = S(() => ({
|
|
991
984
|
borderColor: n,
|
|
992
|
-
transition:
|
|
993
|
-
transform: `rotate(${100 +
|
|
994
|
-
opacity:
|
|
985
|
+
transition: u.value,
|
|
986
|
+
transform: `rotate(${100 + s.value}deg)`,
|
|
987
|
+
opacity: i.value
|
|
995
988
|
}));
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
}),
|
|
999
|
-
|
|
989
|
+
K(r, (R) => {
|
|
990
|
+
R === 0 && (o.value = -50, i.value = 0.3);
|
|
991
|
+
}), K(v, (R) => {
|
|
992
|
+
if (r.value === 2)
|
|
993
|
+
return;
|
|
994
|
+
const D = Math.pow(R, l);
|
|
995
|
+
D === 0 && (o.value = -50), D <= 50 && D > 0 && (o.value = D - 45, s.value = Math.pow(D, 1.5), D > 15 ? f.value = !0 : f.value = !1), D > 50 && (o.value = 5, i.value = 1, r.value);
|
|
1000
996
|
});
|
|
1001
|
-
const
|
|
1002
|
-
t.refreshOff || !t?.refresh ||
|
|
1003
|
-
},
|
|
1004
|
-
t.refreshOff || !t?.refresh ||
|
|
1005
|
-
|
|
997
|
+
const T = (R) => {
|
|
998
|
+
t.refreshOff || !t?.refresh || r.value !== 2 && E.value === 0 && (d.value === 0 && (d.value = R.touches[0].pageY), c.value = 0, M.value.style.transition = `${c.value}ms`, u.value = 0, v.value = R.touches[0].pageY - d.value, M.value.style.transform = `translate3d(0, ${Math.pow(v.value, l)}px, 0)`);
|
|
999
|
+
}, F = () => {
|
|
1000
|
+
if (t.refreshOff || !t?.refresh || r.value === 2)
|
|
1001
|
+
return;
|
|
1002
|
+
d.value = 0, c.value = 300;
|
|
1003
|
+
const R = Math.pow(v.value, l);
|
|
1004
|
+
M.value.style.transition = `${c.value}ms`, R > 50 ? (r.value = 2, v.value = Math.pow(50, 1 / l), M.value.style.transform = `translate3d(0, ${Math.pow(v.value, l)}px, 0)`, u.value = 300, t?.refresh && t?.refresh().then(() => {
|
|
1005
|
+
m.value = "\u5237\u65B0\u6210\u529F";
|
|
1006
1006
|
}).catch(() => {
|
|
1007
|
-
|
|
1007
|
+
m.value = "\u5237\u65B0\u5931\u8D25";
|
|
1008
1008
|
}).finally(() => {
|
|
1009
1009
|
setTimeout(() => {
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1010
|
+
r.value = 0, v.value = 0, M.value.style.transform = `translate3d(0, ${Math.pow(
|
|
1011
|
+
v.value,
|
|
1012
|
+
l
|
|
1013
|
+
)}px, 0)`, setTimeout(() => {
|
|
1014
|
+
m.value = void 0;
|
|
1015
|
+
}, u.value);
|
|
1013
1016
|
}, 600);
|
|
1014
|
-
})) : (
|
|
1015
|
-
},
|
|
1017
|
+
})) : (v.value = 0, M.value.style.transform = `translate3d(0, ${Math.pow(v.value, l)}px, 0)`);
|
|
1018
|
+
}, M = h(null);
|
|
1016
1019
|
return oe(() => {
|
|
1017
|
-
|
|
1020
|
+
M.value = document.querySelector(
|
|
1018
1021
|
t.pullRefreshContainer
|
|
1019
|
-
),
|
|
1020
|
-
}), (
|
|
1021
|
-
|
|
1022
|
+
), M.value.addEventListener("touchmove", T), M.value.addEventListener("touchend", F);
|
|
1023
|
+
}), (R, D) => (I(), P("div", el, [
|
|
1024
|
+
C("div", {
|
|
1022
1025
|
class: "pull-refresh-box",
|
|
1023
|
-
style:
|
|
1026
|
+
style: z($(y))
|
|
1024
1027
|
}, [
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1028
|
+
m.value ? (I(), P("div", rl, Fe(m.value), 1)) : (I(), P("div", tl, [
|
|
1029
|
+
r.value == 2 ? (I(), P("div", ll, [
|
|
1030
|
+
C("div", nl, [
|
|
1031
|
+
C("div", {
|
|
1029
1032
|
class: "left-circle",
|
|
1030
|
-
style:
|
|
1033
|
+
style: z({ backgroundColor: n })
|
|
1031
1034
|
}, null, 4)
|
|
1032
1035
|
]),
|
|
1033
|
-
|
|
1034
|
-
|
|
1036
|
+
C("div", ol, [
|
|
1037
|
+
C("div", {
|
|
1035
1038
|
class: "right-circle",
|
|
1036
|
-
style:
|
|
1039
|
+
style: z({ backgroundColor: n })
|
|
1037
1040
|
}, null, 4)
|
|
1038
1041
|
]),
|
|
1039
|
-
|
|
1040
|
-
])) : (
|
|
1042
|
+
sl
|
|
1043
|
+
])) : (I(), P("div", {
|
|
1041
1044
|
key: 1,
|
|
1042
1045
|
class: "pull-circle-line",
|
|
1043
|
-
style:
|
|
1046
|
+
style: z($(w))
|
|
1044
1047
|
}, [
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
class:
|
|
1048
|
-
style:
|
|
1048
|
+
C("div", al, [
|
|
1049
|
+
C("div", {
|
|
1050
|
+
class: Ae(["arrows", { opacity: f.value }]),
|
|
1051
|
+
style: z({ borderBottomColor: n })
|
|
1049
1052
|
}, null, 6)
|
|
1050
1053
|
])
|
|
1051
1054
|
], 4))
|
|
@@ -1054,10 +1057,10 @@ const Al = /* @__PURE__ */ Q(nl, [["__scopeId", "data-v-edec7292"]]), ol = (e) =
|
|
|
1054
1057
|
]));
|
|
1055
1058
|
}
|
|
1056
1059
|
});
|
|
1057
|
-
const
|
|
1060
|
+
const il = /* @__PURE__ */ J(ul, [["__scopeId", "data-v-9bfa9cae"]]), cl = {
|
|
1058
1061
|
inheritAttrs: !1
|
|
1059
|
-
},
|
|
1060
|
-
...
|
|
1062
|
+
}, dl = /* @__PURE__ */ U({
|
|
1063
|
+
...cl,
|
|
1061
1064
|
__name: "VirtualList",
|
|
1062
1065
|
props: {
|
|
1063
1066
|
data: null,
|
|
@@ -1067,48 +1070,53 @@ const hl = /* @__PURE__ */ Q(fl, [["__scopeId", "data-v-09f2db7d"]]), pl = { cla
|
|
|
1067
1070
|
refreshOff: { type: Boolean, default: !1 }
|
|
1068
1071
|
},
|
|
1069
1072
|
emits: ["scrollEnd"],
|
|
1070
|
-
setup(e, { expose: t, emit:
|
|
1071
|
-
const
|
|
1072
|
-
itemHeight: (
|
|
1073
|
-
overscan:
|
|
1073
|
+
setup(e, { expose: t, emit: l }) {
|
|
1074
|
+
const n = e, o = At(vt(n, "data"), {
|
|
1075
|
+
itemHeight: (u) => n.itemHeight(n.data[u]),
|
|
1076
|
+
overscan: n.overscan,
|
|
1074
1077
|
scrollEndHook: () => {
|
|
1075
|
-
|
|
1078
|
+
l("scrollEnd");
|
|
1076
1079
|
}
|
|
1077
1080
|
}), {
|
|
1078
|
-
list:
|
|
1081
|
+
list: a,
|
|
1079
1082
|
containerProps: s,
|
|
1080
|
-
wrapperProps:
|
|
1081
|
-
innerProps:
|
|
1082
|
-
getItemHeightData:
|
|
1083
|
-
scrollTop:
|
|
1083
|
+
wrapperProps: i,
|
|
1084
|
+
innerProps: f,
|
|
1085
|
+
getItemHeightData: d,
|
|
1086
|
+
scrollTop: v
|
|
1084
1087
|
} = o;
|
|
1085
|
-
|
|
1088
|
+
t({
|
|
1086
1089
|
vListReturn: o
|
|
1087
|
-
})
|
|
1088
|
-
|
|
1090
|
+
});
|
|
1091
|
+
const c = "virtualListWrapper" + new Date().getTime();
|
|
1092
|
+
return (u, r) => (I(), P(Ee, null, [
|
|
1093
|
+
ft(il, {
|
|
1089
1094
|
refresh: e.refresh,
|
|
1090
1095
|
refreshOff: e.refreshOff,
|
|
1091
|
-
scrollTop:
|
|
1092
|
-
pullRefreshContainer: "
|
|
1093
|
-
}, null, 8, ["refresh", "refreshOff", "scrollTop"]),
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1096
|
+
scrollTop: $(v),
|
|
1097
|
+
pullRefreshContainer: "#" + c
|
|
1098
|
+
}, null, 8, ["refresh", "refreshOff", "scrollTop", "pullRefreshContainer"]),
|
|
1099
|
+
C("div", {
|
|
1100
|
+
class: "virtualListWrapper",
|
|
1101
|
+
id: c
|
|
1102
|
+
}, [
|
|
1103
|
+
C("div", ht({
|
|
1104
|
+
onScrollPassive: r[0] || (r[0] = (...m) => $(s).onScroll && $(s).onScroll(...m)),
|
|
1105
|
+
ref: $(s).ref,
|
|
1098
1106
|
class: "virtualList"
|
|
1099
|
-
},
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
(
|
|
1103
|
-
key:
|
|
1104
|
-
style:
|
|
1105
|
-
height: `${
|
|
1107
|
+
}, u.$attrs), [
|
|
1108
|
+
C("div", he(pe($(i))), [
|
|
1109
|
+
C("div", he(pe($(f))), [
|
|
1110
|
+
(I(!0), P(Ee, null, pt($(a), ({ index: m, data: E }) => (I(), P("div", {
|
|
1111
|
+
key: m,
|
|
1112
|
+
style: z({
|
|
1113
|
+
height: `${$(d)(m).height}px`,
|
|
1106
1114
|
display: "flex"
|
|
1107
1115
|
})
|
|
1108
1116
|
}, [
|
|
1109
|
-
ye(
|
|
1110
|
-
data:
|
|
1111
|
-
index:
|
|
1117
|
+
ye(u.$slots, "default", {
|
|
1118
|
+
data: E,
|
|
1119
|
+
index: m
|
|
1112
1120
|
}, void 0, !0)
|
|
1113
1121
|
], 4))), 128))
|
|
1114
1122
|
], 16)
|
|
@@ -1118,22 +1126,22 @@ const hl = /* @__PURE__ */ Q(fl, [["__scopeId", "data-v-09f2db7d"]]), pl = { cla
|
|
|
1118
1126
|
], 64));
|
|
1119
1127
|
}
|
|
1120
1128
|
});
|
|
1121
|
-
const
|
|
1129
|
+
const Rl = /* @__PURE__ */ J(dl, [["__scopeId", "data-v-e0fb787f"]]), be = (e) => (ce("data-v-40e00f20"), e = e(), de(), e), vl = { style: { position: "absolute" } }, fl = /* @__PURE__ */ be(() => /* @__PURE__ */ C("div", { class: "wrapper" }, null, -1)), hl = ["width", "height"], pl = /* @__PURE__ */ be(() => /* @__PURE__ */ C("title", null, "logo", -1)), ml = /* @__PURE__ */ be(() => /* @__PURE__ */ C("g", {
|
|
1122
1130
|
id: "group-1",
|
|
1123
1131
|
stroke: "none",
|
|
1124
1132
|
"stroke-width": "1",
|
|
1125
1133
|
fill: "none",
|
|
1126
1134
|
"fill-rule": "evenodd"
|
|
1127
1135
|
}, [
|
|
1128
|
-
/* @__PURE__ */
|
|
1136
|
+
/* @__PURE__ */ C("path", {
|
|
1129
1137
|
d: "M260,0 L260,260 L0,260 L0,0 L260,0 Z M173.523673,59.478426 L168.543315,62.4752911 C160.9116,67.0675753 153.089651,71.6349169 145.95806,75.5800674 C142.130471,77.697465 141.695584,77.8197038 137.842227,77.8197038 L123.620155,77.8194132 C120.16747,77.8127705 119.807362,77.673506 116.200006,75.5626777 L115.86045,75.3641139 C113.295911,73.8653877 110.281688,72.1255413 103.60737,68.2932221 C100.032855,66.2486474 96.3694634,64.1645054 92.8123362,62.1486494 L88.1098826,59.4837265 L86.4238232,64.6191026 C83.7525911,72.7551036 81.4062856,80.7653112 79.9222326,87.4417622 C78.9474243,91.8460343 78.2380884,93.2327734 74.2195073,98.9752733 C73.3694777,100.207223 72.630007,101.343155 72.0710109,102.283257 C67.5201215,110.313953 65.2975905,119.339776 65.6004928,128.457001 C66.1750084,143.318086 73.5375842,157.955758 85.6992798,168.473706 C96.9509724,178.204645 111.5737,183.826593 127.858154,184.209647 L130.088901,184.229303 C130.3376,186.684365 130.531293,189.982467 130.67329,193.770543 L130.951876,201.202421 L137.351863,197.414204 C154.766094,187.106546 169.345402,176.172255 180.160428,163.526119 C190.679421,151.226139 196.179795,138.745301 195.345608,125.762609 C194.727393,116.39373 192.289395,107.848059 187.082918,99.046007 C186.275378,97.7498121 185.738167,97.0056347 184.495395,95.37077 C181.975467,92.0558065 181.159964,90.5424149 180.493634,87.4039653 C178.713605,78.9218624 176.863265,71.4211865 175.088993,65.0761883 L173.523673,59.478426 Z M93.177,72.537 L93.8226224,72.9040486 C95.6240552,73.9292933 97.4266638,74.9575498 99.2051531,75.9748184 C106.15023,79.9626119 109.111289,81.6727026 111.728598,83.2042091 C116.752992,86.1442112 118.538634,86.6733184 123.964152,86.6733184 L137.842227,86.6733184 C143.264867,86.6733184 145.156143,86.1417146 150.243765,83.3272749 L153.915953,81.276117 C157.635687,79.179445 161.486156,76.9543599 165.360239,74.6740288 L168.062636,73.0710869 L168.527808,74.8705095 C169.630114,79.2468106 170.742831,84.0476913 171.830914,89.2325336 C172.820403,93.8931438 174.207097,96.4665356 177.447051,100.728693 C178.530829,102.154402 178.952253,102.738183 179.517404,103.643654 C183.925243,111.098001 185.980436,118.301862 186.51071,126.337939 C187.173867,136.658947 182.587388,147.066077 173.431821,157.771787 L171.503004,159.959402 C163.609627,168.649028 153.591728,176.617571 141.90907,184.187495 L139.123121,185.960576 L139.113767,185.819152 C139.047016,184.932364 138.975009,184.102769 138.897435,183.336992 C138.769034,182.069465 138.589718,180.629122 138.367155,179.053334 L137.795381,175.005053 L133.714496,175.253822 C132.500079,175.327852 131.274186,175.368647 130.037423,175.375838 C114.999567,175.463276 101.629066,170.545082 91.4908024,161.777083 C81.1421175,152.827103 74.9249947,140.466728 74.4483613,128.138982 C74.2004611,120.675327 76.0261036,113.26129 79.7275986,106.727863 C80.126032,106.059698 80.7615655,105.083428 81.4902403,104.02721 C86.0997527,97.4404488 87.2937074,95.1062887 88.5657754,89.358959 C89.6596645,84.4377825 91.2792852,78.6447463 93.1627518,72.6043699 L93.177,72.537 Z",
|
|
1130
1138
|
id: "path-1",
|
|
1131
1139
|
fill: "#FFF"
|
|
1132
1140
|
})
|
|
1133
|
-
], -1)),
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
],
|
|
1141
|
+
], -1)), gl = [
|
|
1142
|
+
pl,
|
|
1143
|
+
ml
|
|
1144
|
+
], _l = /* @__PURE__ */ U({
|
|
1137
1145
|
__name: "Loading",
|
|
1138
1146
|
props: {
|
|
1139
1147
|
width: { default: "90" },
|
|
@@ -1142,35 +1150,35 @@ const Fl = /* @__PURE__ */ Q(gl, [["__scopeId", "data-v-259e2930"]]), we = (e) =
|
|
|
1142
1150
|
},
|
|
1143
1151
|
setup(e) {
|
|
1144
1152
|
const t = e;
|
|
1145
|
-
mt((
|
|
1146
|
-
"703ef503":
|
|
1153
|
+
mt((n) => ({
|
|
1154
|
+
"703ef503": l
|
|
1147
1155
|
}));
|
|
1148
|
-
const
|
|
1149
|
-
return (
|
|
1150
|
-
|
|
1151
|
-
(
|
|
1156
|
+
const l = `${t.duration}ms`;
|
|
1157
|
+
return (n, o) => (I(), P("div", vl, [
|
|
1158
|
+
fl,
|
|
1159
|
+
(I(), P("svg", {
|
|
1152
1160
|
style: { position: "relative" },
|
|
1153
1161
|
width: e.width,
|
|
1154
1162
|
height: e.height,
|
|
1155
1163
|
viewBox: "0 0 260 260",
|
|
1156
1164
|
version: "1.1",
|
|
1157
1165
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1158
|
-
},
|
|
1166
|
+
}, gl, 8, hl))
|
|
1159
1167
|
]));
|
|
1160
1168
|
}
|
|
1161
1169
|
});
|
|
1162
|
-
const
|
|
1170
|
+
const Dl = /* @__PURE__ */ J(_l, [["__scopeId", "data-v-40e00f20"]]);
|
|
1163
1171
|
export {
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1172
|
+
Tl as DefaultLoading,
|
|
1173
|
+
Dl as Loading,
|
|
1174
|
+
il as PullRefresh,
|
|
1175
|
+
$l as ScrollBar,
|
|
1176
|
+
Ol as SvgIcon,
|
|
1177
|
+
Ll as ToastCreator,
|
|
1178
|
+
Rl as VirtualList,
|
|
1171
1179
|
qe as allSelectedKey,
|
|
1172
|
-
|
|
1173
|
-
|
|
1180
|
+
Ft as closeDialogKey,
|
|
1181
|
+
Cl as dialogController,
|
|
1174
1182
|
Xe as isAllSelectedKey,
|
|
1175
1183
|
Ue as isSelectedKey,
|
|
1176
1184
|
Ye as selectAllKey,
|
|
@@ -1179,11 +1187,11 @@ export {
|
|
|
1179
1187
|
Ke as toggleKey,
|
|
1180
1188
|
Ze as unselectAllKey,
|
|
1181
1189
|
Ge as unselectKey,
|
|
1182
|
-
|
|
1190
|
+
xl as useDelayLoad,
|
|
1183
1191
|
Je as useDragSelect,
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1192
|
+
El as useDragSelectByMobile,
|
|
1193
|
+
Sl as useDragSelectByPc,
|
|
1194
|
+
bl as useSelectable,
|
|
1195
|
+
wl as useSelectableInjectors,
|
|
1196
|
+
At as useVirtualList
|
|
1189
1197
|
};
|