@lazycatcloud/lzc-toolkit 0.0.208 → 0.0.209
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 +505 -496
- package/dist/index.es.js.map +1 -0
- package/dist/index.umd.js +5 -4
- package/dist/index.umd.js.map +1 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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 m, watch 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 m, watch as K, customRef as kt, unref as j, isRef as Qt, getCurrentInstance as Be, onUpdated as Yt, computed as x, reactive as pe, onUnmounted as gt, inject as ee, provide as F, defineComponent as q, h as ue, render as De, openBlock as H, createBlock as Ie, Transition as Ue, withCtx as Re, withDirectives as re, createElementBlock as P, normalizeClass as se, createElementVNode as R, withModifiers as ye, renderSlot as ge, createCommentVNode as fe, useCssVars as He, normalizeProps as _e, guardReactiveProps as ke, pushScopeId as Ae, popScopeId as ze, normalizeStyle as G, toDisplayString as $e, vShow as Le, createVNode as he, onBeforeUnmount as ht, onActivated as mt, onBeforeMount as Bt, onDeactivated as Ut, useSlots as Rt, toRef as Ht, Fragment as Qe, mergeProps as me, renderList as $t, toRefs as yt, createTextVNode as Pt } from "vue";
|
|
2
2
|
const Ft = {
|
|
3
3
|
created(e, t) {
|
|
4
4
|
let n, o;
|
|
@@ -47,7 +47,7 @@ function Xt(e, t) {
|
|
|
47
47
|
const s = m(!0), a = () => {
|
|
48
48
|
s.value = !0, l();
|
|
49
49
|
};
|
|
50
|
-
|
|
50
|
+
K(e, a, { flush: "sync" });
|
|
51
51
|
const f = typeof t == "function" ? t : t.get, u = typeof t == "function" ? void 0 : t.set, r = kt((v, c) => (o = v, l = c, {
|
|
52
52
|
get() {
|
|
53
53
|
return s.value && (n = f(), s.value = !1), o(), n;
|
|
@@ -62,7 +62,7 @@ function Pe(e) {
|
|
|
62
62
|
return _t() ? (Mt(e), !0) : !1;
|
|
63
63
|
}
|
|
64
64
|
function te(e) {
|
|
65
|
-
return typeof e == "function" ? e() :
|
|
65
|
+
return typeof e == "function" ? e() : j(e);
|
|
66
66
|
}
|
|
67
67
|
const Dt = typeof window < "u" && typeof document < "u";
|
|
68
68
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
@@ -100,9 +100,9 @@ function Gt(...e) {
|
|
|
100
100
|
};
|
|
101
101
|
return (M) => {
|
|
102
102
|
const d = te(a), i = Date.now() - t, g = () => s = M();
|
|
103
|
-
return v(), d <= 0 ? (t = Date.now(), g()) : (i > d && (u || !o) ? (t = Date.now(), g()) : f && (s = new Promise((
|
|
104
|
-
l = r ?
|
|
105
|
-
t = Date.now(), o = !0,
|
|
103
|
+
return v(), d <= 0 ? (t = Date.now(), g()) : (i > d && (u || !o) ? (t = Date.now(), g()) : f && (s = new Promise((p, N) => {
|
|
104
|
+
l = r ? N : p, n = setTimeout(() => {
|
|
105
|
+
t = Date.now(), o = !0, p(g()), v();
|
|
106
106
|
}, Math.max(0, d - i));
|
|
107
107
|
})), !u && !n && (n = setTimeout(() => o = !0, d)), o = !1, s);
|
|
108
108
|
};
|
|
@@ -138,7 +138,7 @@ function we(...e) {
|
|
|
138
138
|
Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);
|
|
139
139
|
const s = [], a = () => {
|
|
140
140
|
s.forEach((v) => v()), s.length = 0;
|
|
141
|
-
}, f = (v, c, M, d) => (v.addEventListener(c, M, d), () => v.removeEventListener(c, M, d)), u =
|
|
141
|
+
}, f = (v, c, M, d) => (v.addEventListener(c, M, d), () => v.removeEventListener(c, M, d)), u = K(
|
|
142
142
|
() => [ie(t), te(l)],
|
|
143
143
|
([v, c]) => {
|
|
144
144
|
if (a(), !v)
|
|
@@ -162,7 +162,7 @@ function en() {
|
|
|
162
162
|
}
|
|
163
163
|
function tn(e) {
|
|
164
164
|
const t = en();
|
|
165
|
-
return
|
|
165
|
+
return x(() => (t.value, Boolean(e())));
|
|
166
166
|
}
|
|
167
167
|
function nn(e) {
|
|
168
168
|
const t = Be(), n = Xt(
|
|
@@ -176,7 +176,7 @@ function We(e, t, n = {}) {
|
|
|
176
176
|
let s;
|
|
177
177
|
const a = tn(() => o && "ResizeObserver" in o), f = () => {
|
|
178
178
|
s && (s.disconnect(), s = void 0);
|
|
179
|
-
}, u =
|
|
179
|
+
}, u = x(() => Array.isArray(e) ? e.map((c) => ie(c)) : [ie(e)]), r = K(
|
|
180
180
|
u,
|
|
181
181
|
(c) => {
|
|
182
182
|
if (f(), a.value && o) {
|
|
@@ -195,7 +195,7 @@ function We(e, t, n = {}) {
|
|
|
195
195
|
};
|
|
196
196
|
}
|
|
197
197
|
function on(e, t = { width: 0, height: 0 }, n = {}) {
|
|
198
|
-
const { window: o = xe, box: l = "content-box" } = n, s =
|
|
198
|
+
const { window: o = xe, box: l = "content-box" } = n, s = x(() => {
|
|
199
199
|
var c, M;
|
|
200
200
|
return (M = (c = ie(e)) == null ? void 0 : c.namespaceURI) == null ? void 0 : M.includes("svg");
|
|
201
201
|
}), a = m(t.width), f = m(t.height), { stop: u } = We(
|
|
@@ -220,7 +220,7 @@ function on(e, t = { width: 0, height: 0 }, n = {}) {
|
|
|
220
220
|
const c = ie(e);
|
|
221
221
|
c && (a.value = "offsetWidth" in c ? c.offsetWidth : t.width, f.value = "offsetHeight" in c ? c.offsetHeight : t.height);
|
|
222
222
|
});
|
|
223
|
-
const r =
|
|
223
|
+
const r = K(
|
|
224
224
|
() => ie(e),
|
|
225
225
|
(c) => {
|
|
226
226
|
a.value = c ? t.width : 0, f.value = c ? t.height : 0;
|
|
@@ -254,36 +254,36 @@ function ln(e, t = {}) {
|
|
|
254
254
|
},
|
|
255
255
|
behavior: u = "auto",
|
|
256
256
|
window: r = xe,
|
|
257
|
-
onError: v = (
|
|
258
|
-
console.error(
|
|
257
|
+
onError: v = (T) => {
|
|
258
|
+
console.error(T);
|
|
259
259
|
}
|
|
260
|
-
} = t, c = m(0), M = m(0), d =
|
|
260
|
+
} = t, c = m(0), M = m(0), d = x({
|
|
261
261
|
get() {
|
|
262
262
|
return c.value;
|
|
263
263
|
},
|
|
264
|
-
set(
|
|
265
|
-
g(
|
|
264
|
+
set(T) {
|
|
265
|
+
g(T, void 0);
|
|
266
266
|
}
|
|
267
|
-
}), i =
|
|
267
|
+
}), i = x({
|
|
268
268
|
get() {
|
|
269
269
|
return M.value;
|
|
270
270
|
},
|
|
271
|
-
set(
|
|
272
|
-
g(void 0,
|
|
271
|
+
set(T) {
|
|
272
|
+
g(void 0, T);
|
|
273
273
|
}
|
|
274
274
|
});
|
|
275
|
-
function g(
|
|
276
|
-
var
|
|
275
|
+
function g(T, D) {
|
|
276
|
+
var A, Y, y;
|
|
277
277
|
if (!r)
|
|
278
278
|
return;
|
|
279
|
-
const
|
|
280
|
-
!
|
|
281
|
-
top: (
|
|
282
|
-
left: (Y = te(
|
|
279
|
+
const z = te(e);
|
|
280
|
+
!z || (y = z instanceof Document ? r.document.body : z) == null || y.scrollTo({
|
|
281
|
+
top: (A = te(D)) != null ? A : i.value,
|
|
282
|
+
left: (Y = te(T)) != null ? Y : d.value,
|
|
283
283
|
behavior: te(u)
|
|
284
284
|
});
|
|
285
285
|
}
|
|
286
|
-
const
|
|
286
|
+
const p = m(!1), N = pe({
|
|
287
287
|
left: !0,
|
|
288
288
|
right: !1,
|
|
289
289
|
top: !0,
|
|
@@ -293,55 +293,55 @@ function ln(e, t = {}) {
|
|
|
293
293
|
right: !1,
|
|
294
294
|
top: !1,
|
|
295
295
|
bottom: !1
|
|
296
|
-
}),
|
|
297
|
-
!
|
|
298
|
-
},
|
|
299
|
-
var
|
|
296
|
+
}), I = (T) => {
|
|
297
|
+
!p.value || (p.value = !1, E.left = !1, E.right = !1, E.top = !1, E.bottom = !1, l(T));
|
|
298
|
+
}, h = je(I, n + o), w = (T) => {
|
|
299
|
+
var D;
|
|
300
300
|
if (!r)
|
|
301
301
|
return;
|
|
302
|
-
const
|
|
303
|
-
E.left =
|
|
304
|
-
const b = Math.abs(
|
|
305
|
-
Y === "flex" && y === "row-reverse" ? (
|
|
306
|
-
let _ =
|
|
307
|
-
|
|
308
|
-
const
|
|
309
|
-
Y === "flex" && y === "column-reverse" ? (
|
|
310
|
-
},
|
|
311
|
-
var
|
|
302
|
+
const A = ((D = T?.document) == null ? void 0 : D.documentElement) || T?.documentElement || ie(T), { display: Y, flexDirection: y } = getComputedStyle(A), z = A.scrollLeft;
|
|
303
|
+
E.left = z < c.value, E.right = z > c.value;
|
|
304
|
+
const b = Math.abs(z) <= (a.left || 0), B = Math.abs(z) + A.clientWidth >= A.scrollWidth - (a.right || 0) - it;
|
|
305
|
+
Y === "flex" && y === "row-reverse" ? (N.left = B, N.right = b) : (N.left = b, N.right = B), c.value = z;
|
|
306
|
+
let _ = A.scrollTop;
|
|
307
|
+
T === r.document && !_ && (_ = r.document.body.scrollTop), E.top = _ < M.value, E.bottom = _ > M.value;
|
|
308
|
+
const L = Math.abs(_) <= (a.top || 0), C = Math.abs(_) + A.clientHeight >= A.scrollHeight - (a.bottom || 0) - it;
|
|
309
|
+
Y === "flex" && y === "column-reverse" ? (N.top = C, N.bottom = L) : (N.top = L, N.bottom = C), M.value = _;
|
|
310
|
+
}, S = (T) => {
|
|
311
|
+
var D;
|
|
312
312
|
if (!r)
|
|
313
313
|
return;
|
|
314
|
-
const
|
|
315
|
-
|
|
314
|
+
const A = (D = T.target.documentElement) != null ? D : T.target;
|
|
315
|
+
w(A), p.value = !0, h(T), s(T);
|
|
316
316
|
};
|
|
317
317
|
return we(
|
|
318
318
|
e,
|
|
319
319
|
"scroll",
|
|
320
|
-
n ? Ye(
|
|
320
|
+
n ? Ye(S, n, !0, !1) : S,
|
|
321
321
|
f
|
|
322
322
|
), Fe(() => {
|
|
323
323
|
try {
|
|
324
|
-
const
|
|
325
|
-
if (!
|
|
324
|
+
const T = te(e);
|
|
325
|
+
if (!T)
|
|
326
326
|
return;
|
|
327
|
-
|
|
328
|
-
} catch (
|
|
329
|
-
v(
|
|
327
|
+
w(T);
|
|
328
|
+
} catch (T) {
|
|
329
|
+
v(T);
|
|
330
330
|
}
|
|
331
331
|
}), we(
|
|
332
332
|
e,
|
|
333
333
|
"scrollend",
|
|
334
|
-
|
|
334
|
+
I,
|
|
335
335
|
f
|
|
336
336
|
), {
|
|
337
337
|
x: d,
|
|
338
338
|
y: i,
|
|
339
|
-
isScrolling:
|
|
340
|
-
arrivedState:
|
|
339
|
+
isScrolling: p,
|
|
340
|
+
arrivedState: N,
|
|
341
341
|
directions: E,
|
|
342
342
|
measure() {
|
|
343
|
-
const
|
|
344
|
-
r &&
|
|
343
|
+
const T = te(e);
|
|
344
|
+
r && T && w(T);
|
|
345
345
|
}
|
|
346
346
|
};
|
|
347
347
|
}
|
|
@@ -359,7 +359,7 @@ function Xe(e, t = {}) {
|
|
|
359
359
|
if (!o)
|
|
360
360
|
return;
|
|
361
361
|
const c = o.getElementById(a) || o.createElement("style");
|
|
362
|
-
c.isConnected || (c.id = a, t.media && (c.media = t.media), o.head.appendChild(c)), !n.value && (u =
|
|
362
|
+
c.isConnected || (c.id = a, t.media && (c.media = t.media), o.head.appendChild(c)), !n.value && (u = K(
|
|
363
363
|
f,
|
|
364
364
|
(M) => {
|
|
365
365
|
c.textContent = M;
|
|
@@ -386,103 +386,103 @@ function an(e, t, n) {
|
|
|
386
386
|
};
|
|
387
387
|
}
|
|
388
388
|
function un(e, t) {
|
|
389
|
-
const { scrollEndHook: n, itemHeight: o, overscan: l = 5 } = t, s = m(null), a = on(s), f = m(!0), u = je(
|
|
389
|
+
const { scrollEndHook: n, itemHeight: o, overscan: l = 5 } = t, s = m(null), a = on(s), f = m(!0), u = je(w, 100);
|
|
390
390
|
let r;
|
|
391
391
|
const v = dt(e), c = m(0), M = m({ start: 0, end: 10 }), d = m({ start: 0, end: l });
|
|
392
392
|
let i = 0;
|
|
393
|
-
const g = m([]),
|
|
394
|
-
let { sum:
|
|
395
|
-
return v.value.map((U, $) => (typeof o == "number" ?
|
|
396
|
-
}),
|
|
397
|
-
const { start:
|
|
398
|
-
return g.value.slice(
|
|
393
|
+
const g = m([]), p = x(() => {
|
|
394
|
+
let { sum: L, height: C } = { sum: 0, height: 0 };
|
|
395
|
+
return v.value.map((U, $) => (typeof o == "number" ? C = o : C = o($), L += C, { height: C, sum: L }));
|
|
396
|
+
}), N = x(() => Y(M.value.start)), E = x(() => typeof o == "number" ? p.value.length * o : p.value[p.value.length - 1]?.sum || 0), I = x(() => {
|
|
397
|
+
const { start: L, end: C } = d.value;
|
|
398
|
+
return g.value.slice(L, C);
|
|
399
399
|
});
|
|
400
400
|
ce(() => {
|
|
401
|
-
}), gt(() => cancelAnimationFrame(r)),
|
|
401
|
+
}), gt(() => cancelAnimationFrame(r)), K(
|
|
402
402
|
v,
|
|
403
403
|
() => {
|
|
404
|
-
(a.width.value || a.height.value) &&
|
|
404
|
+
(a.width.value || a.height.value) && S();
|
|
405
405
|
},
|
|
406
406
|
{ deep: !0 }
|
|
407
|
-
),
|
|
407
|
+
), K(
|
|
408
408
|
[a.width, a.height],
|
|
409
|
-
([
|
|
410
|
-
(
|
|
409
|
+
([L, C]) => {
|
|
410
|
+
(L || C) && S();
|
|
411
411
|
},
|
|
412
412
|
{ deep: !0 }
|
|
413
|
-
),
|
|
414
|
-
|
|
413
|
+
), K(c, () => {
|
|
414
|
+
h(), u();
|
|
415
415
|
});
|
|
416
|
-
function
|
|
416
|
+
function h() {
|
|
417
417
|
f.value = !1;
|
|
418
418
|
}
|
|
419
|
-
function
|
|
419
|
+
function w() {
|
|
420
420
|
f.value = !0, n?.();
|
|
421
421
|
}
|
|
422
|
-
function
|
|
423
|
-
cancelAnimationFrame(r), r = requestAnimationFrame(
|
|
422
|
+
function S() {
|
|
423
|
+
cancelAnimationFrame(r), r = requestAnimationFrame(T);
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function T() {
|
|
426
426
|
if (s.value) {
|
|
427
427
|
c.value = s.value.scrollTop;
|
|
428
|
-
let
|
|
429
|
-
i =
|
|
430
|
-
let
|
|
431
|
-
|
|
428
|
+
let L = D(c.value);
|
|
429
|
+
i = A(L);
|
|
430
|
+
let C = Math.max(0, L - l), U = Math.min(
|
|
431
|
+
L + i + l,
|
|
432
432
|
v.value.length
|
|
433
433
|
);
|
|
434
|
-
M.value = { start:
|
|
434
|
+
M.value = { start: C, end: U }, g.value = v.value.slice(C, U).map(($, Q) => ({
|
|
435
435
|
data: $,
|
|
436
|
-
index: Q +
|
|
437
|
-
})), d.value.start =
|
|
436
|
+
index: Q + C
|
|
437
|
+
})), d.value.start = L - C, d.value.end = d.value.start + i;
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
|
-
function
|
|
441
|
-
let
|
|
442
|
-
for (;
|
|
443
|
-
const Q = Math.floor((
|
|
444
|
-
|
|
440
|
+
function D(L) {
|
|
441
|
+
let C = 0, U = p.value.length - 1, $ = -1;
|
|
442
|
+
for (; C <= U; ) {
|
|
443
|
+
const Q = Math.floor((C + U) / 2);
|
|
444
|
+
p.value[Q].sum >= L ? ($ = Q, U = Q - 1) : C = Q + 1;
|
|
445
445
|
}
|
|
446
446
|
return Math.max(0, $);
|
|
447
447
|
}
|
|
448
|
-
function
|
|
449
|
-
let
|
|
450
|
-
for (let $ =
|
|
448
|
+
function A(L) {
|
|
449
|
+
let C = 0, U = 0;
|
|
450
|
+
for (let $ = L; $ < p.value.length && (C++, U += p.value[$].height, !(U >= a.height.value)); $++)
|
|
451
451
|
;
|
|
452
|
-
return
|
|
452
|
+
return C;
|
|
453
453
|
}
|
|
454
|
-
function Y(
|
|
454
|
+
function Y(L) {
|
|
455
455
|
if (typeof o == "number")
|
|
456
|
-
return
|
|
457
|
-
let
|
|
458
|
-
return
|
|
456
|
+
return L * o;
|
|
457
|
+
let C = p.value[L];
|
|
458
|
+
return C ? C.sum - C.height : 0;
|
|
459
459
|
}
|
|
460
|
-
function y(
|
|
461
|
-
return
|
|
460
|
+
function y(L) {
|
|
461
|
+
return p.value[L] || { sum: 0, height: 0 };
|
|
462
462
|
}
|
|
463
|
-
function
|
|
463
|
+
function z(L, C = "smooth") {
|
|
464
464
|
if (s.value) {
|
|
465
465
|
const { reset: U } = an(
|
|
466
466
|
s.value,
|
|
467
467
|
"scrollBehavior",
|
|
468
|
-
|
|
469
|
-
), $ = y(
|
|
470
|
-
s.value.scrollTop = $.sum - $.height,
|
|
468
|
+
C
|
|
469
|
+
), $ = y(L);
|
|
470
|
+
s.value.scrollTop = $.sum - $.height, T(), U();
|
|
471
471
|
}
|
|
472
472
|
if (s.value) {
|
|
473
|
-
const U = y(
|
|
474
|
-
s.value.scrollTop = U.sum - U.height,
|
|
473
|
+
const U = y(L);
|
|
474
|
+
s.value.scrollTop = U.sum - U.height, T();
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
const b =
|
|
477
|
+
const b = x(() => ({
|
|
478
478
|
style: {
|
|
479
479
|
width: "100%",
|
|
480
480
|
height: `${E.value}px`,
|
|
481
481
|
pointerEvents: f.value ? void 0 : "none"
|
|
482
482
|
}
|
|
483
|
-
})), B =
|
|
483
|
+
})), B = x(() => ({
|
|
484
484
|
style: {
|
|
485
|
-
transform: `translate3d(0, ${
|
|
485
|
+
transform: `translate3d(0, ${N.value}px, 0)`,
|
|
486
486
|
"will-change": "transform"
|
|
487
487
|
}
|
|
488
488
|
})), _ = {
|
|
@@ -490,18 +490,18 @@ function un(e, t) {
|
|
|
490
490
|
};
|
|
491
491
|
return {
|
|
492
492
|
list: g,
|
|
493
|
-
visiableList:
|
|
493
|
+
visiableList: I,
|
|
494
494
|
getItemHeightData: y,
|
|
495
|
-
getoffsetTopIndex:
|
|
495
|
+
getoffsetTopIndex: D,
|
|
496
496
|
totalHeight: E,
|
|
497
497
|
clientHeight: a.height,
|
|
498
|
-
scrollTo:
|
|
498
|
+
scrollTo: z,
|
|
499
499
|
scrollTop: c,
|
|
500
500
|
isScrollEnd: f,
|
|
501
501
|
containerProps: {
|
|
502
502
|
ref: s,
|
|
503
503
|
onScroll: () => {
|
|
504
|
-
|
|
504
|
+
S();
|
|
505
505
|
},
|
|
506
506
|
style: _
|
|
507
507
|
},
|
|
@@ -512,12 +512,12 @@ function un(e, t) {
|
|
|
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
513
|
function So() {
|
|
514
514
|
const { voidFn: e, boolFn: t, boolRef: n, numberRef: o, arrayRef: l } = {
|
|
515
|
-
voidFn: (
|
|
515
|
+
voidFn: (p) => {
|
|
516
516
|
},
|
|
517
|
-
boolFn: (
|
|
518
|
-
boolRef:
|
|
519
|
-
numberRef:
|
|
520
|
-
arrayRef:
|
|
517
|
+
boolFn: (p) => !1,
|
|
518
|
+
boolRef: x(() => !1),
|
|
519
|
+
numberRef: x(() => 0),
|
|
520
|
+
arrayRef: x(() => [])
|
|
521
521
|
}, s = ee(Nt, "id"), a = ee(Ge, l), f = ee(Ke, t), u = ee(tt, n), r = ee(Ve, e), v = ee(Ze, e), c = ee(qe, e), M = ee(Je, e), d = ee(et, e), i = ee(Te, e), g = ee(nt, o);
|
|
522
522
|
return {
|
|
523
523
|
itemKey: s,
|
|
@@ -535,117 +535,125 @@ function So() {
|
|
|
535
535
|
}
|
|
536
536
|
function Oo(e, t, n = { deep: !0, useAllFlagOptimizatiofn: !0 }) {
|
|
537
537
|
const o = m(!1), l = m(/* @__PURE__ */ new Set()), s = pe(/* @__PURE__ */ new Map());
|
|
538
|
-
|
|
538
|
+
K(
|
|
539
539
|
e,
|
|
540
540
|
(h) => {
|
|
541
|
-
|
|
542
|
-
s.has(p[t]) || s.set(p[t], p);
|
|
543
|
-
}), E();
|
|
541
|
+
a(h);
|
|
544
542
|
},
|
|
545
543
|
{
|
|
546
544
|
deep: n.deep,
|
|
547
545
|
immediate: !0
|
|
548
546
|
}
|
|
547
|
+
), K(
|
|
548
|
+
() => e.value.length,
|
|
549
|
+
() => {
|
|
550
|
+
a(e.value);
|
|
551
|
+
}
|
|
549
552
|
), Mt(() => {
|
|
550
553
|
o.value = !1, l.value.clear(), s.clear();
|
|
551
554
|
});
|
|
552
|
-
|
|
555
|
+
function a(h) {
|
|
556
|
+
s.clear(), h.forEach((w) => {
|
|
557
|
+
s.has(w[t]) || s.set(w[t], w);
|
|
558
|
+
}), I();
|
|
559
|
+
}
|
|
560
|
+
const f = x(() => {
|
|
553
561
|
let h = [];
|
|
554
562
|
if (o.value != null)
|
|
555
563
|
o.value && (h = Array.from(s.values()));
|
|
556
564
|
else if (l.value.size) {
|
|
557
|
-
let
|
|
565
|
+
let w;
|
|
558
566
|
l.value.forEach((S) => {
|
|
559
|
-
|
|
567
|
+
w = s.get(S), w && h.push(w);
|
|
560
568
|
});
|
|
561
569
|
}
|
|
562
570
|
return h;
|
|
563
|
-
}),
|
|
571
|
+
}), u = x(() => {
|
|
564
572
|
let h = 0;
|
|
565
573
|
return o.value != null ? o.value && (h = s.size) : h = l.value.size, h;
|
|
566
|
-
}),
|
|
574
|
+
}), r = x(() => {
|
|
567
575
|
let h;
|
|
568
576
|
if (o.value != null)
|
|
569
577
|
h = o.value;
|
|
570
578
|
else {
|
|
571
|
-
const
|
|
572
|
-
h =
|
|
579
|
+
const w = l.value.size, S = s.size;
|
|
580
|
+
h = w == S;
|
|
573
581
|
}
|
|
574
582
|
return h;
|
|
575
583
|
});
|
|
576
|
-
function
|
|
584
|
+
function v() {
|
|
577
585
|
o.value = !0;
|
|
578
586
|
}
|
|
579
|
-
function
|
|
587
|
+
function c() {
|
|
580
588
|
o.value = !1;
|
|
581
589
|
}
|
|
582
|
-
function
|
|
590
|
+
function M(h) {
|
|
583
591
|
s.has(h) && l.value.add(h);
|
|
584
592
|
}
|
|
585
|
-
function
|
|
586
|
-
|
|
587
|
-
h.forEach((
|
|
588
|
-
|
|
593
|
+
function d(h) {
|
|
594
|
+
p(() => {
|
|
595
|
+
h.forEach((w) => {
|
|
596
|
+
M(w[t]);
|
|
589
597
|
});
|
|
590
598
|
});
|
|
591
599
|
}
|
|
592
|
-
function
|
|
593
|
-
|
|
594
|
-
h.forEach((
|
|
595
|
-
l.value.delete(
|
|
600
|
+
function i(h) {
|
|
601
|
+
p(() => {
|
|
602
|
+
h.forEach((w) => {
|
|
603
|
+
l.value.delete(w[t]);
|
|
596
604
|
});
|
|
597
605
|
});
|
|
598
606
|
}
|
|
599
|
-
function
|
|
607
|
+
function g(h) {
|
|
600
608
|
return o.value != null ? o.value : l.value.has(h[t]);
|
|
601
609
|
}
|
|
602
|
-
function
|
|
610
|
+
function p(h) {
|
|
603
611
|
o.value != null && (o.value ? l.value = new Set(Array.from(s.keys())) : l.value = /* @__PURE__ */ new Set()), h(), n.useAllFlagOptimizatiofn ? l.value.size == 0 ? o.value = !1 : l.value.size == s.size ? o.value = !0 : o.value = null : o.value = null;
|
|
604
612
|
}
|
|
605
|
-
function
|
|
606
|
-
|
|
607
|
-
h.forEach((
|
|
608
|
-
|
|
613
|
+
function N(h) {
|
|
614
|
+
p(() => {
|
|
615
|
+
h.forEach((w) => {
|
|
616
|
+
g(w) ? l.value.delete(w[t]) : M(w[t]);
|
|
609
617
|
});
|
|
610
618
|
});
|
|
611
619
|
}
|
|
612
|
-
function w() {
|
|
613
|
-
const { value: h } = u;
|
|
614
|
-
h ? v() : r();
|
|
615
|
-
}
|
|
616
620
|
function E() {
|
|
617
|
-
const h =
|
|
618
|
-
|
|
619
|
-
s.get(p) || h.push(p);
|
|
620
|
-
}), h.forEach((p) => l.value.delete(p));
|
|
621
|
+
const { value: h } = r;
|
|
622
|
+
h ? c() : v();
|
|
621
623
|
}
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
624
|
+
function I() {
|
|
625
|
+
const h = [];
|
|
626
|
+
l.value.forEach((w) => {
|
|
627
|
+
s.get(w) || h.push(w);
|
|
628
|
+
}), h.forEach((w) => l.value.delete(w));
|
|
629
|
+
}
|
|
630
|
+
return F(Nt, t), F(Ze, E), F(Ve, N), F(Ke, g), F(Ge, f), F(qe, d), F(Je, v), F(et, i), F(tt, r), F(Te, c), F(Te, c), F(nt, u), {
|
|
631
|
+
selected: f,
|
|
632
|
+
select: d,
|
|
633
|
+
selectAll: v,
|
|
634
|
+
unselect: i,
|
|
635
|
+
unselectAll: c,
|
|
636
|
+
toggle: N,
|
|
637
|
+
toggleAll: E,
|
|
638
|
+
isSelected: g,
|
|
639
|
+
isAllSelected: r,
|
|
640
|
+
selectedCount: u
|
|
633
641
|
};
|
|
634
642
|
}
|
|
635
643
|
function bo(e) {
|
|
636
|
-
const t = m(!1), n = m(/* @__PURE__ */ new Set()), o =
|
|
644
|
+
const t = m(!1), n = m(/* @__PURE__ */ new Set()), o = x(() => {
|
|
637
645
|
let i = [];
|
|
638
646
|
return t.value != null ? t.value && (i = e.value) : n.value.size && (i = Array.from(n.value.values())), i;
|
|
639
|
-
}), l =
|
|
647
|
+
}), l = x(() => {
|
|
640
648
|
let i = 0;
|
|
641
649
|
return t.value != null ? t.value && (i = e.value.length) : i = n.value.size, i;
|
|
642
|
-
}), s =
|
|
650
|
+
}), s = x(() => {
|
|
643
651
|
let i;
|
|
644
652
|
if (t.value != null)
|
|
645
653
|
i = t.value;
|
|
646
654
|
else {
|
|
647
|
-
const g = n.value.size,
|
|
648
|
-
i = g ==
|
|
655
|
+
const g = n.value.size, p = e.value.length;
|
|
656
|
+
i = g == p;
|
|
649
657
|
}
|
|
650
658
|
return i;
|
|
651
659
|
});
|
|
@@ -718,118 +726,118 @@ function wt({
|
|
|
718
726
|
unselectAll: u = Se("\u53D6\u6D88\u5168\u9009")
|
|
719
727
|
} = s();
|
|
720
728
|
let r = {};
|
|
721
|
-
const v =
|
|
729
|
+
const v = x(
|
|
722
730
|
() => Ye(o === "colum" ? xt : Ct, 50)
|
|
723
|
-
), c =
|
|
731
|
+
), c = x(() => e ?? n), M = (() => t ? (O) => t(O) : (O) => O)(), d = /* @__PURE__ */ new Set(), i = m(!0), g = m(), p = m(!1), N = m({ x: 0, y: 0 }), E = m({ x: 0, y: 0, scrollTop: 0 }), I = m({}), h = m({
|
|
724
732
|
top: 0,
|
|
725
733
|
height: 0,
|
|
726
|
-
sync(
|
|
727
|
-
|
|
734
|
+
sync(O = !1) {
|
|
735
|
+
h.value.top = g.value?.scrollTop || 0, O && (h.value.height = g.value?.scrollHeight || 0);
|
|
728
736
|
}
|
|
729
|
-
}),
|
|
730
|
-
left: Math.min(
|
|
731
|
-
top: Math.min(
|
|
732
|
-
width: Math.abs(
|
|
733
|
-
height: Math.abs(
|
|
734
|
-
} : { left: 0, top: 0, width: 0, height: 0 }),
|
|
737
|
+
}), w = x(() => p.value ? {
|
|
738
|
+
left: Math.min(N.value.x, E.value.x) - I.value.left,
|
|
739
|
+
top: Math.min(N.value.y, E.value.y) - I.value.top,
|
|
740
|
+
width: Math.abs(N.value.x - E.value.x),
|
|
741
|
+
height: Math.abs(N.value.y - E.value.y)
|
|
742
|
+
} : { left: 0, top: 0, width: 0, height: 0 }), S = m(!1), { margin: T = 50, startSpeed: D = 30, maxSpeed: A = 30 } = l;
|
|
735
743
|
let Y;
|
|
736
|
-
const y =
|
|
744
|
+
const y = T, z = D, b = A, B = (O) => O ** 1;
|
|
737
745
|
let _ = 0;
|
|
738
|
-
function
|
|
739
|
-
if (cancelAnimationFrame(Y), _ =
|
|
746
|
+
function L(O) {
|
|
747
|
+
if (cancelAnimationFrame(Y), _ = C(O), _ = Math.max(
|
|
740
748
|
Math.min(_, b),
|
|
741
749
|
-b
|
|
742
750
|
), _ !== 0) {
|
|
743
751
|
const k = g.value;
|
|
744
|
-
if (!k || !
|
|
752
|
+
if (!k || !p.value)
|
|
745
753
|
return;
|
|
746
|
-
const Z =
|
|
747
|
-
let X =
|
|
748
|
-
X = Math.min(Math.max(0, X), Z), k.scrollTop = X, $(), Y = requestAnimationFrame(() =>
|
|
754
|
+
const Z = h.value.height - I.value.height;
|
|
755
|
+
let X = h.value.top + Number(_);
|
|
756
|
+
X = Math.min(Math.max(0, X), Z), k.scrollTop = X, $(), Y = requestAnimationFrame(() => L(O));
|
|
749
757
|
}
|
|
750
758
|
}
|
|
751
|
-
function
|
|
759
|
+
function C(O) {
|
|
752
760
|
if (g.value) {
|
|
753
|
-
const Z =
|
|
761
|
+
const Z = I.value, X = Z.bottom - O;
|
|
754
762
|
if (X < y)
|
|
755
|
-
return
|
|
756
|
-
const le =
|
|
763
|
+
return z * B(1 - X / y);
|
|
764
|
+
const le = O - Z.top;
|
|
757
765
|
if (le < y)
|
|
758
|
-
return -
|
|
766
|
+
return -z * B(1 - le / y);
|
|
759
767
|
}
|
|
760
768
|
return 0;
|
|
761
769
|
}
|
|
762
|
-
function U(
|
|
763
|
-
const k = { ...
|
|
764
|
-
return k.left +=
|
|
770
|
+
function U(O) {
|
|
771
|
+
const k = { ...w.value, right: 0, bottom: 0 };
|
|
772
|
+
return k.left += I.value.left, k.top += I.value.top - h.value.top, k.right = k.width + k.left, k.bottom = k.height + k.top, k.left < O.right && k.right > O.left && k.top < O.bottom && k.bottom > O.top;
|
|
765
773
|
}
|
|
766
774
|
function $() {
|
|
767
|
-
|
|
768
|
-
const { top:
|
|
775
|
+
h.value.sync();
|
|
776
|
+
const { top: O, height: k } = h.value;
|
|
769
777
|
E.value.y = Math.min(
|
|
770
|
-
k +
|
|
771
|
-
E.value.y +
|
|
772
|
-
), E.value.scrollTop =
|
|
778
|
+
k + I.value.top,
|
|
779
|
+
E.value.y + O - E.value.scrollTop
|
|
780
|
+
), E.value.scrollTop = O;
|
|
773
781
|
}
|
|
774
|
-
function Q(
|
|
782
|
+
function Q(O, k, Z = "dynamic-styles") {
|
|
775
783
|
let X = document.getElementById(Z);
|
|
776
784
|
X || (X = document.createElement("style"), X.id = Z, document.head.appendChild(X));
|
|
777
|
-
const le = X.sheet.cssRules, ve = le.length, Ot = `${
|
|
785
|
+
const le = X.sheet.cssRules, ve = le.length, Ot = `${O} { ${k} }`;
|
|
778
786
|
for (let Ce = 0; Ce < ve; Ce++) {
|
|
779
787
|
const at = le[Ce];
|
|
780
|
-
if (at.selectorText ===
|
|
788
|
+
if (at.selectorText === O && at.style.cssText === k)
|
|
781
789
|
return;
|
|
782
790
|
}
|
|
783
791
|
X.sheet.insertRule(Ot, ve);
|
|
784
792
|
}
|
|
785
|
-
function W(
|
|
786
|
-
i.value = !0,
|
|
787
|
-
const Z = k +
|
|
788
|
-
|
|
793
|
+
function W(O, k) {
|
|
794
|
+
i.value = !0, p.value = !0, h.value.sync(!0);
|
|
795
|
+
const Z = k + h.value.top;
|
|
796
|
+
N.value.x = O, N.value.y = Z, E.value.x = O, E.value.y = Z, g.value?.classList.add("disable-scroll-behavior"), d.clear(), st();
|
|
789
797
|
}
|
|
790
|
-
function J(
|
|
791
|
-
!
|
|
792
|
-
k +
|
|
793
|
-
|
|
794
|
-
), E.value.scrollTop =
|
|
798
|
+
function J(O, k, Z) {
|
|
799
|
+
!p.value || (i.value && o === "colum" && !Ne() && (S.value || u(), i.value = !1), Z?.(), L(k), E.value.x = Math.max(O, I.value.left), E.value.y = Math.min(
|
|
800
|
+
k + h.value.top,
|
|
801
|
+
h.value.height + I.value.top
|
|
802
|
+
), E.value.scrollTop = h.value.top, v.value());
|
|
795
803
|
}
|
|
796
804
|
function V() {
|
|
797
|
-
|
|
805
|
+
p.value = !1, g.value?.classList.remove("disable-scroll-behavior");
|
|
798
806
|
}
|
|
799
807
|
function oe() {
|
|
800
|
-
!
|
|
808
|
+
!p.value || (_ || $(), v.value());
|
|
801
809
|
}
|
|
802
810
|
function Ne() {
|
|
803
|
-
if (!
|
|
811
|
+
if (!p.value)
|
|
804
812
|
return !1;
|
|
805
|
-
const { width:
|
|
806
|
-
return !(Math.max(
|
|
813
|
+
const { width: O, height: k } = w.value;
|
|
814
|
+
return !(Math.max(O, k) > 5);
|
|
807
815
|
}
|
|
808
816
|
function jt() {
|
|
809
817
|
Ne() && u();
|
|
810
818
|
}
|
|
811
819
|
function xt() {
|
|
812
|
-
Ne() || g.value?.querySelectorAll(`[${n}]`).forEach((
|
|
820
|
+
Ne() || g.value?.querySelectorAll(`[${n}]`).forEach((O) => {
|
|
813
821
|
r[c.value] = M(
|
|
814
|
-
|
|
815
|
-
), U(
|
|
822
|
+
O.getAttribute(`${n}`)
|
|
823
|
+
), U(O.getBoundingClientRect()) ? a([r]) : S.value || f([r]);
|
|
816
824
|
});
|
|
817
825
|
}
|
|
818
826
|
function Ct() {
|
|
819
|
-
const
|
|
827
|
+
const O = [];
|
|
820
828
|
let k = null, Z = 0;
|
|
821
829
|
g.value?.querySelectorAll(`[${n}]`).forEach((X, le) => {
|
|
822
830
|
const ve = M(X.getAttribute(`${n}`));
|
|
823
|
-
|
|
831
|
+
O.push(ve), U(X.getBoundingClientRect()) ? (k === null && (k = le), k = Math.min(k, le), Z = Math.max(Z, le)) : (r[c.value] = ve, d.has(ve) && f([r]));
|
|
824
832
|
});
|
|
825
833
|
for (let X = k; X < Z + 1; X++)
|
|
826
|
-
r[c.value] =
|
|
834
|
+
r[c.value] = O[X], a([r]), d.add(O[X]);
|
|
827
835
|
}
|
|
828
836
|
function st() {
|
|
829
|
-
!g.value || (
|
|
837
|
+
!g.value || (I.value = g.value.getBoundingClientRect());
|
|
830
838
|
}
|
|
831
|
-
function St(
|
|
832
|
-
return !
|
|
839
|
+
function St(O) {
|
|
840
|
+
return !O?.value || (g.value = O.value, !g?.value) ? !1 : (st(), Q(".disable-scroll-behavior", "scroll-behavior: unset !important;"), !0);
|
|
833
841
|
}
|
|
834
842
|
return {
|
|
835
843
|
init: St,
|
|
@@ -841,9 +849,9 @@ function wt({
|
|
|
841
849
|
cancelSelectAllBySingleClick: jt,
|
|
842
850
|
selectFn: v,
|
|
843
851
|
getAttributeValue: M,
|
|
844
|
-
incrementalSelect:
|
|
845
|
-
selectRange:
|
|
846
|
-
isPressing:
|
|
852
|
+
incrementalSelect: S,
|
|
853
|
+
selectRange: w,
|
|
854
|
+
isPressing: p,
|
|
847
855
|
containerEl: g
|
|
848
856
|
};
|
|
849
857
|
}
|
|
@@ -854,7 +862,7 @@ function _o(e, t = !1) {
|
|
|
854
862
|
dragMove: a,
|
|
855
863
|
dragEnd: f,
|
|
856
864
|
cancelSelectAllBySingleClick: u
|
|
857
|
-
} = n, r =
|
|
865
|
+
} = n, r = x(() => ({
|
|
858
866
|
left: `${o.value.left}px`,
|
|
859
867
|
top: `${o.value.top}px`,
|
|
860
868
|
width: `${o.value.width}px`,
|
|
@@ -876,22 +884,22 @@ function _o(e, t = !1) {
|
|
|
876
884
|
});
|
|
877
885
|
}
|
|
878
886
|
});
|
|
879
|
-
function M(
|
|
880
|
-
|
|
887
|
+
function M(N) {
|
|
888
|
+
N.button === 0 && (t && (N.ctrlKey || N.metaKey) && (n.incrementalSelect.value = !0), s(N.x, N.y), window.addEventListener("mousemove", d), window.addEventListener("mouseup", i));
|
|
881
889
|
}
|
|
882
|
-
function d(
|
|
883
|
-
a(
|
|
890
|
+
function d(N) {
|
|
891
|
+
a(N.x, N.y);
|
|
884
892
|
}
|
|
885
|
-
function i(
|
|
886
|
-
window.removeEventListener("mousemove", d), window.removeEventListener("mouseup", i),
|
|
887
|
-
(
|
|
888
|
-
|
|
893
|
+
function i(N) {
|
|
894
|
+
window.removeEventListener("mousemove", d), window.removeEventListener("mouseup", i), N.composedPath().some(
|
|
895
|
+
(I) => n.getAttributeValue(
|
|
896
|
+
I?.getAttribute?.(e.attribute)
|
|
889
897
|
)
|
|
890
898
|
) || u(), f(), n.incrementalSelect.value = !1;
|
|
891
899
|
}
|
|
892
|
-
function g(
|
|
900
|
+
function g(N) {
|
|
893
901
|
try {
|
|
894
|
-
if (!n.init(
|
|
902
|
+
if (!n.init(N))
|
|
895
903
|
throw "\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";
|
|
896
904
|
if (!n.containerEl?.value)
|
|
897
905
|
return !1;
|
|
@@ -900,10 +908,10 @@ function _o(e, t = !1) {
|
|
|
900
908
|
console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25", E);
|
|
901
909
|
}
|
|
902
910
|
}
|
|
903
|
-
function
|
|
911
|
+
function p() {
|
|
904
912
|
n.containerEl.value?.removeEventListener("scroll", l), n.containerEl.value?.removeEventListener("mousedown", M);
|
|
905
913
|
}
|
|
906
|
-
return { init: g, unMount:
|
|
914
|
+
return { init: g, unMount: p };
|
|
907
915
|
}
|
|
908
916
|
function ko(e, t = {}) {
|
|
909
917
|
const {
|
|
@@ -923,58 +931,58 @@ function ko(e, t = {}) {
|
|
|
923
931
|
function i() {
|
|
924
932
|
clearTimeout(c);
|
|
925
933
|
}
|
|
926
|
-
function g(
|
|
927
|
-
return
|
|
934
|
+
function g(D) {
|
|
935
|
+
return D.composedPath().some((A) => !!A?.getAttribute?.(e.attribute));
|
|
928
936
|
}
|
|
929
|
-
function D
|
|
930
|
-
const Y = Math.abs(
|
|
937
|
+
function p(D, A) {
|
|
938
|
+
const Y = Math.abs(D - d.x), y = Math.abs(A - d.y);
|
|
931
939
|
return !M && Y > s && Y > y;
|
|
932
940
|
}
|
|
933
|
-
function
|
|
934
|
-
return l?.value && !a.isPressing.value && D
|
|
941
|
+
function N(D, A) {
|
|
942
|
+
return l?.value && !a.isPressing.value && p(D, A);
|
|
935
943
|
}
|
|
936
|
-
function E(
|
|
937
|
-
(
|
|
944
|
+
function E(D, A, Y) {
|
|
945
|
+
(A == null || Y == null) && (A = D.targetTouches[0].clientX, Y = D.targetTouches[0].clientY), u(A, Y), n?.(), r(A, Y, () => D.preventDefault());
|
|
938
946
|
}
|
|
939
|
-
function
|
|
940
|
-
if (i(), !g(
|
|
947
|
+
function I(D) {
|
|
948
|
+
if (i(), !g(D))
|
|
941
949
|
return;
|
|
942
|
-
const { clientX:
|
|
943
|
-
d = { x:
|
|
944
|
-
E(
|
|
950
|
+
const { clientX: A, clientY: Y } = D.targetTouches[0];
|
|
951
|
+
d = { x: A, y: Y }, M = !1, c = setTimeout(() => {
|
|
952
|
+
E(D), D.preventDefault();
|
|
945
953
|
}, o);
|
|
946
954
|
}
|
|
947
|
-
function
|
|
955
|
+
function h(D) {
|
|
948
956
|
i();
|
|
949
|
-
const { clientX:
|
|
950
|
-
if (
|
|
951
|
-
M = !0, E(
|
|
957
|
+
const { clientX: A, clientY: Y } = D.targetTouches[0];
|
|
958
|
+
if (N(A, Y)) {
|
|
959
|
+
M = !0, E(D, d.x, d.y);
|
|
952
960
|
return;
|
|
953
961
|
}
|
|
954
|
-
r(
|
|
962
|
+
r(A, Y, () => D.preventDefault());
|
|
955
963
|
}
|
|
956
|
-
function
|
|
964
|
+
function w() {
|
|
957
965
|
i(), M = !1, v();
|
|
958
966
|
}
|
|
959
|
-
function
|
|
967
|
+
function S(D) {
|
|
960
968
|
try {
|
|
961
|
-
if (!a.init(
|
|
969
|
+
if (!a.init(D))
|
|
962
970
|
throw new Error("\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E");
|
|
963
971
|
if (!a.containerEl?.value)
|
|
964
972
|
return !1;
|
|
965
|
-
const
|
|
966
|
-
|
|
967
|
-
} catch (
|
|
968
|
-
console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25",
|
|
973
|
+
const A = a.containerEl.value;
|
|
974
|
+
A.addEventListener("scroll", f), A.addEventListener("touchstart", I), A.addEventListener("touchmove", h), window.addEventListener("touchcancel", w), window.addEventListener("touchend", w);
|
|
975
|
+
} catch (A) {
|
|
976
|
+
console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25", A);
|
|
969
977
|
}
|
|
970
978
|
}
|
|
971
|
-
function
|
|
979
|
+
function T() {
|
|
972
980
|
if (!a.containerEl?.value)
|
|
973
981
|
return;
|
|
974
|
-
const
|
|
975
|
-
|
|
982
|
+
const D = a.containerEl.value;
|
|
983
|
+
D.removeEventListener("scroll", f), D.removeEventListener("touchstart", I), D.removeEventListener("touchmove", h), window.removeEventListener("touchcancel", w), window.removeEventListener("touchend", w);
|
|
976
984
|
}
|
|
977
|
-
return { init:
|
|
985
|
+
return { init: S, unMount: T };
|
|
978
986
|
}
|
|
979
987
|
const rn = Symbol(), cn = /* @__PURE__ */ q({
|
|
980
988
|
__name: "Dialog",
|
|
@@ -1005,7 +1013,7 @@ const rn = Symbol(), cn = /* @__PURE__ */ q({
|
|
|
1005
1013
|
ge(l.$slots, "default", {}, void 0, !0)
|
|
1006
1014
|
], 34)
|
|
1007
1015
|
], 2)), [
|
|
1008
|
-
[
|
|
1016
|
+
[j(Ft), () => o()]
|
|
1009
1017
|
]) : fe("", !0)
|
|
1010
1018
|
]),
|
|
1011
1019
|
_: 3
|
|
@@ -1116,15 +1124,15 @@ const hn = /* @__PURE__ */ ne(gn, [["__scopeId", "data-v-92a1804d"]]), mn = "dat
|
|
|
1116
1124
|
He((o) => ({
|
|
1117
1125
|
b1cf73a8: e.delay
|
|
1118
1126
|
}));
|
|
1119
|
-
const n =
|
|
1127
|
+
const n = x(() => {
|
|
1120
1128
|
const o = {};
|
|
1121
1129
|
return t.size === "mini" ? (o.width = "22px", o.height = "22px") : t.size === "large" && (o.width = "28px", o.height = "28px"), o;
|
|
1122
1130
|
});
|
|
1123
1131
|
return (o, l) => (H(), P("div", yn, [
|
|
1124
1132
|
R("img", {
|
|
1125
1133
|
class: "loading-circle",
|
|
1126
|
-
src:
|
|
1127
|
-
style:
|
|
1134
|
+
src: j(mn),
|
|
1135
|
+
style: G(j(n))
|
|
1128
1136
|
}, null, 12, pn)
|
|
1129
1137
|
]));
|
|
1130
1138
|
}
|
|
@@ -1152,10 +1160,10 @@ const Tn = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTJweCIgaGVpZ2h0PSIxMnB4Ii
|
|
|
1152
1160
|
},
|
|
1153
1161
|
emits: ["close"],
|
|
1154
1162
|
setup(e, { emit: t }) {
|
|
1155
|
-
const n = e, o = "lzc-loading-toast", l =
|
|
1163
|
+
const n = e, o = "lzc-loading-toast", l = x(() => {
|
|
1156
1164
|
let r = {};
|
|
1157
1165
|
return n.captureEventP && (r.pointerEvents = "none"), r;
|
|
1158
|
-
}), s =
|
|
1166
|
+
}), s = x(() => {
|
|
1159
1167
|
let r = {
|
|
1160
1168
|
padding: "12px"
|
|
1161
1169
|
};
|
|
@@ -1163,7 +1171,7 @@ const Tn = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTJweCIgaGVpZ2h0PSIxMnB4Ii
|
|
|
1163
1171
|
...r,
|
|
1164
1172
|
...n.overlayContentStyle
|
|
1165
1173
|
}), r;
|
|
1166
|
-
}), a =
|
|
1174
|
+
}), a = x(() => {
|
|
1167
1175
|
let r = {};
|
|
1168
1176
|
return n.showClose && !n.icon && (r.paddingRight = "16px"), r;
|
|
1169
1177
|
});
|
|
@@ -1180,7 +1188,7 @@ const Tn = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTJweCIgaGVpZ2h0PSIxMnB4Ii
|
|
|
1180
1188
|
default: Re(() => [
|
|
1181
1189
|
R("div", {
|
|
1182
1190
|
id: o,
|
|
1183
|
-
style:
|
|
1191
|
+
style: G(j(l))
|
|
1184
1192
|
}, [
|
|
1185
1193
|
re(R("div", {
|
|
1186
1194
|
class: se(`${o} ${e.className}`),
|
|
@@ -1192,23 +1200,23 @@ const Tn = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTJweCIgaGVpZ2h0PSIxMnB4Ii
|
|
|
1192
1200
|
}, [
|
|
1193
1201
|
R("div", {
|
|
1194
1202
|
class: se(`${o}-content`),
|
|
1195
|
-
style:
|
|
1203
|
+
style: G(j(s))
|
|
1196
1204
|
}, [
|
|
1197
1205
|
e.showClose ? (H(), P("img", {
|
|
1198
1206
|
key: 0,
|
|
1199
1207
|
onClick: v[0] || (v[0] = ye((c) => t("close"), ["stop"])),
|
|
1200
|
-
src:
|
|
1208
|
+
src: j(Tn),
|
|
1201
1209
|
class: se(`${o}-close`)
|
|
1202
1210
|
}, null, 10, In)) : fe("", !0),
|
|
1203
1211
|
e.showIcon ? (H(), P("img", {
|
|
1204
1212
|
key: 1,
|
|
1205
|
-
src: e.icon ||
|
|
1213
|
+
src: e.icon || j(Nn),
|
|
1206
1214
|
class: se(`${o}-icon`)
|
|
1207
1215
|
}, null, 10, An)) : fe("", !0),
|
|
1208
1216
|
e.message ? (H(), P("div", {
|
|
1209
1217
|
key: 2,
|
|
1210
1218
|
class: se(`${o}-message`),
|
|
1211
|
-
style:
|
|
1219
|
+
style: G(j(a))
|
|
1212
1220
|
}, $e(e.message), 7)) : fe("", !0)
|
|
1213
1221
|
], 6)
|
|
1214
1222
|
], 10, En)
|
|
@@ -1347,10 +1355,10 @@ function On(e) {
|
|
|
1347
1355
|
function bn(e, t) {
|
|
1348
1356
|
const n = m(!1);
|
|
1349
1357
|
function o() {
|
|
1350
|
-
n.value || (n.value = !0,
|
|
1358
|
+
n.value || (n.value = !0, j(e)?.addEventListener("transitionend", l));
|
|
1351
1359
|
}
|
|
1352
1360
|
function l() {
|
|
1353
|
-
|
|
1361
|
+
j(e)?.removeEventListener("transitionend", l), n.value = !1, t.onComplate?.();
|
|
1354
1362
|
}
|
|
1355
1363
|
return { transitioning: n, startTransition: o };
|
|
1356
1364
|
}
|
|
@@ -1397,7 +1405,7 @@ function It(e) {
|
|
|
1397
1405
|
lastCenter: { x: 0, y: 0 }
|
|
1398
1406
|
}), r = m({}), v = Cn(), c = bn(s, {
|
|
1399
1407
|
onComplate() {
|
|
1400
|
-
u.preview ||
|
|
1408
|
+
u.preview || p();
|
|
1401
1409
|
}
|
|
1402
1410
|
}), M = On({
|
|
1403
1411
|
onTap() {
|
|
@@ -1410,114 +1418,114 @@ function It(e) {
|
|
|
1410
1418
|
e.onLongPress?.();
|
|
1411
1419
|
}
|
|
1412
1420
|
});
|
|
1413
|
-
We(s, (y) => d(y)),
|
|
1421
|
+
We(s, (y) => d(y)), K(
|
|
1414
1422
|
[l, s],
|
|
1415
|
-
([y,
|
|
1416
|
-
i(y,
|
|
1423
|
+
([y, z]) => {
|
|
1424
|
+
i(y, z);
|
|
1417
1425
|
},
|
|
1418
1426
|
{ immediate: !0 }
|
|
1419
1427
|
);
|
|
1420
1428
|
async function d(y) {
|
|
1421
|
-
const [
|
|
1422
|
-
|
|
1429
|
+
const [z] = y;
|
|
1430
|
+
z.contentRect.width == f.value.width && z.contentRect.height == f.value.height || (await i(l.value), await p(u.level, !0));
|
|
1423
1431
|
}
|
|
1424
|
-
async function i(y,
|
|
1425
|
-
await
|
|
1432
|
+
async function i(y, z) {
|
|
1433
|
+
await D(y, z), y && A();
|
|
1426
1434
|
}
|
|
1427
1435
|
async function g(y) {
|
|
1428
1436
|
if (!u.preview)
|
|
1429
1437
|
return;
|
|
1430
1438
|
u.preview = !1, y = y ?? u.level;
|
|
1431
|
-
const
|
|
1432
|
-
if (!
|
|
1439
|
+
const z = s.value;
|
|
1440
|
+
if (!z)
|
|
1433
1441
|
return;
|
|
1434
|
-
const { scrollTop: b, scrollLeft: B } =
|
|
1435
|
-
|
|
1442
|
+
const { scrollTop: b, scrollLeft: B } = z, { width: _, height: L } = a.value, { scaleW: C, scaleH: U } = S(y), { top: $, left: Q } = T(C, U), W = Q != 0 ? Q : B * -1, J = $ != 0 ? $ : b * -1;
|
|
1443
|
+
z.scrollTop = 0, z.scrollLeft = 0;
|
|
1436
1444
|
const { value: V } = r;
|
|
1437
|
-
V.width = `${_}px`, V.height = `${
|
|
1445
|
+
V.width = `${_}px`, V.height = `${L}px`, V.maxHeight = "none", V.transitionDuration = "0s", V.transform = be(W, J, y), r.value = V, await Me(), u.offsetX = W, u.offsetY = J, await ot(20);
|
|
1438
1446
|
}
|
|
1439
|
-
async function
|
|
1440
|
-
if (!
|
|
1447
|
+
async function p(y, z) {
|
|
1448
|
+
if (!z && u.preview)
|
|
1441
1449
|
return;
|
|
1442
1450
|
u.preview = !0, y = y ?? u.level;
|
|
1443
|
-
const { value: b } = r, { scaleW: B, scaleH: _ } =
|
|
1444
|
-
y === 1 && (b.maxHeight = "100%"), b.width = `${B}px`, b.height = `${_}px`, b.transitionDuration = "0s", b.transform = be(
|
|
1451
|
+
const { value: b } = r, { scaleW: B, scaleH: _ } = S(y), { left: L, top: C } = T(B, _);
|
|
1452
|
+
y === 1 && (b.maxHeight = "100%"), b.width = `${B}px`, b.height = `${_}px`, b.transitionDuration = "0s", b.transform = be(L, C, 1), r.value = b, await Me();
|
|
1445
1453
|
const U = s.value;
|
|
1446
1454
|
if (!U)
|
|
1447
1455
|
return;
|
|
1448
1456
|
const { offsetX: $, offsetY: Q } = u;
|
|
1449
1457
|
$ < 0 && (U.scrollLeft = Math.abs($)), Q < 0 && (U.scrollTop = Math.abs(Q));
|
|
1450
1458
|
}
|
|
1451
|
-
async function
|
|
1459
|
+
async function N(y, z, b) {
|
|
1452
1460
|
if (t.value || (y = ae(y), y = Oe(
|
|
1453
1461
|
y,
|
|
1454
1462
|
n.value - n.value * 0.5,
|
|
1455
1463
|
o.value + o.value * 0.5
|
|
1456
1464
|
), y == u.level))
|
|
1457
1465
|
return;
|
|
1458
|
-
u.preview && await g(),
|
|
1459
|
-
const { value: B } = r, { width: _, height:
|
|
1466
|
+
u.preview && await g(), z || (z = { x: v.startX.value, y: v.startY.value });
|
|
1467
|
+
const { value: B } = r, { width: _, height: L } = a.value, { scaleW: C, scaleH: U } = S(y), { top: $, left: Q } = T(C, U), W = y / u.level, J = {
|
|
1460
1468
|
left: Math.abs(_ * y - f.value.width) * -1,
|
|
1461
|
-
top: Math.abs(
|
|
1469
|
+
top: Math.abs(L * y - f.value.height) * -1,
|
|
1462
1470
|
right: Q,
|
|
1463
1471
|
bottom: $
|
|
1464
1472
|
};
|
|
1465
|
-
let V = Q != 0 ? Q : (u.offsetX -
|
|
1466
|
-
V = ae(Oe(V, J.left, J.right)), oe = ae(Oe(oe, J.top, J.bottom)), B.width = `${_}px`, B.height = `${
|
|
1473
|
+
let V = Q != 0 ? Q : (u.offsetX - z.x) * W + z.x, oe = $ != 0 ? $ : (u.offsetY - z.y) * W + z.y;
|
|
1474
|
+
V = ae(Oe(V, J.left, J.right)), oe = ae(Oe(oe, J.top, J.bottom)), B.width = `${_}px`, B.height = `${L}px`, B.transitionDuration = b ? kn(y) : "0s", B.transform = be(V, oe, y), u.offsetX = V, u.offsetY = oe, u.level = y, r.value = B, await Me(), b && c.startTransition(), e.onScale?.(y);
|
|
1467
1475
|
}
|
|
1468
1476
|
function E() {
|
|
1469
|
-
const y = u.level > 1 ? 1 :
|
|
1470
|
-
|
|
1477
|
+
const y = u.level > 1 ? 1 : w();
|
|
1478
|
+
N(y, void 0, !0);
|
|
1471
1479
|
}
|
|
1472
|
-
function
|
|
1480
|
+
function I(y, z) {
|
|
1473
1481
|
if (!u.preview)
|
|
1474
1482
|
return;
|
|
1475
1483
|
const b = s.value;
|
|
1476
1484
|
!b || b.scrollTo({
|
|
1477
1485
|
left: u.offsetX - y,
|
|
1478
|
-
top: u.offsetY -
|
|
1486
|
+
top: u.offsetY - z
|
|
1479
1487
|
});
|
|
1480
1488
|
}
|
|
1481
|
-
async function
|
|
1482
|
-
u.level >= n.value && u.level <= o.value ? u.zooming && await
|
|
1489
|
+
async function h() {
|
|
1490
|
+
u.level >= n.value && u.level <= o.value ? u.zooming && await p() : u.level < n.value ? await N(n.value, void 0, !0) : u.level > o.value && await N(o.value, u.lastCenter, !0), u.zooming = !1;
|
|
1483
1491
|
}
|
|
1484
|
-
function
|
|
1485
|
-
const { width: y, height:
|
|
1486
|
-
let
|
|
1487
|
-
return
|
|
1492
|
+
function w() {
|
|
1493
|
+
const { width: y, height: z } = a.value, { width: b, height: B } = f.value, _ = 2.5;
|
|
1494
|
+
let L;
|
|
1495
|
+
return z == B ? (L = b / y, L - 1 < 0.1 && (L = _)) : L = Math.max(_, b / y, B / z), L;
|
|
1488
1496
|
}
|
|
1489
|
-
function
|
|
1490
|
-
const { width:
|
|
1497
|
+
function S(y) {
|
|
1498
|
+
const { width: z, height: b } = a.value;
|
|
1491
1499
|
return {
|
|
1492
|
-
scaleW: ae(y *
|
|
1500
|
+
scaleW: ae(y * z),
|
|
1493
1501
|
scaleH: ae(y * b)
|
|
1494
1502
|
};
|
|
1495
1503
|
}
|
|
1496
|
-
function
|
|
1497
|
-
const { width: b, height: B } = f.value, _ = Math.max(0, (B -
|
|
1498
|
-
return { top: _, left:
|
|
1504
|
+
function T(y, z) {
|
|
1505
|
+
const { width: b, height: B } = f.value, _ = Math.max(0, (B - z) * 0.5), L = Math.max(0, (b - y) * 0.5);
|
|
1506
|
+
return { top: _, left: L };
|
|
1499
1507
|
}
|
|
1500
|
-
async function
|
|
1501
|
-
if (y = y ?? l.value,
|
|
1508
|
+
async function D(y, z) {
|
|
1509
|
+
if (y = y ?? l.value, z = z ?? s.value, !z)
|
|
1502
1510
|
return;
|
|
1503
1511
|
let b, { clientWidth: B = 0, clientHeight: _ = 0 } = y || {};
|
|
1504
|
-
const { clientWidth:
|
|
1512
|
+
const { clientWidth: L, clientHeight: C } = z;
|
|
1505
1513
|
if (y instanceof HTMLImageElement ? b = { width: y.naturalWidth, height: y.naturalHeight } : y instanceof HTMLVideoElement && (b = { width: y.videoWidth, height: y.videoHeight }), b) {
|
|
1506
1514
|
const U = _n(
|
|
1507
1515
|
b.width,
|
|
1508
1516
|
b.height,
|
|
1509
|
-
|
|
1510
|
-
|
|
1517
|
+
L,
|
|
1518
|
+
C
|
|
1511
1519
|
);
|
|
1512
1520
|
B = U.width, _ = U.height;
|
|
1513
1521
|
}
|
|
1514
|
-
(B === 0 || _ === 0) && (B = a.value.width ||
|
|
1515
|
-
width: Math.min(B,
|
|
1516
|
-
height: Math.min(_,
|
|
1517
|
-
}, f.value = { width:
|
|
1522
|
+
(B === 0 || _ === 0) && (B = a.value.width || L, _ = a.value.height || C), a.value = {
|
|
1523
|
+
width: Math.min(B, L),
|
|
1524
|
+
height: Math.min(_, C)
|
|
1525
|
+
}, f.value = { width: L, height: C }, p(void 0, !0);
|
|
1518
1526
|
}
|
|
1519
|
-
function
|
|
1520
|
-
const y =
|
|
1527
|
+
function A() {
|
|
1528
|
+
const y = w();
|
|
1521
1529
|
o.value = Math.max(o.value, y * 2);
|
|
1522
1530
|
}
|
|
1523
1531
|
function Y(y) {
|
|
@@ -1532,10 +1540,10 @@ function It(e) {
|
|
|
1532
1540
|
imageRef: l,
|
|
1533
1541
|
containerRef: s,
|
|
1534
1542
|
switchToZoom: g,
|
|
1535
|
-
switchToPreview:
|
|
1536
|
-
panTo:
|
|
1537
|
-
zoomTo:
|
|
1538
|
-
zoomFinished:
|
|
1543
|
+
switchToPreview: p,
|
|
1544
|
+
panTo: I,
|
|
1545
|
+
zoomTo: N,
|
|
1546
|
+
zoomFinished: h,
|
|
1539
1547
|
toggleZoom: E,
|
|
1540
1548
|
setDisableZoom: Y
|
|
1541
1549
|
};
|
|
@@ -1551,9 +1559,9 @@ function At(e, t) {
|
|
|
1551
1559
|
}
|
|
1552
1560
|
function c(M, d, i, g) {
|
|
1553
1561
|
a.measure();
|
|
1554
|
-
const { top:
|
|
1562
|
+
const { top: p, left: N, right: E, bottom: I } = a.arrivedState;
|
|
1555
1563
|
if (M == "start")
|
|
1556
|
-
u =
|
|
1564
|
+
u = p || N || E || I;
|
|
1557
1565
|
else if (f == 2)
|
|
1558
1566
|
u = !1;
|
|
1559
1567
|
else if (u) {
|
|
@@ -1561,12 +1569,12 @@ function At(e, t) {
|
|
|
1561
1569
|
if (n.level != 1)
|
|
1562
1570
|
u = !1;
|
|
1563
1571
|
else {
|
|
1564
|
-
const
|
|
1565
|
-
u =
|
|
1572
|
+
const h = o.startY.value < i;
|
|
1573
|
+
u = p && h || I && !h;
|
|
1566
1574
|
}
|
|
1567
1575
|
else if (o.direction.value == "horizontal") {
|
|
1568
|
-
const
|
|
1569
|
-
u =
|
|
1576
|
+
const h = o.startX.value < d;
|
|
1577
|
+
u = N && h || E && !h;
|
|
1570
1578
|
}
|
|
1571
1579
|
}
|
|
1572
1580
|
u && l.transitioning.value && (u = !1, g?.preventDefault()), M == "end" && !u && (d = o.startX.value, i = o.startY.value, u = !0), (M != "move" || u) && t?.(M, o.direction.value, d, i, g);
|
|
@@ -1581,51 +1589,51 @@ function Ro(e) {
|
|
|
1581
1589
|
...e
|
|
1582
1590
|
}), { state: n, touch: o, gesture: l, transition: s } = t;
|
|
1583
1591
|
let a = !1, f = null;
|
|
1584
|
-
const u = { top: 0, left: 0 }, r = je(
|
|
1585
|
-
we("keyup", E), we("keydown",
|
|
1586
|
-
function M(
|
|
1587
|
-
const
|
|
1588
|
-
if (!
|
|
1592
|
+
const u = { top: 0, left: 0 }, r = je(p, 150), { onSwipeEdge: v } = At(t, e.onSwipeEdge), c = m({ top: 0, left: 0 });
|
|
1593
|
+
we("keyup", E), we("keydown", N);
|
|
1594
|
+
function M(I) {
|
|
1595
|
+
const h = t.containerRef.value;
|
|
1596
|
+
if (!h)
|
|
1589
1597
|
return;
|
|
1590
|
-
const { left:
|
|
1591
|
-
c.value.left =
|
|
1592
|
-
let
|
|
1593
|
-
o.start(
|
|
1598
|
+
const { left: w, top: S } = h.getBoundingClientRect();
|
|
1599
|
+
c.value.left = w, c.value.top = S, l.startTap();
|
|
1600
|
+
let T = I.clientX - w, D = I.clientY - S;
|
|
1601
|
+
o.start(T, D), v("start", T, D, I), s.transitioning.value || (a = !0, u.left = w, u.top = S, n.offsetX = h.scrollLeft, n.offsetY = h.scrollTop), window.addEventListener("pointermove", d), window.addEventListener("pointerup", i);
|
|
1594
1602
|
}
|
|
1595
|
-
function d(
|
|
1603
|
+
function d(I) {
|
|
1596
1604
|
if (!a)
|
|
1597
1605
|
return;
|
|
1598
|
-
let
|
|
1599
|
-
o.move(
|
|
1606
|
+
let h = I.clientX, w = I.clientY;
|
|
1607
|
+
o.move(h, w), v(
|
|
1600
1608
|
"move",
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1609
|
+
h - c.value.left,
|
|
1610
|
+
w - c.value.top,
|
|
1611
|
+
I
|
|
1604
1612
|
), n.level !== 1 && t.panTo(
|
|
1605
1613
|
o.deltaX.value - u.left,
|
|
1606
1614
|
o.deltaY.value - u.top
|
|
1607
1615
|
);
|
|
1608
1616
|
}
|
|
1609
|
-
function i(
|
|
1610
|
-
v("end", o.offsetX.value, o.offsetY.value,
|
|
1617
|
+
function i(I) {
|
|
1618
|
+
v("end", o.offsetX.value, o.offsetY.value, I), l.checkTap(o.offsetX.value, o.offsetY.value), o.reset(), a = !1, window.removeEventListener("pointermove", d), window.removeEventListener("pointerup", i);
|
|
1611
1619
|
}
|
|
1612
|
-
function g(
|
|
1613
|
-
if (!
|
|
1620
|
+
function g(I) {
|
|
1621
|
+
if (!I.ctrlKey)
|
|
1614
1622
|
return;
|
|
1615
|
-
n.zooming || (n.zooming = !0, f == "Control" && window.addEventListener("keyup",
|
|
1616
|
-
let
|
|
1617
|
-
|
|
1618
|
-
const
|
|
1623
|
+
n.zooming || (n.zooming = !0, f == "Control" && window.addEventListener("keyup", p)), I.preventDefault();
|
|
1624
|
+
let h = -I.deltaY;
|
|
1625
|
+
I.deltaMode === 1 ? h *= 0.05 : h *= I.deltaMode ? 1 : 2e-3, f != "Control" && (h *= 10), h = 2 ** h;
|
|
1626
|
+
const w = n.level * h;
|
|
1619
1627
|
n.lastCenter = {
|
|
1620
|
-
x:
|
|
1621
|
-
y:
|
|
1622
|
-
}, t.zoomTo(
|
|
1628
|
+
x: I.clientX - c.value.left,
|
|
1629
|
+
y: I.clientY - c.value.top
|
|
1630
|
+
}, t.zoomTo(w, n.lastCenter), f != "Control" && r();
|
|
1623
1631
|
}
|
|
1624
|
-
function
|
|
1625
|
-
t.zoomFinished(), window.removeEventListener("keyup",
|
|
1632
|
+
function p() {
|
|
1633
|
+
t.zoomFinished(), window.removeEventListener("keyup", p);
|
|
1626
1634
|
}
|
|
1627
|
-
function
|
|
1628
|
-
f =
|
|
1635
|
+
function N(I) {
|
|
1636
|
+
f = I.key;
|
|
1629
1637
|
}
|
|
1630
1638
|
function E() {
|
|
1631
1639
|
f = null;
|
|
@@ -1646,16 +1654,16 @@ function Ho(e) {
|
|
|
1646
1654
|
async function v(d) {
|
|
1647
1655
|
const { touches: i } = d;
|
|
1648
1656
|
s(i.length), n.zooming = f(2), l.startTap();
|
|
1649
|
-
const { clientX: g, clientY:
|
|
1650
|
-
o.start(g,
|
|
1657
|
+
const { clientX: g, clientY: p } = i[0];
|
|
1658
|
+
o.start(g, p), a("start", g, p, d), n.zooming && (d.preventDefault(), u = n.level, r = ct(i), await t.switchToZoom(), n.lastCenter = Qn(i));
|
|
1651
1659
|
}
|
|
1652
1660
|
async function c(d) {
|
|
1653
1661
|
const { touches: i } = d;
|
|
1654
1662
|
s(i.length);
|
|
1655
|
-
const { clientX: g, clientY:
|
|
1656
|
-
if (o.move(g,
|
|
1663
|
+
const { clientX: g, clientY: p } = i[0];
|
|
1664
|
+
if (o.move(g, p), a("move", g, p, d), n.zooming && f(2)) {
|
|
1657
1665
|
d.preventDefault();
|
|
1658
|
-
const
|
|
1666
|
+
const N = ct(i), E = u * N / r;
|
|
1659
1667
|
t.zoomTo(E, n.lastCenter);
|
|
1660
1668
|
}
|
|
1661
1669
|
}
|
|
@@ -1733,7 +1741,7 @@ const Un = ["onClick"], Rn = /* @__PURE__ */ q({
|
|
|
1733
1741
|
buttonClickEvent: null
|
|
1734
1742
|
},
|
|
1735
1743
|
setup(e) {
|
|
1736
|
-
const t = e, n = m(), o = m(), l = m(), s =
|
|
1744
|
+
const t = e, n = m(), o = m(), l = m(), s = x(() => {
|
|
1737
1745
|
switch (t.position) {
|
|
1738
1746
|
case "top":
|
|
1739
1747
|
return 10;
|
|
@@ -1742,14 +1750,14 @@ const Un = ["onClick"], Rn = /* @__PURE__ */ q({
|
|
|
1742
1750
|
case "bottom":
|
|
1743
1751
|
return 85;
|
|
1744
1752
|
}
|
|
1745
|
-
}), a =
|
|
1753
|
+
}), a = x(() => ({
|
|
1746
1754
|
position: "absolute",
|
|
1747
1755
|
borderRadius: "10px",
|
|
1748
1756
|
backgroundColor: "rgba(0, 0, 0, 0.8)",
|
|
1749
1757
|
padding: "14px 19px",
|
|
1750
1758
|
top: `calc(${s.value}% - ${l.value}px)`,
|
|
1751
1759
|
left: `calc(50% - ${o.value}px)`
|
|
1752
|
-
})), f =
|
|
1760
|
+
})), f = x(() => ({
|
|
1753
1761
|
width: "fit-content",
|
|
1754
1762
|
display: "flex",
|
|
1755
1763
|
justifyContent: "center",
|
|
@@ -1768,10 +1776,10 @@ const Un = ["onClick"], Rn = /* @__PURE__ */ q({
|
|
|
1768
1776
|
ref_key: "toastWrapper",
|
|
1769
1777
|
ref: n,
|
|
1770
1778
|
class: "toastWrapper",
|
|
1771
|
-
style:
|
|
1779
|
+
style: G([j(a), { zIndex: 9999999 }])
|
|
1772
1780
|
}, [
|
|
1773
1781
|
R("div", {
|
|
1774
|
-
style:
|
|
1782
|
+
style: G(j(f))
|
|
1775
1783
|
}, [
|
|
1776
1784
|
R("span", null, $e(e.message), 1)
|
|
1777
1785
|
], 4)
|
|
@@ -1820,7 +1828,7 @@ const $n = ["xlink:href", "fill", "color"], Ee = /* @__PURE__ */ q({
|
|
|
1820
1828
|
height: null
|
|
1821
1829
|
},
|
|
1822
1830
|
setup(e) {
|
|
1823
|
-
const t = e, n =
|
|
1831
|
+
const t = e, n = x(() => `#${t.prefix}-${t.name}`), o = x(() => ({
|
|
1824
1832
|
width: `${t.width ?? t.height}px`,
|
|
1825
1833
|
height: `${t.height ?? t.width}px`,
|
|
1826
1834
|
aspectRatio: t.width && t.height ? void 0 : "1/1"
|
|
@@ -1831,10 +1839,10 @@ const $n = ["xlink:href", "fill", "color"], Ee = /* @__PURE__ */ q({
|
|
|
1831
1839
|
}
|
|
1832
1840
|
return (s, a) => (H(), P("svg", {
|
|
1833
1841
|
"aria-hidden": "",
|
|
1834
|
-
style:
|
|
1842
|
+
style: G({ ...j(o), ...l(s.$attrs) })
|
|
1835
1843
|
}, [
|
|
1836
1844
|
R("use", {
|
|
1837
|
-
"xlink:href":
|
|
1845
|
+
"xlink:href": j(n),
|
|
1838
1846
|
fill: e.color,
|
|
1839
1847
|
color: e.color
|
|
1840
1848
|
}, null, 8, $n)
|
|
@@ -1858,54 +1866,54 @@ function Pn(e) {
|
|
|
1858
1866
|
clientHeight: 0
|
|
1859
1867
|
}), g = m({
|
|
1860
1868
|
clientHeight: 0
|
|
1861
|
-
}),
|
|
1869
|
+
}), p = x(() => !!M.value), N = x(() => i.value.scrollHeight > i.value.clientHeight), E = x(() => o ? i.value.clientHeight - w.value : i.value.clientHeight - g.value.clientHeight), I = x(() => i.value.scrollHeight - i.value.clientHeight), h = x(() => !i.value.clientHeight && !i.value.scrollHeight ? 1 : Math.max(
|
|
1862
1870
|
i.value.clientHeight / i.value.scrollHeight,
|
|
1863
1871
|
0.05
|
|
1864
|
-
)),
|
|
1872
|
+
)), w = x(() => h.value > s ? 0 : h.value * i.value.clientHeight), S = x(() => ({
|
|
1865
1873
|
willChange: "transform",
|
|
1866
1874
|
transform: `translate3d(0,${d.value}px,0)`,
|
|
1867
|
-
height: o ? `${
|
|
1875
|
+
height: o ? `${w.value}px` : void 0
|
|
1868
1876
|
}));
|
|
1869
|
-
We(t, () =>
|
|
1870
|
-
function
|
|
1871
|
-
|
|
1877
|
+
We(t, () => C());
|
|
1878
|
+
function T(Q) {
|
|
1879
|
+
A(), M.value = Q.clientY - n.value.getBoundingClientRect().top || 1, v = getComputedStyle(t.value).scrollBehavior, v === "smooth" && (t.value.style.scrollBehavior = "unset");
|
|
1872
1880
|
}
|
|
1873
|
-
function
|
|
1881
|
+
function D() {
|
|
1874
1882
|
t.value.style.scrollBehavior = v, M.value = 0, u();
|
|
1875
1883
|
}
|
|
1876
|
-
function
|
|
1884
|
+
function A() {
|
|
1877
1885
|
f.value = !1;
|
|
1878
1886
|
}
|
|
1879
1887
|
function Y() {
|
|
1880
|
-
|
|
1888
|
+
p.value || (f.value = !0);
|
|
1881
1889
|
}
|
|
1882
1890
|
function y(Q) {
|
|
1883
|
-
if (!
|
|
1891
|
+
if (!p.value)
|
|
1884
1892
|
return;
|
|
1885
1893
|
let W = Q.clientY - i.value.top - M.value;
|
|
1886
1894
|
W < 0 ? d.value = 0 : W >= E.value ? d.value = E.value : d.value = W, t.value.scrollTo({
|
|
1887
|
-
top: d.value / E.value *
|
|
1895
|
+
top: d.value / E.value * I.value
|
|
1888
1896
|
});
|
|
1889
1897
|
}
|
|
1890
|
-
function
|
|
1891
|
-
|
|
1898
|
+
function z() {
|
|
1899
|
+
p.value || b();
|
|
1892
1900
|
}
|
|
1893
1901
|
function b() {
|
|
1894
1902
|
cancelAnimationFrame(r), r = requestAnimationFrame(B);
|
|
1895
1903
|
}
|
|
1896
1904
|
function B() {
|
|
1897
|
-
t.value && (c.value = l.scrollTop?.value ?? t.value.scrollTop, d.value = c.value /
|
|
1905
|
+
t.value && (c.value = l.scrollTop?.value ?? t.value.scrollTop, d.value = c.value / I.value * E.value);
|
|
1898
1906
|
}
|
|
1899
1907
|
function _(Q) {
|
|
1900
1908
|
let W = "addEventListener";
|
|
1901
|
-
Q === "add" ? W = "addEventListener" : W = "removeEventListener", n.value?.[W]("pointerdown",
|
|
1909
|
+
Q === "add" ? W = "addEventListener" : W = "removeEventListener", n.value?.[W]("pointerdown", T, {
|
|
1902
1910
|
passive: !0
|
|
1903
|
-
}), window[W]("pointermove", y, { passive: !0 }), window[W]("pointerup",
|
|
1911
|
+
}), window[W]("pointermove", y, { passive: !0 }), window[W]("pointerup", D, { passive: !0 });
|
|
1904
1912
|
}
|
|
1905
|
-
const
|
|
1906
|
-
(a == "classList" || Q.map((J) => J.oldValue).join().includes("height")) &&
|
|
1913
|
+
const L = new MutationObserver((Q) => {
|
|
1914
|
+
(a == "classList" || Q.map((J) => J.oldValue).join().includes("height")) && C();
|
|
1907
1915
|
});
|
|
1908
|
-
function
|
|
1916
|
+
function C() {
|
|
1909
1917
|
i.value.top = t.value?.getBoundingClientRect().top ?? 0;
|
|
1910
1918
|
const { scrollHeight: Q = 0, clientHeight: W = 0 } = t.value || {}, { scrollHeight: J, clientHeight: V } = i.value;
|
|
1911
1919
|
Q != J && (i.value.scrollHeight = Q, B()), W != V && (i.value.clientHeight = W, B());
|
|
@@ -1913,13 +1921,13 @@ function Pn(e) {
|
|
|
1913
1921
|
oe != g.value.clientHeight && (g.value.clientHeight = oe);
|
|
1914
1922
|
}
|
|
1915
1923
|
function U() {
|
|
1916
|
-
|
|
1924
|
+
A(), setTimeout(() => {
|
|
1917
1925
|
g.value.clientHeight = n.value?.clientHeight ?? 0, Y();
|
|
1918
1926
|
}, 150);
|
|
1919
1927
|
}
|
|
1920
1928
|
function $() {
|
|
1921
1929
|
if (t.value && n.value) {
|
|
1922
|
-
t.value.classList.add("hide-scrollbar"), t.value.addEventListener("scroll",
|
|
1930
|
+
t.value.classList.add("hide-scrollbar"), t.value.addEventListener("scroll", z, {
|
|
1923
1931
|
passive: !0
|
|
1924
1932
|
}), _("add");
|
|
1925
1933
|
const Q = {};
|
|
@@ -1927,25 +1935,25 @@ function Pn(e) {
|
|
|
1927
1935
|
subtree: !0,
|
|
1928
1936
|
attributeOldValue: !0,
|
|
1929
1937
|
attributeFilter: ["style"]
|
|
1930
|
-
}),
|
|
1931
|
-
|
|
1938
|
+
}), L.observe(t.value, Q), setTimeout(() => {
|
|
1939
|
+
C();
|
|
1932
1940
|
}, 100), U();
|
|
1933
1941
|
} else
|
|
1934
1942
|
console.error("useScrollBar:", "\u521D\u59CB\u5316\u5931\u8D25!", { containerEl: t, sliderEl: n });
|
|
1935
1943
|
}
|
|
1936
|
-
return
|
|
1937
|
-
|
|
1944
|
+
return K(c, () => {
|
|
1945
|
+
A(), u();
|
|
1938
1946
|
}), {
|
|
1939
1947
|
isScrollEnd: f,
|
|
1940
|
-
isDragSlider:
|
|
1948
|
+
isDragSlider: p,
|
|
1941
1949
|
offsetTop: d,
|
|
1942
1950
|
scrollTop: c,
|
|
1943
|
-
scrollable:
|
|
1944
|
-
sliderPos:
|
|
1951
|
+
scrollable: N,
|
|
1952
|
+
sliderPos: S,
|
|
1945
1953
|
sliderRollableHeight: E,
|
|
1946
1954
|
init: $,
|
|
1947
1955
|
modifySliderEventListener: _,
|
|
1948
|
-
heightRatio:
|
|
1956
|
+
heightRatio: h
|
|
1949
1957
|
};
|
|
1950
1958
|
}
|
|
1951
1959
|
const Fn = (e) => (Ae("data-v-7fd39e51"), e = e(), ze(), e), Wn = /* @__PURE__ */ Fn(() => /* @__PURE__ */ R("div", { class: "default-slider" }, null, -1)), Xn = /* @__PURE__ */ q({
|
|
@@ -1959,13 +1967,13 @@ const Fn = (e) => (Ae("data-v-7fd39e51"), e = e(), ze(), e), Wn = /* @__PURE__ *
|
|
|
1959
1967
|
maxHeightRatio: { default: 0.9 }
|
|
1960
1968
|
},
|
|
1961
1969
|
setup(e, { expose: t }) {
|
|
1962
|
-
const n = e, o = !!Rt().default, l = m(null), s =
|
|
1970
|
+
const n = e, o = !!Rt().default, l = m(null), s = x(() => n.containerEl), a = Pn({
|
|
1963
1971
|
containerEl: s,
|
|
1964
1972
|
sliderEl: l,
|
|
1965
1973
|
autoHeight: o ? n.autoHeight : !0,
|
|
1966
1974
|
performance: n.performance,
|
|
1967
1975
|
observeMethod: n.observeMethod
|
|
1968
|
-
}), { scrollable: f, isScrollEnd: u, sliderPos: r, heightRatio: v } = a, c = m(!1), M = n.autoHide ?
|
|
1976
|
+
}), { scrollable: f, isScrollEnd: u, sliderPos: r, heightRatio: v } = a, c = m(!1), M = n.autoHide ? x(() => n.maxHeightRatio < v.value ? !1 : c.value || !u.value) : x(() => n.maxHeightRatio < v.value ? !1 : f.value), { load: d } = Xe(
|
|
1969
1977
|
`.hide-scrollbar {
|
|
1970
1978
|
scrollbar-width: none;
|
|
1971
1979
|
-ms-overflow-style: none;
|
|
@@ -1988,7 +1996,7 @@ const Fn = (e) => (Ae("data-v-7fd39e51"), e = e(), ze(), e), Wn = /* @__PURE__ *
|
|
|
1988
1996
|
function g() {
|
|
1989
1997
|
c.value = !1;
|
|
1990
1998
|
}
|
|
1991
|
-
return t({ uScrollBarReturn: a }), (
|
|
1999
|
+
return t({ uScrollBarReturn: a }), (p, N) => (H(), Ie(Ue, null, {
|
|
1992
2000
|
default: Re(() => [
|
|
1993
2001
|
re(R("div", {
|
|
1994
2002
|
ref_key: "sliderRef",
|
|
@@ -1996,13 +2004,13 @@ const Fn = (e) => (Ae("data-v-7fd39e51"), e = e(), ze(), e), Wn = /* @__PURE__ *
|
|
|
1996
2004
|
class: "slider-wrapper",
|
|
1997
2005
|
onMouseenter: i,
|
|
1998
2006
|
onMouseleave: g,
|
|
1999
|
-
style:
|
|
2007
|
+
style: G(j(r))
|
|
2000
2008
|
}, [
|
|
2001
|
-
ge(
|
|
2009
|
+
ge(p.$slots, "default", {}, () => [
|
|
2002
2010
|
Wn
|
|
2003
2011
|
], !0)
|
|
2004
2012
|
], 36), [
|
|
2005
|
-
[Le,
|
|
2013
|
+
[Le, j(M)]
|
|
2006
2014
|
])
|
|
2007
2015
|
]),
|
|
2008
2016
|
_: 3
|
|
@@ -2024,81 +2032,81 @@ const Wo = /* @__PURE__ */ ne(Xn, [["__scopeId", "data-v-7fd39e51"]]), Zn = (e)
|
|
|
2024
2032
|
pullRefreshContainer: null
|
|
2025
2033
|
},
|
|
2026
2034
|
setup(e) {
|
|
2027
|
-
const t = e, n = 0.7, o = "#2EC1CC", l = m(-999), s = m(1), a = m(0), f = m(0.3), u = m(!1), r = m(0), v = m(0), c = m(0), M = m(0), d = m(0), i = m(), g =
|
|
2035
|
+
const t = e, n = 0.7, o = "#2EC1CC", l = m(-999), s = m(1), a = m(0), f = m(0.3), u = m(!1), r = m(0), v = m(0), c = m(0), M = m(0), d = m(0), i = m(), g = x(() => t.scrollTop), p = x(() => ({
|
|
2028
2036
|
transition: `${M.value}ms`,
|
|
2029
2037
|
transform: `translate3d(0,${l.value}px, 0) scale(${s.value})`
|
|
2030
|
-
})),
|
|
2038
|
+
})), N = x(() => ({
|
|
2031
2039
|
borderColor: o,
|
|
2032
2040
|
transition: M.value,
|
|
2033
2041
|
transform: `rotate(${100 + a.value}deg)`,
|
|
2034
2042
|
opacity: f.value
|
|
2035
2043
|
}));
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
}),
|
|
2044
|
+
K(d, (T) => {
|
|
2045
|
+
T === 0 && (l.value = -50, f.value = 0.3);
|
|
2046
|
+
}), K(v, (T) => {
|
|
2039
2047
|
if (d.value === 2)
|
|
2040
2048
|
return;
|
|
2041
|
-
const
|
|
2042
|
-
|
|
2049
|
+
const D = Math.pow(T, n);
|
|
2050
|
+
D === 0 && (l.value = -50), D <= 50 && D > 0 && (l.value = D - 45, a.value = Math.pow(D, 1.5), D > 15 ? u.value = !0 : u.value = !1), D > 50 && (l.value = 5, f.value = 1, d.value);
|
|
2043
2051
|
});
|
|
2044
|
-
const E = m(0),
|
|
2045
|
-
E.value =
|
|
2046
|
-
},
|
|
2047
|
-
const
|
|
2048
|
-
E.value =
|
|
2049
|
-
},
|
|
2052
|
+
const E = m(0), I = (T) => {
|
|
2053
|
+
E.value = T.touches[0].pageY;
|
|
2054
|
+
}, h = (T) => {
|
|
2055
|
+
const D = T.touches[0].pageY - E.value;
|
|
2056
|
+
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, S.value.style.transition = `${c.value}ms`, M.value = 0, v.value = T.touches[0].pageY - r.value, S.value.style.transform = `translate3d(0, ${Math.pow(v.value, n)}px, 0)`, D > 0 && T.preventDefault()));
|
|
2057
|
+
}, w = () => {
|
|
2050
2058
|
if (t.refreshOff || !t?.refresh || d.value === 2)
|
|
2051
2059
|
return;
|
|
2052
2060
|
r.value = 0, c.value = 300;
|
|
2053
|
-
const
|
|
2054
|
-
|
|
2061
|
+
const T = Math.pow(v.value, n);
|
|
2062
|
+
S.value.style.transition = `${c.value}ms`, T > 50 ? (d.value = 2, v.value = Math.pow(50, 1 / n), S.value.style.transform = `translate3d(0, ${Math.pow(v.value, n)}px, 0)`, M.value = 300, t?.refresh && t?.refresh().then(() => {
|
|
2055
2063
|
i.value = "\u5237\u65B0\u6210\u529F";
|
|
2056
2064
|
}).catch(() => {
|
|
2057
2065
|
i.value = "\u5237\u65B0\u5931\u8D25";
|
|
2058
2066
|
}).finally(() => {
|
|
2059
2067
|
setTimeout(() => {
|
|
2060
|
-
d.value = 0, v.value = 0,
|
|
2068
|
+
d.value = 0, v.value = 0, S.value.style.transform = `translate3d(0, ${Math.pow(
|
|
2061
2069
|
v.value,
|
|
2062
2070
|
n
|
|
2063
2071
|
)}px, 0)`, setTimeout(() => {
|
|
2064
2072
|
i.value = void 0;
|
|
2065
2073
|
}, M.value);
|
|
2066
2074
|
}, 600);
|
|
2067
|
-
})) : (v.value = 0,
|
|
2068
|
-
},
|
|
2075
|
+
})) : (v.value = 0, S.value.style.transform = `translate3d(0, ${Math.pow(v.value, n)}px, 0)`);
|
|
2076
|
+
}, S = m(null);
|
|
2069
2077
|
return ce(() => {
|
|
2070
|
-
t?.refreshOff || (
|
|
2078
|
+
t?.refreshOff || (S.value = document.querySelector(
|
|
2071
2079
|
t.pullRefreshContainer
|
|
2072
|
-
),
|
|
2073
|
-
}), (
|
|
2080
|
+
), S.value?.addEventListener("touchstart", I), S.value?.addEventListener("touchmove", h), S.value?.addEventListener("touchend", w));
|
|
2081
|
+
}), (T, D) => (H(), P("div", Vn, [
|
|
2074
2082
|
R("div", {
|
|
2075
2083
|
class: "pull-refresh-box",
|
|
2076
|
-
style:
|
|
2084
|
+
style: G(j(p))
|
|
2077
2085
|
}, [
|
|
2078
2086
|
i.value ? (H(), P("div", no, $e(i.value), 1)) : (H(), P("div", Kn, [
|
|
2079
2087
|
d.value == 2 ? (H(), P("div", Gn, [
|
|
2080
2088
|
R("div", qn, [
|
|
2081
2089
|
R("div", {
|
|
2082
2090
|
class: "left-circle",
|
|
2083
|
-
style:
|
|
2091
|
+
style: G({ backgroundColor: o })
|
|
2084
2092
|
}, null, 4)
|
|
2085
2093
|
]),
|
|
2086
2094
|
R("div", Jn, [
|
|
2087
2095
|
R("div", {
|
|
2088
2096
|
class: "right-circle",
|
|
2089
|
-
style:
|
|
2097
|
+
style: G({ backgroundColor: o })
|
|
2090
2098
|
}, null, 4)
|
|
2091
2099
|
]),
|
|
2092
2100
|
eo
|
|
2093
2101
|
])) : (H(), P("div", {
|
|
2094
2102
|
key: 1,
|
|
2095
2103
|
class: "pull-circle-line",
|
|
2096
|
-
style:
|
|
2104
|
+
style: G(j(N))
|
|
2097
2105
|
}, [
|
|
2098
2106
|
R("div", to, [
|
|
2099
2107
|
R("div", {
|
|
2100
2108
|
class: se(["arrows", { opacity: u.value }]),
|
|
2101
|
-
style:
|
|
2109
|
+
style: G({ borderBottomColor: o })
|
|
2102
2110
|
}, null, 6)
|
|
2103
2111
|
])
|
|
2104
2112
|
], 4))
|
|
@@ -2147,7 +2155,7 @@ const lo = /* @__PURE__ */ ne(oo, [["__scopeId", "data-v-df5da876"]]), so = ["da
|
|
|
2147
2155
|
he(lo, {
|
|
2148
2156
|
refresh: e.refresh,
|
|
2149
2157
|
refreshOff: e.refreshOff,
|
|
2150
|
-
scrollTop:
|
|
2158
|
+
scrollTop: j(v),
|
|
2151
2159
|
pullRefreshContainer: "#" + c
|
|
2152
2160
|
}, null, 8, ["refresh", "refreshOff", "scrollTop", "pullRefreshContainer"]),
|
|
2153
2161
|
R("div", {
|
|
@@ -2155,23 +2163,23 @@ const lo = /* @__PURE__ */ ne(oo, [["__scopeId", "data-v-df5da876"]]), so = ["da
|
|
|
2155
2163
|
id: c
|
|
2156
2164
|
}, [
|
|
2157
2165
|
R("div", me({
|
|
2158
|
-
onScrollPassive: i[0] || (i[0] = (...g) =>
|
|
2159
|
-
ref:
|
|
2166
|
+
onScrollPassive: i[0] || (i[0] = (...g) => j(a).onScroll && j(a).onScroll(...g)),
|
|
2167
|
+
ref: j(a).ref,
|
|
2160
2168
|
class: "virtualList"
|
|
2161
2169
|
}, d.$attrs), [
|
|
2162
|
-
R("div", _e(ke(
|
|
2163
|
-
R("div", _e(ke(
|
|
2164
|
-
(H(!0), P(Qe, null, $t(
|
|
2165
|
-
key: M(g,
|
|
2166
|
-
"data-key": M(g,
|
|
2167
|
-
style:
|
|
2168
|
-
height: `${
|
|
2170
|
+
R("div", _e(ke(j(f))), [
|
|
2171
|
+
R("div", _e(ke(j(u))), [
|
|
2172
|
+
(H(!0), P(Qe, null, $t(j(s), ({ data: g, index: p }) => (H(), P("div", {
|
|
2173
|
+
key: M(g, p),
|
|
2174
|
+
"data-key": M(g, p),
|
|
2175
|
+
style: G({
|
|
2176
|
+
height: `${j(r)(p).height}px`,
|
|
2169
2177
|
display: "flex"
|
|
2170
2178
|
})
|
|
2171
2179
|
}, [
|
|
2172
2180
|
ge(d.$slots, "default", {
|
|
2173
2181
|
data: g,
|
|
2174
|
-
index:
|
|
2182
|
+
index: p
|
|
2175
2183
|
}, void 0, !0)
|
|
2176
2184
|
], 12, so))), 128))
|
|
2177
2185
|
], 16)
|
|
@@ -2229,11 +2237,11 @@ const Zo = /* @__PURE__ */ ne(go, [["__scopeId", "data-v-33519afd"]]), ho = [
|
|
|
2229
2237
|
"image/pcx"
|
|
2230
2238
|
];
|
|
2231
2239
|
function zt(e, t) {
|
|
2232
|
-
const n = m(e?.value), o =
|
|
2240
|
+
const n = m(e?.value), o = x(() => n.value?.startsWith("/_lzc")), l = m(!1), s = x(() => l.value), a = x(() => {
|
|
2233
2241
|
const u = t?.value;
|
|
2234
2242
|
return !u || u.startsWith("video/") ? !0 : u.startsWith("image/") ? o.value ? !0 : !ho.includes(u) : !1;
|
|
2235
2243
|
});
|
|
2236
|
-
e &&
|
|
2244
|
+
e && K(e, (u) => {
|
|
2237
2245
|
n.value = u, l.value = !1;
|
|
2238
2246
|
});
|
|
2239
2247
|
function f() {
|
|
@@ -2273,67 +2281,67 @@ const mo = ["title"], yo = { class: "tip" }, po = /* @__PURE__ */ Pt("\u5F53\u52
|
|
|
2273
2281
|
const n = e, o = m(), l = m(), s = m(!1), a = m(!1), f = m(!1), { src: u, mime: r } = yt(n), { imgSrc: v, isSupport: c, hasError: M, handleError: d } = zt(u, r), { vImageCancel: i } = Lt(), { LoadingComp: g } = Et({
|
|
2274
2282
|
component: hn,
|
|
2275
2283
|
delay: 300
|
|
2276
|
-
}),
|
|
2277
|
-
function
|
|
2284
|
+
}), p = Wt(() => f.value && n.autoRemoveThumbnail ? !1 : n.thumbnail && !f.value);
|
|
2285
|
+
function N() {
|
|
2278
2286
|
a.value = !0;
|
|
2279
2287
|
}
|
|
2280
2288
|
function E() {
|
|
2281
2289
|
a.value && (f.value = !0);
|
|
2282
2290
|
}
|
|
2283
|
-
async function
|
|
2284
|
-
|
|
2291
|
+
async function I() {
|
|
2292
|
+
N(), p.value ? (o.value?.addEventListener("animationend", h), o.value?.classList.add("showing"), await ot(10)) : o.value && t("load", o.value), o.value?.classList.remove("src-class");
|
|
2285
2293
|
}
|
|
2286
|
-
function
|
|
2287
|
-
o.value?.removeEventListener("animationend",
|
|
2294
|
+
function h() {
|
|
2295
|
+
o.value?.removeEventListener("animationend", h), o.value?.classList.remove("showing"), o.value && t("load", o.value), E();
|
|
2288
2296
|
}
|
|
2289
|
-
async function
|
|
2290
|
-
|
|
2297
|
+
async function w(D) {
|
|
2298
|
+
D ? I() : l.value && t("load", l.value), s.value = !0;
|
|
2291
2299
|
}
|
|
2292
|
-
function
|
|
2293
|
-
|
|
2300
|
+
function S(D) {
|
|
2301
|
+
D ? (d(), t("loadError")) : N(), s.value = !0;
|
|
2294
2302
|
}
|
|
2295
|
-
function
|
|
2303
|
+
function T() {
|
|
2296
2304
|
t("noSupport");
|
|
2297
2305
|
}
|
|
2298
|
-
return (
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
title:
|
|
2306
|
+
return (D, A) => (H(), P(Qe, null, [
|
|
2307
|
+
j(c) && !s.value ? (H(), Ie(j(g), { key: 0 })) : fe("", !0),
|
|
2308
|
+
j(c) ? j(M) ? (H(), P("div", me({ key: 3 }, D.$attrs, {
|
|
2309
|
+
title: j(v),
|
|
2302
2310
|
class: "tip-wrap"
|
|
2303
2311
|
}), [
|
|
2304
2312
|
he(Ee, {
|
|
2305
2313
|
class: "bad-image",
|
|
2306
2314
|
name: e.badImageIconName
|
|
2307
2315
|
}, null, 8, ["name"])
|
|
2308
|
-
], 16, wo)) : ge(
|
|
2316
|
+
], 16, wo)) : ge(D.$slots, "default", {
|
|
2309
2317
|
key: 2,
|
|
2310
|
-
src:
|
|
2311
|
-
onLoad:
|
|
2312
|
-
onError:
|
|
2313
|
-
vImageCancel:
|
|
2318
|
+
src: j(v),
|
|
2319
|
+
onLoad: w,
|
|
2320
|
+
onError: S,
|
|
2321
|
+
vImageCancel: j(i)
|
|
2314
2322
|
}, () => [
|
|
2315
|
-
|
|
2323
|
+
j(p) ? re((H(), P("img", me({ key: 0 }, D.$attrs, {
|
|
2316
2324
|
ref_key: "thumbnailRef",
|
|
2317
2325
|
ref: l,
|
|
2318
|
-
onLoad:
|
|
2319
|
-
onError:
|
|
2326
|
+
onLoad: A[0] || (A[0] = (Y) => w()),
|
|
2327
|
+
onError: A[1] || (A[1] = (Y) => S()),
|
|
2320
2328
|
src: e.thumbnail
|
|
2321
2329
|
}), null, 16, To)), [
|
|
2322
|
-
[
|
|
2330
|
+
[j(i)]
|
|
2323
2331
|
]) : fe("", !0),
|
|
2324
|
-
e.isShowSrc || a.value ? re((H(), P("img", me({ key: 1 },
|
|
2332
|
+
e.isShowSrc || a.value ? re((H(), P("img", me({ key: 1 }, D.$attrs, {
|
|
2325
2333
|
ref_key: "srcRef",
|
|
2326
2334
|
ref: o,
|
|
2327
2335
|
class: "src-class",
|
|
2328
|
-
onLoad:
|
|
2329
|
-
onError:
|
|
2330
|
-
src:
|
|
2336
|
+
onLoad: A[2] || (A[2] = (Y) => w(!0)),
|
|
2337
|
+
onError: A[3] || (A[3] = (Y) => S(!0)),
|
|
2338
|
+
src: j(v)
|
|
2331
2339
|
}), null, 16, No)), [
|
|
2332
|
-
[
|
|
2340
|
+
[j(i)],
|
|
2333
2341
|
[Le, a.value]
|
|
2334
2342
|
]) : fe("", !0)
|
|
2335
|
-
], !0) : (H(), P("div", me({ key: 1 },
|
|
2336
|
-
title:
|
|
2343
|
+
], !0) : (H(), P("div", me({ key: 1 }, D.$attrs, {
|
|
2344
|
+
title: j(v),
|
|
2337
2345
|
class: "tip-wrap"
|
|
2338
2346
|
}), [
|
|
2339
2347
|
he(Ee, {
|
|
@@ -2341,7 +2349,7 @@ const mo = ["title"], yo = { class: "tip" }, po = /* @__PURE__ */ Pt("\u5F53\u52
|
|
|
2341
2349
|
name: e.noSupportIconName
|
|
2342
2350
|
}, null, 8, ["name"]),
|
|
2343
2351
|
re((H(), P("span", yo, Do)), [
|
|
2344
|
-
[
|
|
2352
|
+
[j(pt), T]
|
|
2345
2353
|
])
|
|
2346
2354
|
], 16, mo))
|
|
2347
2355
|
], 64));
|
|
@@ -2359,9 +2367,9 @@ const Vo = /* @__PURE__ */ ne(Io, [["__scopeId", "data-v-bfec1a6b"]]), Ao = ["ti
|
|
|
2359
2367
|
function c() {
|
|
2360
2368
|
t("noSupport");
|
|
2361
2369
|
}
|
|
2362
|
-
return (M, d) =>
|
|
2370
|
+
return (M, d) => j(u) ? j(f) ? ge(M.$slots, "imageError", { key: 2 }, () => [
|
|
2363
2371
|
R("div", {
|
|
2364
|
-
title:
|
|
2372
|
+
title: j(a),
|
|
2365
2373
|
class: "icon-wrap"
|
|
2366
2374
|
}, [
|
|
2367
2375
|
he(Ee, {
|
|
@@ -2373,21 +2381,21 @@ const Vo = /* @__PURE__ */ ne(Io, [["__scopeId", "data-v-bfec1a6b"]]), Ao = ["ti
|
|
|
2373
2381
|
key: 1,
|
|
2374
2382
|
fetchpriority: "high",
|
|
2375
2383
|
onLoad: d[0] || (d[0] = (i) => o.value = !0),
|
|
2376
|
-
onError: d[1] || (d[1] = (...i) =>
|
|
2377
|
-
src:
|
|
2384
|
+
onError: d[1] || (d[1] = (...i) => j(r) && j(r)(...i)),
|
|
2385
|
+
src: j(a)
|
|
2378
2386
|
}, null, 40, zo)), [
|
|
2379
|
-
[
|
|
2387
|
+
[j(v)],
|
|
2380
2388
|
[Le, o.value]
|
|
2381
2389
|
]) : ge(M.$slots, "noSupport", { key: 0 }, () => [
|
|
2382
2390
|
R("div", {
|
|
2383
|
-
title:
|
|
2391
|
+
title: j(a),
|
|
2384
2392
|
class: "icon-wrap"
|
|
2385
2393
|
}, [
|
|
2386
2394
|
re(he(Ee, {
|
|
2387
2395
|
class: "icon",
|
|
2388
2396
|
name: "\u672A\u77E5\u7C7B\u578B"
|
|
2389
2397
|
}, null, 512), [
|
|
2390
|
-
[
|
|
2398
|
+
[j(pt), c]
|
|
2391
2399
|
])
|
|
2392
2400
|
], 8, Ao)
|
|
2393
2401
|
], !0);
|
|
@@ -2440,3 +2448,4 @@ export {
|
|
|
2440
2448
|
pt as vEnter,
|
|
2441
2449
|
Ft as vSingleClick
|
|
2442
2450
|
};
|
|
2451
|
+
//# sourceMappingURL=index.es.js.map
|