@lazycatcloud/lzc-toolkit 0.0.207 → 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 +632 -621
- package/dist/index.es.js.map +1 -0
- package/dist/index.umd.js +5 -4
- package/dist/index.umd.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/types/image/Thumbnail.vue.d.ts +68 -7
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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 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;
|
|
@@ -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,
|
|
@@ -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;
|
|
@@ -59,10 +59,10 @@ 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
|
-
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
|
};
|
|
@@ -131,14 +131,14 @@ function ie(e) {
|
|
|
131
131
|
return (t = n?.$el) != null ? t : n;
|
|
132
132
|
}
|
|
133
133
|
const xe = Dt ? window : void 0, Jt = Dt ? window.document : void 0;
|
|
134
|
-
function
|
|
134
|
+
function we(...e) {
|
|
135
135
|
let t, n, o, l;
|
|
136
136
|
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, o, l] = e, t = xe) : [t, n, o, l] = e, !t)
|
|
137
137
|
return de;
|
|
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,94 +254,94 @@ 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,
|
|
290
290
|
bottom: !1
|
|
291
|
-
}), E =
|
|
291
|
+
}), E = pe({
|
|
292
292
|
left: !1,
|
|
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
|
|
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
|
-
return
|
|
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,139 +386,139 @@ 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
|
|
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
|
+
})), _ = {
|
|
489
489
|
overflowY: "auto"
|
|
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
|
-
style:
|
|
506
|
+
style: _
|
|
507
507
|
},
|
|
508
|
-
wrapperProps:
|
|
508
|
+
wrapperProps: b,
|
|
509
509
|
innerProps: B
|
|
510
510
|
};
|
|
511
511
|
}
|
|
512
|
-
const Nt = Symbol(), Ze = Symbol(), Ve = Symbol(), Ke = Symbol(), Ge = Symbol(), qe = Symbol(), Je = Symbol(), et = Symbol(), tt = Symbol(),
|
|
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:
|
|
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(
|
|
517
|
+
boolFn: (p) => !1,
|
|
518
|
+
boolRef: x(() => !1),
|
|
519
|
+
numberRef: x(() => 0),
|
|
520
|
+
arrayRef: x(() => [])
|
|
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,
|
|
524
524
|
selected: a,
|
|
@@ -534,118 +534,126 @@ function So() {
|
|
|
534
534
|
};
|
|
535
535
|
}
|
|
536
536
|
function Oo(e, t, n = { deep: !0, useAllFlagOptimizatiofn: !0 }) {
|
|
537
|
-
const o = m(!1), l = m(/* @__PURE__ */ new Set()), s =
|
|
538
|
-
|
|
537
|
+
const o = m(!1), l = m(/* @__PURE__ */ new Set()), s = pe(/* @__PURE__ */ new Map());
|
|
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
|
-
function
|
|
636
|
-
const t = m(!1), n = m(/* @__PURE__ */ new Set()), o =
|
|
643
|
+
function bo(e) {
|
|
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
|
});
|
|
@@ -686,7 +694,7 @@ function _o(e) {
|
|
|
686
694
|
const { value: i } = s;
|
|
687
695
|
i ? f() : a();
|
|
688
696
|
}
|
|
689
|
-
return F(Ze, d), F(Ve, M), F(Ke, v), F(Ge, o), F(qe, u), F(Je, a), F(et, r), F(tt, s), F(
|
|
697
|
+
return F(Ze, d), F(Ve, M), F(Ke, v), F(Ge, o), F(qe, u), F(Je, a), F(et, r), F(tt, s), F(Te, f), F(Te, f), F(nt, l), {
|
|
690
698
|
selected: o,
|
|
691
699
|
select: u,
|
|
692
700
|
selectAll: a,
|
|
@@ -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 =
|
|
737
|
-
let
|
|
738
|
-
function
|
|
739
|
-
if (cancelAnimationFrame(Y),
|
|
740
|
-
Math.min(
|
|
741
|
-
-
|
|
742
|
-
),
|
|
744
|
+
const y = T, z = D, b = A, B = (O) => O ** 1;
|
|
745
|
+
let _ = 0;
|
|
746
|
+
function L(O) {
|
|
747
|
+
if (cancelAnimationFrame(Y), _ = C(O), _ = Math.max(
|
|
748
|
+
Math.min(_, b),
|
|
749
|
+
-b
|
|
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
|
-
function
|
|
803
|
-
if (!
|
|
810
|
+
function Ne() {
|
|
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
|
-
|
|
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,
|
|
@@ -837,24 +845,24 @@ function wt({
|
|
|
837
845
|
dragMove: J,
|
|
838
846
|
dragEnd: V,
|
|
839
847
|
onScroll: oe,
|
|
840
|
-
isSingleClick:
|
|
848
|
+
isSingleClick: Ne,
|
|
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
|
}
|
|
850
|
-
function
|
|
858
|
+
function _o(e, t = !1) {
|
|
851
859
|
const n = wt(e), { selectRange: o } = n, {
|
|
852
860
|
onScroll: l,
|
|
853
861
|
dragStart: s,
|
|
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,34 +884,34 @@ function bo(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;
|
|
898
|
-
|
|
906
|
+
De(ue(c), n.containerEl.value), v(), n.containerEl.value?.addEventListener("scroll", l), n.containerEl.value?.addEventListener("mousedown", M);
|
|
899
907
|
} catch (E) {
|
|
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",
|
|
@@ -991,21 +999,21 @@ const rn = Symbol(), cn = /* @__PURE__ */ q({
|
|
|
991
999
|
const n = e, o = () => {
|
|
992
1000
|
n.onClickOverlay?.(), n.closeOnClickOverlay && t("update:visiable", !1);
|
|
993
1001
|
};
|
|
994
|
-
return F(rn, () => t("update:visiable", !1)), (l, s) => (
|
|
1002
|
+
return F(rn, () => t("update:visiable", !1)), (l, s) => (H(), Ie(Ue, { name: "modal" }, {
|
|
995
1003
|
default: Re(() => [
|
|
996
|
-
e.visiable ? re((
|
|
1004
|
+
e.visiable ? re((H(), P("div", {
|
|
997
1005
|
key: 0,
|
|
998
1006
|
class: se([e.hiddenOverlay ? "no-overlay-modal" : "lzc-modal", e.modalClass])
|
|
999
1007
|
}, [
|
|
1000
|
-
|
|
1001
|
-
onMousedown: s[0] || (s[0] =
|
|
1008
|
+
R("div", {
|
|
1009
|
+
onMousedown: s[0] || (s[0] = ye(() => {
|
|
1002
1010
|
}, ["stop"])),
|
|
1003
1011
|
class: se(["lzc-dialog", e.dialogClass])
|
|
1004
1012
|
}, [
|
|
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
|
|
@@ -1037,7 +1045,7 @@ function Qo(e) {
|
|
|
1037
1045
|
);
|
|
1038
1046
|
}
|
|
1039
1047
|
};
|
|
1040
|
-
return document.body.appendChild(l),
|
|
1048
|
+
return document.body.appendChild(l), De(ue(s), l), {
|
|
1041
1049
|
close: () => l?.remove()
|
|
1042
1050
|
};
|
|
1043
1051
|
}
|
|
@@ -1088,8 +1096,8 @@ function Yo({
|
|
|
1088
1096
|
}
|
|
1089
1097
|
return { LoadingComp: o, loading: l, load: s, unload: a };
|
|
1090
1098
|
}
|
|
1091
|
-
const dn = (e) => (Ae("data-v-92a1804d"), e = e(), ze(), e), vn = /* @__PURE__ */ dn(() => /* @__PURE__ */
|
|
1092
|
-
/* @__PURE__ */
|
|
1099
|
+
const dn = (e) => (Ae("data-v-92a1804d"), e = e(), ze(), e), vn = /* @__PURE__ */ dn(() => /* @__PURE__ */ R("div", { class: "ldio-mm5gwljcryb" }, [
|
|
1100
|
+
/* @__PURE__ */ R("div")
|
|
1093
1101
|
], -1)), Mn = [
|
|
1094
1102
|
vn
|
|
1095
1103
|
], gn = /* @__PURE__ */ q({
|
|
@@ -1102,7 +1110,7 @@ const dn = (e) => (Ae("data-v-92a1804d"), e = e(), ze(), e), vn = /* @__PURE__ *
|
|
|
1102
1110
|
return He((t) => ({
|
|
1103
1111
|
"4e4a9ce4": e.width + "px",
|
|
1104
1112
|
e56fe5c2: e.height + "px"
|
|
1105
|
-
})), (t, n) => (
|
|
1113
|
+
})), (t, n) => (H(), P("div", _e(ke(t.$attrs)), Mn, 16));
|
|
1106
1114
|
}
|
|
1107
1115
|
});
|
|
1108
1116
|
const hn = /* @__PURE__ */ ne(gn, [["__scopeId", "data-v-92a1804d"]]), mn = "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", yn = { class: "loading-wrap" }, pn = ["src"], Dn = /* @__PURE__ */ q({
|
|
@@ -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
|
-
return (o, l) => (
|
|
1124
|
-
|
|
1131
|
+
return (o, l) => (H(), P("div", yn, [
|
|
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
|
});
|
|
@@ -1173,42 +1181,42 @@ const Tn = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTJweCIgaGVpZ2h0PSIxMnB4Ii
|
|
|
1173
1181
|
function u() {
|
|
1174
1182
|
n.closeOnClick && t("close");
|
|
1175
1183
|
}
|
|
1176
|
-
return (r, v) => (
|
|
1184
|
+
return (r, v) => (H(), Ie(Ue, {
|
|
1177
1185
|
"enter-active-class": "lzc-animate-fade-in lzc-animate-duration-300",
|
|
1178
1186
|
"leave-active-class": "lzc-animate-fade-out lzc-animate-duration-300"
|
|
1179
1187
|
}, {
|
|
1180
1188
|
default: Re(() => [
|
|
1181
|
-
|
|
1189
|
+
R("div", {
|
|
1182
1190
|
id: o,
|
|
1183
|
-
style:
|
|
1191
|
+
style: G(j(l))
|
|
1184
1192
|
}, [
|
|
1185
|
-
re(
|
|
1193
|
+
re(R("div", {
|
|
1186
1194
|
class: se(`${o} ${e.className}`),
|
|
1187
|
-
onClick:
|
|
1195
|
+
onClick: ye(f, ["stop"])
|
|
1188
1196
|
}, [
|
|
1189
|
-
|
|
1197
|
+
R("div", {
|
|
1190
1198
|
class: se(`${o}-wrap`),
|
|
1191
|
-
onClick:
|
|
1199
|
+
onClick: ye(u, ["stop"])
|
|
1192
1200
|
}, [
|
|
1193
|
-
|
|
1201
|
+
R("div", {
|
|
1194
1202
|
class: se(`${o}-content`),
|
|
1195
|
-
style:
|
|
1203
|
+
style: G(j(s))
|
|
1196
1204
|
}, [
|
|
1197
|
-
e.showClose ? (
|
|
1205
|
+
e.showClose ? (H(), P("img", {
|
|
1198
1206
|
key: 0,
|
|
1199
|
-
onClick: v[0] || (v[0] =
|
|
1200
|
-
src:
|
|
1207
|
+
onClick: v[0] || (v[0] = ye((c) => t("close"), ["stop"])),
|
|
1208
|
+
src: j(Tn),
|
|
1201
1209
|
class: se(`${o}-close`)
|
|
1202
1210
|
}, null, 10, In)) : fe("", !0),
|
|
1203
|
-
e.showIcon ? (
|
|
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
|
-
e.message ? (
|
|
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)
|
|
@@ -1234,8 +1242,8 @@ class jn {
|
|
|
1234
1242
|
async show() {
|
|
1235
1243
|
const t = this.options, o = { ...t, onClose: () => {
|
|
1236
1244
|
this.close(), t?.onClose?.();
|
|
1237
|
-
} }, l =
|
|
1238
|
-
|
|
1245
|
+
} }, l = he(this.loadingToast, o);
|
|
1246
|
+
De(l, this.el), document.body.insertBefore(this.el, document.body.firstChild), this.visible.value = !0, t.duration !== 0 && setTimeout(() => {
|
|
1239
1247
|
this.destory();
|
|
1240
1248
|
}, t.duration), await ot(t.duration + this.animateDuration);
|
|
1241
1249
|
}
|
|
@@ -1344,17 +1352,17 @@ function On(e) {
|
|
|
1344
1352
|
}
|
|
1345
1353
|
return { startTap: l, checkTap: s };
|
|
1346
1354
|
}
|
|
1347
|
-
function
|
|
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
|
}
|
|
1357
|
-
function
|
|
1365
|
+
function _n(e, t, n, o) {
|
|
1358
1366
|
var l = Math.min(
|
|
1359
1367
|
n / e,
|
|
1360
1368
|
o / t
|
|
@@ -1373,7 +1381,7 @@ function Oe(e, t, n) {
|
|
|
1373
1381
|
function ae(e, t = 2) {
|
|
1374
1382
|
return parseFloat(e.toFixed(t));
|
|
1375
1383
|
}
|
|
1376
|
-
function
|
|
1384
|
+
function be(e, t, n) {
|
|
1377
1385
|
return e = ae(e), t = ae(t), `translate3d(${e}px, ${t}px, 0) scale3d(${n},${n},${n})`;
|
|
1378
1386
|
}
|
|
1379
1387
|
function ct(e) {
|
|
@@ -1388,16 +1396,16 @@ function Qn(e) {
|
|
|
1388
1396
|
};
|
|
1389
1397
|
}
|
|
1390
1398
|
function It(e) {
|
|
1391
|
-
const t = m(!1), n = m(1), o = m(9), l = m(), s = m(), a = m({ width: 0, height: 0 }), f = m({ width: 0, height: 0 }), u =
|
|
1399
|
+
const t = m(!1), n = m(1), o = m(9), l = m(), s = m(), a = m({ width: 0, height: 0 }), f = m({ width: 0, height: 0 }), u = pe({
|
|
1392
1400
|
level: 1,
|
|
1393
1401
|
offsetX: 0,
|
|
1394
1402
|
offsetY: 0,
|
|
1395
1403
|
zooming: !1,
|
|
1396
1404
|
preview: !0,
|
|
1397
1405
|
lastCenter: { x: 0, y: 0 }
|
|
1398
|
-
}), r = m({}), v = Cn(), c =
|
|
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:
|
|
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 = `${
|
|
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:
|
|
1444
|
-
y === 1 && (
|
|
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:
|
|
1460
|
-
left: Math.abs(
|
|
1461
|
-
top: Math.abs(
|
|
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 = {
|
|
1468
|
+
left: Math.abs(_ * y - f.value.width) * -1,
|
|
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 = `${
|
|
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
|
-
const
|
|
1476
|
-
!
|
|
1483
|
+
const b = s.value;
|
|
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 *
|
|
1493
|
-
scaleH: ae(y *
|
|
1500
|
+
scaleW: ae(y * z),
|
|
1501
|
+
scaleH: ae(y * b)
|
|
1494
1502
|
};
|
|
1495
1503
|
}
|
|
1496
|
-
function
|
|
1497
|
-
const { width:
|
|
1498
|
-
return { top:
|
|
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
|
-
let
|
|
1504
|
-
const { clientWidth:
|
|
1505
|
-
if (y instanceof HTMLImageElement ?
|
|
1506
|
-
const U =
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
+
let b, { clientWidth: B = 0, clientHeight: _ = 0 } = y || {};
|
|
1512
|
+
const { clientWidth: L, clientHeight: C } = z;
|
|
1513
|
+
if (y instanceof HTMLImageElement ? b = { width: y.naturalWidth, height: y.naturalHeight } : y instanceof HTMLVideoElement && (b = { width: y.videoWidth, height: y.videoHeight }), b) {
|
|
1514
|
+
const U = _n(
|
|
1515
|
+
b.width,
|
|
1516
|
+
b.height,
|
|
1517
|
+
L,
|
|
1518
|
+
C
|
|
1511
1519
|
);
|
|
1512
|
-
B = U.width,
|
|
1520
|
+
B = U.width, _ = U.height;
|
|
1513
1521
|
}
|
|
1514
|
-
(B === 0 ||
|
|
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
|
-
|
|
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
|
}
|
|
@@ -1668,7 +1676,7 @@ function Ho(e) {
|
|
|
1668
1676
|
return { core: t, onTouchStart: v, onTouchMove: c, onTouchEnd: M };
|
|
1669
1677
|
}
|
|
1670
1678
|
function $o() {
|
|
1671
|
-
const e =
|
|
1679
|
+
const e = pe({
|
|
1672
1680
|
scale: 1,
|
|
1673
1681
|
startX: 0,
|
|
1674
1682
|
startY: 0,
|
|
@@ -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",
|
|
@@ -1762,18 +1770,18 @@ const Un = ["onClick"], Rn = /* @__PURE__ */ q({
|
|
|
1762
1770
|
}
|
|
1763
1771
|
return Me(() => {
|
|
1764
1772
|
o.value = n.value.offsetWidth / 2, l.value = n.value.offsetHeight / 2;
|
|
1765
|
-
}), (r, v) => (
|
|
1766
|
-
onClick:
|
|
1773
|
+
}), (r, v) => (H(), P("div", {
|
|
1774
|
+
onClick: ye(u, ["stop"]),
|
|
1767
1775
|
id: "toastWrapper",
|
|
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
|
-
|
|
1774
|
-
style:
|
|
1781
|
+
R("div", {
|
|
1782
|
+
style: G(j(f))
|
|
1775
1783
|
}, [
|
|
1776
|
-
|
|
1784
|
+
R("span", null, $e(e.message), 1)
|
|
1777
1785
|
], 4)
|
|
1778
1786
|
], 12, Un));
|
|
1779
1787
|
}
|
|
@@ -1793,7 +1801,7 @@ class Fo {
|
|
|
1793
1801
|
}
|
|
1794
1802
|
present() {
|
|
1795
1803
|
const t = ue(ue(Hn), { ...ft, ...this.options });
|
|
1796
|
-
|
|
1804
|
+
De(t, this.container), document.body.insertBefore(this.container, document.body.firstChild);
|
|
1797
1805
|
const n = this.options.duration || ft.duration;
|
|
1798
1806
|
setTimeout(() => {
|
|
1799
1807
|
this.dismiss();
|
|
@@ -1805,12 +1813,12 @@ class Fo {
|
|
|
1805
1813
|
"#toastWrapper"
|
|
1806
1814
|
);
|
|
1807
1815
|
t.style.opacity = "0", t.style.transition = "opacity 0.4s ease-in", setTimeout(() => {
|
|
1808
|
-
this.container && (
|
|
1816
|
+
this.container && (De(null, this.container), document.body.removeChild(this.container));
|
|
1809
1817
|
}, 500);
|
|
1810
1818
|
}
|
|
1811
1819
|
}
|
|
1812
1820
|
}
|
|
1813
|
-
const $n = ["xlink:href", "fill", "color"],
|
|
1821
|
+
const $n = ["xlink:href", "fill", "color"], Ee = /* @__PURE__ */ q({
|
|
1814
1822
|
__name: "SvgIcon",
|
|
1815
1823
|
props: {
|
|
1816
1824
|
name: null,
|
|
@@ -1820,7 +1828,7 @@ const $n = ["xlink:href", "fill", "color"], we = /* @__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"
|
|
@@ -1829,12 +1837,12 @@ const $n = ["xlink:href", "fill", "color"], we = /* @__PURE__ */ q({
|
|
|
1829
1837
|
const { style: a } = s;
|
|
1830
1838
|
return typeof a == "object" ? a : {};
|
|
1831
1839
|
}
|
|
1832
|
-
return (s, a) => (
|
|
1840
|
+
return (s, a) => (H(), P("svg", {
|
|
1833
1841
|
"aria-hidden": "",
|
|
1834
|
-
style:
|
|
1842
|
+
style: G({ ...j(o), ...l(s.$attrs) })
|
|
1835
1843
|
}, [
|
|
1836
|
-
|
|
1837
|
-
"xlink:href":
|
|
1844
|
+
R("use", {
|
|
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
|
-
function
|
|
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
|
-
function
|
|
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,42 +1921,42 @@ 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 = {};
|
|
1926
1934
|
a === "classList" ? Object.assign(Q, { subtree: !0, childList: !0 }) : Object.assign(Q, {
|
|
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
|
-
modifySliderEventListener:
|
|
1948
|
-
heightRatio:
|
|
1955
|
+
modifySliderEventListener: _,
|
|
1956
|
+
heightRatio: h
|
|
1949
1957
|
};
|
|
1950
1958
|
}
|
|
1951
|
-
const Fn = (e) => (Ae("data-v-7fd39e51"), e = e(), ze(), e), Wn = /* @__PURE__ */ Fn(() => /* @__PURE__ */
|
|
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({
|
|
1952
1960
|
__name: "ScrollBar",
|
|
1953
1961
|
props: {
|
|
1954
1962
|
containerEl: null,
|
|
@@ -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,21 +1996,21 @@ 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
|
-
re(
|
|
2001
|
+
re(R("div", {
|
|
1994
2002
|
ref_key: "sliderRef",
|
|
1995
2003
|
ref: l,
|
|
1996
2004
|
class: "slider-wrapper",
|
|
1997
2005
|
onMouseenter: i,
|
|
1998
2006
|
onMouseleave: g,
|
|
1999
|
-
style:
|
|
2007
|
+
style: G(j(r))
|
|
2000
2008
|
}, [
|
|
2001
|
-
|
|
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
|
|
@@ -2015,7 +2023,7 @@ const Wo = /* @__PURE__ */ ne(Xn, [["__scopeId", "data-v-7fd39e51"]]), Zn = (e)
|
|
|
2015
2023
|
}, Gn = {
|
|
2016
2024
|
key: 0,
|
|
2017
2025
|
class: "box-load"
|
|
2018
|
-
}, qn = { class: "left-load" }, Jn = { class: "right-load" }, eo = /* @__PURE__ */ Zn(() => /* @__PURE__ */
|
|
2026
|
+
}, qn = { class: "left-load" }, Jn = { class: "right-load" }, eo = /* @__PURE__ */ Zn(() => /* @__PURE__ */ R("div", { class: "among-load" }, null, -1)), to = { class: "pull-arrow" }, no = { key: 1 }, oo = /* @__PURE__ */ q({
|
|
2019
2027
|
__name: "PullRefresh",
|
|
2020
2028
|
props: {
|
|
2021
2029
|
refresh: null,
|
|
@@ -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
|
-
}), (
|
|
2074
|
-
|
|
2080
|
+
), S.value?.addEventListener("touchstart", I), S.value?.addEventListener("touchmove", h), S.value?.addEventListener("touchend", w));
|
|
2081
|
+
}), (T, D) => (H(), P("div", Vn, [
|
|
2082
|
+
R("div", {
|
|
2075
2083
|
class: "pull-refresh-box",
|
|
2076
|
-
style:
|
|
2084
|
+
style: G(j(p))
|
|
2077
2085
|
}, [
|
|
2078
|
-
i.value ? (
|
|
2079
|
-
d.value == 2 ? (
|
|
2080
|
-
|
|
2081
|
-
|
|
2086
|
+
i.value ? (H(), P("div", no, $e(i.value), 1)) : (H(), P("div", Kn, [
|
|
2087
|
+
d.value == 2 ? (H(), P("div", Gn, [
|
|
2088
|
+
R("div", qn, [
|
|
2089
|
+
R("div", {
|
|
2082
2090
|
class: "left-circle",
|
|
2083
|
-
style:
|
|
2091
|
+
style: G({ backgroundColor: o })
|
|
2084
2092
|
}, null, 4)
|
|
2085
2093
|
]),
|
|
2086
|
-
|
|
2087
|
-
|
|
2094
|
+
R("div", Jn, [
|
|
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
|
-
|
|
2099
|
-
|
|
2106
|
+
R("div", to, [
|
|
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))
|
|
@@ -2143,35 +2151,35 @@ const lo = /* @__PURE__ */ ne(oo, [["__scopeId", "data-v-df5da876"]]), so = ["da
|
|
|
2143
2151
|
function M(d, i) {
|
|
2144
2152
|
return o.getItemKey ? o.getItemKey(d, i) : `${i}`;
|
|
2145
2153
|
}
|
|
2146
|
-
return (d, i) => (
|
|
2147
|
-
|
|
2154
|
+
return (d, i) => (H(), P(Qe, null, [
|
|
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", {
|
|
2154
2162
|
class: "virtualListWrapper",
|
|
2155
2163
|
id: c
|
|
2156
2164
|
}, [
|
|
2157
|
-
|
|
2158
|
-
onScrollPassive: i[0] || (i[0] = (...g) =>
|
|
2159
|
-
ref:
|
|
2165
|
+
R("div", me({
|
|
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
|
-
|
|
2163
|
-
|
|
2164
|
-
(
|
|
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)
|
|
@@ -2181,14 +2189,14 @@ const lo = /* @__PURE__ */ ne(oo, [["__scopeId", "data-v-df5da876"]]), so = ["da
|
|
|
2181
2189
|
], 64));
|
|
2182
2190
|
}
|
|
2183
2191
|
});
|
|
2184
|
-
const Xo = /* @__PURE__ */ ne(io, [["__scopeId", "data-v-dfe60586"]]), lt = (e) => (Ae("data-v-33519afd"), e = e(), ze(), e), uo = { style: { position: "absolute" } }, ro = /* @__PURE__ */ lt(() => /* @__PURE__ */
|
|
2192
|
+
const Xo = /* @__PURE__ */ ne(io, [["__scopeId", "data-v-dfe60586"]]), lt = (e) => (Ae("data-v-33519afd"), e = e(), ze(), e), uo = { style: { position: "absolute" } }, ro = /* @__PURE__ */ lt(() => /* @__PURE__ */ R("div", { class: "wrapper" }, null, -1)), co = ["width", "height"], fo = /* @__PURE__ */ lt(() => /* @__PURE__ */ R("title", null, "logo", -1)), vo = /* @__PURE__ */ lt(() => /* @__PURE__ */ R("g", {
|
|
2185
2193
|
id: "group-1",
|
|
2186
2194
|
stroke: "none",
|
|
2187
2195
|
"stroke-width": "1",
|
|
2188
2196
|
fill: "none",
|
|
2189
2197
|
"fill-rule": "evenodd"
|
|
2190
2198
|
}, [
|
|
2191
|
-
/* @__PURE__ */
|
|
2199
|
+
/* @__PURE__ */ R("path", {
|
|
2192
2200
|
d: "M260,0 L260,260 L0,260 L0,0 L260,0 Z M173.523673,59.478426 L168.543315,62.4752911 C160.9116,67.0675753 153.089651,71.6349169 145.95806,75.5800674 C142.130471,77.697465 141.695584,77.8197038 137.842227,77.8197038 L123.620155,77.8194132 C120.16747,77.8127705 119.807362,77.673506 116.200006,75.5626777 L115.86045,75.3641139 C113.295911,73.8653877 110.281688,72.1255413 103.60737,68.2932221 C100.032855,66.2486474 96.3694634,64.1645054 92.8123362,62.1486494 L88.1098826,59.4837265 L86.4238232,64.6191026 C83.7525911,72.7551036 81.4062856,80.7653112 79.9222326,87.4417622 C78.9474243,91.8460343 78.2380884,93.2327734 74.2195073,98.9752733 C73.3694777,100.207223 72.630007,101.343155 72.0710109,102.283257 C67.5201215,110.313953 65.2975905,119.339776 65.6004928,128.457001 C66.1750084,143.318086 73.5375842,157.955758 85.6992798,168.473706 C96.9509724,178.204645 111.5737,183.826593 127.858154,184.209647 L130.088901,184.229303 C130.3376,186.684365 130.531293,189.982467 130.67329,193.770543 L130.951876,201.202421 L137.351863,197.414204 C154.766094,187.106546 169.345402,176.172255 180.160428,163.526119 C190.679421,151.226139 196.179795,138.745301 195.345608,125.762609 C194.727393,116.39373 192.289395,107.848059 187.082918,99.046007 C186.275378,97.7498121 185.738167,97.0056347 184.495395,95.37077 C181.975467,92.0558065 181.159964,90.5424149 180.493634,87.4039653 C178.713605,78.9218624 176.863265,71.4211865 175.088993,65.0761883 L173.523673,59.478426 Z M93.177,72.537 L93.8226224,72.9040486 C95.6240552,73.9292933 97.4266638,74.9575498 99.2051531,75.9748184 C106.15023,79.9626119 109.111289,81.6727026 111.728598,83.2042091 C116.752992,86.1442112 118.538634,86.6733184 123.964152,86.6733184 L137.842227,86.6733184 C143.264867,86.6733184 145.156143,86.1417146 150.243765,83.3272749 L153.915953,81.276117 C157.635687,79.179445 161.486156,76.9543599 165.360239,74.6740288 L168.062636,73.0710869 L168.527808,74.8705095 C169.630114,79.2468106 170.742831,84.0476913 171.830914,89.2325336 C172.820403,93.8931438 174.207097,96.4665356 177.447051,100.728693 C178.530829,102.154402 178.952253,102.738183 179.517404,103.643654 C183.925243,111.098001 185.980436,118.301862 186.51071,126.337939 C187.173867,136.658947 182.587388,147.066077 173.431821,157.771787 L171.503004,159.959402 C163.609627,168.649028 153.591728,176.617571 141.90907,184.187495 L139.123121,185.960576 L139.113767,185.819152 C139.047016,184.932364 138.975009,184.102769 138.897435,183.336992 C138.769034,182.069465 138.589718,180.629122 138.367155,179.053334 L137.795381,175.005053 L133.714496,175.253822 C132.500079,175.327852 131.274186,175.368647 130.037423,175.375838 C114.999567,175.463276 101.629066,170.545082 91.4908024,161.777083 C81.1421175,152.827103 74.9249947,140.466728 74.4483613,128.138982 C74.2004611,120.675327 76.0261036,113.26129 79.7275986,106.727863 C80.126032,106.059698 80.7615655,105.083428 81.4902403,104.02721 C86.0997527,97.4404488 87.2937074,95.1062887 88.5657754,89.358959 C89.6596645,84.4377825 91.2792852,78.6447463 93.1627518,72.6043699 L93.177,72.537 Z",
|
|
2193
2201
|
id: "path-1",
|
|
2194
2202
|
fill: "#FFF"
|
|
@@ -2209,9 +2217,9 @@ const Xo = /* @__PURE__ */ ne(io, [["__scopeId", "data-v-dfe60586"]]), lt = (e)
|
|
|
2209
2217
|
"312487ac": n
|
|
2210
2218
|
}));
|
|
2211
2219
|
const n = `${t.duration}ms`;
|
|
2212
|
-
return (o, l) => (
|
|
2220
|
+
return (o, l) => (H(), P("div", uo, [
|
|
2213
2221
|
ro,
|
|
2214
|
-
(
|
|
2222
|
+
(H(), P("svg", {
|
|
2215
2223
|
style: { position: "relative" },
|
|
2216
2224
|
width: e.width,
|
|
2217
2225
|
height: e.height,
|
|
@@ -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,75 +2281,75 @@ 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)) :
|
|
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((
|
|
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) : (
|
|
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, {
|
|
2340
2348
|
class: "no-support-icon",
|
|
2341
2349
|
name: e.noSupportIconName
|
|
2342
2350
|
}, null, 8, ["name"]),
|
|
2343
|
-
re((
|
|
2344
|
-
[
|
|
2351
|
+
re((H(), P("span", yo, Do)), [
|
|
2352
|
+
[j(pt), T]
|
|
2345
2353
|
])
|
|
2346
2354
|
], 16, mo))
|
|
2347
2355
|
], 64));
|
|
@@ -2359,39 +2367,41 @@ 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) =>
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2370
|
+
return (M, d) => j(u) ? j(f) ? ge(M.$slots, "imageError", { key: 2 }, () => [
|
|
2371
|
+
R("div", {
|
|
2372
|
+
title: j(a),
|
|
2373
|
+
class: "icon-wrap"
|
|
2374
|
+
}, [
|
|
2375
|
+
he(Ee, {
|
|
2376
|
+
class: "icon",
|
|
2377
|
+
name: "\u56FE\u7247\u635F\u574F"
|
|
2378
|
+
})
|
|
2379
|
+
], 8, Lo)
|
|
2380
|
+
], !0) : re((H(), P("img", {
|
|
2372
2381
|
key: 1,
|
|
2373
2382
|
fetchpriority: "high",
|
|
2374
2383
|
onLoad: d[0] || (d[0] = (i) => o.value = !0),
|
|
2375
|
-
onError: d[1] || (d[1] = (...i) =>
|
|
2376
|
-
src:
|
|
2384
|
+
onError: d[1] || (d[1] = (...i) => j(r) && j(r)(...i)),
|
|
2385
|
+
src: j(a)
|
|
2377
2386
|
}, null, 40, zo)), [
|
|
2378
|
-
[
|
|
2387
|
+
[j(v)],
|
|
2379
2388
|
[Le, o.value]
|
|
2380
|
-
]) : (
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2389
|
+
]) : ge(M.$slots, "noSupport", { key: 0 }, () => [
|
|
2390
|
+
R("div", {
|
|
2391
|
+
title: j(a),
|
|
2392
|
+
class: "icon-wrap"
|
|
2393
|
+
}, [
|
|
2394
|
+
re(he(Ee, {
|
|
2395
|
+
class: "icon",
|
|
2396
|
+
name: "\u672A\u77E5\u7C7B\u578B"
|
|
2397
|
+
}, null, 512), [
|
|
2398
|
+
[j(pt), c]
|
|
2399
|
+
])
|
|
2400
|
+
], 8, Ao)
|
|
2401
|
+
], !0);
|
|
2392
2402
|
}
|
|
2393
2403
|
});
|
|
2394
|
-
const Ko = /* @__PURE__ */ ne(jo, [["__scopeId", "data-v-
|
|
2404
|
+
const Ko = /* @__PURE__ */ ne(jo, [["__scopeId", "data-v-ab86da1e"]]);
|
|
2395
2405
|
export {
|
|
2396
2406
|
hn as DefaultLoading,
|
|
2397
2407
|
Vo as Image,
|
|
@@ -2400,14 +2410,14 @@ export {
|
|
|
2400
2410
|
Bo as PageLoading,
|
|
2401
2411
|
lo as PullRefresh,
|
|
2402
2412
|
Wo as ScrollBar,
|
|
2403
|
-
|
|
2413
|
+
Ee as SvgIcon,
|
|
2404
2414
|
Ko as Thumbnail,
|
|
2405
2415
|
Fo as ToastCreator,
|
|
2406
2416
|
Xo as VirtualList,
|
|
2407
2417
|
Ge as allSelectedKey,
|
|
2408
2418
|
rn as closeDialogKey,
|
|
2409
2419
|
Qo as dialogController,
|
|
2410
|
-
|
|
2420
|
+
be as getTransform,
|
|
2411
2421
|
tt as isAllSelectedKey,
|
|
2412
2422
|
Ke as isSelectedKey,
|
|
2413
2423
|
Nt as itemKeyKey,
|
|
@@ -2417,7 +2427,7 @@ export {
|
|
|
2417
2427
|
nt as selectedCountKey,
|
|
2418
2428
|
Ze as toggleAllKey,
|
|
2419
2429
|
Ve as toggleKey,
|
|
2420
|
-
|
|
2430
|
+
Te as unselectAllKey,
|
|
2421
2431
|
et as unselectKey,
|
|
2422
2432
|
Po as useBackPress,
|
|
2423
2433
|
Uo as useDelayAsync,
|
|
@@ -2426,15 +2436,16 @@ export {
|
|
|
2426
2436
|
$o as useDownDrag,
|
|
2427
2437
|
wt as useDragSelect,
|
|
2428
2438
|
ko as useDragSelectByMobile,
|
|
2429
|
-
|
|
2439
|
+
_o as useDragSelectByPc,
|
|
2430
2440
|
Yn as useRouterActivated,
|
|
2431
2441
|
Ho as useScaleImageByMobile,
|
|
2432
2442
|
Ro as useScaleImageByPc,
|
|
2433
2443
|
Oo as useSelectable,
|
|
2434
|
-
|
|
2444
|
+
bo as useSelectableByBase,
|
|
2435
2445
|
So as useSelectableInjectors,
|
|
2436
2446
|
un as useVirtualList,
|
|
2437
2447
|
Co as vDebounceClick,
|
|
2438
2448
|
pt as vEnter,
|
|
2439
2449
|
Ft as vSingleClick
|
|
2440
2450
|
};
|
|
2451
|
+
//# sourceMappingURL=index.es.js.map
|