@lazycatcloud/lzc-toolkit 0.0.95 → 0.0.96
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 +87 -86
- package/dist/index.umd.js +4 -4
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getCurrentScope as st, onScopeDispose as at, getCurrentInstance as De, onMounted as ne, nextTick as me, ref as p, watch as Y, customRef as rt, unref as R, readonly as ut, onUpdated as it, shallowRef as ct, computed as
|
|
1
|
+
import { getCurrentScope as st, onScopeDispose as at, getCurrentInstance as De, onMounted as ne, nextTick as me, ref as p, watch as Y, customRef as rt, unref as R, readonly as ut, onUpdated as it, shallowRef as ct, computed as w, onUnmounted as Re, inject as V, provide as z, defineComponent as j, h as Q, render as se, openBlock as I, createBlock as Ie, Transition as Be, withCtx as Me, withDirectives as Pe, createElementBlock as H, createElementVNode as x, withModifiers as He, normalizeClass as Ae, renderSlot as ge, createCommentVNode as dt, useCssVars as Fe, normalizeProps as ve, guardReactiveProps as fe, pushScopeId as re, popScopeId as ue, normalizeStyle as W, toDisplayString as ke, useSlots as vt, vShow as ft, toRef as ht, Fragment as we, createVNode as pt, mergeProps as mt, renderList as gt } from "vue";
|
|
2
2
|
const _t = {
|
|
3
3
|
created(e, t) {
|
|
4
4
|
let n, o;
|
|
@@ -53,7 +53,7 @@ function yt(e, t = {}) {
|
|
|
53
53
|
}, s);
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function bt(e, t = !0, n = !0) {
|
|
57
57
|
let o = 0, l, a = !0;
|
|
58
58
|
const s = () => {
|
|
59
59
|
l && (clearTimeout(l), l = void 0);
|
|
@@ -67,7 +67,7 @@ function wt(e, t = !0, n = !0) {
|
|
|
67
67
|
}, v)), !n && !l && (l = setTimeout(() => a = !0, v)), a = !1;
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function wt(e) {
|
|
71
71
|
return e;
|
|
72
72
|
}
|
|
73
73
|
function Et(e, t) {
|
|
@@ -93,12 +93,12 @@ function Ye(e, t = 200, n = {}) {
|
|
|
93
93
|
return ze(yt(t, n), e);
|
|
94
94
|
}
|
|
95
95
|
function Se(e, t = 200, n = !1, o = !0) {
|
|
96
|
-
return ze(
|
|
96
|
+
return ze(bt(t, n, o), e);
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function je(e, t = !0) {
|
|
99
99
|
De() ? ne(e) : t ? e() : me(e);
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function Ne(e) {
|
|
102
102
|
var t;
|
|
103
103
|
const n = ae(e);
|
|
104
104
|
return (t = n?.$el) != null ? t : n;
|
|
@@ -108,7 +108,7 @@ le && window.navigator;
|
|
|
108
108
|
le && window.location;
|
|
109
109
|
function xt(e, t = !1) {
|
|
110
110
|
const n = p(), o = () => n.value = Boolean(e());
|
|
111
|
-
return o(),
|
|
111
|
+
return o(), je(o, t), n;
|
|
112
112
|
}
|
|
113
113
|
const he = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, pe = "__vueuse_ssr_handlers__";
|
|
114
114
|
he[pe] = he[pe] || {};
|
|
@@ -131,7 +131,7 @@ function Dt(e, t, n = {}) {
|
|
|
131
131
|
let s;
|
|
132
132
|
const r = xt(() => l && "ResizeObserver" in l), h = () => {
|
|
133
133
|
s && (s.disconnect(), s = void 0);
|
|
134
|
-
}, v = Y(() =>
|
|
134
|
+
}, v = Y(() => Ne(e), (c) => {
|
|
135
135
|
h(), r.value && l && c && (s = new ResizeObserver(t), s.observe(c, a));
|
|
136
136
|
}, { immediate: !0, flush: "post" }), i = () => {
|
|
137
137
|
h(), v();
|
|
@@ -146,7 +146,7 @@ function Rt(e, t = { width: 0, height: 0 }, n = {}) {
|
|
|
146
146
|
return Dt(e, ([s]) => {
|
|
147
147
|
const r = o === "border-box" ? s.borderBoxSize : o === "content-box" ? s.contentBoxSize : s.devicePixelContentBoxSize;
|
|
148
148
|
r ? (l.value = r.reduce((h, { inlineSize: v }) => h + v, 0), a.value = r.reduce((h, { blockSize: v }) => h + v, 0)) : (l.value = s.contentRect.width, a.value = s.contentRect.height);
|
|
149
|
-
}, n), Y(() =>
|
|
149
|
+
}, n), Y(() => Ne(e), (s) => {
|
|
150
150
|
l.value = s ? t.width : 0, a.value = s ? t.height : 0;
|
|
151
151
|
}), {
|
|
152
152
|
width: l,
|
|
@@ -177,7 +177,7 @@ function _e(e, t = {}) {
|
|
|
177
177
|
}, i = () => {
|
|
178
178
|
!o || !n.value || (h(), o.head.removeChild(o.getElementById(s)), n.value = !1);
|
|
179
179
|
};
|
|
180
|
-
return l && !a &&
|
|
180
|
+
return l && !a && je(v), a || We(i), {
|
|
181
181
|
id: s,
|
|
182
182
|
css: r,
|
|
183
183
|
unload: i,
|
|
@@ -220,19 +220,19 @@ const At = {
|
|
|
220
220
|
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
|
|
221
221
|
};
|
|
222
222
|
Ht({
|
|
223
|
-
linear:
|
|
223
|
+
linear: wt
|
|
224
224
|
}, At);
|
|
225
225
|
function Ft(e, t) {
|
|
226
226
|
const { scrollEndHook: n, itemHeight: o, overscan: l = 5 } = t, a = p(null), s = Rt(a), r = p(!0), h = Ye(U, 100);
|
|
227
227
|
let v;
|
|
228
228
|
const i = ct(e), c = p(0), d = p({ start: 0, end: 10 }), u = p({ start: 0, end: l });
|
|
229
229
|
let f = 0;
|
|
230
|
-
const O = p([]), m =
|
|
231
|
-
let { sum: E, height:
|
|
232
|
-
return i.value.map((M, P) => (typeof o == "number" ?
|
|
233
|
-
}), _ =
|
|
234
|
-
const { start: E, end:
|
|
235
|
-
return O.value.slice(E,
|
|
230
|
+
const O = p([]), m = w(() => {
|
|
231
|
+
let { sum: E, height: b } = { sum: 0, height: 0 };
|
|
232
|
+
return i.value.map((M, P) => (typeof o == "number" ? b = o : b = o(P), E += b, { height: b, sum: E }));
|
|
233
|
+
}), _ = w(() => X(d.value.start)), C = w(() => typeof o == "number" ? m.value.length * o : m.value[m.value.length - 1]?.sum || 0), A = w(() => {
|
|
234
|
+
const { start: E, end: b } = u.value;
|
|
235
|
+
return O.value.slice(E, b);
|
|
236
236
|
});
|
|
237
237
|
ne(() => {
|
|
238
238
|
}), Re(() => cancelAnimationFrame(v)), Y(
|
|
@@ -243,8 +243,8 @@ function Ft(e, t) {
|
|
|
243
243
|
{ deep: !0 }
|
|
244
244
|
), Y(
|
|
245
245
|
[s.width, s.height],
|
|
246
|
-
([E,
|
|
247
|
-
(E ||
|
|
246
|
+
([E, b]) => {
|
|
247
|
+
(E || b) && $();
|
|
248
248
|
},
|
|
249
249
|
{ deep: !0 }
|
|
250
250
|
), Y(c, () => {
|
|
@@ -264,52 +264,52 @@ function Ft(e, t) {
|
|
|
264
264
|
c.value = a.value.scrollTop;
|
|
265
265
|
let E = D(c.value);
|
|
266
266
|
f = q(E);
|
|
267
|
-
let
|
|
267
|
+
let b = Math.max(0, E - l), M = Math.min(
|
|
268
268
|
E + f + l,
|
|
269
269
|
i.value.length
|
|
270
270
|
);
|
|
271
|
-
d.value = { start:
|
|
271
|
+
d.value = { start: b, end: M }, O.value = i.value.slice(b, M).map((P, T) => ({
|
|
272
272
|
data: P,
|
|
273
|
-
index: T +
|
|
274
|
-
})), u.value.start = E -
|
|
273
|
+
index: T + b
|
|
274
|
+
})), u.value.start = E - b, u.value.end = u.value.start + f;
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
277
|
function D(E) {
|
|
278
|
-
let
|
|
279
|
-
for (;
|
|
280
|
-
const T = Math.floor((
|
|
281
|
-
m.value[T].sum >= E ? (P = T, M = T - 1) :
|
|
278
|
+
let b = 0, M = m.value.length - 1, P = -1;
|
|
279
|
+
for (; b <= M; ) {
|
|
280
|
+
const T = Math.floor((b + M) / 2);
|
|
281
|
+
m.value[T].sum >= E ? (P = T, M = T - 1) : b = T + 1;
|
|
282
282
|
}
|
|
283
283
|
return Math.max(0, P);
|
|
284
284
|
}
|
|
285
285
|
function q(E) {
|
|
286
|
-
let
|
|
287
|
-
for (let P = E; P < m.value.length && (
|
|
286
|
+
let b = 0, M = 0;
|
|
287
|
+
for (let P = E; P < m.value.length && (b++, M += m.value[P].height, !(M >= s.height.value)); P++)
|
|
288
288
|
;
|
|
289
|
-
return
|
|
289
|
+
return b;
|
|
290
290
|
}
|
|
291
291
|
function X(E) {
|
|
292
292
|
if (typeof o == "number")
|
|
293
293
|
return E * o;
|
|
294
|
-
let
|
|
295
|
-
return
|
|
294
|
+
let b = m.value[E];
|
|
295
|
+
return b ? b.sum - b.height : 0;
|
|
296
296
|
}
|
|
297
297
|
function k(E) {
|
|
298
298
|
return m.value[E] || { sum: 0, height: 0 };
|
|
299
299
|
}
|
|
300
300
|
function J(E) {
|
|
301
301
|
if (a.value) {
|
|
302
|
-
const
|
|
303
|
-
a.value.scrollTop =
|
|
302
|
+
const b = k(E);
|
|
303
|
+
a.value.scrollTop = b.sum - b.height, S();
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
|
-
const oe =
|
|
306
|
+
const oe = w(() => ({
|
|
307
307
|
style: {
|
|
308
308
|
width: "100%",
|
|
309
309
|
height: `${C.value}px`,
|
|
310
310
|
pointerEvents: r.value ? void 0 : "none"
|
|
311
311
|
}
|
|
312
|
-
})), ee =
|
|
312
|
+
})), ee = w(() => ({
|
|
313
313
|
style: {
|
|
314
314
|
transform: `translate3d(0, ${_.value}px, 0)`,
|
|
315
315
|
"will-change": "transform"
|
|
@@ -344,8 +344,8 @@ function xn() {
|
|
|
344
344
|
voidFn: (u) => {
|
|
345
345
|
},
|
|
346
346
|
boolFn: (u) => !1,
|
|
347
|
-
boolRef:
|
|
348
|
-
arrayRef:
|
|
347
|
+
boolRef: w(() => !1),
|
|
348
|
+
arrayRef: w(() => [])
|
|
349
349
|
}, l = V(qe, o), a = V(Ue, t), s = V(Ze, n), r = V(Ke, e), h = V(Ve, e), v = V(Qe, e), i = V(Xe, e), c = V(Ge, e), d = V(Je, e);
|
|
350
350
|
return {
|
|
351
351
|
selected: l,
|
|
@@ -360,7 +360,7 @@ function xn() {
|
|
|
360
360
|
};
|
|
361
361
|
}
|
|
362
362
|
function Ln(e, t) {
|
|
363
|
-
const n = p({}), o =
|
|
363
|
+
const n = p({}), o = w(() => e.value.filter((d) => n.value[d[t]])), l = w(() => o.value.length != 0 && Object.keys(n.value).length == e.value.length);
|
|
364
364
|
function a() {
|
|
365
365
|
e.value.forEach((d) => {
|
|
366
366
|
n.value[d[t]] = !0;
|
|
@@ -419,7 +419,7 @@ function et({
|
|
|
419
419
|
unselectAll: s = de("\u53D6\u6D88\u5168\u9009")
|
|
420
420
|
} = o();
|
|
421
421
|
let r = {};
|
|
422
|
-
const h =
|
|
422
|
+
const h = w(
|
|
423
423
|
() => Se(t === "colum" ? tt : nt, 50)
|
|
424
424
|
), v = /* @__PURE__ */ new Set(), i = p(!0), c = p(), d = p(!1), u = p({ x: 0, y: 0 }), f = p({ x: 0, y: 0, scrollTop: 0 }), O = new ResizeObserver(
|
|
425
425
|
(g) => m.value = g[0].target.getBoundingClientRect()
|
|
@@ -429,7 +429,7 @@ function et({
|
|
|
429
429
|
sync(g = !1) {
|
|
430
430
|
_.value.top = c.value?.scrollTop || 0, g && (_.value.height = c.value?.scrollHeight || 0);
|
|
431
431
|
}
|
|
432
|
-
}), C =
|
|
432
|
+
}), C = w(() => d.value ? {
|
|
433
433
|
left: Math.min(u.value.x, f.value.x) - m.value.left,
|
|
434
434
|
top: Math.min(u.value.y, f.value.y) - m.value.top,
|
|
435
435
|
width: Math.abs(u.value.x - f.value.x),
|
|
@@ -456,9 +456,9 @@ function et({
|
|
|
456
456
|
const F = m.value, L = F.bottom - g;
|
|
457
457
|
if (L < S)
|
|
458
458
|
return D * X(1 - L / S);
|
|
459
|
-
const
|
|
460
|
-
if (
|
|
461
|
-
return -D * X(1 -
|
|
459
|
+
const N = g - F.top;
|
|
460
|
+
if (N < S)
|
|
461
|
+
return -D * X(1 - N / S);
|
|
462
462
|
}
|
|
463
463
|
return 0;
|
|
464
464
|
}
|
|
@@ -477,15 +477,15 @@ function et({
|
|
|
477
477
|
function E(g, y, F = "dynamic-styles") {
|
|
478
478
|
let L = document.getElementById(F);
|
|
479
479
|
L || (L = document.createElement("style"), L.id = F, document.head.appendChild(L));
|
|
480
|
-
const
|
|
480
|
+
const N = L.sheet.cssRules, te = N.length, lt = `${g} { ${y} }`;
|
|
481
481
|
for (let ce = 0; ce < te; ce++) {
|
|
482
|
-
const
|
|
483
|
-
if (
|
|
482
|
+
const be = N[ce];
|
|
483
|
+
if (be.selectorText === g && be.style.cssText === y)
|
|
484
484
|
return;
|
|
485
485
|
}
|
|
486
486
|
L.sheet.insertRule(lt, te);
|
|
487
487
|
}
|
|
488
|
-
function
|
|
488
|
+
function b(g, y) {
|
|
489
489
|
i.value = !0, d.value = !0, _.value.height ? _.value.sync() : _.value.sync(!0), u.value.x = g, u.value.y = y + _.value.top, f.value.x = u.value.x, f.value.y = u.value.y, c.value?.classList.add("disable-scroll-behavior"), v.clear();
|
|
490
490
|
}
|
|
491
491
|
function M(g, y, F) {
|
|
@@ -517,9 +517,9 @@ function et({
|
|
|
517
517
|
function nt() {
|
|
518
518
|
const g = [];
|
|
519
519
|
let y = null, F = 0;
|
|
520
|
-
c.value?.querySelectorAll(`[${e}]`).forEach((L,
|
|
520
|
+
c.value?.querySelectorAll(`[${e}]`).forEach((L, N) => {
|
|
521
521
|
const te = L.getAttribute(`${e}`);
|
|
522
|
-
g.push(te), ee(L.getBoundingClientRect()) ? (y === null && (y =
|
|
522
|
+
g.push(te), ee(L.getBoundingClientRect()) ? (y === null && (y = N), y = Math.min(y, N), F = Math.max(F, N)) : (r[`${e}`] = te, v.has(te) && a([r]));
|
|
523
523
|
});
|
|
524
524
|
for (let L = y; L < F + 1; L++)
|
|
525
525
|
r[`${e}`] = g[L], l([r]), v.add(g[L]);
|
|
@@ -532,7 +532,7 @@ function et({
|
|
|
532
532
|
}
|
|
533
533
|
return {
|
|
534
534
|
init: ot,
|
|
535
|
-
dragStart:
|
|
535
|
+
dragStart: b,
|
|
536
536
|
dragMove: M,
|
|
537
537
|
dragEnd: P,
|
|
538
538
|
onScroll: T,
|
|
@@ -552,7 +552,7 @@ function Tn(e) {
|
|
|
552
552
|
dragMove: s,
|
|
553
553
|
dragEnd: r,
|
|
554
554
|
cancelSelectAllBySingleClick: h
|
|
555
|
-
} = t, v =
|
|
555
|
+
} = t, v = w(() => ({
|
|
556
556
|
left: `${o.value.left}px`,
|
|
557
557
|
top: `${o.value.top}px`,
|
|
558
558
|
width: `${o.value.width}px`,
|
|
@@ -565,7 +565,7 @@ function Tn(e) {
|
|
|
565
565
|
opacity: 0.5;
|
|
566
566
|
}`,
|
|
567
567
|
{ id: "styletag_lzc_dragselect", manual: !0 }
|
|
568
|
-
), c =
|
|
568
|
+
), c = j({
|
|
569
569
|
render() {
|
|
570
570
|
return Q("div", {
|
|
571
571
|
id: "selectBoxEl",
|
|
@@ -645,7 +645,7 @@ function On(e, t, n = 600) {
|
|
|
645
645
|
const kt = Symbol(), zt = {
|
|
646
646
|
key: 0,
|
|
647
647
|
class: "lzc-modal"
|
|
648
|
-
}, Wt = /* @__PURE__ */
|
|
648
|
+
}, Wt = /* @__PURE__ */ j({
|
|
649
649
|
__name: "Dialog",
|
|
650
650
|
props: {
|
|
651
651
|
visiable: { type: Boolean, default: !1 },
|
|
@@ -708,7 +708,7 @@ function $n(e) {
|
|
|
708
708
|
create: t
|
|
709
709
|
};
|
|
710
710
|
}
|
|
711
|
-
function
|
|
711
|
+
function jt({
|
|
712
712
|
component: e,
|
|
713
713
|
componentProps: t,
|
|
714
714
|
delay: n = 300
|
|
@@ -724,7 +724,7 @@ function Nt({
|
|
|
724
724
|
opacity: 0;
|
|
725
725
|
animation: lzcDelayLoad 0s ${a} forwards;
|
|
726
726
|
}`
|
|
727
|
-
), { LoadingComp:
|
|
727
|
+
), { LoadingComp: j({
|
|
728
728
|
setup() {
|
|
729
729
|
const r = Lt();
|
|
730
730
|
return ne(() => {
|
|
@@ -738,7 +738,7 @@ function Dn({
|
|
|
738
738
|
componentProps: t,
|
|
739
739
|
delay: n = 300
|
|
740
740
|
}) {
|
|
741
|
-
const { LoadingComp: o } =
|
|
741
|
+
const { LoadingComp: o } = jt({
|
|
742
742
|
component: e,
|
|
743
743
|
componentProps: t,
|
|
744
744
|
delay: n
|
|
@@ -751,11 +751,11 @@ function Dn({
|
|
|
751
751
|
}
|
|
752
752
|
return { LoadingComp: o, loading: l, load: a, unload: s };
|
|
753
753
|
}
|
|
754
|
-
const
|
|
754
|
+
const Nt = (e) => (re("data-v-d0ad7597"), e = e(), ue(), e), Vt = /* @__PURE__ */ Nt(() => /* @__PURE__ */ x("div", { class: "ldio-mm5gwljcryb" }, [
|
|
755
755
|
/* @__PURE__ */ x("div")
|
|
756
756
|
], -1)), Kt = [
|
|
757
757
|
Vt
|
|
758
|
-
], Ut = /* @__PURE__ */
|
|
758
|
+
], Ut = /* @__PURE__ */ j({
|
|
759
759
|
__name: "DefaultLoading",
|
|
760
760
|
props: {
|
|
761
761
|
width: { default: 24 },
|
|
@@ -768,7 +768,7 @@ const jt = (e) => (re("data-v-d0ad7597"), e = e(), ue(), e), Vt = /* @__PURE__ *
|
|
|
768
768
|
})), (t, n) => (I(), H("div", ve(fe(t.$attrs)), Kt, 16));
|
|
769
769
|
}
|
|
770
770
|
});
|
|
771
|
-
const Rn = /* @__PURE__ */ Z(Ut, [["__scopeId", "data-v-d0ad7597"]]), qt = ["onClick"], Qt = /* @__PURE__ */
|
|
771
|
+
const Rn = /* @__PURE__ */ Z(Ut, [["__scopeId", "data-v-d0ad7597"]]), qt = ["onClick"], Qt = /* @__PURE__ */ j({
|
|
772
772
|
__name: "Toast",
|
|
773
773
|
props: {
|
|
774
774
|
message: null,
|
|
@@ -776,7 +776,7 @@ const Rn = /* @__PURE__ */ Z(Ut, [["__scopeId", "data-v-d0ad7597"]]), qt = ["onC
|
|
|
776
776
|
buttonClickEvent: null
|
|
777
777
|
},
|
|
778
778
|
setup(e) {
|
|
779
|
-
const t = e, n = p(), o = p(), l = p(), a =
|
|
779
|
+
const t = e, n = p(), o = p(), l = p(), a = w(() => {
|
|
780
780
|
switch (t.position) {
|
|
781
781
|
case "top":
|
|
782
782
|
return 10;
|
|
@@ -785,14 +785,14 @@ const Rn = /* @__PURE__ */ Z(Ut, [["__scopeId", "data-v-d0ad7597"]]), qt = ["onC
|
|
|
785
785
|
case "bottom":
|
|
786
786
|
return 85;
|
|
787
787
|
}
|
|
788
|
-
}), s =
|
|
788
|
+
}), s = w(() => ({
|
|
789
789
|
position: "absolute",
|
|
790
790
|
borderRadius: "10px",
|
|
791
791
|
backgroundColor: "rgba(0, 0, 0, 0.8)",
|
|
792
792
|
padding: "14px 19px",
|
|
793
793
|
top: `calc(${a.value}% - ${l.value}px)`,
|
|
794
794
|
left: `calc(50% - ${o.value}px)`
|
|
795
|
-
})), r =
|
|
795
|
+
})), r = w(() => ({
|
|
796
796
|
width: "fit-content",
|
|
797
797
|
display: "flex",
|
|
798
798
|
justifyContent: "center",
|
|
@@ -853,7 +853,7 @@ class In {
|
|
|
853
853
|
}
|
|
854
854
|
}
|
|
855
855
|
}
|
|
856
|
-
const Gt = ["xlink:href", "fill", "color"], Bn = /* @__PURE__ */
|
|
856
|
+
const Gt = ["xlink:href", "fill", "color"], Bn = /* @__PURE__ */ j({
|
|
857
857
|
__name: "SvgIcon",
|
|
858
858
|
props: {
|
|
859
859
|
name: null,
|
|
@@ -863,13 +863,14 @@ const Gt = ["xlink:href", "fill", "color"], Bn = /* @__PURE__ */ N({
|
|
|
863
863
|
height: null
|
|
864
864
|
},
|
|
865
865
|
setup(e) {
|
|
866
|
-
const t = e, n =
|
|
866
|
+
const t = e, n = w(() => `#${t.prefix}-${t.name}`), o = w(() => ({
|
|
867
867
|
width: `${t.width ?? t.height}px`,
|
|
868
868
|
height: `${t.height ?? t.width}px`,
|
|
869
869
|
aspectRatio: t.width && t.height ? void 0 : "1/1"
|
|
870
870
|
}));
|
|
871
871
|
function l(a) {
|
|
872
|
-
|
|
872
|
+
const { style: s } = a;
|
|
873
|
+
return typeof s == "object" ? s : {};
|
|
873
874
|
}
|
|
874
875
|
return (a, s) => (I(), H("svg", {
|
|
875
876
|
"aria-hidden": "",
|
|
@@ -900,10 +901,10 @@ function Zt(e) {
|
|
|
900
901
|
clientHeight: 0
|
|
901
902
|
}), O = p({
|
|
902
903
|
clientHeight: 0
|
|
903
|
-
}), m =
|
|
904
|
+
}), m = w(() => !!d.value), _ = w(() => f.value.scrollHeight > f.value.clientHeight), C = w(() => o ? f.value.clientHeight - U.value : f.value.clientHeight - O.value.clientHeight), A = w(() => f.value.scrollHeight - f.value.clientHeight), K = w(() => Math.max(
|
|
904
905
|
f.value.clientHeight / f.value.scrollHeight,
|
|
905
906
|
0.05
|
|
906
|
-
)), U =
|
|
907
|
+
)), U = w(() => K.value > a ? 0 : K.value * f.value.clientHeight), $ = w(() => ({
|
|
907
908
|
willChange: "transform",
|
|
908
909
|
transform: `translate3d(0,${u.value}px,0)`,
|
|
909
910
|
height: o ? `${U.value}px` : void 0
|
|
@@ -944,9 +945,9 @@ function Zt(e) {
|
|
|
944
945
|
}), window[B]("pointermove", k, { passive: !0 }), window[B]("pointerup", D, { passive: !0 });
|
|
945
946
|
}
|
|
946
947
|
const E = new MutationObserver((T) => {
|
|
947
|
-
(s == "classList" || T.map((ie) => ie.oldValue).join().includes("height")) &&
|
|
948
|
+
(s == "classList" || T.map((ie) => ie.oldValue).join().includes("height")) && b();
|
|
948
949
|
});
|
|
949
|
-
function
|
|
950
|
+
function b() {
|
|
950
951
|
f.value.top = t.value?.getBoundingClientRect().top ?? 0, f.value.scrollHeight = t.value?.scrollHeight ?? 0, f.value.clientHeight = t.value?.clientHeight ?? 0;
|
|
951
952
|
}
|
|
952
953
|
function M() {
|
|
@@ -965,7 +966,7 @@ function Zt(e) {
|
|
|
965
966
|
attributeOldValue: !0,
|
|
966
967
|
attributeFilter: ["style"]
|
|
967
968
|
}), E.observe(t.value, T), setTimeout(() => {
|
|
968
|
-
|
|
969
|
+
b();
|
|
969
970
|
}, 100), M();
|
|
970
971
|
} else
|
|
971
972
|
console.error("useScrollBar:", "\u521D\u59CB\u5316\u5931\u8D25!", { containerEl: t, sliderEl: n });
|
|
@@ -983,7 +984,7 @@ function Zt(e) {
|
|
|
983
984
|
modifySliderEventListener: G
|
|
984
985
|
};
|
|
985
986
|
}
|
|
986
|
-
const Jt = (e) => (re("data-v-efefe52c"), e = e(), ue(), e), en = /* @__PURE__ */ Jt(() => /* @__PURE__ */ x("div", { class: "default-slider" }, null, -1)), tn = /* @__PURE__ */
|
|
987
|
+
const Jt = (e) => (re("data-v-efefe52c"), e = e(), ue(), e), en = /* @__PURE__ */ Jt(() => /* @__PURE__ */ x("div", { class: "default-slider" }, null, -1)), tn = /* @__PURE__ */ j({
|
|
987
988
|
__name: "ScrollBar",
|
|
988
989
|
props: {
|
|
989
990
|
containerEl: null,
|
|
@@ -993,13 +994,13 @@ const Jt = (e) => (re("data-v-efefe52c"), e = e(), ue(), e), en = /* @__PURE__ *
|
|
|
993
994
|
performance: null
|
|
994
995
|
},
|
|
995
996
|
setup(e, { expose: t }) {
|
|
996
|
-
const n = e, o = !!vt().default, l = p(null), a =
|
|
997
|
+
const n = e, o = !!vt().default, l = p(null), a = w(() => n.containerEl), s = Zt({
|
|
997
998
|
containerEl: a,
|
|
998
999
|
sliderEl: l,
|
|
999
1000
|
autoHeight: o ? n.autoHeight : !0,
|
|
1000
1001
|
performance: n.performance,
|
|
1001
1002
|
observeMethod: n.observeMethod
|
|
1002
|
-
}), { scrollable: r, isScrollEnd: h, sliderPos: v } = s, i = p(!1), c = n.autoHide ?
|
|
1003
|
+
}), { scrollable: r, isScrollEnd: h, sliderPos: v } = s, i = p(!1), c = n.autoHide ? w(() => i.value || !h.value) : w(() => r.value), { load: d } = _e(
|
|
1003
1004
|
`.hide-scrollbar {
|
|
1004
1005
|
scrollbar-width: none;
|
|
1005
1006
|
-ms-overflow-style: none;
|
|
@@ -1049,7 +1050,7 @@ const Mn = /* @__PURE__ */ Z(tn, [["__scopeId", "data-v-efefe52c"]]), nn = (e) =
|
|
|
1049
1050
|
}, sn = {
|
|
1050
1051
|
key: 0,
|
|
1051
1052
|
class: "box-load"
|
|
1052
|
-
}, an = { class: "left-load" }, rn = { class: "right-load" }, un = /* @__PURE__ */ nn(() => /* @__PURE__ */ x("div", { class: "among-load" }, null, -1)), cn = { class: "pull-arrow" }, dn = { key: 1 }, vn = /* @__PURE__ */
|
|
1053
|
+
}, an = { class: "left-load" }, rn = { class: "right-load" }, un = /* @__PURE__ */ nn(() => /* @__PURE__ */ x("div", { class: "among-load" }, null, -1)), cn = { class: "pull-arrow" }, dn = { key: 1 }, vn = /* @__PURE__ */ j({
|
|
1053
1054
|
__name: "PullRefresh",
|
|
1054
1055
|
props: {
|
|
1055
1056
|
refresh: null,
|
|
@@ -1058,10 +1059,10 @@ const Mn = /* @__PURE__ */ Z(tn, [["__scopeId", "data-v-efefe52c"]]), nn = (e) =
|
|
|
1058
1059
|
pullRefreshContainer: null
|
|
1059
1060
|
},
|
|
1060
1061
|
setup(e) {
|
|
1061
|
-
const t = e, n = 0.7, o = "#2EC1CC", l = p(-999), a = p(1), s = p(0), r = p(0.3), h = p(!1), v = p(0), i = p(0), c = p(0), d = p(0), u = p(0), f = p(), O =
|
|
1062
|
+
const t = e, n = 0.7, o = "#2EC1CC", l = p(-999), a = p(1), s = p(0), r = p(0.3), h = p(!1), v = p(0), i = p(0), c = p(0), d = p(0), u = p(0), f = p(), O = w(() => t.scrollTop), m = w(() => ({
|
|
1062
1063
|
transition: `${d.value}ms`,
|
|
1063
1064
|
transform: `translate3d(0,${l.value}px, 0) scale(${a.value})`
|
|
1064
|
-
})), _ =
|
|
1065
|
+
})), _ = w(() => ({
|
|
1065
1066
|
borderColor: o,
|
|
1066
1067
|
transition: d.value,
|
|
1067
1068
|
transform: `rotate(${100 + s.value}deg)`,
|
|
@@ -1143,7 +1144,7 @@ const Mn = /* @__PURE__ */ Z(tn, [["__scopeId", "data-v-efefe52c"]]), nn = (e) =
|
|
|
1143
1144
|
});
|
|
1144
1145
|
const fn = /* @__PURE__ */ Z(vn, [["__scopeId", "data-v-18377f18"]]), hn = {
|
|
1145
1146
|
inheritAttrs: !1
|
|
1146
|
-
}, pn = /* @__PURE__ */
|
|
1147
|
+
}, pn = /* @__PURE__ */ j({
|
|
1147
1148
|
...hn,
|
|
1148
1149
|
__name: "VirtualList",
|
|
1149
1150
|
props: {
|
|
@@ -1173,7 +1174,7 @@ const fn = /* @__PURE__ */ Z(vn, [["__scopeId", "data-v-18377f18"]]), hn = {
|
|
|
1173
1174
|
vListReturn: l
|
|
1174
1175
|
});
|
|
1175
1176
|
const c = "virtualListWrapper" + new Date().getTime();
|
|
1176
|
-
return (d, u) => (I(), H(
|
|
1177
|
+
return (d, u) => (I(), H(we, null, [
|
|
1177
1178
|
pt(fn, {
|
|
1178
1179
|
refresh: e.refresh,
|
|
1179
1180
|
refreshOff: e.refreshOff,
|
|
@@ -1191,7 +1192,7 @@ const fn = /* @__PURE__ */ Z(vn, [["__scopeId", "data-v-18377f18"]]), hn = {
|
|
|
1191
1192
|
}, d.$attrs), [
|
|
1192
1193
|
x("div", ve(fe(R(r))), [
|
|
1193
1194
|
x("div", ve(fe(R(h))), [
|
|
1194
|
-
(I(!0), H(
|
|
1195
|
+
(I(!0), H(we, null, gt(R(a), ({ index: f, data: O }) => (I(), H("div", {
|
|
1195
1196
|
key: f,
|
|
1196
1197
|
style: W({
|
|
1197
1198
|
height: `${R(v)(f).height}px`,
|
|
@@ -1210,7 +1211,7 @@ const fn = /* @__PURE__ */ Z(vn, [["__scopeId", "data-v-18377f18"]]), hn = {
|
|
|
1210
1211
|
], 64));
|
|
1211
1212
|
}
|
|
1212
1213
|
});
|
|
1213
|
-
const Pn = /* @__PURE__ */ Z(pn, [["__scopeId", "data-v-e0fb787f"]]), ye = (e) => (re("data-v-c986249d"), e = e(), ue(), e), mn = { style: { position: "absolute" } }, gn = /* @__PURE__ */ ye(() => /* @__PURE__ */ x("div", { class: "wrapper" }, null, -1)), _n = ["width", "height"], yn = /* @__PURE__ */ ye(() => /* @__PURE__ */ x("title", null, "logo", -1)),
|
|
1214
|
+
const Pn = /* @__PURE__ */ Z(pn, [["__scopeId", "data-v-e0fb787f"]]), ye = (e) => (re("data-v-c986249d"), e = e(), ue(), e), mn = { style: { position: "absolute" } }, gn = /* @__PURE__ */ ye(() => /* @__PURE__ */ x("div", { class: "wrapper" }, null, -1)), _n = ["width", "height"], yn = /* @__PURE__ */ ye(() => /* @__PURE__ */ x("title", null, "logo", -1)), bn = /* @__PURE__ */ ye(() => /* @__PURE__ */ x("g", {
|
|
1214
1215
|
id: "group-1",
|
|
1215
1216
|
stroke: "none",
|
|
1216
1217
|
"stroke-width": "1",
|
|
@@ -1222,10 +1223,10 @@ const Pn = /* @__PURE__ */ Z(pn, [["__scopeId", "data-v-e0fb787f"]]), ye = (e) =
|
|
|
1222
1223
|
id: "path-1",
|
|
1223
1224
|
fill: "#FFF"
|
|
1224
1225
|
})
|
|
1225
|
-
], -1)),
|
|
1226
|
+
], -1)), wn = [
|
|
1226
1227
|
yn,
|
|
1227
|
-
|
|
1228
|
-
], En = /* @__PURE__ */
|
|
1228
|
+
bn
|
|
1229
|
+
], En = /* @__PURE__ */ j({
|
|
1229
1230
|
__name: "Loading",
|
|
1230
1231
|
props: {
|
|
1231
1232
|
width: { default: "90" },
|
|
@@ -1247,7 +1248,7 @@ const Pn = /* @__PURE__ */ Z(pn, [["__scopeId", "data-v-e0fb787f"]]), ye = (e) =
|
|
|
1247
1248
|
viewBox: "0 0 260 260",
|
|
1248
1249
|
version: "1.1",
|
|
1249
1250
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1250
|
-
},
|
|
1251
|
+
}, wn, 8, _n))
|
|
1251
1252
|
]));
|
|
1252
1253
|
}
|
|
1253
1254
|
});
|
|
@@ -1272,7 +1273,7 @@ export {
|
|
|
1272
1273
|
Je as unselectAllKey,
|
|
1273
1274
|
Ge as unselectKey,
|
|
1274
1275
|
Dn as useDelayLoad,
|
|
1275
|
-
|
|
1276
|
+
jt as useDelayLoadComp,
|
|
1276
1277
|
et as useDragSelect,
|
|
1277
1278
|
On as useDragSelectByMobile,
|
|
1278
1279
|
Tn as useDragSelectByPc,
|
package/dist/index.umd.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
(function(y,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(y=typeof globalThis<"u"?globalThis:y||self,e(y.ui={},y.Vue))})(this,function(y,e){"use strict";const fe={created(t,n){let o,l;function r(a){o=a.clientX,l=a.clientY}function s(a){if(o===void 0)return;const i=a.clientX,m=a.clientY,p=Math.abs(i-o),u=Math.abs(m-l);p>5||u>5||n.value&&n.value(a)}t.__mouse_down__=r,t.__mouse_up__=s,t.addEventListener("mousedown",r),t.addEventListener("mouseup",s)},unmounted(t){t.removeEventListener("mousedown",t.__mouse_down__),t.removeEventListener("mouseup",t.__mouse_up__)}},$e={created(t,n){const{fn:o,ms:l=1500}=n.value;let r=null;function s(a){r||(o(a),r=setTimeout(()=>{r=null},l))}t.addEventListener("click",s)}};var pe;const Y=typeof window<"u",he=t=>typeof t=="function";Y&&((pe=window?.navigator)==null?void 0:pe.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function q(t){return typeof t=="function"?t():e.unref(t)}function me(t,n){function o(...l){t(()=>n.apply(this,l),{fn:n,thisArg:this,args:l})}return o}function Ie(t,n={}){let o,l;return s=>{const a=q(t),i=q(n.maxWait);if(o&&clearTimeout(o),a<=0||i!==void 0&&i<=0)return l&&(clearTimeout(l),l=null),s();i&&!l&&(l=setTimeout(()=>{o&&clearTimeout(o),l=null,s()},i)),o=setTimeout(()=>{l&&clearTimeout(l),l=null,s()},a)}}function Me(t,n=!0,o=!0){let l=0,r,s=!0;const a=()=>{r&&(clearTimeout(r),r=void 0)};return m=>{const p=q(t),u=Date.now()-l;if(a(),p<=0)return l=Date.now(),m();u>p&&(o||!s)?(l=Date.now(),m()):n&&(r=setTimeout(()=>{l=Date.now(),s=!0,a(),m()},p)),!o&&!r&&(r=setTimeout(()=>s=!0,p)),s=!1}}function ke(t){return t}function Re(t,n){let o,l,r;const s=e.ref(!0),a=()=>{s.value=!0,r()};e.watch(t,a,{flush:"sync"});const i=he(n)?n:n.get,m=he(n)?void 0:n.set,p=e.customRef((u,d)=>(l=u,r=d,{get(){return s.value&&(o=i(),s.value=!1),l(),o},set(f){m?.(f)}}));return Object.isExtensible(p)&&(p.trigger=a),p}function ve(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}function ge(t,n=200,o={}){return me(Ie(n,o),t)}function _e(t,n=200,o=!1,l=!0){return me(Me(n,o,l),t)}function ye(t,n=!0){e.getCurrentInstance()?e.onMounted(t):n?t():e.nextTick(t)}function we(t){var n;const o=q(t);return(n=o?.$el)!=null?n:o}const Pe=Y?window:void 0,Ae=Y?window.document:void 0;Y&&window.navigator,Y&&window.location;function He(t,n=!1){const o=e.ref(),l=()=>o.value=Boolean(t());return l(),ye(l,n),o}const Q=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},X="__vueuse_ssr_handlers__";Q[X]=Q[X]||{},Q[X];function Fe(){const t=e.getCurrentInstance(),n=Re(()=>null,()=>t.proxy.$el);return e.onUpdated(n.trigger),e.onMounted(n.trigger),n}var Ee=Object.getOwnPropertySymbols,Ve=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable,ze=(t,n)=>{var o={};for(var l in t)Ve.call(t,l)&&n.indexOf(l)<0&&(o[l]=t[l]);if(t!=null&&Ee)for(var l of Ee(t))n.indexOf(l)<0&&Ne.call(t,l)&&(o[l]=t[l]);return o};function je(t,n,o={}){const l=o,{window:r=Pe}=l,s=ze(l,["window"]);let a;const i=He(()=>r&&"ResizeObserver"in r),m=()=>{a&&(a.disconnect(),a=void 0)},p=e.watch(()=>we(t),d=>{m(),i.value&&r&&d&&(a=new ResizeObserver(n),a.observe(d,s))},{immediate:!0,flush:"post"}),u=()=>{m(),p()};return ve(u),{isSupported:i,stop:u}}function Ke(t,n={width:0,height:0},o={}){const{box:l="content-box"}=o,r=e.ref(n.width),s=e.ref(n.height);return je(t,([a])=>{const i=l==="border-box"?a.borderBoxSize:l==="content-box"?a.contentBoxSize:a.devicePixelContentBoxSize;i?(r.value=i.reduce((m,{inlineSize:p})=>m+p,0),s.value=i.reduce((m,{blockSize:p})=>m+p,0)):(r.value=a.contentRect.width,s.value=a.contentRect.height)},o),e.watch(()=>we(t),a=>{r.value=a?n.width:0,s.value=a?n.height:0}),{width:r,height:s}}var Se;(function(t){t.UP="UP",t.RIGHT="RIGHT",t.DOWN="DOWN",t.LEFT="LEFT",t.NONE="NONE"})(Se||(Se={}));let We=0;function G(t,n={}){const o=e.ref(!1),{document:l=Ae,immediate:r=!0,manual:s=!1,id:a=`vueuse_styletag_${++We}`}=n,i=e.ref(t);let m=()=>{};const p=()=>{if(!l)return;const d=l.getElementById(a)||l.createElement("style");d.type="text/css",d.id=a,n.media&&(d.media=n.media),l.head.appendChild(d),!o.value&&(m=e.watch(i,f=>{d.innerText=f},{immediate:!0}),o.value=!0)},u=()=>{!l||!o.value||(m(),l.head.removeChild(l.getElementById(a)),o.value=!1)};return r&&!s&&ye(p),s||ve(u),{id:a,css:i,unload:u,load:p,isLoaded:e.readonly(o)}}var Ye=Object.defineProperty,be=Object.getOwnPropertySymbols,Ue=Object.prototype.hasOwnProperty,qe=Object.prototype.propertyIsEnumerable,Ce=(t,n,o)=>n in t?Ye(t,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[n]=o,Qe=(t,n)=>{for(var o in n||(n={}))Ue.call(n,o)&&Ce(t,o,n[o]);if(be)for(var o of be(n))qe.call(n,o)&&Ce(t,o,n[o]);return t};Qe({linear:ke},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});function Le(t,n){const{scrollEndHook:o,itemHeight:l,overscan:r=5}=n,s=e.ref(null),a=Ke(s),i=e.ref(!0),m=ge(H,100);let p;const u=e.shallowRef(t),d=e.ref(0),f=e.ref({start:0,end:10}),c=e.ref({start:0,end:r});let h=0;const B=e.ref([]),v=e.computed(()=>{let{sum:S,height:E}={sum:0,height:0};return u.value.map(($,I)=>(typeof l=="number"?E=l:E=l(I),S+=E,{height:E,sum:S}))}),_=e.computed(()=>N(f.value.start)),b=e.computed(()=>typeof l=="number"?v.value.length*l:v.value[v.value.length-1]?.sum||0),M=e.computed(()=>{const{start:S,end:E}=c.value;return B.value.slice(S,E)});e.onMounted(()=>{}),e.onUnmounted(()=>cancelAnimationFrame(p)),e.watch(u,()=>{(a.width.value||a.height.value)&&x()},{deep:!0}),e.watch([a.width,a.height],([S,E])=>{(S||E)&&x()},{deep:!0}),e.watch(d,()=>{A(),m()});function A(){i.value=!1}function H(){i.value=!0,o?.()}function x(){cancelAnimationFrame(p),p=requestAnimationFrame(C)}function C(){if(s.value){d.value=s.value.scrollTop;let S=D(d.value);h=F(S);let E=Math.max(0,S-r),$=Math.min(S+h+r,u.value.length);f.value={start:E,end:$},B.value=u.value.slice(E,$).map((I,T)=>({data:I,index:T+E})),c.value.start=S-E,c.value.end=c.value.start+h}}function D(S){let E=0,$=v.value.length-1,I=-1;for(;E<=$;){const T=Math.floor((E+$)/2);v.value[T].sum>=S?(I=T,$=T-1):E=T+1}return Math.max(0,I)}function F(S){let E=0,$=0;for(let I=S;I<v.value.length&&(E++,$+=v.value[I].height,!($>=a.height.value));I++);return E}function N(S){if(typeof l=="number")return S*l;let E=v.value[S];return E?E.sum-E.height:0}function R(S){return v.value[S]||{sum:0,height:0}}function j(S){if(s.value){const E=R(S);s.value.scrollTop=E.sum-E.height,C()}}const U=e.computed(()=>({style:{width:"100%",height:`${b.value}px`,pointerEvents:i.value?void 0:"none"}})),K=e.computed(()=>({style:{transform:`translate3d(0, ${_.value}px, 0)`,"will-change":"transform"}})),z={overflowY:"auto"};return{list:B,visiableList:M,getItemHeightData:R,getoffsetTopIndex:D,totalHeight:b,clientHeight:a.height,scrollTo:j,scrollTop:d,isScrollEnd:i,containerProps:{ref:s,onScroll:()=>{x()},style:z},wrapperProps:U,innerProps:K}}const Z=Symbol(),J=Symbol(),ee=Symbol(),te=Symbol(),ne=Symbol(),oe=Symbol(),le=Symbol(),re=Symbol(),ae=Symbol();function Xe(){const{voidFn:t,boolFn:n,boolRef:o,arrayRef:l}={voidFn:c=>{},boolFn:c=>!1,boolRef:e.computed(()=>!1),arrayRef:e.computed(()=>[])},r=e.inject(te,l),s=e.inject(ee,n),a=e.inject(re,o),i=e.inject(J,t),m=e.inject(Z,t),p=e.inject(ne,t),u=e.inject(oe,t),d=e.inject(le,t),f=e.inject(ae,t);return{selected:r,isSelected:s,isAllSelected:a,toggle:i,toggleAll:m,select:p,selectAll:u,unselect:d,unselectAll:f}}function Ge(t,n){const o=e.ref({}),l=e.computed(()=>t.value.filter(f=>o.value[f[n]])),r=e.computed(()=>l.value.length!=0&&Object.keys(o.value).length==t.value.length);function s(){t.value.forEach(f=>{o.value[f[n]]=!0})}function a(){o.value={}}function i(f){f.forEach(c=>{o.value[c[n]]||(o.value[c[n]]=!0)})}function m(f){f.forEach(c=>{o.value[c[n]]&&delete o.value[c[n]]})}function p(f){return!!o.value[f[n]]}function u(f){f.forEach(c=>{p(c)?delete o.value[c[n]]:o.value[c[n]]=!0})}function d(){r.value?a():s()}return e.provide(Z,d),e.provide(J,u),e.provide(ee,p),e.provide(te,l),e.provide(ne,i),e.provide(oe,s),e.provide(le,m),e.provide(re,r),e.provide(ae,a),{selected:l,select:i,selectAll:s,unselect:m,unselectAll:a,toggle:u,toggleAll:d,isSelected:p,isAllSelected:r}}function se(t){return()=>{console.debug(`\u9ED8\u8BA4${t}\u65B9\u6CD5,\u9700\u8981\u81EA\u5B9A\u4E49\u751F\u6548`)}}function ie({attribute:t,selectWay:n="colum",scrollOptions:o={},getSelectMap:l=()=>({})}){const{select:r=se("\u9009\u62E9"),unselect:s=se("\u53D6\u6D88\u9009\u62E9"),unselectAll:a=se("\u53D6\u6D88\u5168\u9009")}=l();let i={};const m=e.computed(()=>_e(n==="colum"?At:Ht,50)),p=new Set,u=e.ref(!0),d=e.ref(),f=e.ref(!1),c=e.ref({x:0,y:0}),h=e.ref({x:0,y:0,scrollTop:0}),B=new ResizeObserver(g=>v.value=g[0].target.getBoundingClientRect()),v=e.ref({}),_=e.ref({top:0,height:0,sync(g=!1){_.value.top=d.value?.scrollTop||0,g&&(_.value.height=d.value?.scrollHeight||0)}}),b=e.computed(()=>f.value?{left:Math.min(c.value.x,h.value.x)-v.value.left,top:Math.min(c.value.y,h.value.y)-v.value.top,width:Math.abs(c.value.x-h.value.x),height:Math.abs(c.value.y-h.value.y)}:{left:0,top:0,width:0,height:0}),{margin:M=50,startSpeed:A=30,maxSpeed:H=30}=o;let x;const C=M,D=A,F=H,N=g=>g**1;let R=0;function j(g){if(cancelAnimationFrame(x),R=U(g),R=Math.max(Math.min(R,F),-F),R!==0){const w=d.value;if(!w||!f.value)return;const k=_.value.height-v.value.height;let L=_.value.top+Number(R);L=Math.min(Math.max(0,L),k),w.scrollTop=L,z(),x=requestAnimationFrame(()=>j(g))}}function U(g){if(d.value){const k=v.value,L=k.bottom-g;if(L<C)return D*N(1-L/C);const P=g-k.top;if(P<C)return-D*N(1-P/C)}return 0}function K(g){const w={...b.value,right:0,bottom:0};return w.left+=v.value.left,w.top+=v.value.top-_.value.top,w.right=w.width+w.left,w.bottom=w.height+w.top,w.left<g.right&&w.right>g.left&&w.top<g.bottom&&w.bottom>g.top}function z(){_.value.sync();const{top:g,height:w}=_.value;h.value.y=Math.min(w+v.value.top,h.value.y+g-h.value.scrollTop),h.value.scrollTop=g}function S(g,w,k="dynamic-styles"){let L=document.getElementById(k);L||(L=document.createElement("style"),L.id=k,document.head.appendChild(L));const P=L.sheet.cssRules,W=P.length,Vt=`${g} { ${w} }`;for(let de=0;de<W;de++){const Oe=P[de];if(Oe.selectorText===g&&Oe.style.cssText===w)return}L.sheet.insertRule(Vt,W)}function E(g,w){u.value=!0,f.value=!0,_.value.height?_.value.sync():_.value.sync(!0),c.value.x=g,c.value.y=w+_.value.top,h.value.x=c.value.x,h.value.y=c.value.y,d.value?.classList.add("disable-scroll-behavior"),p.clear()}function $(g,w,k){!f.value||(u.value&&n==="colum"&&!O()&&(a(),u.value=!1),k?.(),j(w),h.value.x=Math.max(g,v.value.left),h.value.y=Math.min(w+_.value.top,_.value.height+v.value.top),h.value.scrollTop=_.value.top,m.value())}function I(){f.value=!1,d.value?.classList.remove("disable-scroll-behavior")}function T(){!f.value||(R||z(),m.value())}function O(){if(!f.value)return!1;const{width:g,height:w}=b.value;return!(Math.max(g,w)>5)}function ue(){O()&&a()}function At(){O()||d.value?.querySelectorAll(`[${t}]`).forEach(g=>{i[`${t}`]=g.getAttribute(`${t}`),K(g.getBoundingClientRect())?r([i]):s([i])})}function Ht(){const g=[];let w=null,k=0;d.value?.querySelectorAll(`[${t}]`).forEach((L,P)=>{const W=L.getAttribute(`${t}`);g.push(W),K(L.getBoundingClientRect())?(w===null&&(w=P),w=Math.min(w,P),k=Math.max(k,P)):(i[`${t}`]=W,p.has(W)&&s([i]))});for(let L=w;L<k+1;L++)i[`${t}`]=g[L],r([i]),p.add(g[L])}function Ft(g){return!g?.value||(d.value=g.value,!d?.value)?!1:(B.observe(d.value),S(".disable-scroll-behavior","scroll-behavior: unset !important;"),!0)}return{init:Ft,dragStart:E,dragMove:$,dragEnd:I,onScroll:T,isSingleClick:O,cancelSelectAllBySingleClick:ue,selectFn:m,selectRange:b,isPressing:f,containerEl:d,observer:B}}function Ze(t){const n=ie(t),{observer:o,selectRange:l}=n,{onScroll:r,dragStart:s,dragMove:a,dragEnd:i,cancelSelectAllBySingleClick:m}=n,p=e.computed(()=>({left:`${l.value.left}px`,top:`${l.value.top}px`,width:`${l.value.width}px`,height:`${l.value.height}px`})),{load:u}=G(`.drag-select-box {
|
|
1
|
+
(function(y,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(y=typeof globalThis<"u"?globalThis:y||self,e(y.ui={},y.Vue))})(this,function(y,e){"use strict";const fe={created(t,o){let n,l;function r(a){n=a.clientX,l=a.clientY}function s(a){if(n===void 0)return;const i=a.clientX,m=a.clientY,p=Math.abs(i-n),u=Math.abs(m-l);p>5||u>5||o.value&&o.value(a)}t.__mouse_down__=r,t.__mouse_up__=s,t.addEventListener("mousedown",r),t.addEventListener("mouseup",s)},unmounted(t){t.removeEventListener("mousedown",t.__mouse_down__),t.removeEventListener("mouseup",t.__mouse_up__)}},$e={created(t,o){const{fn:n,ms:l=1500}=o.value;let r=null;function s(a){r||(n(a),r=setTimeout(()=>{r=null},l))}t.addEventListener("click",s)}};var pe;const Y=typeof window<"u",he=t=>typeof t=="function";Y&&((pe=window?.navigator)==null?void 0:pe.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function q(t){return typeof t=="function"?t():e.unref(t)}function me(t,o){function n(...l){t(()=>o.apply(this,l),{fn:o,thisArg:this,args:l})}return n}function Ie(t,o={}){let n,l;return s=>{const a=q(t),i=q(o.maxWait);if(n&&clearTimeout(n),a<=0||i!==void 0&&i<=0)return l&&(clearTimeout(l),l=null),s();i&&!l&&(l=setTimeout(()=>{n&&clearTimeout(n),l=null,s()},i)),n=setTimeout(()=>{l&&clearTimeout(l),l=null,s()},a)}}function Me(t,o=!0,n=!0){let l=0,r,s=!0;const a=()=>{r&&(clearTimeout(r),r=void 0)};return m=>{const p=q(t),u=Date.now()-l;if(a(),p<=0)return l=Date.now(),m();u>p&&(n||!s)?(l=Date.now(),m()):o&&(r=setTimeout(()=>{l=Date.now(),s=!0,a(),m()},p)),!n&&!r&&(r=setTimeout(()=>s=!0,p)),s=!1}}function ke(t){return t}function Re(t,o){let n,l,r;const s=e.ref(!0),a=()=>{s.value=!0,r()};e.watch(t,a,{flush:"sync"});const i=he(o)?o:o.get,m=he(o)?void 0:o.set,p=e.customRef((u,d)=>(l=u,r=d,{get(){return s.value&&(n=i(),s.value=!1),l(),n},set(f){m?.(f)}}));return Object.isExtensible(p)&&(p.trigger=a),p}function ve(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}function ge(t,o=200,n={}){return me(Ie(o,n),t)}function _e(t,o=200,n=!1,l=!0){return me(Me(o,n,l),t)}function ye(t,o=!0){e.getCurrentInstance()?e.onMounted(t):o?t():e.nextTick(t)}function we(t){var o;const n=q(t);return(o=n?.$el)!=null?o:n}const Pe=Y?window:void 0,Ae=Y?window.document:void 0;Y&&window.navigator,Y&&window.location;function He(t,o=!1){const n=e.ref(),l=()=>n.value=Boolean(t());return l(),ye(l,o),n}const Q=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},X="__vueuse_ssr_handlers__";Q[X]=Q[X]||{},Q[X];function Fe(){const t=e.getCurrentInstance(),o=Re(()=>null,()=>t.proxy.$el);return e.onUpdated(o.trigger),e.onMounted(o.trigger),o}var Ee=Object.getOwnPropertySymbols,Ve=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable,ze=(t,o)=>{var n={};for(var l in t)Ve.call(t,l)&&o.indexOf(l)<0&&(n[l]=t[l]);if(t!=null&&Ee)for(var l of Ee(t))o.indexOf(l)<0&&Ne.call(t,l)&&(n[l]=t[l]);return n};function je(t,o,n={}){const l=n,{window:r=Pe}=l,s=ze(l,["window"]);let a;const i=He(()=>r&&"ResizeObserver"in r),m=()=>{a&&(a.disconnect(),a=void 0)},p=e.watch(()=>we(t),d=>{m(),i.value&&r&&d&&(a=new ResizeObserver(o),a.observe(d,s))},{immediate:!0,flush:"post"}),u=()=>{m(),p()};return ve(u),{isSupported:i,stop:u}}function Ke(t,o={width:0,height:0},n={}){const{box:l="content-box"}=n,r=e.ref(o.width),s=e.ref(o.height);return je(t,([a])=>{const i=l==="border-box"?a.borderBoxSize:l==="content-box"?a.contentBoxSize:a.devicePixelContentBoxSize;i?(r.value=i.reduce((m,{inlineSize:p})=>m+p,0),s.value=i.reduce((m,{blockSize:p})=>m+p,0)):(r.value=a.contentRect.width,s.value=a.contentRect.height)},n),e.watch(()=>we(t),a=>{r.value=a?o.width:0,s.value=a?o.height:0}),{width:r,height:s}}var be;(function(t){t.UP="UP",t.RIGHT="RIGHT",t.DOWN="DOWN",t.LEFT="LEFT",t.NONE="NONE"})(be||(be={}));let We=0;function G(t,o={}){const n=e.ref(!1),{document:l=Ae,immediate:r=!0,manual:s=!1,id:a=`vueuse_styletag_${++We}`}=o,i=e.ref(t);let m=()=>{};const p=()=>{if(!l)return;const d=l.getElementById(a)||l.createElement("style");d.type="text/css",d.id=a,o.media&&(d.media=o.media),l.head.appendChild(d),!n.value&&(m=e.watch(i,f=>{d.innerText=f},{immediate:!0}),n.value=!0)},u=()=>{!l||!n.value||(m(),l.head.removeChild(l.getElementById(a)),n.value=!1)};return r&&!s&&ye(p),s||ve(u),{id:a,css:i,unload:u,load:p,isLoaded:e.readonly(n)}}var Ye=Object.defineProperty,Se=Object.getOwnPropertySymbols,Ue=Object.prototype.hasOwnProperty,qe=Object.prototype.propertyIsEnumerable,Ce=(t,o,n)=>o in t?Ye(t,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[o]=n,Qe=(t,o)=>{for(var n in o||(o={}))Ue.call(o,n)&&Ce(t,n,o[n]);if(Se)for(var n of Se(o))qe.call(o,n)&&Ce(t,n,o[n]);return t};Qe({linear:ke},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});function Le(t,o){const{scrollEndHook:n,itemHeight:l,overscan:r=5}=o,s=e.ref(null),a=Ke(s),i=e.ref(!0),m=ge(H,100);let p;const u=e.shallowRef(t),d=e.ref(0),f=e.ref({start:0,end:10}),c=e.ref({start:0,end:r});let h=0;const B=e.ref([]),v=e.computed(()=>{let{sum:b,height:E}={sum:0,height:0};return u.value.map(($,I)=>(typeof l=="number"?E=l:E=l(I),b+=E,{height:E,sum:b}))}),_=e.computed(()=>N(f.value.start)),S=e.computed(()=>typeof l=="number"?v.value.length*l:v.value[v.value.length-1]?.sum||0),M=e.computed(()=>{const{start:b,end:E}=c.value;return B.value.slice(b,E)});e.onMounted(()=>{}),e.onUnmounted(()=>cancelAnimationFrame(p)),e.watch(u,()=>{(a.width.value||a.height.value)&&x()},{deep:!0}),e.watch([a.width,a.height],([b,E])=>{(b||E)&&x()},{deep:!0}),e.watch(d,()=>{A(),m()});function A(){i.value=!1}function H(){i.value=!0,n?.()}function x(){cancelAnimationFrame(p),p=requestAnimationFrame(C)}function C(){if(s.value){d.value=s.value.scrollTop;let b=D(d.value);h=F(b);let E=Math.max(0,b-r),$=Math.min(b+h+r,u.value.length);f.value={start:E,end:$},B.value=u.value.slice(E,$).map((I,T)=>({data:I,index:T+E})),c.value.start=b-E,c.value.end=c.value.start+h}}function D(b){let E=0,$=v.value.length-1,I=-1;for(;E<=$;){const T=Math.floor((E+$)/2);v.value[T].sum>=b?(I=T,$=T-1):E=T+1}return Math.max(0,I)}function F(b){let E=0,$=0;for(let I=b;I<v.value.length&&(E++,$+=v.value[I].height,!($>=a.height.value));I++);return E}function N(b){if(typeof l=="number")return b*l;let E=v.value[b];return E?E.sum-E.height:0}function R(b){return v.value[b]||{sum:0,height:0}}function j(b){if(s.value){const E=R(b);s.value.scrollTop=E.sum-E.height,C()}}const U=e.computed(()=>({style:{width:"100%",height:`${S.value}px`,pointerEvents:i.value?void 0:"none"}})),K=e.computed(()=>({style:{transform:`translate3d(0, ${_.value}px, 0)`,"will-change":"transform"}})),z={overflowY:"auto"};return{list:B,visiableList:M,getItemHeightData:R,getoffsetTopIndex:D,totalHeight:S,clientHeight:a.height,scrollTo:j,scrollTop:d,isScrollEnd:i,containerProps:{ref:s,onScroll:()=>{x()},style:z},wrapperProps:U,innerProps:K}}const Z=Symbol(),J=Symbol(),ee=Symbol(),te=Symbol(),oe=Symbol(),ne=Symbol(),le=Symbol(),re=Symbol(),ae=Symbol();function Xe(){const{voidFn:t,boolFn:o,boolRef:n,arrayRef:l}={voidFn:c=>{},boolFn:c=>!1,boolRef:e.computed(()=>!1),arrayRef:e.computed(()=>[])},r=e.inject(te,l),s=e.inject(ee,o),a=e.inject(re,n),i=e.inject(J,t),m=e.inject(Z,t),p=e.inject(oe,t),u=e.inject(ne,t),d=e.inject(le,t),f=e.inject(ae,t);return{selected:r,isSelected:s,isAllSelected:a,toggle:i,toggleAll:m,select:p,selectAll:u,unselect:d,unselectAll:f}}function Ge(t,o){const n=e.ref({}),l=e.computed(()=>t.value.filter(f=>n.value[f[o]])),r=e.computed(()=>l.value.length!=0&&Object.keys(n.value).length==t.value.length);function s(){t.value.forEach(f=>{n.value[f[o]]=!0})}function a(){n.value={}}function i(f){f.forEach(c=>{n.value[c[o]]||(n.value[c[o]]=!0)})}function m(f){f.forEach(c=>{n.value[c[o]]&&delete n.value[c[o]]})}function p(f){return!!n.value[f[o]]}function u(f){f.forEach(c=>{p(c)?delete n.value[c[o]]:n.value[c[o]]=!0})}function d(){r.value?a():s()}return e.provide(Z,d),e.provide(J,u),e.provide(ee,p),e.provide(te,l),e.provide(oe,i),e.provide(ne,s),e.provide(le,m),e.provide(re,r),e.provide(ae,a),{selected:l,select:i,selectAll:s,unselect:m,unselectAll:a,toggle:u,toggleAll:d,isSelected:p,isAllSelected:r}}function se(t){return()=>{console.debug(`\u9ED8\u8BA4${t}\u65B9\u6CD5,\u9700\u8981\u81EA\u5B9A\u4E49\u751F\u6548`)}}function ie({attribute:t,selectWay:o="colum",scrollOptions:n={},getSelectMap:l=()=>({})}){const{select:r=se("\u9009\u62E9"),unselect:s=se("\u53D6\u6D88\u9009\u62E9"),unselectAll:a=se("\u53D6\u6D88\u5168\u9009")}=l();let i={};const m=e.computed(()=>_e(o==="colum"?At:Ht,50)),p=new Set,u=e.ref(!0),d=e.ref(),f=e.ref(!1),c=e.ref({x:0,y:0}),h=e.ref({x:0,y:0,scrollTop:0}),B=new ResizeObserver(g=>v.value=g[0].target.getBoundingClientRect()),v=e.ref({}),_=e.ref({top:0,height:0,sync(g=!1){_.value.top=d.value?.scrollTop||0,g&&(_.value.height=d.value?.scrollHeight||0)}}),S=e.computed(()=>f.value?{left:Math.min(c.value.x,h.value.x)-v.value.left,top:Math.min(c.value.y,h.value.y)-v.value.top,width:Math.abs(c.value.x-h.value.x),height:Math.abs(c.value.y-h.value.y)}:{left:0,top:0,width:0,height:0}),{margin:M=50,startSpeed:A=30,maxSpeed:H=30}=n;let x;const C=M,D=A,F=H,N=g=>g**1;let R=0;function j(g){if(cancelAnimationFrame(x),R=U(g),R=Math.max(Math.min(R,F),-F),R!==0){const w=d.value;if(!w||!f.value)return;const k=_.value.height-v.value.height;let L=_.value.top+Number(R);L=Math.min(Math.max(0,L),k),w.scrollTop=L,z(),x=requestAnimationFrame(()=>j(g))}}function U(g){if(d.value){const k=v.value,L=k.bottom-g;if(L<C)return D*N(1-L/C);const P=g-k.top;if(P<C)return-D*N(1-P/C)}return 0}function K(g){const w={...S.value,right:0,bottom:0};return w.left+=v.value.left,w.top+=v.value.top-_.value.top,w.right=w.width+w.left,w.bottom=w.height+w.top,w.left<g.right&&w.right>g.left&&w.top<g.bottom&&w.bottom>g.top}function z(){_.value.sync();const{top:g,height:w}=_.value;h.value.y=Math.min(w+v.value.top,h.value.y+g-h.value.scrollTop),h.value.scrollTop=g}function b(g,w,k="dynamic-styles"){let L=document.getElementById(k);L||(L=document.createElement("style"),L.id=k,document.head.appendChild(L));const P=L.sheet.cssRules,W=P.length,Vt=`${g} { ${w} }`;for(let de=0;de<W;de++){const Oe=P[de];if(Oe.selectorText===g&&Oe.style.cssText===w)return}L.sheet.insertRule(Vt,W)}function E(g,w){u.value=!0,f.value=!0,_.value.height?_.value.sync():_.value.sync(!0),c.value.x=g,c.value.y=w+_.value.top,h.value.x=c.value.x,h.value.y=c.value.y,d.value?.classList.add("disable-scroll-behavior"),p.clear()}function $(g,w,k){!f.value||(u.value&&o==="colum"&&!O()&&(a(),u.value=!1),k?.(),j(w),h.value.x=Math.max(g,v.value.left),h.value.y=Math.min(w+_.value.top,_.value.height+v.value.top),h.value.scrollTop=_.value.top,m.value())}function I(){f.value=!1,d.value?.classList.remove("disable-scroll-behavior")}function T(){!f.value||(R||z(),m.value())}function O(){if(!f.value)return!1;const{width:g,height:w}=S.value;return!(Math.max(g,w)>5)}function ue(){O()&&a()}function At(){O()||d.value?.querySelectorAll(`[${t}]`).forEach(g=>{i[`${t}`]=g.getAttribute(`${t}`),K(g.getBoundingClientRect())?r([i]):s([i])})}function Ht(){const g=[];let w=null,k=0;d.value?.querySelectorAll(`[${t}]`).forEach((L,P)=>{const W=L.getAttribute(`${t}`);g.push(W),K(L.getBoundingClientRect())?(w===null&&(w=P),w=Math.min(w,P),k=Math.max(k,P)):(i[`${t}`]=W,p.has(W)&&s([i]))});for(let L=w;L<k+1;L++)i[`${t}`]=g[L],r([i]),p.add(g[L])}function Ft(g){return!g?.value||(d.value=g.value,!d?.value)?!1:(B.observe(d.value),b(".disable-scroll-behavior","scroll-behavior: unset !important;"),!0)}return{init:Ft,dragStart:E,dragMove:$,dragEnd:I,onScroll:T,isSingleClick:O,cancelSelectAllBySingleClick:ue,selectFn:m,selectRange:S,isPressing:f,containerEl:d,observer:B}}function Ze(t){const o=ie(t),{observer:n,selectRange:l}=o,{onScroll:r,dragStart:s,dragMove:a,dragEnd:i,cancelSelectAllBySingleClick:m}=o,p=e.computed(()=>({left:`${l.value.left}px`,top:`${l.value.top}px`,width:`${l.value.width}px`,height:`${l.value.height}px`})),{load:u}=G(`.drag-select-box {
|
|
2
2
|
position: absolute;
|
|
3
3
|
z-index: 99999;
|
|
4
4
|
background-color: rgb(191 219 254);
|
|
5
5
|
opacity: 0.5;
|
|
6
|
-
}`,{id:"styletag_lzc_dragselect",manual:!0}),d=e.defineComponent({render(){return e.h("div",{id:"selectBoxEl",class:"drag-select-box",style:p.value})}});function f(_){_.button===0&&s(_.x,_.y)}function c(_){a(_.x,_.y)}function h(_){_.composedPath().some(M=>M?.getAttribute?.(t.attribute))||m(),i()}function B(_){try{if(!
|
|
6
|
+
}`,{id:"styletag_lzc_dragselect",manual:!0}),d=e.defineComponent({render(){return e.h("div",{id:"selectBoxEl",class:"drag-select-box",style:p.value})}});function f(_){_.button===0&&s(_.x,_.y)}function c(_){a(_.x,_.y)}function h(_){_.composedPath().some(M=>M?.getAttribute?.(t.attribute))||m(),i()}function B(_){try{if(!o.init(_))throw"\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";if(!o.containerEl?.value)return!1;e.render(e.h(d),o.containerEl.value),u(),o.containerEl.value?.addEventListener("scroll",r),o.containerEl.value?.addEventListener("mousedown",f),window.addEventListener("mousemove",c),window.addEventListener("mouseup",h)}catch(S){console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25",S)}}function v(){n.disconnect(),o.containerEl.value?.removeEventListener("scroll",r),o.containerEl.value?.removeEventListener("mousedown",f),window.removeEventListener("mousemove",c),window.removeEventListener("mouseup",h)}return{init:B,unMount:v}}function Je(t,o,n=600){const l=ie({...t,selectWay:"row",scrollOptions:{startSpeed:5,maxSpeed:5}}),{observer:r}=l,{onScroll:s,dragStart:a,dragMove:i,dragEnd:m}=l;let p;function u(){clearTimeout(p)}function d(v){u(),v.composedPath().some(S=>!!S?.getAttribute?.(t.attribute))&&(p=setTimeout(()=>{const{clientX:S,clientY:M}=v.targetTouches[0];a(S,M),o?.(),i(S,M,()=>v.preventDefault()),v.preventDefault()},n))}function f(v){u();const{clientX:_,clientY:S}=v.targetTouches[0];i(_,S,()=>v.preventDefault())}function c(){u(),m()}function h(v){try{if(!l.init(v))throw"\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";if(!l.containerEl?.value)return!1;l.containerEl.value?.addEventListener("scroll",s),l.containerEl.value?.addEventListener("touchstart",d),l.containerEl.value?.addEventListener("touchmove",f),window.addEventListener("touchcancel",c),window.addEventListener("touchend",c)}catch(_){console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25",_)}}function B(){r.disconnect(),l.containerEl.value?.removeEventListener("scroll",s),l.containerEl.value?.removeEventListener("touchstart",d),l.containerEl.value?.removeEventListener("touchmove",f),window.removeEventListener("touchcancel",c),window.removeEventListener("touchEnd",c)}return{init:h,unMount:B}}const Te=Symbol(),et={key:0,class:"lzc-modal"},tt=e.defineComponent({__name:"Dialog",props:{visiable:{type:Boolean,default:!1},closeOnClickOverlay:{type:Boolean,default:!0},dialogClass:{default:""}},emits:["update:visiable"],setup(t,{emit:o}){const n=t,l=()=>{n.closeOnClickOverlay&&o("update:visiable",!1)};return e.provide(Te,()=>o("update:visiable",!1)),(r,s)=>(e.openBlock(),e.createBlock(e.Transition,{name:"modal"},{default:e.withCtx(()=>[t.visiable?e.withDirectives((e.openBlock(),e.createElementBlock("div",et,[e.createElementVNode("div",{onMousedown:s[0]||(s[0]=e.withModifiers(()=>{},["stop"])),class:e.normalizeClass(["lzc-dialog",t.dialogClass])},[e.renderSlot(r.$slots,"default",{},void 0,!0)],34)])),[[e.unref(fe),()=>l()]]):e.createCommentVNode("",!0)]),_:3}))}}),zt="",V=(t,o)=>{const n=t.__vccOpts||t;for(const[l,r]of o)n[l]=r;return n},ot=V(tt,[["__scopeId","data-v-4ff684af"]]);function nt(t){function o(n,l){const r=document.createElement("div"),s={setup(){return()=>e.h(ot,{visiable:!0,"onUpdate:visiable":()=>{r?.remove()},...t},{default:()=>e.h(n,l)})}};return document.body.appendChild(r),e.render(e.h(s),r),{close:()=>r?.remove()}}return{create:o}}function Be({component:t,componentProps:o,delay:n=300}){const r=`lzc-delay-loading-${`${new Date().getTime()}`}`,s=`${n}ms`;return G(`@keyframes lzcDelayLoad {
|
|
7
7
|
to {
|
|
8
8
|
opacity: 1;
|
|
9
9
|
}
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
.${r} {
|
|
12
12
|
opacity: 0;
|
|
13
13
|
animation: lzcDelayLoad 0s ${s} forwards;
|
|
14
|
-
}`),{LoadingComp:e.defineComponent({setup(){const i=Fe();return e.onMounted(()=>{i.value.classList.add(r)}),()=>e.h(t,
|
|
14
|
+
}`),{LoadingComp:e.defineComponent({setup(){const i=Fe();return e.onMounted(()=>{i.value.classList.add(r)}),()=>e.h(t,o)}})}}function lt({component:t,componentProps:o,delay:n=300}){const{LoadingComp:l}=Be({component:t,componentProps:o,delay:n}),r=e.ref(!1);function s(){r.value=!0}function a(){r.value=!1}return{LoadingComp:l,loading:r,load:s,unload:a}}const rt=[(t=>(e.pushScopeId("data-v-d0ad7597"),t=t(),e.popScopeId(),t))(()=>e.createElementVNode("div",{class:"ldio-mm5gwljcryb"},[e.createElementVNode("div")],-1))],at=e.defineComponent({__name:"DefaultLoading",props:{width:{default:24},height:{default:24}},setup(t){return e.useCssVars(o=>({d8dfa9f0:t.width+"px","2941c2e5":t.height+"px"})),(o,n)=>(e.openBlock(),e.createElementBlock("div",e.normalizeProps(e.guardReactiveProps(o.$attrs)),rt,16))}}),Wt="",st=V(at,[["__scopeId","data-v-d0ad7597"]]),it=["onClick"],ct=e.defineComponent({__name:"Toast",props:{message:null,position:null,buttonClickEvent:null},setup(t){const o=t,n=e.ref(),l=e.ref(),r=e.ref(),s=e.computed(()=>{switch(o.position){case"top":return 10;case"middle":return 50;case"bottom":return 85}}),a=e.computed(()=>({position:"absolute",borderRadius:"10px",backgroundColor:"rgba(0, 0, 0, 0.8)",padding:"14px 19px",top:`calc(${s.value}% - ${r.value}px)`,left:`calc(50% - ${l.value}px)`})),i=e.computed(()=>({width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",color:"white",fontSize:"14px"}));function m(){!o.buttonClickEvent||o.buttonClickEvent()}return e.nextTick(()=>{l.value=n.value.offsetWidth/2,r.value=n.value.offsetHeight/2}),(p,u)=>(e.openBlock(),e.createElementBlock("div",{onClick:e.withModifiers(m,["stop"]),id:"toastWrapper",ref_key:"toastWrapper",ref:n,class:"toastWrapper",style:e.normalizeStyle([e.unref(a),{zIndex:9999999}])},[e.createElementVNode("div",{style:e.normalizeStyle(e.unref(i))},[e.createElementVNode("span",null,e.toDisplayString(t.message),1)],4)],12,it))}}),Yt="",ut=V(ct,[["__scopeId","data-v-533e986b"]]),xe={message:"\u61D2\u732B\u4E91 Yes!!!",position:"middle",duration:1500,buttonClickEvent:()=>{}};class dt{options;container;constructor(o){this.options=o,this.container=document.createElement("div")}present(){const o=e.h(e.h(ut),{...xe,...this.options});e.render(o,this.container),document.body.insertBefore(this.container,document.body.firstChild);const n=this.options.duration||xe.duration;setTimeout(()=>{this.dismiss()},n)}dismiss(){if(this.container){const o=this.container.querySelector("#toastWrapper");o.style.opacity="0",o.style.transition="opacity 0.4s ease-in",setTimeout(()=>{this.container&&(e.render(null,this.container),document.body.removeChild(this.container))},500)}}}const ft=["xlink:href","fill","color"],pt=e.defineComponent({__name:"SvgIcon",props:{name:null,prefix:{default:"icon"},color:{default:"#FFF"},width:null,height:null},setup(t){const o=t,n=e.computed(()=>`#${o.prefix}-${o.name}`),l=e.computed(()=>({width:`${o.width??o.height}px`,height:`${o.height??o.width}px`,aspectRatio:o.width&&o.height?void 0:"1/1"}));function r(s){const{style:a}=s;return typeof a=="object"?a:{}}return(s,a)=>(e.openBlock(),e.createElementBlock("svg",{"aria-hidden":"",style:e.normalizeStyle({...e.unref(l),...r(s.$attrs)})},[e.createElementVNode("use",{"xlink:href":e.unref(n),fill:t.color,color:t.color},null,8,ft)],4))}});function ht(t){const{containerEl:o,sliderEl:n,autoHeight:l,performance:r={},maxHeightRatio:s=.9,observeMethod:a="classList"}=t,i=e.ref(!0),m=ge(N,100);let p,u="";const d=e.ref(0),f=e.ref(0),c=e.ref(0),h=e.ref({top:0,scrollTop:0,scrollHeight:0,clientHeight:0}),B=e.ref({clientHeight:0}),v=e.computed(()=>!!f.value),_=e.computed(()=>h.value.scrollHeight>h.value.clientHeight),S=e.computed(()=>l?h.value.clientHeight-H.value:h.value.clientHeight-B.value.clientHeight),M=e.computed(()=>h.value.scrollHeight-h.value.clientHeight),A=e.computed(()=>Math.max(h.value.clientHeight/h.value.scrollHeight,.05)),H=e.computed(()=>A.value>s?0:A.value*h.value.clientHeight),x=e.computed(()=>({willChange:"transform",transform:`translate3d(0,${c.value}px,0)`,height:l?`${H.value}px`:void 0}));function C(T){F(),f.value=T.clientY-n.value.getBoundingClientRect().top||1,u=getComputedStyle(o.value).scrollBehavior,u==="smooth"&&(o.value.style.scrollBehavior="unset")}function D(){o.value.style.scrollBehavior=u,f.value=0,m()}function F(){i.value=!1}function N(){v.value||(i.value=!0)}function R(T){if(!v.value)return;let O=T.clientY-h.value.top-f.value;O<0?c.value=0:O>=S.value?c.value=S.value:c.value=O,o.value.scrollTo({top:c.value/S.value*M.value})}function j(){v.value||U()}function U(){cancelAnimationFrame(p),p=requestAnimationFrame(K)}function K(){o.value&&(d.value=r.scrollTop?.value??o.value.scrollTop,c.value=d.value/M.value*S.value)}function z(T){let O="addEventListener";T==="add"?O="addEventListener":O="removeEventListener",n.value?.[O]("pointerdown",C,{passive:!0}),window[O]("pointermove",R,{passive:!0}),window[O]("pointerup",D,{passive:!0})}const b=new MutationObserver(T=>{(a=="classList"||T.map(ue=>ue.oldValue).join().includes("height"))&&E()});function E(){h.value.top=o.value?.getBoundingClientRect().top??0,h.value.scrollHeight=o.value?.scrollHeight??0,h.value.clientHeight=o.value?.clientHeight??0}function $(){F(),setTimeout(()=>{B.value.clientHeight=n.value?.clientHeight??0,N()},150)}function I(){if(o.value&&n.value){o.value.classList.add("hide-scrollbar"),o.value.addEventListener("scroll",j,{passive:!0}),z("add");const T={};a==="classList"?Object.assign(T,{subtree:!0,childList:!0}):Object.assign(T,{subtree:!0,attributeOldValue:!0,attributeFilter:["style"]}),b.observe(o.value,T),setTimeout(()=>{E()},100),$()}else console.error("useScrollBar:","\u521D\u59CB\u5316\u5931\u8D25!",{containerEl:o,sliderEl:n})}return e.watch(d,()=>{F(),m()}),{isScrollEnd:i,isDragSlider:v,offsetTop:c,scrollTop:d,scrollable:_,sliderPos:x,init:I,modifySliderEventListener:z}}const mt=(t=>(e.pushScopeId("data-v-efefe52c"),t=t(),e.popScopeId(),t))(()=>e.createElementVNode("div",{class:"default-slider"},null,-1)),vt=e.defineComponent({__name:"ScrollBar",props:{containerEl:null,autoHide:{type:Boolean},autoHeight:{type:Boolean},observeMethod:null,performance:null},setup(t,{expose:o}){const n=t,l=!!e.useSlots().default,r=e.ref(null),s=e.computed(()=>n.containerEl),a=ht({containerEl:s,sliderEl:r,autoHeight:l?n.autoHeight:!0,performance:n.performance,observeMethod:n.observeMethod}),{scrollable:i,isScrollEnd:m,sliderPos:p}=a,u=e.ref(!1),d=n.autoHide?e.computed(()=>u.value||!m.value):e.computed(()=>i.value),{load:f}=G(`.hide-scrollbar {
|
|
15
15
|
scrollbar-width: none;
|
|
16
16
|
-ms-overflow-style: none;
|
|
17
17
|
}
|
|
18
18
|
.hide-scrollbar::-webkit-scrollbar {
|
|
19
19
|
display: none;
|
|
20
|
-
}`,{id:"styletag_lzc_scrollbar",manual:!0});e.onMounted(()=>{f(),e.nextTick(()=>{a.init()})}),e.onUnmounted(()=>{a.modifySliderEventListener("remove")});function c(){u.value=!0}function h(){u.value=!1}return n({uScrollBarReturn:a}),(B,v)=>(e.openBlock(),e.createBlock(e.Transition,null,{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"sliderRef",ref:r,class:"slider-wrapper",onMouseenter:c,onMouseleave:h,style:e.normalizeStyle(e.unref(p))},[e.renderSlot(B.$slots,"default",{},()=>[mt],!0)],36),[[e.vShow,e.unref(d)]])]),_:3}))}}),qt="",gt=V(vt,[["__scopeId","data-v-efefe52c"]]),_t=t=>(e.pushScopeId("data-v-18377f18"),t=t(),e.popScopeId(),t),yt={class:"pull-refresh"},wt={key:0,class:"pull-arrow-circle"},Et={key:0,class:"box-load"},St={class:"left-load"},bt={class:"right-load"},Ct=_t(()=>e.createElementVNode("div",{class:"among-load"},null,-1)),Lt={class:"pull-arrow"},Tt={key:1},Bt=e.defineComponent({__name:"PullRefresh",props:{refresh:null,refreshOff:{type:Boolean,default:!1},scrollTop:null,pullRefreshContainer:null},setup(t){const n=t,o=.7,l="#2EC1CC",r=e.ref(-999),s=e.ref(1),a=e.ref(0),i=e.ref(.3),m=e.ref(!1),p=e.ref(0),u=e.ref(0),d=e.ref(0),f=e.ref(0),c=e.ref(0),h=e.ref(),B=e.computed(()=>n.scrollTop),v=e.computed(()=>({transition:`${f.value}ms`,transform:`translate3d(0,${r.value}px, 0) scale(${s.value})`})),_=e.computed(()=>({borderColor:l,transition:f.value,transform:`rotate(${100+a.value}deg)`,opacity:i.value}));e.watch(c,C=>{C===0&&(r.value=-50,i.value=.3)}),e.watch(u,C=>{if(c.value===2)return;const D=Math.pow(C,o);D===0&&(r.value=-50),D<=50&&D>0&&(r.value=D-45,a.value=Math.pow(D,1.5),D>15?m.value=!0:m.value=!1),D>50&&(r.value=5,i.value=1,c.value)});const b=e.ref(0),M=C=>{b.value=C.touches[0].pageY},A=C=>{const D=C.touches[0].pageY-b.value;b.value=C.touches[0].pageY,!n.refreshOff&&(!n?.refresh||c.value!==2&&B.value===0&&(p.value===0&&(p.value=C.touches[0].pageY),d.value=0,x.value.style.transition=`${d.value}ms`,f.value=0,u.value=C.touches[0].pageY-p.value,x.value.style.transform=`translate3d(0, ${Math.pow(u.value,o)}px, 0)`,D>0&&C.preventDefault()))},H=()=>{if(n.refreshOff||!n?.refresh||c.value===2)return;p.value=0,d.value=300;const C=Math.pow(u.value,o);x.value.style.transition=`${d.value}ms`,C>50?(c.value=2,u.value=Math.pow(50,1/o),x.value.style.transform=`translate3d(0, ${Math.pow(u.value,o)}px, 0)`,f.value=300,n?.refresh&&n?.refresh().then(()=>{h.value="\u5237\u65B0\u6210\u529F"}).catch(()=>{h.value="\u5237\u65B0\u5931\u8D25"}).finally(()=>{setTimeout(()=>{c.value=0,u.value=0,x.value.style.transform=`translate3d(0, ${Math.pow(u.value,o)}px, 0)`,setTimeout(()=>{h.value=void 0},f.value)},600)})):(u.value=0,x.value.style.transform=`translate3d(0, ${Math.pow(u.value,o)}px, 0)`)},x=e.ref(null);return e.onMounted(()=>{n?.refreshOff||(x.value=document.querySelector(n.pullRefreshContainer),x.value?.addEventListener("touchstart",M),x.value?.addEventListener("touchmove",A),x.value?.addEventListener("touchend",H))}),(C,D)=>(e.openBlock(),e.createElementBlock("div",yt,[e.createElementVNode("div",{class:"pull-refresh-box",style:e.normalizeStyle(e.unref(v))},[h.value?(e.openBlock(),e.createElementBlock("div",Tt,e.toDisplayString(h.value),1)):(e.openBlock(),e.createElementBlock("div",wt,[c.value==2?(e.openBlock(),e.createElementBlock("div",Et,[e.createElementVNode("div",St,[e.createElementVNode("div",{class:"left-circle",style:e.normalizeStyle({backgroundColor:l})},null,4)]),e.createElementVNode("div",bt,[e.createElementVNode("div",{class:"right-circle",style:e.normalizeStyle({backgroundColor:l})},null,4)]),Ct])):(e.openBlock(),e.createElementBlock("div",{key:1,class:"pull-circle-line",style:e.normalizeStyle(e.unref(_))},[e.createElementVNode("div",Lt,[e.createElementVNode("div",{class:e.normalizeClass(["arrows",{opacity:m.value}]),style:e.normalizeStyle({borderBottomColor:l})},null,6)])],4))]))],4)]))}}),Qt="",De=V(Bt,[["__scopeId","data-v-18377f18"]]),xt={inheritAttrs:!1},Dt=e.defineComponent({...xt,__name:"VirtualList",props:{data:null,itemHeight:null,overscan:{default:10},refresh:null,refreshOff:{type:Boolean,default:!1}},emits:["scrollEnd"],setup(t,{expose:n,emit:o}){const l=t,r=Le(e.toRef(l,"data"),{itemHeight:f=>l.itemHeight(l.data[f]),overscan:l.overscan,scrollEndHook:()=>{o("scrollEnd")}}),{list:s,containerProps:a,wrapperProps:i,innerProps:m,getItemHeightData:p,scrollTop:u}=r;n({vListReturn:r});const d="virtualListWrapper"+new Date().getTime();return(f,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(De,{refresh:t.refresh,refreshOff:t.refreshOff,scrollTop:e.unref(u),pullRefreshContainer:"#"+d},null,8,["refresh","refreshOff","scrollTop","pullRefreshContainer"]),e.createElementVNode("div",{class:"virtualListWrapper",id:d},[e.createElementVNode("div",e.mergeProps({onScrollPassive:c[0]||(c[0]=(...h)=>e.unref(a).onScroll&&e.unref(a).onScroll(...h)),ref:e.unref(a).ref,class:"virtualList"},f.$attrs),[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(i))),[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(m))),[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),({index:h,data:B})=>(e.openBlock(),e.createElementBlock("div",{key:h,style:e.normalizeStyle({height:`${e.unref(p)(h).height}px`,display:"flex"})},[e.renderSlot(f.$slots,"default",{data:B,index:h},void 0,!0)],4))),128))],16)],16)],16)])],64))}}),Xt="",Ot=V(Dt,[["__scopeId","data-v-e0fb787f"]]),ce=t=>(e.pushScopeId("data-v-c986249d"),t=t(),e.popScopeId(),t),$t={style:{position:"absolute"}},It=ce(()=>e.createElementVNode("div",{class:"wrapper"},null,-1)),Mt=["width","height"],kt=[ce(()=>e.createElementVNode("title",null,"logo",-1)),ce(()=>e.createElementVNode("g",{id:"group-1",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createElementVNode("path",{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",id:"path-1",fill:"#FFF"})],-1))],Rt=e.defineComponent({__name:"Loading",props:{width:{default:"90"},height:{default:"90"},duration:{default:1300}},setup(t){const n=t;e.useCssVars(l=>({"5e400569":o}));const o=`${n.duration}ms`;return(l,r)=>(e.openBlock(),e.createElementBlock("div",$t,[It,(e.openBlock(),e.createElementBlock("svg",{style:{position:"relative"},width:t.width,height:t.height,viewBox:"0 0 260 260",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},kt,8,Mt))]))}}),Jt="",Pt=V(Rt,[["__scopeId","data-v-c986249d"]]);y.DefaultLoading=st,y.Loading=Pt,y.PullRefresh=De,y.ScrollBar=gt,y.SvgIcon=pt,y.ToastCreator=dt,y.VirtualList=Ot,y.allSelectedKey=te,y.closeDialogKey=Te,y.dialogController=ot,y.isAllSelectedKey=re,y.isSelectedKey=ee,y.selectAllKey=oe,y.selectKey=ne,y.toggleAllKey=Z,y.toggleKey=J,y.unselectAllKey=ae,y.unselectKey=le,y.useDelayLoad=lt,y.useDelayLoadComp=Be,y.useDragSelect=ie,y.useDragSelectByMobile=Je,y.useDragSelectByPc=Ze,y.useSelectable=Ge,y.useSelectableInjectors=Xe,y.useVirtualList=Le,y.vDebounceClick=$e,y.vSingleClick=fe,Object.defineProperties(y,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
20
|
+
}`,{id:"styletag_lzc_scrollbar",manual:!0});e.onMounted(()=>{f(),e.nextTick(()=>{a.init()})}),e.onUnmounted(()=>{a.modifySliderEventListener("remove")});function c(){u.value=!0}function h(){u.value=!1}return o({uScrollBarReturn:a}),(B,v)=>(e.openBlock(),e.createBlock(e.Transition,null,{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"sliderRef",ref:r,class:"slider-wrapper",onMouseenter:c,onMouseleave:h,style:e.normalizeStyle(e.unref(p))},[e.renderSlot(B.$slots,"default",{},()=>[mt],!0)],36),[[e.vShow,e.unref(d)]])]),_:3}))}}),qt="",gt=V(vt,[["__scopeId","data-v-efefe52c"]]),_t=t=>(e.pushScopeId("data-v-18377f18"),t=t(),e.popScopeId(),t),yt={class:"pull-refresh"},wt={key:0,class:"pull-arrow-circle"},Et={key:0,class:"box-load"},bt={class:"left-load"},St={class:"right-load"},Ct=_t(()=>e.createElementVNode("div",{class:"among-load"},null,-1)),Lt={class:"pull-arrow"},Tt={key:1},Bt=e.defineComponent({__name:"PullRefresh",props:{refresh:null,refreshOff:{type:Boolean,default:!1},scrollTop:null,pullRefreshContainer:null},setup(t){const o=t,n=.7,l="#2EC1CC",r=e.ref(-999),s=e.ref(1),a=e.ref(0),i=e.ref(.3),m=e.ref(!1),p=e.ref(0),u=e.ref(0),d=e.ref(0),f=e.ref(0),c=e.ref(0),h=e.ref(),B=e.computed(()=>o.scrollTop),v=e.computed(()=>({transition:`${f.value}ms`,transform:`translate3d(0,${r.value}px, 0) scale(${s.value})`})),_=e.computed(()=>({borderColor:l,transition:f.value,transform:`rotate(${100+a.value}deg)`,opacity:i.value}));e.watch(c,C=>{C===0&&(r.value=-50,i.value=.3)}),e.watch(u,C=>{if(c.value===2)return;const D=Math.pow(C,n);D===0&&(r.value=-50),D<=50&&D>0&&(r.value=D-45,a.value=Math.pow(D,1.5),D>15?m.value=!0:m.value=!1),D>50&&(r.value=5,i.value=1,c.value)});const S=e.ref(0),M=C=>{S.value=C.touches[0].pageY},A=C=>{const D=C.touches[0].pageY-S.value;S.value=C.touches[0].pageY,!o.refreshOff&&(!o?.refresh||c.value!==2&&B.value===0&&(p.value===0&&(p.value=C.touches[0].pageY),d.value=0,x.value.style.transition=`${d.value}ms`,f.value=0,u.value=C.touches[0].pageY-p.value,x.value.style.transform=`translate3d(0, ${Math.pow(u.value,n)}px, 0)`,D>0&&C.preventDefault()))},H=()=>{if(o.refreshOff||!o?.refresh||c.value===2)return;p.value=0,d.value=300;const C=Math.pow(u.value,n);x.value.style.transition=`${d.value}ms`,C>50?(c.value=2,u.value=Math.pow(50,1/n),x.value.style.transform=`translate3d(0, ${Math.pow(u.value,n)}px, 0)`,f.value=300,o?.refresh&&o?.refresh().then(()=>{h.value="\u5237\u65B0\u6210\u529F"}).catch(()=>{h.value="\u5237\u65B0\u5931\u8D25"}).finally(()=>{setTimeout(()=>{c.value=0,u.value=0,x.value.style.transform=`translate3d(0, ${Math.pow(u.value,n)}px, 0)`,setTimeout(()=>{h.value=void 0},f.value)},600)})):(u.value=0,x.value.style.transform=`translate3d(0, ${Math.pow(u.value,n)}px, 0)`)},x=e.ref(null);return e.onMounted(()=>{o?.refreshOff||(x.value=document.querySelector(o.pullRefreshContainer),x.value?.addEventListener("touchstart",M),x.value?.addEventListener("touchmove",A),x.value?.addEventListener("touchend",H))}),(C,D)=>(e.openBlock(),e.createElementBlock("div",yt,[e.createElementVNode("div",{class:"pull-refresh-box",style:e.normalizeStyle(e.unref(v))},[h.value?(e.openBlock(),e.createElementBlock("div",Tt,e.toDisplayString(h.value),1)):(e.openBlock(),e.createElementBlock("div",wt,[c.value==2?(e.openBlock(),e.createElementBlock("div",Et,[e.createElementVNode("div",bt,[e.createElementVNode("div",{class:"left-circle",style:e.normalizeStyle({backgroundColor:l})},null,4)]),e.createElementVNode("div",St,[e.createElementVNode("div",{class:"right-circle",style:e.normalizeStyle({backgroundColor:l})},null,4)]),Ct])):(e.openBlock(),e.createElementBlock("div",{key:1,class:"pull-circle-line",style:e.normalizeStyle(e.unref(_))},[e.createElementVNode("div",Lt,[e.createElementVNode("div",{class:e.normalizeClass(["arrows",{opacity:m.value}]),style:e.normalizeStyle({borderBottomColor:l})},null,6)])],4))]))],4)]))}}),Qt="",De=V(Bt,[["__scopeId","data-v-18377f18"]]),xt={inheritAttrs:!1},Dt=e.defineComponent({...xt,__name:"VirtualList",props:{data:null,itemHeight:null,overscan:{default:10},refresh:null,refreshOff:{type:Boolean,default:!1}},emits:["scrollEnd"],setup(t,{expose:o,emit:n}){const l=t,r=Le(e.toRef(l,"data"),{itemHeight:f=>l.itemHeight(l.data[f]),overscan:l.overscan,scrollEndHook:()=>{n("scrollEnd")}}),{list:s,containerProps:a,wrapperProps:i,innerProps:m,getItemHeightData:p,scrollTop:u}=r;o({vListReturn:r});const d="virtualListWrapper"+new Date().getTime();return(f,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(De,{refresh:t.refresh,refreshOff:t.refreshOff,scrollTop:e.unref(u),pullRefreshContainer:"#"+d},null,8,["refresh","refreshOff","scrollTop","pullRefreshContainer"]),e.createElementVNode("div",{class:"virtualListWrapper",id:d},[e.createElementVNode("div",e.mergeProps({onScrollPassive:c[0]||(c[0]=(...h)=>e.unref(a).onScroll&&e.unref(a).onScroll(...h)),ref:e.unref(a).ref,class:"virtualList"},f.$attrs),[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(i))),[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(m))),[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),({index:h,data:B})=>(e.openBlock(),e.createElementBlock("div",{key:h,style:e.normalizeStyle({height:`${e.unref(p)(h).height}px`,display:"flex"})},[e.renderSlot(f.$slots,"default",{data:B,index:h},void 0,!0)],4))),128))],16)],16)],16)])],64))}}),Xt="",Ot=V(Dt,[["__scopeId","data-v-e0fb787f"]]),ce=t=>(e.pushScopeId("data-v-c986249d"),t=t(),e.popScopeId(),t),$t={style:{position:"absolute"}},It=ce(()=>e.createElementVNode("div",{class:"wrapper"},null,-1)),Mt=["width","height"],kt=[ce(()=>e.createElementVNode("title",null,"logo",-1)),ce(()=>e.createElementVNode("g",{id:"group-1",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createElementVNode("path",{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",id:"path-1",fill:"#FFF"})],-1))],Rt=e.defineComponent({__name:"Loading",props:{width:{default:"90"},height:{default:"90"},duration:{default:1300}},setup(t){const o=t;e.useCssVars(l=>({"5e400569":n}));const n=`${o.duration}ms`;return(l,r)=>(e.openBlock(),e.createElementBlock("div",$t,[It,(e.openBlock(),e.createElementBlock("svg",{style:{position:"relative"},width:t.width,height:t.height,viewBox:"0 0 260 260",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},kt,8,Mt))]))}}),Jt="",Pt=V(Rt,[["__scopeId","data-v-c986249d"]]);y.DefaultLoading=st,y.Loading=Pt,y.PullRefresh=De,y.ScrollBar=gt,y.SvgIcon=pt,y.ToastCreator=dt,y.VirtualList=Ot,y.allSelectedKey=te,y.closeDialogKey=Te,y.dialogController=nt,y.isAllSelectedKey=re,y.isSelectedKey=ee,y.selectAllKey=ne,y.selectKey=oe,y.toggleAllKey=Z,y.toggleKey=J,y.unselectAllKey=ae,y.unselectKey=le,y.useDelayLoad=lt,y.useDelayLoadComp=Be,y.useDragSelect=ie,y.useDragSelectByMobile=Je,y.useDragSelectByPc=Ze,y.useSelectable=Ge,y.useSelectableInjectors=Xe,y.useVirtualList=Le,y.vDebounceClick=$e,y.vSingleClick=fe,Object.defineProperties(y,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|