@lazycatcloud/lzc-toolkit 0.0.210 → 0.0.211
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 +161 -161
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +4 -4
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { shallowRef as dt, watchEffect as
|
|
1
|
+
import { shallowRef as dt, watchEffect as bt, readonly as vt, getCurrentScope as _t, onScopeDispose as Mt, onMounted as ce, nextTick as Me, ref as h, watch as K, customRef as kt, unref as L, isRef as Qt, getCurrentInstance as Be, onUpdated as Yt, computed as j, reactive as pe, onUnmounted as gt, inject as ee, provide as P, defineComponent as q, h as ue, render as De, openBlock as R, createBlock as Ie, Transition as Ue, withCtx as Re, withDirectives as re, createElementBlock as H, normalizeClass as se, createElementVNode as U, withModifiers as ye, renderSlot as ge, createCommentVNode as fe, useCssVars as $e, normalizeProps as _e, guardReactiveProps as ke, pushScopeId as Ae, popScopeId as ze, normalizeStyle as G, toDisplayString as He, vShow as Le, createVNode as he, onBeforeUnmount as ht, onActivated as mt, onBeforeMount as Bt, onDeactivated as Ut, useSlots as Rt, toRef as $t, Fragment as Qe, mergeProps as me, renderList as Ht, toRefs as yt, createTextVNode as Pt } from "vue";
|
|
2
2
|
const Ft = {
|
|
3
3
|
created(e, t) {
|
|
4
|
-
let n, o;
|
|
5
|
-
function
|
|
6
|
-
|
|
4
|
+
let n, o, l;
|
|
5
|
+
function s(f) {
|
|
6
|
+
f.button == 0 && (n = Date.now(), o = f.clientX, l = f.clientY, t.modifiers?.stop && f.stopPropagation());
|
|
7
7
|
}
|
|
8
|
-
function
|
|
9
|
-
if (
|
|
8
|
+
function a(f) {
|
|
9
|
+
if (f.button != 0 || o === void 0)
|
|
10
10
|
return;
|
|
11
|
-
const
|
|
12
|
-
|
|
11
|
+
const i = f.clientX, r = f.clientY, v = Math.abs(i - o), c = Math.abs(r - l);
|
|
12
|
+
v > 5 || c > 5 || Date.now() - n > 300 || t.value?.(f);
|
|
13
13
|
}
|
|
14
|
-
e.
|
|
14
|
+
e._down__ = s, e._up__ = a, e.addEventListener("pointerdown", s), e.addEventListener("pointerup", a);
|
|
15
15
|
},
|
|
16
16
|
unmounted(e) {
|
|
17
|
-
e.removeEventListener("
|
|
17
|
+
e.removeEventListener("pointerdown", e._down__), e.removeEventListener("pointerup", e._up__);
|
|
18
18
|
}
|
|
19
19
|
}, Oo = {
|
|
20
20
|
created(e, t) {
|
|
@@ -35,7 +35,7 @@ const Ft = {
|
|
|
35
35
|
function Wt(e, t) {
|
|
36
36
|
var n;
|
|
37
37
|
const o = dt();
|
|
38
|
-
return
|
|
38
|
+
return bt(() => {
|
|
39
39
|
o.value = e();
|
|
40
40
|
}, {
|
|
41
41
|
...t,
|
|
@@ -59,7 +59,7 @@ function Xt(e, t) {
|
|
|
59
59
|
return Object.isExtensible(r) && (r.trigger = a), r;
|
|
60
60
|
}
|
|
61
61
|
function Pe(e) {
|
|
62
|
-
return
|
|
62
|
+
return _t() ? (Mt(e), !0) : !1;
|
|
63
63
|
}
|
|
64
64
|
function te(e) {
|
|
65
65
|
return typeof e == "function" ? e() : L(e);
|
|
@@ -288,26 +288,26 @@ function ln(e, t = {}) {
|
|
|
288
288
|
right: !1,
|
|
289
289
|
top: !0,
|
|
290
290
|
bottom: !1
|
|
291
|
-
}),
|
|
291
|
+
}), E = pe({
|
|
292
292
|
left: !1,
|
|
293
293
|
right: !1,
|
|
294
294
|
top: !1,
|
|
295
295
|
bottom: !1
|
|
296
296
|
}), I = (T) => {
|
|
297
|
-
!y.value || (y.value = !1,
|
|
297
|
+
!y.value || (y.value = !1, E.left = !1, E.right = !1, E.top = !1, E.bottom = !1, l(T));
|
|
298
298
|
}, m = je(I, n + o), D = (T) => {
|
|
299
299
|
var S;
|
|
300
300
|
if (!r)
|
|
301
301
|
return;
|
|
302
302
|
const Y = ((S = T?.document) == null ? void 0 : S.documentElement) || T?.documentElement || ie(T), { display: X, flexDirection: p } = getComputedStyle(Y), A = Y.scrollLeft;
|
|
303
|
-
|
|
303
|
+
E.left = A < c.value, E.right = A > c.value;
|
|
304
304
|
const O = Math.abs(A) <= (a.left || 0), Q = Math.abs(A) + Y.clientWidth >= Y.scrollWidth - (a.right || 0) - it;
|
|
305
305
|
X === "flex" && p === "row-reverse" ? (N.left = Q, N.right = O) : (N.left = O, N.right = Q), c.value = A;
|
|
306
|
-
let
|
|
307
|
-
T === r.document && !
|
|
308
|
-
const z = Math.abs(
|
|
309
|
-
X === "flex" && p === "column-reverse" ? (N.top = x, N.bottom = z) : (N.top = z, N.bottom = x), M.value =
|
|
310
|
-
},
|
|
306
|
+
let b = Y.scrollTop;
|
|
307
|
+
T === r.document && !b && (b = r.document.body.scrollTop), E.top = b < M.value, E.bottom = b > M.value;
|
|
308
|
+
const z = Math.abs(b) <= (a.top || 0), x = Math.abs(b) + Y.clientHeight >= Y.scrollHeight - (a.bottom || 0) - it;
|
|
309
|
+
X === "flex" && p === "column-reverse" ? (N.top = x, N.bottom = z) : (N.top = z, N.bottom = x), M.value = b;
|
|
310
|
+
}, w = (T) => {
|
|
311
311
|
var S;
|
|
312
312
|
if (!r)
|
|
313
313
|
return;
|
|
@@ -317,7 +317,7 @@ function ln(e, t = {}) {
|
|
|
317
317
|
return we(
|
|
318
318
|
e,
|
|
319
319
|
"scroll",
|
|
320
|
-
n ? Ye(
|
|
320
|
+
n ? Ye(w, n, !0, !1) : w,
|
|
321
321
|
f
|
|
322
322
|
), Fe(() => {
|
|
323
323
|
try {
|
|
@@ -338,7 +338,7 @@ function ln(e, t = {}) {
|
|
|
338
338
|
y: u,
|
|
339
339
|
isScrolling: y,
|
|
340
340
|
arrivedState: N,
|
|
341
|
-
directions:
|
|
341
|
+
directions: E,
|
|
342
342
|
measure() {
|
|
343
343
|
const T = te(e);
|
|
344
344
|
r && T && D(T);
|
|
@@ -393,7 +393,7 @@ function un(e, t) {
|
|
|
393
393
|
const g = h([]), y = j(() => {
|
|
394
394
|
let { sum: z, height: x } = { sum: 0, height: 0 };
|
|
395
395
|
return v.value.map((B, $) => (typeof o == "number" ? x = o : x = o($), z += x, { height: x, sum: z }));
|
|
396
|
-
}), N = j(() => X(M.value.start)),
|
|
396
|
+
}), N = j(() => X(M.value.start)), E = j(() => typeof o == "number" ? y.value.length * o : y.value[y.value.length - 1]?.sum || 0), I = j(() => {
|
|
397
397
|
const { start: z, end: x } = d.value;
|
|
398
398
|
return g.value.slice(z, x);
|
|
399
399
|
});
|
|
@@ -401,13 +401,13 @@ function un(e, t) {
|
|
|
401
401
|
}), gt(() => cancelAnimationFrame(r)), K(
|
|
402
402
|
v,
|
|
403
403
|
() => {
|
|
404
|
-
(a.width.value || a.height.value) &&
|
|
404
|
+
(a.width.value || a.height.value) && w();
|
|
405
405
|
},
|
|
406
406
|
{ deep: !0 }
|
|
407
407
|
), K(
|
|
408
408
|
[a.width, a.height],
|
|
409
409
|
([z, x]) => {
|
|
410
|
-
(z || x) &&
|
|
410
|
+
(z || x) && w();
|
|
411
411
|
},
|
|
412
412
|
{ deep: !0 }
|
|
413
413
|
), K(c, () => {
|
|
@@ -419,7 +419,7 @@ function un(e, t) {
|
|
|
419
419
|
function D() {
|
|
420
420
|
f.value = !0, n?.();
|
|
421
421
|
}
|
|
422
|
-
function
|
|
422
|
+
function w() {
|
|
423
423
|
cancelAnimationFrame(r), r = requestAnimationFrame(T);
|
|
424
424
|
}
|
|
425
425
|
function T() {
|
|
@@ -477,7 +477,7 @@ function un(e, t) {
|
|
|
477
477
|
const O = j(() => ({
|
|
478
478
|
style: {
|
|
479
479
|
width: "100%",
|
|
480
|
-
height: `${
|
|
480
|
+
height: `${E.value}px`,
|
|
481
481
|
pointerEvents: f.value ? void 0 : "none"
|
|
482
482
|
}
|
|
483
483
|
})), Q = j(() => ({
|
|
@@ -485,7 +485,7 @@ function un(e, t) {
|
|
|
485
485
|
transform: `translate3d(0, ${N.value}px, 0)`,
|
|
486
486
|
"will-change": "transform"
|
|
487
487
|
}
|
|
488
|
-
})),
|
|
488
|
+
})), b = {
|
|
489
489
|
overflowY: "auto"
|
|
490
490
|
};
|
|
491
491
|
return {
|
|
@@ -493,7 +493,7 @@ function un(e, t) {
|
|
|
493
493
|
visiableList: I,
|
|
494
494
|
getItemHeightData: p,
|
|
495
495
|
getoffsetTopIndex: S,
|
|
496
|
-
totalHeight:
|
|
496
|
+
totalHeight: E,
|
|
497
497
|
clientHeight: a.height,
|
|
498
498
|
scrollTo: A,
|
|
499
499
|
scrollTop: c,
|
|
@@ -501,16 +501,16 @@ function un(e, t) {
|
|
|
501
501
|
containerProps: {
|
|
502
502
|
ref: s,
|
|
503
503
|
onScroll: () => {
|
|
504
|
-
|
|
504
|
+
w();
|
|
505
505
|
},
|
|
506
|
-
style:
|
|
506
|
+
style: b
|
|
507
507
|
},
|
|
508
508
|
wrapperProps: O,
|
|
509
509
|
innerProps: Q
|
|
510
510
|
};
|
|
511
511
|
}
|
|
512
512
|
const Nt = Symbol(), Ze = Symbol(), Ve = Symbol(), Ke = Symbol(), Ge = Symbol(), qe = Symbol(), Je = Symbol(), et = Symbol(), tt = Symbol(), Te = Symbol(), nt = Symbol();
|
|
513
|
-
function
|
|
513
|
+
function bo() {
|
|
514
514
|
const { voidFn: e, boolFn: t, boolRef: n, numberRef: o, arrayRef: l } = {
|
|
515
515
|
voidFn: (y) => {
|
|
516
516
|
},
|
|
@@ -533,7 +533,7 @@ function _o() {
|
|
|
533
533
|
selectedCount: g
|
|
534
534
|
};
|
|
535
535
|
}
|
|
536
|
-
function
|
|
536
|
+
function _o(e, t, n = { deep: !0, useAllFlagOptimizatiofn: !0 }) {
|
|
537
537
|
const o = h(!1), l = h(/* @__PURE__ */ new Set()), s = pe(/* @__PURE__ */ new Map());
|
|
538
538
|
K(
|
|
539
539
|
e,
|
|
@@ -563,8 +563,8 @@ function bo(e, t, n = { deep: !0, useAllFlagOptimizatiofn: !0 }) {
|
|
|
563
563
|
o.value && (m = Array.from(s.values()));
|
|
564
564
|
else if (l.value.size) {
|
|
565
565
|
let D;
|
|
566
|
-
l.value.forEach((
|
|
567
|
-
D = s.get(
|
|
566
|
+
l.value.forEach((w) => {
|
|
567
|
+
D = s.get(w), D && m.push(D);
|
|
568
568
|
});
|
|
569
569
|
}
|
|
570
570
|
return m;
|
|
@@ -576,8 +576,8 @@ function bo(e, t, n = { deep: !0, useAllFlagOptimizatiofn: !0 }) {
|
|
|
576
576
|
if (o.value != null)
|
|
577
577
|
m = o.value;
|
|
578
578
|
else {
|
|
579
|
-
const D = l.value.size,
|
|
580
|
-
m = D ==
|
|
579
|
+
const D = l.value.size, w = s.size;
|
|
580
|
+
m = D == w;
|
|
581
581
|
}
|
|
582
582
|
return m;
|
|
583
583
|
});
|
|
@@ -617,7 +617,7 @@ function bo(e, t, n = { deep: !0, useAllFlagOptimizatiofn: !0 }) {
|
|
|
617
617
|
});
|
|
618
618
|
});
|
|
619
619
|
}
|
|
620
|
-
function
|
|
620
|
+
function E() {
|
|
621
621
|
const { value: m } = r;
|
|
622
622
|
m ? c() : v();
|
|
623
623
|
}
|
|
@@ -627,14 +627,14 @@ function bo(e, t, n = { deep: !0, useAllFlagOptimizatiofn: !0 }) {
|
|
|
627
627
|
s.get(D) || m.push(D);
|
|
628
628
|
}), m.forEach((D) => l.value.delete(D));
|
|
629
629
|
}
|
|
630
|
-
return P(Nt, t), P(Ze,
|
|
630
|
+
return P(Nt, t), P(Ze, E), P(Ve, N), P(Ke, g), P(Ge, f), P(qe, d), P(Je, v), P(et, u), P(tt, r), P(Te, c), P(Te, c), P(nt, i), {
|
|
631
631
|
selected: f,
|
|
632
632
|
select: d,
|
|
633
633
|
selectAll: v,
|
|
634
634
|
unselect: u,
|
|
635
635
|
unselectAll: c,
|
|
636
636
|
toggle: N,
|
|
637
|
-
toggleAll:
|
|
637
|
+
toggleAll: E,
|
|
638
638
|
isSelected: g,
|
|
639
639
|
isAllSelected: r,
|
|
640
640
|
selectedCount: i
|
|
@@ -756,32 +756,32 @@ function wt({
|
|
|
756
756
|
let r = {};
|
|
757
757
|
const v = j(
|
|
758
758
|
() => Ye(o === "colum" ? xt : Ct, 50)
|
|
759
|
-
), c = j(() => e ?? n), M = (() => t ? (C) => t(C) : (C) => C)(), d = /* @__PURE__ */ new Set(), u = h(!0), g = h(), y = h(!1), N = h({ x: 0, y: 0 }),
|
|
759
|
+
), c = j(() => e ?? n), M = (() => t ? (C) => t(C) : (C) => C)(), d = /* @__PURE__ */ new Set(), u = h(!0), g = h(), y = h(!1), N = h({ x: 0, y: 0 }), E = h({ x: 0, y: 0, scrollTop: 0 }), I = h({}), m = h({
|
|
760
760
|
top: 0,
|
|
761
761
|
height: 0,
|
|
762
762
|
sync(C = !1) {
|
|
763
763
|
m.value.top = g.value?.scrollTop || 0, C && (m.value.height = g.value?.scrollHeight || 0);
|
|
764
764
|
}
|
|
765
765
|
}), D = j(() => y.value ? {
|
|
766
|
-
left: Math.min(N.value.x,
|
|
767
|
-
top: Math.min(N.value.y,
|
|
768
|
-
width: Math.abs(N.value.x -
|
|
769
|
-
height: Math.abs(N.value.y -
|
|
770
|
-
} : { left: 0, top: 0, width: 0, height: 0 }),
|
|
766
|
+
left: Math.min(N.value.x, E.value.x) - I.value.left,
|
|
767
|
+
top: Math.min(N.value.y, E.value.y) - I.value.top,
|
|
768
|
+
width: Math.abs(N.value.x - E.value.x),
|
|
769
|
+
height: Math.abs(N.value.y - E.value.y)
|
|
770
|
+
} : { left: 0, top: 0, width: 0, height: 0 }), w = h(!1), { margin: T = 50, startSpeed: S = 30, maxSpeed: Y = 30 } = l;
|
|
771
771
|
let X;
|
|
772
772
|
const p = T, A = S, O = Y, Q = (C) => C ** 1;
|
|
773
|
-
let
|
|
773
|
+
let b = 0;
|
|
774
774
|
function z(C) {
|
|
775
|
-
if (cancelAnimationFrame(X),
|
|
776
|
-
Math.min(
|
|
775
|
+
if (cancelAnimationFrame(X), b = x(C), b = Math.max(
|
|
776
|
+
Math.min(b, O),
|
|
777
777
|
-O
|
|
778
|
-
),
|
|
779
|
-
const
|
|
780
|
-
if (!
|
|
778
|
+
), b !== 0) {
|
|
779
|
+
const _ = g.value;
|
|
780
|
+
if (!_ || !y.value)
|
|
781
781
|
return;
|
|
782
782
|
const Z = m.value.height - I.value.height;
|
|
783
|
-
let W = m.value.top + Number(
|
|
784
|
-
W = Math.min(Math.max(0, W), Z),
|
|
783
|
+
let W = m.value.top + Number(b);
|
|
784
|
+
W = Math.min(Math.max(0, W), Z), _.scrollTop = W, $(), X = requestAnimationFrame(() => z(C));
|
|
785
785
|
}
|
|
786
786
|
}
|
|
787
787
|
function x(C) {
|
|
@@ -796,50 +796,50 @@ function wt({
|
|
|
796
796
|
return 0;
|
|
797
797
|
}
|
|
798
798
|
function B(C) {
|
|
799
|
-
const
|
|
800
|
-
return
|
|
799
|
+
const _ = { ...D.value, right: 0, bottom: 0 };
|
|
800
|
+
return _.left += I.value.left, _.top += I.value.top - m.value.top, _.right = _.width + _.left, _.bottom = _.height + _.top, _.left < C.right && _.right > C.left && _.top < C.bottom && _.bottom > C.top;
|
|
801
801
|
}
|
|
802
802
|
function $() {
|
|
803
803
|
m.value.sync();
|
|
804
|
-
const { top: C, height:
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
),
|
|
804
|
+
const { top: C, height: _ } = m.value;
|
|
805
|
+
E.value.y = Math.min(
|
|
806
|
+
_ + I.value.top,
|
|
807
|
+
E.value.y + C - E.value.scrollTop
|
|
808
|
+
), E.value.scrollTop = C;
|
|
809
809
|
}
|
|
810
|
-
function k(C,
|
|
810
|
+
function k(C, _, Z = "dynamic-styles") {
|
|
811
811
|
let W = document.getElementById(Z);
|
|
812
812
|
W || (W = document.createElement("style"), W.id = Z, document.head.appendChild(W));
|
|
813
|
-
const le = W.sheet.cssRules, ve = le.length, Ot = `${C} { ${
|
|
813
|
+
const le = W.sheet.cssRules, ve = le.length, Ot = `${C} { ${_} }`;
|
|
814
814
|
for (let Ce = 0; Ce < ve; Ce++) {
|
|
815
815
|
const at = le[Ce];
|
|
816
|
-
if (at.selectorText === C && at.style.cssText ===
|
|
816
|
+
if (at.selectorText === C && at.style.cssText === _)
|
|
817
817
|
return;
|
|
818
818
|
}
|
|
819
819
|
W.sheet.insertRule(Ot, ve);
|
|
820
820
|
}
|
|
821
|
-
function F(C,
|
|
821
|
+
function F(C, _) {
|
|
822
822
|
u.value = !0, y.value = !0, m.value.sync(!0);
|
|
823
|
-
const Z =
|
|
824
|
-
N.value.x = C, N.value.y = Z,
|
|
823
|
+
const Z = _ + m.value.top;
|
|
824
|
+
N.value.x = C, N.value.y = Z, E.value.x = C, E.value.y = Z, g.value?.classList.add("disable-scroll-behavior"), d.clear(), st();
|
|
825
825
|
}
|
|
826
|
-
function J(C,
|
|
827
|
-
!y.value || (u.value && o === "colum" && !Ne() && (
|
|
828
|
-
|
|
826
|
+
function J(C, _, Z) {
|
|
827
|
+
!y.value || (u.value && o === "colum" && !Ne() && (w.value || i(), u.value = !1), Z?.(), z(_), E.value.x = Math.max(C, I.value.left), E.value.y = Math.min(
|
|
828
|
+
_ + m.value.top,
|
|
829
829
|
m.value.height + I.value.top
|
|
830
|
-
),
|
|
830
|
+
), E.value.scrollTop = m.value.top, v.value());
|
|
831
831
|
}
|
|
832
832
|
function V() {
|
|
833
833
|
y.value = !1, g.value?.classList.remove("disable-scroll-behavior");
|
|
834
834
|
}
|
|
835
835
|
function oe() {
|
|
836
|
-
!y.value || (
|
|
836
|
+
!y.value || (b || $(), v.value());
|
|
837
837
|
}
|
|
838
838
|
function Ne() {
|
|
839
839
|
if (!y.value)
|
|
840
840
|
return !1;
|
|
841
|
-
const { width: C, height:
|
|
842
|
-
return !(Math.max(C,
|
|
841
|
+
const { width: C, height: _ } = D.value;
|
|
842
|
+
return !(Math.max(C, _) > 5);
|
|
843
843
|
}
|
|
844
844
|
function jt() {
|
|
845
845
|
Ne() && i();
|
|
@@ -848,17 +848,17 @@ function wt({
|
|
|
848
848
|
Ne() || g.value?.querySelectorAll(`[${n}]`).forEach((C) => {
|
|
849
849
|
r[c.value] = M(
|
|
850
850
|
C.getAttribute(`${n}`)
|
|
851
|
-
), B(C.getBoundingClientRect()) ? a([r]) :
|
|
851
|
+
), B(C.getBoundingClientRect()) ? a([r]) : w.value || f([r]);
|
|
852
852
|
});
|
|
853
853
|
}
|
|
854
854
|
function Ct() {
|
|
855
855
|
const C = [];
|
|
856
|
-
let
|
|
856
|
+
let _ = null, Z = 0;
|
|
857
857
|
g.value?.querySelectorAll(`[${n}]`).forEach((W, le) => {
|
|
858
858
|
const ve = M(W.getAttribute(`${n}`));
|
|
859
|
-
C.push(ve), B(W.getBoundingClientRect()) ? (
|
|
859
|
+
C.push(ve), B(W.getBoundingClientRect()) ? (_ === null && (_ = le), _ = Math.min(_, le), Z = Math.max(Z, le)) : (r[c.value] = ve, d.has(ve) && f([r]));
|
|
860
860
|
});
|
|
861
|
-
for (let W =
|
|
861
|
+
for (let W = _; W < Z + 1; W++)
|
|
862
862
|
r[c.value] = C[W], a([r]), d.add(C[W]);
|
|
863
863
|
}
|
|
864
864
|
function st() {
|
|
@@ -877,7 +877,7 @@ function wt({
|
|
|
877
877
|
cancelSelectAllBySingleClick: jt,
|
|
878
878
|
selectFn: v,
|
|
879
879
|
getAttributeValue: M,
|
|
880
|
-
incrementalSelect:
|
|
880
|
+
incrementalSelect: w,
|
|
881
881
|
selectRange: D,
|
|
882
882
|
isPressing: y,
|
|
883
883
|
containerEl: g
|
|
@@ -932,8 +932,8 @@ function Qo(e, t = !1) {
|
|
|
932
932
|
if (!n.containerEl?.value)
|
|
933
933
|
return !1;
|
|
934
934
|
De(ue(c), n.containerEl.value), v(), n.containerEl.value?.addEventListener("scroll", l), n.containerEl.value?.addEventListener("mousedown", M);
|
|
935
|
-
} catch (
|
|
936
|
-
console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25",
|
|
935
|
+
} catch (E) {
|
|
936
|
+
console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25", E);
|
|
937
937
|
}
|
|
938
938
|
}
|
|
939
939
|
function y() {
|
|
@@ -956,30 +956,30 @@ function Yo(e, t = {}) {
|
|
|
956
956
|
clearTimeout(v);
|
|
957
957
|
}
|
|
958
958
|
function d(D) {
|
|
959
|
-
return D.composedPath().some((
|
|
959
|
+
return D.composedPath().some((w) => !!w?.getAttribute?.(e.attribute));
|
|
960
960
|
}
|
|
961
961
|
function u() {
|
|
962
962
|
return l?.value && !s.isPressing.value && c.isHorizontal();
|
|
963
963
|
}
|
|
964
|
-
function g(D,
|
|
965
|
-
(
|
|
964
|
+
function g(D, w, T) {
|
|
965
|
+
(w == null || T == null) && (w = D.targetTouches[0].clientX, T = D.targetTouches[0].clientY), f(w, T), n?.(), i(w, T, () => D.preventDefault());
|
|
966
966
|
}
|
|
967
967
|
function y(D) {
|
|
968
|
-
const { clientX:
|
|
969
|
-
c.start(
|
|
968
|
+
const { clientX: w, clientY: T } = D.targetTouches[0];
|
|
969
|
+
c.start(w, T), M(), d(D) && (v = setTimeout(() => {
|
|
970
970
|
g(D), D.preventDefault();
|
|
971
971
|
}, o));
|
|
972
972
|
}
|
|
973
973
|
function N(D) {
|
|
974
974
|
M();
|
|
975
|
-
const { clientX:
|
|
976
|
-
if (c.move(
|
|
975
|
+
const { clientX: w, clientY: T } = D.targetTouches[0];
|
|
976
|
+
if (c.move(w, T), u()) {
|
|
977
977
|
g(D, c.startX.value, c.startY.value);
|
|
978
978
|
return;
|
|
979
979
|
}
|
|
980
|
-
i(
|
|
980
|
+
i(w, T, () => D.preventDefault());
|
|
981
981
|
}
|
|
982
|
-
function
|
|
982
|
+
function E() {
|
|
983
983
|
M(), r();
|
|
984
984
|
}
|
|
985
985
|
function I(D) {
|
|
@@ -988,17 +988,17 @@ function Yo(e, t = {}) {
|
|
|
988
988
|
throw new Error("\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E");
|
|
989
989
|
if (!s.containerEl?.value)
|
|
990
990
|
return !1;
|
|
991
|
-
const
|
|
992
|
-
|
|
993
|
-
} catch (
|
|
994
|
-
console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25",
|
|
991
|
+
const w = s.containerEl.value;
|
|
992
|
+
w.addEventListener("scroll", a), w.addEventListener("touchstart", y), w.addEventListener("touchmove", N), window.addEventListener("pointerup", E);
|
|
993
|
+
} catch (w) {
|
|
994
|
+
console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25", w);
|
|
995
995
|
}
|
|
996
996
|
}
|
|
997
997
|
function m() {
|
|
998
998
|
if (!s.containerEl?.value)
|
|
999
999
|
return;
|
|
1000
1000
|
const D = s.containerEl.value;
|
|
1001
|
-
D.removeEventListener("scroll", a), D.removeEventListener("touchstart", y), D.removeEventListener("touchmove", N), window.removeEventListener("
|
|
1001
|
+
D.removeEventListener("scroll", a), D.removeEventListener("touchstart", y), D.removeEventListener("touchmove", N), window.removeEventListener("pointerup", E);
|
|
1002
1002
|
}
|
|
1003
1003
|
return { init: I, unMount: m };
|
|
1004
1004
|
}
|
|
@@ -1128,7 +1128,7 @@ const Mn = (e) => (Ae("data-v-92a1804d"), e = e(), ze(), e), gn = /* @__PURE__ *
|
|
|
1128
1128
|
return $e((t) => ({
|
|
1129
1129
|
"4e4a9ce4": e.width + "px",
|
|
1130
1130
|
e56fe5c2: e.height + "px"
|
|
1131
|
-
})), (t, n) => (R(), H("div",
|
|
1131
|
+
})), (t, n) => (R(), H("div", _e(ke(t.$attrs)), hn, 16));
|
|
1132
1132
|
}
|
|
1133
1133
|
});
|
|
1134
1134
|
const yn = /* @__PURE__ */ ne(mn, [["__scopeId", "data-v-92a1804d"]]), pn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAQAAAC0jZKKAAAAAnNCSVQICFXsRgQAAAABc1JHQgCuzhzpAAAEMklEQVRIx62XzW9VZRDGn2fmPff23qYtlvIRqVVQICgGoS21wYUGEA0x0YUYE/8BNTHujBsNiS5cGBeujAtXLiTGjUnFjRKNQWgJVoqxC/m2RMpX7cf9OOedcXFrg1qutPc+ZzM5b84vc+bNZOYh6sp5tKWQr2qmBZ/Biqxq03Eybsh6I63+l7z90Wirts0VoyU2bYm1ZdFXZtf9shUMWckL8XGrBw+Lvx7pqHTN5Toy9cQSZMgtnLR7m19Hj//i9TNeBDyU7+jOWj2mDgBVlqXqRmHOgXZPvNOLXsHzSwWPdeKelMEiDKlkThMIhSVGTqGKaZRxxm/4VlsSeLTb17ojkpkESwlPrDhTLmn6VXbQACd4RFbhBoElgEfur6yJMXhE9Aoz+mz56sDMP+7a4TDcgW4Bn7wPax05VpGnQ6u4NPgnlq0F8Ojq6n2puxehXkFydeAsDWgYfLFwcYtLztQjieLv2y6hQc2DJx5qSYAUZJV+rr9hLCAAcGoNu6oSSZrI5K7zaIICAJQ2iwZGuGHuwjiaIgFGV2sHmQpIJr8eiM0BB6Byr6i7OBAmd0yiSRJXWQeQFDA5g6YpDK+SxB2As7z1SvPA0rKKJElQ/qA3MeNyp4Raxuk1NFGBHSZwcUFhqqlgKZgAjoj8bFPBlhephQ+kDdM4vKkWmAdXE0DRjL4YCfiiFmk1MGPemEFxJIdyg+QO3zQ/+q8FTa1VCER2tDUM7kE2v1BcEUyBoItLpavRUtiDNNSeccFNBARqIi3dDXfbIFJkyBD9tJQmMq1lbBvelkawrthDh8Hd9XvJT+Qi1NUSa9+3oRHw8T2+0iNNImbtqPSl6VkToVAlP9BQIV6hubuZyVDfnAA4LSoaNaqv/3HjsvPdLb3IkDFjhk8BAQbOZpNGpRCUp8dyy8GOtspBczgNjtO938wP08IP1BiyQJWVc88uB1x5F+sYEd0Y/f2FKb1tPJ4nhVFMuO34niW38mu639ycRuN3/UMLYCAbktSFKkrVvcf2LQV74lW8jChRMzOfxpv/2uhHHrYDokYVYab4acWhjZU7yLWIt3w/1Uklo+D1nV/+xyqc3Bt3O11JCMmb9nn/WH3s8C68Id0QV9CV9I/6P1jUg5x4Tgar6hLoQgX9nH69/dRiy+Eh3fhofMl7QSoE4qT6Z/0Hb2tuTjyFJ10gLlTSleKzPMXx7FL75OUSUCjm11TW6yMYRBfpAURwUZroxzs+rOuaRnb4C1Ks/ZoFCNUFAZTg4oFiQeiJi4gJlOJKasnf6T38v3ZspAsv2hYq6YFCqZXFEsyDhAguVK/FiuPxvZ0X79DnDW/nM94DodRu/G+wEOriAQIlqfjNP+n7dokGcnirPma93jJf73ALWF00xVE/3HdsGc605vk6Nydb0GN38y4UqV7BjE/ggv48NfZE3UH2F3Kp4Zn6aTweAAAAAElFTkSuQmCC", Dn = { class: "loading-wrap" }, Tn = ["src"], Nn = /* @__PURE__ */ q({
|
|
@@ -1355,8 +1355,8 @@ function On() {
|
|
|
1355
1355
|
isHorizontal: i
|
|
1356
1356
|
};
|
|
1357
1357
|
}
|
|
1358
|
-
const ut = 250, rt = 5,
|
|
1359
|
-
function
|
|
1358
|
+
const ut = 250, rt = 5, bn = 500;
|
|
1359
|
+
function _n(e) {
|
|
1360
1360
|
const { isDouble: t = !0 } = e;
|
|
1361
1361
|
let n, o;
|
|
1362
1362
|
function l() {
|
|
@@ -1366,7 +1366,7 @@ function bn(e) {
|
|
|
1366
1366
|
const i = Date.now() - n;
|
|
1367
1367
|
a < rt && f < rt && (i < ut ? t ? o ? (clearTimeout(o), o = null, e.onDoubleTap?.()) : o = setTimeout(async () => {
|
|
1368
1368
|
e.onTap?.(), o = null;
|
|
1369
|
-
}, ut) : e.onTap?.() : i >
|
|
1369
|
+
}, ut) : e.onTap?.() : i > bn && e.onLongPress?.());
|
|
1370
1370
|
}
|
|
1371
1371
|
return { startTap: l, checkTap: s };
|
|
1372
1372
|
}
|
|
@@ -1399,7 +1399,7 @@ function Oe(e, t, n) {
|
|
|
1399
1399
|
function ae(e, t = 2) {
|
|
1400
1400
|
return parseFloat(e.toFixed(t));
|
|
1401
1401
|
}
|
|
1402
|
-
function
|
|
1402
|
+
function be(e, t, n) {
|
|
1403
1403
|
return e = ae(e), t = ae(t), `translate3d(${e}px, ${t}px, 0) scale3d(${n},${n},${n})`;
|
|
1404
1404
|
}
|
|
1405
1405
|
function ct(e) {
|
|
@@ -1425,7 +1425,7 @@ function It(e) {
|
|
|
1425
1425
|
onComplate() {
|
|
1426
1426
|
i.preview || y();
|
|
1427
1427
|
}
|
|
1428
|
-
}), M =
|
|
1428
|
+
}), M = _n({
|
|
1429
1429
|
onTap() {
|
|
1430
1430
|
e.onTap?.();
|
|
1431
1431
|
},
|
|
@@ -1457,17 +1457,17 @@ function It(e) {
|
|
|
1457
1457
|
const A = s.value;
|
|
1458
1458
|
if (!A)
|
|
1459
1459
|
return;
|
|
1460
|
-
const { scrollTop: O, scrollLeft: Q } = A, { width:
|
|
1460
|
+
const { scrollTop: O, scrollLeft: Q } = A, { width: b, height: z } = a.value, { scaleW: x, scaleH: B } = w(p), { top: $, left: k } = T(x, B), F = k != 0 ? k : Q * -1, J = $ != 0 ? $ : O * -1;
|
|
1461
1461
|
A.scrollTop = 0, A.scrollLeft = 0;
|
|
1462
1462
|
const { value: V } = r;
|
|
1463
|
-
V.width = `${
|
|
1463
|
+
V.width = `${b}px`, V.height = `${z}px`, V.maxHeight = "none", V.transitionDuration = "0s", V.transform = be(F, J, p), r.value = V, await Me(), i.offsetX = F, i.offsetY = J, await ot(20);
|
|
1464
1464
|
}
|
|
1465
1465
|
async function y(p, A) {
|
|
1466
1466
|
if (!A && i.preview)
|
|
1467
1467
|
return;
|
|
1468
1468
|
i.preview = !0, p = p ?? i.level;
|
|
1469
|
-
const { value: O } = r, { scaleW: Q, scaleH:
|
|
1470
|
-
p === 1 && (O.maxHeight = "100%"), O.width = `${Q}px`, O.height = `${
|
|
1469
|
+
const { value: O } = r, { scaleW: Q, scaleH: b } = w(p), { left: z, top: x } = T(Q, b);
|
|
1470
|
+
p === 1 && (O.maxHeight = "100%"), O.width = `${Q}px`, O.height = `${b}px`, O.transitionDuration = "0s", O.transform = be(z, x, 1), r.value = O, await Me();
|
|
1471
1471
|
const B = s.value;
|
|
1472
1472
|
if (!B)
|
|
1473
1473
|
return;
|
|
@@ -1482,16 +1482,16 @@ function It(e) {
|
|
|
1482
1482
|
), p == i.level))
|
|
1483
1483
|
return;
|
|
1484
1484
|
i.preview && await g(), A || (A = { x: v.startX.value, y: v.startY.value });
|
|
1485
|
-
const { value: Q } = r, { width:
|
|
1486
|
-
left: Math.abs(
|
|
1485
|
+
const { value: Q } = r, { width: b, height: z } = a.value, { scaleW: x, scaleH: B } = w(p), { top: $, left: k } = T(x, B), F = p / i.level, J = {
|
|
1486
|
+
left: Math.abs(b * p - f.value.width) * -1,
|
|
1487
1487
|
top: Math.abs(z * p - f.value.height) * -1,
|
|
1488
1488
|
right: k,
|
|
1489
1489
|
bottom: $
|
|
1490
1490
|
};
|
|
1491
1491
|
let V = k != 0 ? k : (i.offsetX - A.x) * F + A.x, oe = $ != 0 ? $ : (i.offsetY - A.y) * F + A.y;
|
|
1492
|
-
V = ae(Oe(V, J.left, J.right)), oe = ae(Oe(oe, J.top, J.bottom)), Q.width = `${
|
|
1492
|
+
V = ae(Oe(V, J.left, J.right)), oe = ae(Oe(oe, J.top, J.bottom)), Q.width = `${b}px`, Q.height = `${z}px`, Q.transitionDuration = O ? Yn(p) : "0s", Q.transform = be(V, oe, p), i.offsetX = V, i.offsetY = oe, i.level = p, r.value = Q, await Me(), O && c.startTransition(), e.onScale?.(p);
|
|
1493
1493
|
}
|
|
1494
|
-
function
|
|
1494
|
+
function E() {
|
|
1495
1495
|
const p = i.level > 1 ? 1 : D();
|
|
1496
1496
|
N(p, void 0, !0);
|
|
1497
1497
|
}
|
|
@@ -1508,11 +1508,11 @@ function It(e) {
|
|
|
1508
1508
|
i.level >= n.value && i.level <= o.value ? i.zooming && await y() : i.level < n.value ? await N(n.value, void 0, !0) : i.level > o.value && await N(o.value, i.lastCenter, !0), i.zooming = !1;
|
|
1509
1509
|
}
|
|
1510
1510
|
function D() {
|
|
1511
|
-
const { width: p, height: A } = a.value, { width: O, height: Q } = f.value,
|
|
1511
|
+
const { width: p, height: A } = a.value, { width: O, height: Q } = f.value, b = 2.5;
|
|
1512
1512
|
let z;
|
|
1513
|
-
return A == Q ? (z = O / p, z - 1 < 0.1 && (z =
|
|
1513
|
+
return A == Q ? (z = O / p, z - 1 < 0.1 && (z = b)) : z = Math.max(b, O / p, Q / A), z;
|
|
1514
1514
|
}
|
|
1515
|
-
function
|
|
1515
|
+
function w(p) {
|
|
1516
1516
|
const { width: A, height: O } = a.value;
|
|
1517
1517
|
return {
|
|
1518
1518
|
scaleW: ae(p * A),
|
|
@@ -1520,13 +1520,13 @@ function It(e) {
|
|
|
1520
1520
|
};
|
|
1521
1521
|
}
|
|
1522
1522
|
function T(p, A) {
|
|
1523
|
-
const { width: O, height: Q } = f.value,
|
|
1524
|
-
return { top:
|
|
1523
|
+
const { width: O, height: Q } = f.value, b = Math.max(0, (Q - A) * 0.5), z = Math.max(0, (O - p) * 0.5);
|
|
1524
|
+
return { top: b, left: z };
|
|
1525
1525
|
}
|
|
1526
1526
|
async function S(p, A) {
|
|
1527
1527
|
if (p = p ?? l.value, A = A ?? s.value, !A)
|
|
1528
1528
|
return;
|
|
1529
|
-
let O, { clientWidth: Q = 0, clientHeight:
|
|
1529
|
+
let O, { clientWidth: Q = 0, clientHeight: b = 0 } = p || {};
|
|
1530
1530
|
const { clientWidth: z, clientHeight: x } = A;
|
|
1531
1531
|
if (p instanceof HTMLImageElement ? O = { width: p.naturalWidth, height: p.naturalHeight } : p instanceof HTMLVideoElement && (O = { width: p.videoWidth, height: p.videoHeight }), O) {
|
|
1532
1532
|
const B = Qn(
|
|
@@ -1535,11 +1535,11 @@ function It(e) {
|
|
|
1535
1535
|
z,
|
|
1536
1536
|
x
|
|
1537
1537
|
);
|
|
1538
|
-
Q = B.width,
|
|
1538
|
+
Q = B.width, b = B.height;
|
|
1539
1539
|
}
|
|
1540
|
-
(Q === 0 ||
|
|
1540
|
+
(Q === 0 || b === 0) && (Q = a.value.width || z, b = a.value.height || x), a.value = {
|
|
1541
1541
|
width: Math.min(Q, z),
|
|
1542
|
-
height: Math.min(
|
|
1542
|
+
height: Math.min(b, x)
|
|
1543
1543
|
}, f.value = { width: z, height: x }, y(void 0, !0);
|
|
1544
1544
|
}
|
|
1545
1545
|
function Y() {
|
|
@@ -1562,7 +1562,7 @@ function It(e) {
|
|
|
1562
1562
|
panTo: I,
|
|
1563
1563
|
zoomTo: N,
|
|
1564
1564
|
zoomFinished: m,
|
|
1565
|
-
toggleZoom:
|
|
1565
|
+
toggleZoom: E,
|
|
1566
1566
|
setDisableZoom: X
|
|
1567
1567
|
};
|
|
1568
1568
|
}
|
|
@@ -1577,9 +1577,9 @@ function At(e, t) {
|
|
|
1577
1577
|
}
|
|
1578
1578
|
function c(M, d, u, g) {
|
|
1579
1579
|
a.measure();
|
|
1580
|
-
const { top: y, left: N, right:
|
|
1580
|
+
const { top: y, left: N, right: E, bottom: I } = a.arrivedState;
|
|
1581
1581
|
if (M == "start")
|
|
1582
|
-
i = y || N ||
|
|
1582
|
+
i = y || N || E || I;
|
|
1583
1583
|
else if (f == 2)
|
|
1584
1584
|
i = !1;
|
|
1585
1585
|
else if (i) {
|
|
@@ -1592,7 +1592,7 @@ function At(e, t) {
|
|
|
1592
1592
|
}
|
|
1593
1593
|
else if (o.direction.value == "horizontal") {
|
|
1594
1594
|
const m = o.startX.value < d;
|
|
1595
|
-
i = N && m ||
|
|
1595
|
+
i = N && m || E && !m;
|
|
1596
1596
|
}
|
|
1597
1597
|
}
|
|
1598
1598
|
i && l.transitioning.value && (i = !1, g?.preventDefault()), M == "end" && !i && (d = o.startX.value, u = o.startY.value, i = !0), (M != "move" || i) && t?.(M, o.direction.value, d, u, g);
|
|
@@ -1608,15 +1608,15 @@ function Ho(e) {
|
|
|
1608
1608
|
}), { state: n, touch: o, gesture: l, transition: s } = t;
|
|
1609
1609
|
let a = !1, f = null;
|
|
1610
1610
|
const i = { top: 0, left: 0 }, r = je(y, 150), { onSwipeEdge: v } = At(t, e.onSwipeEdge), c = h({ top: 0, left: 0 });
|
|
1611
|
-
we("keyup",
|
|
1611
|
+
we("keyup", E), we("keydown", N);
|
|
1612
1612
|
function M(I) {
|
|
1613
1613
|
const m = t.containerRef.value;
|
|
1614
1614
|
if (!m)
|
|
1615
1615
|
return;
|
|
1616
|
-
const { left: D, top:
|
|
1617
|
-
c.value.left = D, c.value.top =
|
|
1618
|
-
let T = I.clientX - D, S = I.clientY -
|
|
1619
|
-
o.start(T, S), v("start", T, S, I), s.transitioning.value || (a = !0, i.left = D, i.top =
|
|
1616
|
+
const { left: D, top: w } = m.getBoundingClientRect();
|
|
1617
|
+
c.value.left = D, c.value.top = w, l.startTap();
|
|
1618
|
+
let T = I.clientX - D, S = I.clientY - w;
|
|
1619
|
+
o.start(T, S), v("start", T, S, I), s.transitioning.value || (a = !0, i.left = D, i.top = w, n.offsetX = m.scrollLeft, n.offsetY = m.scrollTop), window.addEventListener("pointermove", d), window.addEventListener("pointerup", u);
|
|
1620
1620
|
}
|
|
1621
1621
|
function d(I) {
|
|
1622
1622
|
if (!a)
|
|
@@ -1653,7 +1653,7 @@ function Ho(e) {
|
|
|
1653
1653
|
function N(I) {
|
|
1654
1654
|
f = I.key;
|
|
1655
1655
|
}
|
|
1656
|
-
function
|
|
1656
|
+
function E() {
|
|
1657
1657
|
f = null;
|
|
1658
1658
|
}
|
|
1659
1659
|
return { core: t, onPointerDown: M, onWheel: g };
|
|
@@ -1681,8 +1681,8 @@ function Po(e) {
|
|
|
1681
1681
|
const { clientX: g, clientY: y } = u[0];
|
|
1682
1682
|
if (o.move(g, y), a("move", g, y, d), n.zooming && f(2)) {
|
|
1683
1683
|
d.preventDefault();
|
|
1684
|
-
const N = ct(u),
|
|
1685
|
-
t.zoomTo(
|
|
1684
|
+
const N = ct(u), E = i * N / r;
|
|
1685
|
+
t.zoomTo(E, n.lastCenter);
|
|
1686
1686
|
}
|
|
1687
1687
|
}
|
|
1688
1688
|
async function M(d) {
|
|
@@ -1884,10 +1884,10 @@ function Wn(e) {
|
|
|
1884
1884
|
clientHeight: 0
|
|
1885
1885
|
}), g = h({
|
|
1886
1886
|
clientHeight: 0
|
|
1887
|
-
}), y = j(() => !!M.value), N = j(() => u.value.scrollHeight > u.value.clientHeight),
|
|
1887
|
+
}), y = j(() => !!M.value), N = j(() => u.value.scrollHeight > u.value.clientHeight), E = j(() => o ? u.value.clientHeight - D.value : u.value.clientHeight - g.value.clientHeight), I = j(() => u.value.scrollHeight - u.value.clientHeight), m = j(() => !u.value.clientHeight && !u.value.scrollHeight ? 1 : Math.max(
|
|
1888
1888
|
u.value.clientHeight / u.value.scrollHeight,
|
|
1889
1889
|
0.05
|
|
1890
|
-
)), D = j(() => m.value > s ? 0 : m.value * u.value.clientHeight),
|
|
1890
|
+
)), D = j(() => m.value > s ? 0 : m.value * u.value.clientHeight), w = j(() => ({
|
|
1891
1891
|
willChange: "transform",
|
|
1892
1892
|
transform: `translate3d(0,${d.value}px,0)`,
|
|
1893
1893
|
height: o ? `${D.value}px` : void 0
|
|
@@ -1909,8 +1909,8 @@ function Wn(e) {
|
|
|
1909
1909
|
if (!y.value)
|
|
1910
1910
|
return;
|
|
1911
1911
|
let F = k.clientY - u.value.top - M.value;
|
|
1912
|
-
F < 0 ? d.value = 0 : F >=
|
|
1913
|
-
top: d.value /
|
|
1912
|
+
F < 0 ? d.value = 0 : F >= E.value ? d.value = E.value : d.value = F, t.value.scrollTo({
|
|
1913
|
+
top: d.value / E.value * I.value
|
|
1914
1914
|
});
|
|
1915
1915
|
}
|
|
1916
1916
|
function A() {
|
|
@@ -1920,9 +1920,9 @@ function Wn(e) {
|
|
|
1920
1920
|
cancelAnimationFrame(r), r = requestAnimationFrame(Q);
|
|
1921
1921
|
}
|
|
1922
1922
|
function Q() {
|
|
1923
|
-
t.value && (c.value = l.scrollTop?.value ?? t.value.scrollTop, d.value = c.value / I.value *
|
|
1923
|
+
t.value && (c.value = l.scrollTop?.value ?? t.value.scrollTop, d.value = c.value / I.value * E.value);
|
|
1924
1924
|
}
|
|
1925
|
-
function
|
|
1925
|
+
function b(k) {
|
|
1926
1926
|
let F = "addEventListener";
|
|
1927
1927
|
k === "add" ? F = "addEventListener" : F = "removeEventListener", n.value?.[F]("pointerdown", T, {
|
|
1928
1928
|
passive: !0
|
|
@@ -1947,7 +1947,7 @@ function Wn(e) {
|
|
|
1947
1947
|
if (t.value && n.value) {
|
|
1948
1948
|
t.value.classList.add("hide-scrollbar"), t.value.addEventListener("scroll", A, {
|
|
1949
1949
|
passive: !0
|
|
1950
|
-
}),
|
|
1950
|
+
}), b("add");
|
|
1951
1951
|
const k = {};
|
|
1952
1952
|
a === "classList" ? Object.assign(k, { subtree: !0, childList: !0 }) : Object.assign(k, {
|
|
1953
1953
|
subtree: !0,
|
|
@@ -1967,10 +1967,10 @@ function Wn(e) {
|
|
|
1967
1967
|
offsetTop: d,
|
|
1968
1968
|
scrollTop: c,
|
|
1969
1969
|
scrollable: N,
|
|
1970
|
-
sliderPos:
|
|
1971
|
-
sliderRollableHeight:
|
|
1970
|
+
sliderPos: w,
|
|
1971
|
+
sliderRollableHeight: E,
|
|
1972
1972
|
init: $,
|
|
1973
|
-
modifySliderEventListener:
|
|
1973
|
+
modifySliderEventListener: b,
|
|
1974
1974
|
heightRatio: m
|
|
1975
1975
|
};
|
|
1976
1976
|
}
|
|
@@ -2067,35 +2067,35 @@ const Zo = /* @__PURE__ */ ne(Vn, [["__scopeId", "data-v-7fd39e51"]]), Kn = (e)
|
|
|
2067
2067
|
const S = Math.pow(T, n);
|
|
2068
2068
|
S === 0 && (l.value = -50), S <= 50 && S > 0 && (l.value = S - 45, a.value = Math.pow(S, 1.5), S > 15 ? i.value = !0 : i.value = !1), S > 50 && (l.value = 5, f.value = 1, d.value);
|
|
2069
2069
|
});
|
|
2070
|
-
const
|
|
2071
|
-
|
|
2070
|
+
const E = h(0), I = (T) => {
|
|
2071
|
+
E.value = T.touches[0].pageY;
|
|
2072
2072
|
}, m = (T) => {
|
|
2073
|
-
const S = T.touches[0].pageY -
|
|
2074
|
-
|
|
2073
|
+
const S = T.touches[0].pageY - E.value;
|
|
2074
|
+
E.value = T.touches[0].pageY, !t.refreshOff && (!t?.refresh || d.value !== 2 && g.value === 0 && (r.value === 0 && (r.value = T.touches[0].pageY), c.value = 0, w.value.style.transition = `${c.value}ms`, M.value = 0, v.value = T.touches[0].pageY - r.value, w.value.style.transform = `translate3d(0, ${Math.pow(v.value, n)}px, 0)`, S > 0 && T.preventDefault()));
|
|
2075
2075
|
}, D = () => {
|
|
2076
2076
|
if (t.refreshOff || !t?.refresh || d.value === 2)
|
|
2077
2077
|
return;
|
|
2078
2078
|
r.value = 0, c.value = 300;
|
|
2079
2079
|
const T = Math.pow(v.value, n);
|
|
2080
|
-
|
|
2080
|
+
w.value.style.transition = `${c.value}ms`, T > 50 ? (d.value = 2, v.value = Math.pow(50, 1 / n), w.value.style.transform = `translate3d(0, ${Math.pow(v.value, n)}px, 0)`, M.value = 300, t?.refresh && t?.refresh().then(() => {
|
|
2081
2081
|
u.value = "\u5237\u65B0\u6210\u529F";
|
|
2082
2082
|
}).catch(() => {
|
|
2083
2083
|
u.value = "\u5237\u65B0\u5931\u8D25";
|
|
2084
2084
|
}).finally(() => {
|
|
2085
2085
|
setTimeout(() => {
|
|
2086
|
-
d.value = 0, v.value = 0,
|
|
2086
|
+
d.value = 0, v.value = 0, w.value.style.transform = `translate3d(0, ${Math.pow(
|
|
2087
2087
|
v.value,
|
|
2088
2088
|
n
|
|
2089
2089
|
)}px, 0)`, setTimeout(() => {
|
|
2090
2090
|
u.value = void 0;
|
|
2091
2091
|
}, M.value);
|
|
2092
2092
|
}, 600);
|
|
2093
|
-
})) : (v.value = 0,
|
|
2094
|
-
},
|
|
2093
|
+
})) : (v.value = 0, w.value.style.transform = `translate3d(0, ${Math.pow(v.value, n)}px, 0)`);
|
|
2094
|
+
}, w = h(null);
|
|
2095
2095
|
return ce(() => {
|
|
2096
|
-
t?.refreshOff || (
|
|
2096
|
+
t?.refreshOff || (w.value = document.querySelector(
|
|
2097
2097
|
t.pullRefreshContainer
|
|
2098
|
-
),
|
|
2098
|
+
), w.value?.addEventListener("touchstart", I), w.value?.addEventListener("touchmove", m), w.value?.addEventListener("touchend", D));
|
|
2099
2099
|
}), (T, S) => (R(), H("div", Gn, [
|
|
2100
2100
|
U("div", {
|
|
2101
2101
|
class: "pull-refresh-box",
|
|
@@ -2185,8 +2185,8 @@ const ao = /* @__PURE__ */ ne(so, [["__scopeId", "data-v-df5da876"]]), io = ["da
|
|
|
2185
2185
|
ref: L(a).ref,
|
|
2186
2186
|
class: "virtualList"
|
|
2187
2187
|
}, d.$attrs), [
|
|
2188
|
-
U("div",
|
|
2189
|
-
U("div",
|
|
2188
|
+
U("div", _e(ke(L(f))), [
|
|
2189
|
+
U("div", _e(ke(L(i))), [
|
|
2190
2190
|
(R(!0), H(Qe, null, Ht(L(s), ({ data: g, index: y }) => (R(), H("div", {
|
|
2191
2191
|
key: M(g, y),
|
|
2192
2192
|
"data-key": M(g, y),
|
|
@@ -2303,19 +2303,19 @@ const po = ["title"], Do = { class: "tip" }, To = /* @__PURE__ */ Pt("\u5F53\u52
|
|
|
2303
2303
|
function N() {
|
|
2304
2304
|
a.value = !0;
|
|
2305
2305
|
}
|
|
2306
|
-
function
|
|
2306
|
+
function E() {
|
|
2307
2307
|
a.value && (f.value = !0);
|
|
2308
2308
|
}
|
|
2309
2309
|
async function I() {
|
|
2310
2310
|
N(), y.value ? (o.value?.addEventListener("animationend", m), o.value?.classList.add("showing"), await ot(10)) : o.value && t("load", o.value), o.value?.classList.remove("src-class");
|
|
2311
2311
|
}
|
|
2312
2312
|
function m() {
|
|
2313
|
-
o.value?.removeEventListener("animationend", m), o.value?.classList.remove("showing"), o.value && t("load", o.value),
|
|
2313
|
+
o.value?.removeEventListener("animationend", m), o.value?.classList.remove("showing"), o.value && t("load", o.value), E();
|
|
2314
2314
|
}
|
|
2315
2315
|
async function D(S) {
|
|
2316
2316
|
S ? I() : l.value && t("load", l.value), s.value = !0;
|
|
2317
2317
|
}
|
|
2318
|
-
function
|
|
2318
|
+
function w(S) {
|
|
2319
2319
|
S ? (d(), t("loadError")) : N(), s.value = !0;
|
|
2320
2320
|
}
|
|
2321
2321
|
function T() {
|
|
@@ -2335,14 +2335,14 @@ const po = ["title"], Do = { class: "tip" }, To = /* @__PURE__ */ Pt("\u5F53\u52
|
|
|
2335
2335
|
key: 2,
|
|
2336
2336
|
src: L(v),
|
|
2337
2337
|
onLoad: D,
|
|
2338
|
-
onError:
|
|
2338
|
+
onError: w,
|
|
2339
2339
|
vImageCancel: L(u)
|
|
2340
2340
|
}, () => [
|
|
2341
2341
|
L(y) ? re((R(), H("img", me({ key: 0 }, S.$attrs, {
|
|
2342
2342
|
ref_key: "thumbnailRef",
|
|
2343
2343
|
ref: l,
|
|
2344
2344
|
onLoad: Y[0] || (Y[0] = (X) => D()),
|
|
2345
|
-
onError: Y[1] || (Y[1] = (X) =>
|
|
2345
|
+
onError: Y[1] || (Y[1] = (X) => w()),
|
|
2346
2346
|
src: e.thumbnail
|
|
2347
2347
|
}), null, 16, wo)), [
|
|
2348
2348
|
[L(u)]
|
|
@@ -2352,7 +2352,7 @@ const po = ["title"], Do = { class: "tip" }, To = /* @__PURE__ */ Pt("\u5F53\u52
|
|
|
2352
2352
|
ref: o,
|
|
2353
2353
|
class: "src-class",
|
|
2354
2354
|
onLoad: Y[2] || (Y[2] = (X) => D(!0)),
|
|
2355
|
-
onError: Y[3] || (Y[3] = (X) =>
|
|
2355
|
+
onError: Y[3] || (Y[3] = (X) => w(!0)),
|
|
2356
2356
|
src: L(v)
|
|
2357
2357
|
}), null, 16, Eo)), [
|
|
2358
2358
|
[L(u)],
|
|
@@ -2435,7 +2435,7 @@ export {
|
|
|
2435
2435
|
Ge as allSelectedKey,
|
|
2436
2436
|
fn as closeDialogKey,
|
|
2437
2437
|
Bo as dialogController,
|
|
2438
|
-
|
|
2438
|
+
be as getTransform,
|
|
2439
2439
|
tt as isAllSelectedKey,
|
|
2440
2440
|
Ke as isSelectedKey,
|
|
2441
2441
|
Nt as itemKeyKey,
|
|
@@ -2458,9 +2458,9 @@ export {
|
|
|
2458
2458
|
Un as useRouterActivated,
|
|
2459
2459
|
Po as useScaleImageByMobile,
|
|
2460
2460
|
Ho as useScaleImageByPc,
|
|
2461
|
-
|
|
2461
|
+
_o as useSelectable,
|
|
2462
2462
|
ko as useSelectableByBase,
|
|
2463
|
-
|
|
2463
|
+
bo as useSelectableInjectors,
|
|
2464
2464
|
un as useVirtualList,
|
|
2465
2465
|
Oo as vDebounceClick,
|
|
2466
2466
|
pt as vEnter,
|