@lazycatcloud/lzc-toolkit 0.0.191 → 0.0.192
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 +426 -420
- package/dist/index.umd.js +4 -4
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { shallowRef as dt, watchEffect as Ot, readonly as ft, getCurrentScope as bt, onScopeDispose as _t, onMounted as ce, nextTick as Me, ref as
|
|
1
|
+
import { shallowRef as dt, watchEffect as Ot, readonly as ft, getCurrentScope as bt, onScopeDispose as _t, onMounted as ce, nextTick as Me, ref as h, watch as G, customRef as kt, unref as A, isRef as Qt, getCurrentInstance as Be, onUpdated as Yt, computed as z, reactive as Te, onUnmounted as vt, inject as ee, provide as P, defineComponent as q, h as ue, render as ye, openBlock as B, createBlock as Ee, Transition as Ue, withCtx as Re, withDirectives as re, createElementBlock as H, normalizeClass as se, createElementVNode as R, withModifiers as me, renderSlot as Ie, createCommentVNode as de, useCssVars as $e, normalizeProps as _e, guardReactiveProps as ke, pushScopeId as Ae, popScopeId as ze, normalizeStyle as K, toDisplayString as He, vShow as Le, createVNode as ge, onBeforeUnmount as Mt, onActivated as gt, onBeforeMount as Bt, onDeactivated as Ut, useSlots as Rt, toRef as $t, Fragment as Qe, mergeProps as he, renderList as Ht, toRefs as ht, createTextVNode as Pt } from "vue";
|
|
2
2
|
const Ft = {
|
|
3
3
|
created(e, t) {
|
|
4
4
|
let n, o;
|
|
@@ -44,7 +44,7 @@ function Wt(e, t) {
|
|
|
44
44
|
}
|
|
45
45
|
function Xt(e, t) {
|
|
46
46
|
let n, o, l;
|
|
47
|
-
const s =
|
|
47
|
+
const s = h(!0), a = () => {
|
|
48
48
|
s.value = !0, l();
|
|
49
49
|
};
|
|
50
50
|
G(e, a, { flush: "sync" });
|
|
@@ -52,8 +52,8 @@ function Xt(e, t) {
|
|
|
52
52
|
get() {
|
|
53
53
|
return s.value && (n = d(), s.value = !1), o(), n;
|
|
54
54
|
},
|
|
55
|
-
set(
|
|
56
|
-
i?.(
|
|
55
|
+
set(g) {
|
|
56
|
+
i?.(g);
|
|
57
57
|
}
|
|
58
58
|
}));
|
|
59
59
|
return Object.isExtensible(r) && (r.trigger = a), r;
|
|
@@ -98,11 +98,11 @@ function Gt(...e) {
|
|
|
98
98
|
const v = () => {
|
|
99
99
|
n && (clearTimeout(n), n = void 0, l(), l = fe);
|
|
100
100
|
};
|
|
101
|
-
return (
|
|
102
|
-
const f = te(a), u = Date.now() - t,
|
|
103
|
-
return v(), f <= 0 ? (t = Date.now(),
|
|
104
|
-
l = r ? I :
|
|
105
|
-
t = Date.now(), o = !0,
|
|
101
|
+
return (g) => {
|
|
102
|
+
const f = te(a), u = Date.now() - t, M = () => s = g();
|
|
103
|
+
return v(), f <= 0 ? (t = Date.now(), M()) : (u > f && (i || !o) ? (t = Date.now(), M()) : d && (s = new Promise((m, I) => {
|
|
104
|
+
l = r ? I : m, n = setTimeout(() => {
|
|
105
|
+
t = Date.now(), o = !0, m(M()), v();
|
|
106
106
|
}, Math.max(0, f - u));
|
|
107
107
|
})), !i && !n && (n = setTimeout(() => o = !0, f)), o = !1, s);
|
|
108
108
|
};
|
|
@@ -138,14 +138,14 @@ function Ne(...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
|
-
}, d = (v, c,
|
|
141
|
+
}, d = (v, c, g, f) => (v.addEventListener(c, g, f), () => v.removeEventListener(c, g, f)), i = G(
|
|
142
142
|
() => [ie(t), te(l)],
|
|
143
143
|
([v, c]) => {
|
|
144
144
|
if (a(), !v)
|
|
145
145
|
return;
|
|
146
|
-
const
|
|
146
|
+
const g = Vt(c) ? { ...c } : c;
|
|
147
147
|
s.push(
|
|
148
|
-
...n.flatMap((f) => o.map((u) => d(v, f, u,
|
|
148
|
+
...n.flatMap((f) => o.map((u) => d(v, f, u, g)))
|
|
149
149
|
);
|
|
150
150
|
},
|
|
151
151
|
{ immediate: !0, flush: "post" }
|
|
@@ -155,7 +155,7 @@ function Ne(...e) {
|
|
|
155
155
|
return Pe(r), r;
|
|
156
156
|
}
|
|
157
157
|
function en() {
|
|
158
|
-
const e =
|
|
158
|
+
const e = h(!1), t = Be();
|
|
159
159
|
return t && ce(() => {
|
|
160
160
|
e.value = !0;
|
|
161
161
|
}, t), e;
|
|
@@ -181,8 +181,8 @@ function We(e, t, n = {}) {
|
|
|
181
181
|
(c) => {
|
|
182
182
|
if (d(), a.value && o) {
|
|
183
183
|
s = new ResizeObserver(t);
|
|
184
|
-
for (const
|
|
185
|
-
|
|
184
|
+
for (const g of c)
|
|
185
|
+
g && s.observe(g, l);
|
|
186
186
|
}
|
|
187
187
|
},
|
|
188
188
|
{ immediate: !0, flush: "post" }
|
|
@@ -196,21 +196,21 @@ function We(e, t, n = {}) {
|
|
|
196
196
|
}
|
|
197
197
|
function on(e, t = { width: 0, height: 0 }, n = {}) {
|
|
198
198
|
const { window: o = xe, box: l = "content-box" } = n, s = z(() => {
|
|
199
|
-
var c,
|
|
200
|
-
return (
|
|
201
|
-
}), a =
|
|
199
|
+
var c, g;
|
|
200
|
+
return (g = (c = ie(e)) == null ? void 0 : c.namespaceURI) == null ? void 0 : g.includes("svg");
|
|
201
|
+
}), a = h(t.width), d = h(t.height), { stop: i } = We(
|
|
202
202
|
e,
|
|
203
203
|
([c]) => {
|
|
204
|
-
const
|
|
204
|
+
const g = l === "border-box" ? c.borderBoxSize : l === "content-box" ? c.contentBoxSize : c.devicePixelContentBoxSize;
|
|
205
205
|
if (o && s.value) {
|
|
206
206
|
const f = ie(e);
|
|
207
207
|
if (f) {
|
|
208
208
|
const u = o.getComputedStyle(f);
|
|
209
209
|
a.value = Number.parseFloat(u.width), d.value = Number.parseFloat(u.height);
|
|
210
210
|
}
|
|
211
|
-
} else if (
|
|
212
|
-
const f = Array.isArray(
|
|
213
|
-
a.value = f.reduce((u, { inlineSize:
|
|
211
|
+
} else if (g) {
|
|
212
|
+
const f = Array.isArray(g) ? g : [g];
|
|
213
|
+
a.value = f.reduce((u, { inlineSize: M }) => u + M, 0), d.value = f.reduce((u, { blockSize: M }) => u + M, 0);
|
|
214
214
|
} else
|
|
215
215
|
a.value = c.contentRect.width, d.value = c.contentRect.height;
|
|
216
216
|
},
|
|
@@ -254,65 +254,65 @@ function ln(e, t = {}) {
|
|
|
254
254
|
},
|
|
255
255
|
behavior: i = "auto",
|
|
256
256
|
window: r = xe,
|
|
257
|
-
onError: v = (
|
|
258
|
-
console.error(
|
|
257
|
+
onError: v = (N) => {
|
|
258
|
+
console.error(N);
|
|
259
259
|
}
|
|
260
|
-
} = t, c =
|
|
260
|
+
} = t, c = h(0), g = h(0), f = z({
|
|
261
261
|
get() {
|
|
262
262
|
return c.value;
|
|
263
263
|
},
|
|
264
|
-
set(
|
|
265
|
-
|
|
264
|
+
set(N) {
|
|
265
|
+
M(N, void 0);
|
|
266
266
|
}
|
|
267
267
|
}), u = z({
|
|
268
268
|
get() {
|
|
269
|
-
return
|
|
269
|
+
return g.value;
|
|
270
270
|
},
|
|
271
|
-
set(
|
|
272
|
-
|
|
271
|
+
set(N) {
|
|
272
|
+
M(void 0, N);
|
|
273
273
|
}
|
|
274
274
|
});
|
|
275
|
-
function
|
|
275
|
+
function M(N, C) {
|
|
276
276
|
var Y, X, p;
|
|
277
277
|
if (!r)
|
|
278
278
|
return;
|
|
279
279
|
const E = te(e);
|
|
280
280
|
!E || (p = E instanceof Document ? r.document.body : E) == null || p.scrollTo({
|
|
281
|
-
top: (Y = te(
|
|
282
|
-
left: (X = te(
|
|
281
|
+
top: (Y = te(C)) != null ? Y : u.value,
|
|
282
|
+
left: (X = te(N)) != null ? X : f.value,
|
|
283
283
|
behavior: te(i)
|
|
284
284
|
});
|
|
285
285
|
}
|
|
286
|
-
const
|
|
286
|
+
const m = h(!1), I = Te({
|
|
287
287
|
left: !0,
|
|
288
288
|
right: !1,
|
|
289
289
|
top: !0,
|
|
290
290
|
bottom: !1
|
|
291
|
-
}),
|
|
291
|
+
}), T = Te({
|
|
292
292
|
left: !1,
|
|
293
293
|
right: !1,
|
|
294
294
|
top: !1,
|
|
295
295
|
bottom: !1
|
|
296
|
-
}),
|
|
297
|
-
!
|
|
298
|
-
},
|
|
299
|
-
var
|
|
296
|
+
}), y = (N) => {
|
|
297
|
+
!m.value || (m.value = !1, T.left = !1, T.right = !1, T.top = !1, T.bottom = !1, l(N));
|
|
298
|
+
}, D = je(y, n + o), j = (N) => {
|
|
299
|
+
var C;
|
|
300
300
|
if (!r)
|
|
301
301
|
return;
|
|
302
|
-
const Y = ((
|
|
303
|
-
|
|
302
|
+
const Y = ((C = N?.document) == null ? void 0 : C.documentElement) || N?.documentElement || ie(N), { display: X, flexDirection: p } = getComputedStyle(Y), E = Y.scrollLeft;
|
|
303
|
+
T.left = E < c.value, T.right = E > c.value;
|
|
304
304
|
const S = Math.abs(E) <= (a.left || 0), Q = Math.abs(E) + Y.clientWidth >= Y.scrollWidth - (a.right || 0) - at;
|
|
305
305
|
X === "flex" && p === "row-reverse" ? (I.left = Q, I.right = S) : (I.left = S, I.right = Q), c.value = E;
|
|
306
306
|
let k = Y.scrollTop;
|
|
307
|
-
|
|
307
|
+
N === r.document && !k && (k = r.document.body.scrollTop), T.top = k < g.value, T.bottom = k > g.value;
|
|
308
308
|
const w = Math.abs(k) <= (a.top || 0), L = Math.abs(k) + Y.clientHeight >= Y.scrollHeight - (a.bottom || 0) - at;
|
|
309
|
-
X === "flex" && p === "column-reverse" ? (I.top = L, I.bottom = w) : (I.top = w, I.bottom = L),
|
|
310
|
-
}, O = (
|
|
311
|
-
var
|
|
309
|
+
X === "flex" && p === "column-reverse" ? (I.top = L, I.bottom = w) : (I.top = w, I.bottom = L), g.value = k;
|
|
310
|
+
}, O = (N) => {
|
|
311
|
+
var C;
|
|
312
312
|
if (!r)
|
|
313
313
|
return;
|
|
314
|
-
const Y = (
|
|
315
|
-
|
|
314
|
+
const Y = (C = N.target.documentElement) != null ? C : N.target;
|
|
315
|
+
j(Y), m.value = !0, D(N), s(N);
|
|
316
316
|
};
|
|
317
317
|
return Ne(
|
|
318
318
|
e,
|
|
@@ -321,38 +321,38 @@ function ln(e, t = {}) {
|
|
|
321
321
|
d
|
|
322
322
|
), Fe(() => {
|
|
323
323
|
try {
|
|
324
|
-
const
|
|
325
|
-
if (!
|
|
324
|
+
const N = te(e);
|
|
325
|
+
if (!N)
|
|
326
326
|
return;
|
|
327
|
-
|
|
328
|
-
} catch (
|
|
329
|
-
v(
|
|
327
|
+
j(N);
|
|
328
|
+
} catch (N) {
|
|
329
|
+
v(N);
|
|
330
330
|
}
|
|
331
331
|
}), Ne(
|
|
332
332
|
e,
|
|
333
333
|
"scrollend",
|
|
334
|
-
|
|
334
|
+
y,
|
|
335
335
|
d
|
|
336
336
|
), {
|
|
337
337
|
x: f,
|
|
338
338
|
y: u,
|
|
339
|
-
isScrolling:
|
|
339
|
+
isScrolling: m,
|
|
340
340
|
arrivedState: I,
|
|
341
|
-
directions:
|
|
341
|
+
directions: T,
|
|
342
342
|
measure() {
|
|
343
|
-
const
|
|
344
|
-
r &&
|
|
343
|
+
const N = te(e);
|
|
344
|
+
r && N && j(N);
|
|
345
345
|
}
|
|
346
346
|
};
|
|
347
347
|
}
|
|
348
348
|
let sn = 0;
|
|
349
349
|
function Xe(e, t = {}) {
|
|
350
|
-
const n =
|
|
350
|
+
const n = h(!1), {
|
|
351
351
|
document: o = Jt,
|
|
352
352
|
immediate: l = !0,
|
|
353
353
|
manual: s = !1,
|
|
354
354
|
id: a = `vueuse_styletag_${++sn}`
|
|
355
|
-
} = t, d =
|
|
355
|
+
} = t, d = h(e);
|
|
356
356
|
let i = () => {
|
|
357
357
|
};
|
|
358
358
|
const r = () => {
|
|
@@ -361,8 +361,8 @@ function Xe(e, t = {}) {
|
|
|
361
361
|
const c = o.getElementById(a) || o.createElement("style");
|
|
362
362
|
c.isConnected || (c.id = a, t.media && (c.media = t.media), o.head.appendChild(c)), !n.value && (i = G(
|
|
363
363
|
d,
|
|
364
|
-
(
|
|
365
|
-
c.textContent =
|
|
364
|
+
(g) => {
|
|
365
|
+
c.textContent = g;
|
|
366
366
|
},
|
|
367
367
|
{ immediate: !0 }
|
|
368
368
|
), n.value = !0);
|
|
@@ -386,16 +386,16 @@ 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 =
|
|
389
|
+
const { scrollEndHook: n, itemHeight: o, overscan: l = 5 } = t, s = h(null), a = on(s), d = h(!0), i = je(j, 100);
|
|
390
390
|
let r;
|
|
391
|
-
const v = dt(e), c =
|
|
391
|
+
const v = dt(e), c = h(0), g = h({ start: 0, end: 10 }), f = h({ start: 0, end: l });
|
|
392
392
|
let u = 0;
|
|
393
|
-
const
|
|
393
|
+
const M = h([]), m = z(() => {
|
|
394
394
|
let { sum: w, height: L } = { sum: 0, height: 0 };
|
|
395
395
|
return v.value.map((U, $) => (typeof o == "number" ? L = o : L = o($), w += L, { height: L, sum: w }));
|
|
396
|
-
}), I = z(() => X(
|
|
396
|
+
}), I = z(() => X(g.value.start)), T = z(() => typeof o == "number" ? m.value.length * o : m.value[m.value.length - 1]?.sum || 0), y = z(() => {
|
|
397
397
|
const { start: w, end: L } = f.value;
|
|
398
|
-
return
|
|
398
|
+
return M.value.slice(w, L);
|
|
399
399
|
});
|
|
400
400
|
ce(() => {
|
|
401
401
|
}), vt(() => cancelAnimationFrame(r)), G(
|
|
@@ -411,54 +411,54 @@ function un(e, t) {
|
|
|
411
411
|
},
|
|
412
412
|
{ deep: !0 }
|
|
413
413
|
), G(c, () => {
|
|
414
|
-
|
|
414
|
+
D(), i();
|
|
415
415
|
});
|
|
416
|
-
function
|
|
416
|
+
function D() {
|
|
417
417
|
d.value = !1;
|
|
418
418
|
}
|
|
419
|
-
function
|
|
419
|
+
function j() {
|
|
420
420
|
d.value = !0, n?.();
|
|
421
421
|
}
|
|
422
422
|
function O() {
|
|
423
|
-
cancelAnimationFrame(r), r = requestAnimationFrame(
|
|
423
|
+
cancelAnimationFrame(r), r = requestAnimationFrame(N);
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function N() {
|
|
426
426
|
if (s.value) {
|
|
427
427
|
c.value = s.value.scrollTop;
|
|
428
|
-
let w =
|
|
428
|
+
let w = C(c.value);
|
|
429
429
|
u = Y(w);
|
|
430
430
|
let L = Math.max(0, w - l), U = Math.min(
|
|
431
431
|
w + u + l,
|
|
432
432
|
v.value.length
|
|
433
433
|
);
|
|
434
|
-
|
|
434
|
+
g.value = { start: L, end: U }, M.value = v.value.slice(L, U).map(($, b) => ({
|
|
435
435
|
data: $,
|
|
436
436
|
index: b + L
|
|
437
437
|
})), f.value.start = w - L, f.value.end = f.value.start + u;
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
|
-
function
|
|
441
|
-
let L = 0, U =
|
|
440
|
+
function C(w) {
|
|
441
|
+
let L = 0, U = m.value.length - 1, $ = -1;
|
|
442
442
|
for (; L <= U; ) {
|
|
443
443
|
const b = Math.floor((L + U) / 2);
|
|
444
|
-
|
|
444
|
+
m.value[b].sum >= w ? ($ = b, U = b - 1) : L = b + 1;
|
|
445
445
|
}
|
|
446
446
|
return Math.max(0, $);
|
|
447
447
|
}
|
|
448
448
|
function Y(w) {
|
|
449
449
|
let L = 0, U = 0;
|
|
450
|
-
for (let $ = w; $ <
|
|
450
|
+
for (let $ = w; $ < m.value.length && (L++, U += m.value[$].height, !(U >= a.height.value)); $++)
|
|
451
451
|
;
|
|
452
452
|
return L;
|
|
453
453
|
}
|
|
454
454
|
function X(w) {
|
|
455
455
|
if (typeof o == "number")
|
|
456
456
|
return w * o;
|
|
457
|
-
let L =
|
|
457
|
+
let L = m.value[w];
|
|
458
458
|
return L ? L.sum - L.height : 0;
|
|
459
459
|
}
|
|
460
460
|
function p(w) {
|
|
461
|
-
return
|
|
461
|
+
return m.value[w] || { sum: 0, height: 0 };
|
|
462
462
|
}
|
|
463
463
|
function E(w, L = "smooth") {
|
|
464
464
|
if (s.value) {
|
|
@@ -467,17 +467,17 @@ function un(e, t) {
|
|
|
467
467
|
"scrollBehavior",
|
|
468
468
|
L
|
|
469
469
|
), $ = p(w);
|
|
470
|
-
s.value.scrollTop = $.sum - $.height,
|
|
470
|
+
s.value.scrollTop = $.sum - $.height, N(), U();
|
|
471
471
|
}
|
|
472
472
|
if (s.value) {
|
|
473
473
|
const U = p(w);
|
|
474
|
-
s.value.scrollTop = U.sum - U.height,
|
|
474
|
+
s.value.scrollTop = U.sum - U.height, N();
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
477
|
const S = z(() => ({
|
|
478
478
|
style: {
|
|
479
479
|
width: "100%",
|
|
480
|
-
height: `${
|
|
480
|
+
height: `${T.value}px`,
|
|
481
481
|
pointerEvents: d.value ? void 0 : "none"
|
|
482
482
|
}
|
|
483
483
|
})), Q = z(() => ({
|
|
@@ -489,11 +489,11 @@ function un(e, t) {
|
|
|
489
489
|
overflowY: "auto"
|
|
490
490
|
};
|
|
491
491
|
return {
|
|
492
|
-
list:
|
|
493
|
-
visiableList:
|
|
492
|
+
list: M,
|
|
493
|
+
visiableList: y,
|
|
494
494
|
getItemHeightData: p,
|
|
495
|
-
getoffsetTopIndex:
|
|
496
|
-
totalHeight:
|
|
495
|
+
getoffsetTopIndex: C,
|
|
496
|
+
totalHeight: T,
|
|
497
497
|
clientHeight: a.height,
|
|
498
498
|
scrollTo: E,
|
|
499
499
|
scrollTop: c,
|
|
@@ -512,13 +512,13 @@ function un(e, t) {
|
|
|
512
512
|
const Dt = Symbol(), Ze = Symbol(), Ve = Symbol(), Ke = Symbol(), Ge = Symbol(), qe = Symbol(), Je = Symbol(), et = Symbol(), tt = Symbol(), pe = Symbol(), nt = Symbol();
|
|
513
513
|
function So() {
|
|
514
514
|
const { voidFn: e, boolFn: t, boolRef: n, numberRef: o, arrayRef: l } = {
|
|
515
|
-
voidFn: (
|
|
515
|
+
voidFn: (m) => {
|
|
516
516
|
},
|
|
517
|
-
boolFn: (
|
|
517
|
+
boolFn: (m) => !1,
|
|
518
518
|
boolRef: z(() => !1),
|
|
519
519
|
numberRef: z(() => 0),
|
|
520
520
|
arrayRef: z(() => [])
|
|
521
|
-
}, s = ee(Dt, "id"), a = ee(Ge, l), d = ee(Ke, t), i = ee(tt, n), r = ee(Ve, e), v = ee(Ze, e), c = ee(qe, e),
|
|
521
|
+
}, s = ee(Dt, "id"), a = ee(Ge, l), d = ee(Ke, t), i = ee(tt, n), r = ee(Ve, e), v = ee(Ze, e), c = ee(qe, e), g = ee(Je, e), f = ee(et, e), u = ee(pe, e), M = ee(nt, o);
|
|
522
522
|
return {
|
|
523
523
|
itemKey: s,
|
|
524
524
|
selected: a,
|
|
@@ -527,18 +527,18 @@ function So() {
|
|
|
527
527
|
toggle: r,
|
|
528
528
|
toggleAll: v,
|
|
529
529
|
select: c,
|
|
530
|
-
selectAll:
|
|
530
|
+
selectAll: g,
|
|
531
531
|
unselect: f,
|
|
532
532
|
unselectAll: u,
|
|
533
|
-
selectedCount:
|
|
533
|
+
selectedCount: M
|
|
534
534
|
};
|
|
535
535
|
}
|
|
536
536
|
function Oo(e, t, n = { deep: !0 }) {
|
|
537
|
-
const o =
|
|
537
|
+
const o = h(!1), l = h(/* @__PURE__ */ new Set()), s = h(/* @__PURE__ */ new Map());
|
|
538
538
|
G(
|
|
539
539
|
e,
|
|
540
|
-
(
|
|
541
|
-
s.value =
|
|
540
|
+
(y) => {
|
|
541
|
+
s.value = y.reduce((D, j) => (D.set(j[t], j), D), /* @__PURE__ */ new Map()), T();
|
|
542
542
|
},
|
|
543
543
|
{
|
|
544
544
|
deep: n.deep,
|
|
@@ -546,28 +546,28 @@ function Oo(e, t, n = { deep: !0 }) {
|
|
|
546
546
|
}
|
|
547
547
|
);
|
|
548
548
|
const a = z(() => {
|
|
549
|
-
let
|
|
549
|
+
let y = [];
|
|
550
550
|
if (o.value != null)
|
|
551
|
-
o.value && (
|
|
551
|
+
o.value && (y = Array.from(s.value.values()));
|
|
552
552
|
else if (l.value.size) {
|
|
553
|
-
let
|
|
554
|
-
l.value.forEach((
|
|
555
|
-
|
|
553
|
+
let D;
|
|
554
|
+
l.value.forEach((j) => {
|
|
555
|
+
D = s.value.get(j), D && y.push(D);
|
|
556
556
|
});
|
|
557
557
|
}
|
|
558
|
-
return
|
|
558
|
+
return y;
|
|
559
559
|
}), d = z(() => {
|
|
560
|
-
let
|
|
561
|
-
return o.value != null ? o.value && (
|
|
560
|
+
let y = 0;
|
|
561
|
+
return o.value != null ? o.value && (y = s.value.size) : y = l.value.size, y;
|
|
562
562
|
}), i = z(() => {
|
|
563
|
-
let
|
|
563
|
+
let y;
|
|
564
564
|
if (o.value != null)
|
|
565
|
-
|
|
565
|
+
y = o.value;
|
|
566
566
|
else {
|
|
567
|
-
const
|
|
568
|
-
|
|
567
|
+
const D = l.value.size, j = s.value.size;
|
|
568
|
+
y = D == j;
|
|
569
569
|
}
|
|
570
|
-
return
|
|
570
|
+
return y;
|
|
571
571
|
});
|
|
572
572
|
function r() {
|
|
573
573
|
o.value = !0;
|
|
@@ -575,47 +575,53 @@ function Oo(e, t, n = { deep: !0 }) {
|
|
|
575
575
|
function v() {
|
|
576
576
|
o.value = !1;
|
|
577
577
|
}
|
|
578
|
-
function c(
|
|
579
|
-
s.value.has(
|
|
578
|
+
function c(y) {
|
|
579
|
+
s.value.has(y) && l.value.add(y);
|
|
580
580
|
}
|
|
581
|
-
function
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
c(
|
|
581
|
+
function g(y) {
|
|
582
|
+
M(() => {
|
|
583
|
+
y.forEach((D) => {
|
|
584
|
+
c(D[t]);
|
|
585
585
|
});
|
|
586
586
|
});
|
|
587
587
|
}
|
|
588
|
-
function f(
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
l.value.delete(
|
|
588
|
+
function f(y) {
|
|
589
|
+
M(() => {
|
|
590
|
+
y.forEach((D) => {
|
|
591
|
+
l.value.delete(D[t]);
|
|
592
592
|
});
|
|
593
593
|
});
|
|
594
594
|
}
|
|
595
|
-
function u(
|
|
596
|
-
return o.value != null ? o.value : l.value.has(
|
|
595
|
+
function u(y) {
|
|
596
|
+
return o.value != null ? o.value : l.value.has(y[t]);
|
|
597
597
|
}
|
|
598
|
-
function
|
|
599
|
-
o.value != null && (o.value ? l.value = new Set(Array.from(s.value.keys())) : l.value = /* @__PURE__ */ new Set()),
|
|
598
|
+
function M(y) {
|
|
599
|
+
o.value != null && (o.value ? l.value = new Set(Array.from(s.value.keys())) : l.value = /* @__PURE__ */ new Set()), y(), l.value.size == 0 ? o.value = !1 : l.value.size == s.value.size ? o.value = !0 : o.value = null;
|
|
600
600
|
}
|
|
601
|
-
function y
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
u(
|
|
601
|
+
function m(y) {
|
|
602
|
+
M(() => {
|
|
603
|
+
y.forEach((D) => {
|
|
604
|
+
u(D) ? l.value.delete(D[t]) : c(D[t]);
|
|
605
605
|
});
|
|
606
606
|
});
|
|
607
607
|
}
|
|
608
608
|
function I() {
|
|
609
|
-
const { value:
|
|
610
|
-
|
|
609
|
+
const { value: y } = i;
|
|
610
|
+
y ? v() : r();
|
|
611
611
|
}
|
|
612
|
-
|
|
612
|
+
function T() {
|
|
613
|
+
const y = [];
|
|
614
|
+
l.value.forEach((D) => {
|
|
615
|
+
s.value.get(D) || y.push(D);
|
|
616
|
+
}), y.forEach((D) => l.value.delete(D));
|
|
617
|
+
}
|
|
618
|
+
return P(Dt, t), P(Ze, I), P(Ve, m), P(Ke, u), P(Ge, a), P(qe, g), P(Je, r), P(et, f), P(tt, i), P(pe, v), P(pe, v), P(nt, d), {
|
|
613
619
|
selected: a,
|
|
614
|
-
select:
|
|
620
|
+
select: g,
|
|
615
621
|
selectAll: r,
|
|
616
622
|
unselect: f,
|
|
617
623
|
unselectAll: v,
|
|
618
|
-
toggle:
|
|
624
|
+
toggle: m,
|
|
619
625
|
toggleAll: I,
|
|
620
626
|
isSelected: u,
|
|
621
627
|
isAllSelected: i,
|
|
@@ -623,7 +629,7 @@ function Oo(e, t, n = { deep: !0 }) {
|
|
|
623
629
|
};
|
|
624
630
|
}
|
|
625
631
|
function bo(e) {
|
|
626
|
-
const t =
|
|
632
|
+
const t = h(!1), n = h(/* @__PURE__ */ new Set()), o = z(() => {
|
|
627
633
|
let u = [];
|
|
628
634
|
return t.value != null ? t.value && (u = e.value) : n.value.size && (u = Array.from(n.value.values())), u;
|
|
629
635
|
}), l = z(() => {
|
|
@@ -634,8 +640,8 @@ function bo(e) {
|
|
|
634
640
|
if (t.value != null)
|
|
635
641
|
u = t.value;
|
|
636
642
|
else {
|
|
637
|
-
const
|
|
638
|
-
u =
|
|
643
|
+
const M = n.value.size, m = e.value.length;
|
|
644
|
+
u = M == m;
|
|
639
645
|
}
|
|
640
646
|
return u;
|
|
641
647
|
});
|
|
@@ -647,15 +653,15 @@ function bo(e) {
|
|
|
647
653
|
}
|
|
648
654
|
function i(u) {
|
|
649
655
|
c(() => {
|
|
650
|
-
u.forEach((
|
|
651
|
-
n.value.add(
|
|
656
|
+
u.forEach((M) => {
|
|
657
|
+
n.value.add(M);
|
|
652
658
|
});
|
|
653
659
|
});
|
|
654
660
|
}
|
|
655
661
|
function r(u) {
|
|
656
662
|
c(() => {
|
|
657
|
-
u.forEach((
|
|
658
|
-
n.value.delete(
|
|
663
|
+
u.forEach((M) => {
|
|
664
|
+
n.value.delete(M);
|
|
659
665
|
});
|
|
660
666
|
});
|
|
661
667
|
}
|
|
@@ -665,10 +671,10 @@ function bo(e) {
|
|
|
665
671
|
function c(u) {
|
|
666
672
|
t.value != null && (t.value ? n.value = new Set(Array.from(e.value)) : n.value = /* @__PURE__ */ new Set()), u(), n.value.size == 0 ? t.value = !1 : n.value.size == e.value.length ? t.value = !0 : t.value = null;
|
|
667
673
|
}
|
|
668
|
-
function
|
|
674
|
+
function g(u) {
|
|
669
675
|
c(() => {
|
|
670
|
-
u.forEach((
|
|
671
|
-
v(
|
|
676
|
+
u.forEach((M) => {
|
|
677
|
+
v(M) ? n.value.delete(M) : n.value.add(M);
|
|
672
678
|
});
|
|
673
679
|
});
|
|
674
680
|
}
|
|
@@ -676,13 +682,13 @@ function bo(e) {
|
|
|
676
682
|
const { value: u } = s;
|
|
677
683
|
u ? d() : a();
|
|
678
684
|
}
|
|
679
|
-
return P(Ze, f), P(Ve,
|
|
685
|
+
return P(Ze, f), P(Ve, g), P(Ke, v), P(Ge, o), P(qe, i), P(Je, a), P(et, r), P(tt, s), P(pe, d), P(pe, d), P(nt, l), {
|
|
680
686
|
selected: o,
|
|
681
687
|
select: i,
|
|
682
688
|
selectAll: a,
|
|
683
689
|
unselect: r,
|
|
684
690
|
unselectAll: d,
|
|
685
|
-
toggle:
|
|
691
|
+
toggle: g,
|
|
686
692
|
toggleAll: f,
|
|
687
693
|
isSelected: v,
|
|
688
694
|
isAllSelected: s,
|
|
@@ -710,115 +716,115 @@ function Tt({
|
|
|
710
716
|
let r = {};
|
|
711
717
|
const v = z(
|
|
712
718
|
() => Ye(o === "colum" ? jt : xt, 50)
|
|
713
|
-
), c = z(() => e ?? n),
|
|
714
|
-
(
|
|
715
|
-
),
|
|
719
|
+
), c = z(() => e ?? n), g = (() => t ? (x) => t(x) : (x) => x)(), f = /* @__PURE__ */ new Set(), u = h(!0), M = h(), m = h(!1), I = h({ x: 0, y: 0 }), T = h({ x: 0, y: 0, scrollTop: 0 }), y = new ResizeObserver(
|
|
720
|
+
(x) => D.value = x[0].target.getBoundingClientRect()
|
|
721
|
+
), D = h({}), j = h({
|
|
716
722
|
top: 0,
|
|
717
723
|
height: 0,
|
|
718
|
-
sync(
|
|
719
|
-
|
|
724
|
+
sync(x = !1) {
|
|
725
|
+
j.value.top = M.value?.scrollTop || 0, x && (j.value.height = M.value?.scrollHeight || 0);
|
|
720
726
|
}
|
|
721
|
-
}), O = z(() =>
|
|
722
|
-
left: Math.min(I.value.x,
|
|
723
|
-
top: Math.min(I.value.y,
|
|
724
|
-
width: Math.abs(I.value.x -
|
|
725
|
-
height: Math.abs(I.value.y -
|
|
726
|
-
} : { left: 0, top: 0, width: 0, height: 0 }),
|
|
727
|
+
}), O = z(() => m.value ? {
|
|
728
|
+
left: Math.min(I.value.x, T.value.x) - D.value.left,
|
|
729
|
+
top: Math.min(I.value.y, T.value.y) - D.value.top,
|
|
730
|
+
width: Math.abs(I.value.x - T.value.x),
|
|
731
|
+
height: Math.abs(I.value.y - T.value.y)
|
|
732
|
+
} : { left: 0, top: 0, width: 0, height: 0 }), N = h(!1), { margin: C = 50, startSpeed: Y = 30, maxSpeed: X = 30 } = l;
|
|
727
733
|
let p;
|
|
728
|
-
const E =
|
|
734
|
+
const E = C, S = Y, Q = X, k = (x) => x ** 1;
|
|
729
735
|
let w = 0;
|
|
730
|
-
function L(
|
|
731
|
-
if (cancelAnimationFrame(p), w = U(
|
|
736
|
+
function L(x) {
|
|
737
|
+
if (cancelAnimationFrame(p), w = U(x), w = Math.max(
|
|
732
738
|
Math.min(w, Q),
|
|
733
739
|
-Q
|
|
734
740
|
), w !== 0) {
|
|
735
|
-
const _ =
|
|
736
|
-
if (!_ || !
|
|
741
|
+
const _ = M.value;
|
|
742
|
+
if (!_ || !m.value)
|
|
737
743
|
return;
|
|
738
|
-
const Z =
|
|
739
|
-
let W =
|
|
740
|
-
W = Math.min(Math.max(0, W), Z), _.scrollTop = W, b(), p = requestAnimationFrame(() => L(
|
|
744
|
+
const Z = j.value.height - D.value.height;
|
|
745
|
+
let W = j.value.top + Number(w);
|
|
746
|
+
W = Math.min(Math.max(0, W), Z), _.scrollTop = W, b(), p = requestAnimationFrame(() => L(x));
|
|
741
747
|
}
|
|
742
748
|
}
|
|
743
|
-
function U(
|
|
744
|
-
if (
|
|
745
|
-
const Z =
|
|
749
|
+
function U(x) {
|
|
750
|
+
if (M.value) {
|
|
751
|
+
const Z = D.value, W = Z.bottom - x;
|
|
746
752
|
if (W < E)
|
|
747
753
|
return S * k(1 - W / E);
|
|
748
|
-
const le =
|
|
754
|
+
const le = x - Z.top;
|
|
749
755
|
if (le < E)
|
|
750
756
|
return -S * k(1 - le / E);
|
|
751
757
|
}
|
|
752
758
|
return 0;
|
|
753
759
|
}
|
|
754
|
-
function $(
|
|
760
|
+
function $(x) {
|
|
755
761
|
const _ = { ...O.value, right: 0, bottom: 0 };
|
|
756
|
-
return _.left +=
|
|
762
|
+
return _.left += D.value.left, _.top += D.value.top - j.value.top, _.right = _.width + _.left, _.bottom = _.height + _.top, _.left < x.right && _.right > x.left && _.top < x.bottom && _.bottom > x.top;
|
|
757
763
|
}
|
|
758
764
|
function b() {
|
|
759
|
-
|
|
760
|
-
const { top:
|
|
761
|
-
|
|
762
|
-
_ +
|
|
763
|
-
|
|
764
|
-
),
|
|
765
|
-
}
|
|
766
|
-
function F(
|
|
765
|
+
j.value.sync();
|
|
766
|
+
const { top: x, height: _ } = j.value;
|
|
767
|
+
T.value.y = Math.min(
|
|
768
|
+
_ + D.value.top,
|
|
769
|
+
T.value.y + x - T.value.scrollTop
|
|
770
|
+
), T.value.scrollTop = x;
|
|
771
|
+
}
|
|
772
|
+
function F(x, _, Z = "dynamic-styles") {
|
|
767
773
|
let W = document.getElementById(Z);
|
|
768
774
|
W || (W = document.createElement("style"), W.id = Z, document.head.appendChild(W));
|
|
769
|
-
const le = W.sheet.cssRules, ve = le.length, St = `${
|
|
775
|
+
const le = W.sheet.cssRules, ve = le.length, St = `${x} { ${_} }`;
|
|
770
776
|
for (let Ce = 0; Ce < ve; Ce++) {
|
|
771
777
|
const st = le[Ce];
|
|
772
|
-
if (st.selectorText ===
|
|
778
|
+
if (st.selectorText === x && st.style.cssText === _)
|
|
773
779
|
return;
|
|
774
780
|
}
|
|
775
781
|
W.sheet.insertRule(St, ve);
|
|
776
782
|
}
|
|
777
|
-
function J(
|
|
778
|
-
u.value = !0,
|
|
779
|
-
const Z = _ +
|
|
780
|
-
I.value.x =
|
|
783
|
+
function J(x, _) {
|
|
784
|
+
u.value = !0, m.value = !0, j.value.sync(!0);
|
|
785
|
+
const Z = _ + j.value.top;
|
|
786
|
+
I.value.x = x, I.value.y = Z, T.value.x = x, T.value.y = Z, M.value?.classList.add("disable-scroll-behavior"), f.clear();
|
|
781
787
|
}
|
|
782
|
-
function V(
|
|
783
|
-
!
|
|
784
|
-
_ +
|
|
785
|
-
|
|
786
|
-
),
|
|
788
|
+
function V(x, _, Z) {
|
|
789
|
+
!m.value || (u.value && o === "colum" && !De() && (N.value || i(), u.value = !1), Z?.(), L(_), T.value.x = Math.max(x, D.value.left), T.value.y = Math.min(
|
|
790
|
+
_ + j.value.top,
|
|
791
|
+
j.value.height + D.value.top
|
|
792
|
+
), T.value.scrollTop = j.value.top, v.value());
|
|
787
793
|
}
|
|
788
794
|
function oe() {
|
|
789
|
-
|
|
795
|
+
m.value = !1, M.value?.classList.remove("disable-scroll-behavior");
|
|
790
796
|
}
|
|
791
797
|
function zt() {
|
|
792
|
-
!
|
|
798
|
+
!m.value || (w || b(), v.value());
|
|
793
799
|
}
|
|
794
800
|
function De() {
|
|
795
|
-
if (!
|
|
801
|
+
if (!m.value)
|
|
796
802
|
return !1;
|
|
797
|
-
const { width:
|
|
798
|
-
return !(Math.max(
|
|
803
|
+
const { width: x, height: _ } = O.value;
|
|
804
|
+
return !(Math.max(x, _) > 5);
|
|
799
805
|
}
|
|
800
806
|
function Lt() {
|
|
801
807
|
De() && i();
|
|
802
808
|
}
|
|
803
809
|
function jt() {
|
|
804
|
-
De() ||
|
|
805
|
-
r[c.value] =
|
|
806
|
-
|
|
807
|
-
), $(
|
|
810
|
+
De() || M.value?.querySelectorAll(`[${n}]`).forEach((x) => {
|
|
811
|
+
r[c.value] = g(
|
|
812
|
+
x.getAttribute(`${n}`)
|
|
813
|
+
), $(x.getBoundingClientRect()) ? a([r]) : N.value || d([r]);
|
|
808
814
|
});
|
|
809
815
|
}
|
|
810
816
|
function xt() {
|
|
811
|
-
const
|
|
817
|
+
const x = [];
|
|
812
818
|
let _ = null, Z = 0;
|
|
813
|
-
|
|
814
|
-
const ve =
|
|
815
|
-
|
|
819
|
+
M.value?.querySelectorAll(`[${n}]`).forEach((W, le) => {
|
|
820
|
+
const ve = g(W.getAttribute(`${n}`));
|
|
821
|
+
x.push(ve), $(W.getBoundingClientRect()) ? (_ === null && (_ = le), _ = Math.min(_, le), Z = Math.max(Z, le)) : (r[c.value] = ve, f.has(ve) && d([r]));
|
|
816
822
|
});
|
|
817
823
|
for (let W = _; W < Z + 1; W++)
|
|
818
|
-
r[c.value] =
|
|
824
|
+
r[c.value] = x[W], a([r]), f.add(x[W]);
|
|
819
825
|
}
|
|
820
|
-
function Ct(
|
|
821
|
-
return !
|
|
826
|
+
function Ct(x) {
|
|
827
|
+
return !x?.value || (M.value = x.value, !M?.value) ? !1 : (y.observe(M.value), F(".disable-scroll-behavior", "scroll-behavior: unset !important;"), !0);
|
|
822
828
|
}
|
|
823
829
|
return {
|
|
824
830
|
init: Ct,
|
|
@@ -829,12 +835,12 @@ function Tt({
|
|
|
829
835
|
isSingleClick: De,
|
|
830
836
|
cancelSelectAllBySingleClick: Lt,
|
|
831
837
|
selectFn: v,
|
|
832
|
-
getAttributeValue:
|
|
833
|
-
incrementalSelect:
|
|
838
|
+
getAttributeValue: g,
|
|
839
|
+
incrementalSelect: N,
|
|
834
840
|
selectRange: O,
|
|
835
|
-
isPressing:
|
|
836
|
-
containerEl:
|
|
837
|
-
observer:
|
|
841
|
+
isPressing: m,
|
|
842
|
+
containerEl: M,
|
|
843
|
+
observer: y
|
|
838
844
|
};
|
|
839
845
|
}
|
|
840
846
|
function _o(e, t = !1) {
|
|
@@ -857,7 +863,7 @@ function _o(e, t = !1) {
|
|
|
857
863
|
opacity: 0.5;
|
|
858
864
|
}`,
|
|
859
865
|
{ id: "styletag_lzc_dragselect", manual: !0 }
|
|
860
|
-
),
|
|
866
|
+
), g = q({
|
|
861
867
|
render() {
|
|
862
868
|
return ue("div", {
|
|
863
869
|
id: "selectBoxEl",
|
|
@@ -866,34 +872,34 @@ function _o(e, t = !1) {
|
|
|
866
872
|
});
|
|
867
873
|
}
|
|
868
874
|
});
|
|
869
|
-
function f(
|
|
870
|
-
|
|
875
|
+
function f(T) {
|
|
876
|
+
T.button === 0 && (t && (T.ctrlKey || T.metaKey) && (n.incrementalSelect.value = !0), a(T.x, T.y), window.addEventListener("mousemove", u), window.addEventListener("mouseup", M));
|
|
871
877
|
}
|
|
872
|
-
function u(
|
|
873
|
-
d(
|
|
878
|
+
function u(T) {
|
|
879
|
+
d(T.x, T.y);
|
|
874
880
|
}
|
|
875
|
-
function
|
|
876
|
-
window.removeEventListener("mousemove", u), window.removeEventListener("mouseup",
|
|
877
|
-
(
|
|
878
|
-
|
|
881
|
+
function M(T) {
|
|
882
|
+
window.removeEventListener("mousemove", u), window.removeEventListener("mouseup", M), T.composedPath().some(
|
|
883
|
+
(D) => n.getAttributeValue(
|
|
884
|
+
D?.getAttribute?.(e.attribute)
|
|
879
885
|
)
|
|
880
886
|
) || r(), i(), n.incrementalSelect.value = !1;
|
|
881
887
|
}
|
|
882
|
-
function
|
|
888
|
+
function m(T) {
|
|
883
889
|
try {
|
|
884
|
-
if (!n.init(
|
|
890
|
+
if (!n.init(T))
|
|
885
891
|
throw "\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";
|
|
886
892
|
if (!n.containerEl?.value)
|
|
887
893
|
return !1;
|
|
888
|
-
ye(ue(
|
|
889
|
-
} catch (
|
|
890
|
-
console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25",
|
|
894
|
+
ye(ue(g), n.containerEl.value), c(), n.containerEl.value?.addEventListener("scroll", s), n.containerEl.value?.addEventListener("mousedown", f);
|
|
895
|
+
} catch (y) {
|
|
896
|
+
console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25", y);
|
|
891
897
|
}
|
|
892
898
|
}
|
|
893
899
|
function I() {
|
|
894
900
|
o.disconnect(), n.containerEl.value?.removeEventListener("scroll", s), n.containerEl.value?.removeEventListener("mousedown", f);
|
|
895
901
|
}
|
|
896
|
-
return { init:
|
|
902
|
+
return { init: m, unMount: I };
|
|
897
903
|
}
|
|
898
904
|
function ko(e, t, n = 600) {
|
|
899
905
|
const o = Tt({
|
|
@@ -908,35 +914,35 @@ function ko(e, t, n = 600) {
|
|
|
908
914
|
function v() {
|
|
909
915
|
clearTimeout(r);
|
|
910
916
|
}
|
|
911
|
-
function c(
|
|
912
|
-
v(),
|
|
913
|
-
const { clientX:
|
|
914
|
-
a(
|
|
917
|
+
function c(m) {
|
|
918
|
+
v(), m.composedPath().some((T) => !!T?.getAttribute?.(e.attribute)) && (r = setTimeout(() => {
|
|
919
|
+
const { clientX: T, clientY: y } = m.targetTouches[0];
|
|
920
|
+
a(T, y), t?.(), d(T, y, () => m.preventDefault()), m.preventDefault();
|
|
915
921
|
}, n));
|
|
916
922
|
}
|
|
917
|
-
function
|
|
923
|
+
function g(m) {
|
|
918
924
|
v();
|
|
919
|
-
const { clientX: I, clientY:
|
|
920
|
-
d(I,
|
|
925
|
+
const { clientX: I, clientY: T } = m.targetTouches[0];
|
|
926
|
+
d(I, T, () => m.preventDefault());
|
|
921
927
|
}
|
|
922
928
|
function f() {
|
|
923
929
|
v(), i();
|
|
924
930
|
}
|
|
925
|
-
function u(
|
|
931
|
+
function u(m) {
|
|
926
932
|
try {
|
|
927
|
-
if (!o.init(
|
|
933
|
+
if (!o.init(m))
|
|
928
934
|
throw "\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";
|
|
929
935
|
if (!o.containerEl?.value)
|
|
930
936
|
return !1;
|
|
931
|
-
o.containerEl.value?.addEventListener("scroll", s), o.containerEl.value?.addEventListener("touchstart", c), o.containerEl.value?.addEventListener("touchmove",
|
|
937
|
+
o.containerEl.value?.addEventListener("scroll", s), o.containerEl.value?.addEventListener("touchstart", c), o.containerEl.value?.addEventListener("touchmove", g), window.addEventListener("touchcancel", f), window.addEventListener("touchend", f);
|
|
932
938
|
} catch (I) {
|
|
933
939
|
console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25", I);
|
|
934
940
|
}
|
|
935
941
|
}
|
|
936
|
-
function
|
|
937
|
-
l.disconnect(), o.containerEl.value?.removeEventListener("scroll", s), o.containerEl.value?.removeEventListener("touchstart", c), o.containerEl.value?.removeEventListener("touchmove",
|
|
942
|
+
function M() {
|
|
943
|
+
l.disconnect(), o.containerEl.value?.removeEventListener("scroll", s), o.containerEl.value?.removeEventListener("touchstart", c), o.containerEl.value?.removeEventListener("touchmove", g), window.removeEventListener("touchcancel", f), window.removeEventListener("touchEnd", f);
|
|
938
944
|
}
|
|
939
|
-
return { init: u, unMount:
|
|
945
|
+
return { init: u, unMount: M };
|
|
940
946
|
}
|
|
941
947
|
const rn = Symbol(), cn = /* @__PURE__ */ q({
|
|
942
948
|
__name: "Dialog",
|
|
@@ -1041,7 +1047,7 @@ function Yo({
|
|
|
1041
1047
|
component: e,
|
|
1042
1048
|
componentProps: t,
|
|
1043
1049
|
delay: n
|
|
1044
|
-
}), l =
|
|
1050
|
+
}), l = h(!1);
|
|
1045
1051
|
function s() {
|
|
1046
1052
|
l.value = !0;
|
|
1047
1053
|
}
|
|
@@ -1188,7 +1194,7 @@ class jn {
|
|
|
1188
1194
|
loadingToast;
|
|
1189
1195
|
el;
|
|
1190
1196
|
options;
|
|
1191
|
-
visible =
|
|
1197
|
+
visible = h(!1);
|
|
1192
1198
|
animateDuration = 300;
|
|
1193
1199
|
constructor(t) {
|
|
1194
1200
|
this.options = { ...t, visible: this.visible }, this.options.duration == null && (this.options.duration = 60 * 10 * 1e3), this.el = document.createElement("div"), this.loadingToast = Ln;
|
|
@@ -1229,10 +1235,10 @@ function Uo(e, t) {
|
|
|
1229
1235
|
a,
|
|
1230
1236
|
i
|
|
1231
1237
|
);
|
|
1232
|
-
const r =
|
|
1238
|
+
const r = h(!1);
|
|
1233
1239
|
let v = null;
|
|
1234
1240
|
const c = new jn(i);
|
|
1235
|
-
async function
|
|
1241
|
+
async function g(...u) {
|
|
1236
1242
|
if (n && console.log(`useDelayAsync - handler - processing: ${r.value}`), !r.value) {
|
|
1237
1243
|
r.value = !0, v = setTimeout(() => {
|
|
1238
1244
|
n && console.log(
|
|
@@ -1243,10 +1249,10 @@ function Uo(e, t) {
|
|
|
1243
1249
|
}, a);
|
|
1244
1250
|
try {
|
|
1245
1251
|
n && console.time("useDelayAsync - handler-execute-time");
|
|
1246
|
-
const
|
|
1247
|
-
return n && console.log("useDelayAsync - execute res: ",
|
|
1248
|
-
} catch (
|
|
1249
|
-
n && console.timeEnd("useDelayAsync - handler-execute-time"), o && console.error(
|
|
1252
|
+
const M = await e(...u);
|
|
1253
|
+
return n && console.log("useDelayAsync - execute res: ", M), n && console.timeEnd("useDelayAsync - handler-execute-time"), await f(s), await t?.onSuccess?.(M, [...u]), M;
|
|
1254
|
+
} catch (M) {
|
|
1255
|
+
n && console.timeEnd("useDelayAsync - handler-execute-time"), o && console.error(M), await f(s), await t?.onError?.(M, [...u]);
|
|
1250
1256
|
}
|
|
1251
1257
|
}
|
|
1252
1258
|
}
|
|
@@ -1257,7 +1263,7 @@ function Uo(e, t) {
|
|
|
1257
1263
|
n && console.log("useDelayAsync - onBeforeUnmount - close"), f();
|
|
1258
1264
|
}), {
|
|
1259
1265
|
processing: r,
|
|
1260
|
-
handler:
|
|
1266
|
+
handler: g,
|
|
1261
1267
|
close: f
|
|
1262
1268
|
};
|
|
1263
1269
|
}
|
|
@@ -1265,14 +1271,14 @@ function xn(e, t) {
|
|
|
1265
1271
|
return e > t ? "horizontal" : t > e ? "vertical" : "";
|
|
1266
1272
|
}
|
|
1267
1273
|
function Cn() {
|
|
1268
|
-
const e =
|
|
1274
|
+
const e = h(0), t = h(0), n = h(0), o = h(0), l = h(0), s = h(0), a = h(""), d = () => a.value === "vertical", i = () => a.value === "horizontal", r = () => {
|
|
1269
1275
|
n.value = 0, o.value = 0, l.value = 0, s.value = 0, a.value = "";
|
|
1270
1276
|
};
|
|
1271
|
-
function v(
|
|
1272
|
-
r(), e.value =
|
|
1277
|
+
function v(g, f) {
|
|
1278
|
+
r(), e.value = g, t.value = f;
|
|
1273
1279
|
}
|
|
1274
|
-
function c(
|
|
1275
|
-
n.value = (
|
|
1280
|
+
function c(g, f) {
|
|
1281
|
+
n.value = (g < 0 ? 0 : g) - e.value, o.value = f - t.value, l.value = Math.abs(n.value), s.value = Math.abs(o.value);
|
|
1276
1282
|
const u = 10;
|
|
1277
1283
|
(!a.value || l.value < u && s.value < u) && (a.value = xn(l.value, s.value));
|
|
1278
1284
|
}
|
|
@@ -1307,7 +1313,7 @@ function On(e) {
|
|
|
1307
1313
|
return { startTap: l, checkTap: s };
|
|
1308
1314
|
}
|
|
1309
1315
|
function bn(e, t) {
|
|
1310
|
-
const n =
|
|
1316
|
+
const n = h(!1);
|
|
1311
1317
|
function o() {
|
|
1312
1318
|
n.value || (n.value = !0, A(e)?.addEventListener("transitionend", l));
|
|
1313
1319
|
}
|
|
@@ -1350,18 +1356,18 @@ function Qn(e) {
|
|
|
1350
1356
|
};
|
|
1351
1357
|
}
|
|
1352
1358
|
function wt(e) {
|
|
1353
|
-
const t =
|
|
1359
|
+
const t = h(!1), n = h(1), o = h(9), l = h(), s = h(), a = h({ width: 0, height: 0 }), d = h({ width: 0, height: 0 }), i = Te({
|
|
1354
1360
|
level: 1,
|
|
1355
1361
|
offsetX: 0,
|
|
1356
1362
|
offsetY: 0,
|
|
1357
1363
|
zooming: !1,
|
|
1358
1364
|
preview: !0,
|
|
1359
1365
|
lastCenter: { x: 0, y: 0 }
|
|
1360
|
-
}), r =
|
|
1366
|
+
}), r = h({}), v = Cn(), c = bn(s, {
|
|
1361
1367
|
onComplate() {
|
|
1362
|
-
i.preview ||
|
|
1368
|
+
i.preview || m();
|
|
1363
1369
|
}
|
|
1364
|
-
}),
|
|
1370
|
+
}), g = On({
|
|
1365
1371
|
onTap() {
|
|
1366
1372
|
e.onTap?.();
|
|
1367
1373
|
},
|
|
@@ -1381,28 +1387,28 @@ function wt(e) {
|
|
|
1381
1387
|
);
|
|
1382
1388
|
async function f(p) {
|
|
1383
1389
|
const [E] = p;
|
|
1384
|
-
E.contentRect.width == d.value.width && E.contentRect.height == d.value.height || (await u(l.value), await
|
|
1390
|
+
E.contentRect.width == d.value.width && E.contentRect.height == d.value.height || (await u(l.value), await m(i.level, !0));
|
|
1385
1391
|
}
|
|
1386
1392
|
async function u(p, E) {
|
|
1387
|
-
await
|
|
1393
|
+
await C(p, E), p && Y();
|
|
1388
1394
|
}
|
|
1389
|
-
async function
|
|
1395
|
+
async function M(p) {
|
|
1390
1396
|
if (!i.preview)
|
|
1391
1397
|
return;
|
|
1392
1398
|
i.preview = !1, p = p ?? i.level;
|
|
1393
1399
|
const E = s.value;
|
|
1394
1400
|
if (!E)
|
|
1395
1401
|
return;
|
|
1396
|
-
const { scrollTop: S, scrollLeft: Q } = E, { width: k, height: w } = a.value, { scaleW: L, scaleH: U } = O(p), { top: $, left: b } =
|
|
1402
|
+
const { scrollTop: S, scrollLeft: Q } = E, { width: k, height: w } = a.value, { scaleW: L, scaleH: U } = O(p), { top: $, left: b } = N(L, U), F = b != 0 ? b : Q * -1, J = $ != 0 ? $ : S * -1;
|
|
1397
1403
|
E.scrollTop = 0, E.scrollLeft = 0;
|
|
1398
1404
|
const { value: V } = r;
|
|
1399
1405
|
V.width = `${k}px`, V.height = `${w}px`, V.maxHeight = "none", V.transitionDuration = "0s", V.transform = be(F, J, p), r.value = V, await Me(), i.offsetX = F, i.offsetY = J, await ot(20);
|
|
1400
1406
|
}
|
|
1401
|
-
async function
|
|
1407
|
+
async function m(p, E) {
|
|
1402
1408
|
if (!E && i.preview)
|
|
1403
1409
|
return;
|
|
1404
1410
|
i.preview = !0, p = p ?? i.level;
|
|
1405
|
-
const { value: S } = r, { scaleW: Q, scaleH: k } = O(p), { left: w, top: L } =
|
|
1411
|
+
const { value: S } = r, { scaleW: Q, scaleH: k } = O(p), { left: w, top: L } = N(Q, k);
|
|
1406
1412
|
p === 1 && (S.maxHeight = "100%"), S.width = `${Q}px`, S.height = `${k}px`, S.transitionDuration = "0s", S.transform = be(w, L, 1), r.value = S, await Me();
|
|
1407
1413
|
const U = s.value;
|
|
1408
1414
|
if (!U)
|
|
@@ -1417,8 +1423,8 @@ function wt(e) {
|
|
|
1417
1423
|
o.value + o.value * 0.5
|
|
1418
1424
|
), p == i.level))
|
|
1419
1425
|
return;
|
|
1420
|
-
i.preview && await
|
|
1421
|
-
const { value: Q } = r, { width: k, height: w } = a.value, { scaleW: L, scaleH: U } = O(p), { top: $, left: b } =
|
|
1426
|
+
i.preview && await M(), E || (E = { x: v.startX.value, y: v.startY.value });
|
|
1427
|
+
const { value: Q } = r, { width: k, height: w } = a.value, { scaleW: L, scaleH: U } = O(p), { top: $, left: b } = N(L, U), F = p / i.level, J = {
|
|
1422
1428
|
left: Math.abs(k * p - d.value.width) * -1,
|
|
1423
1429
|
top: Math.abs(w * p - d.value.height) * -1,
|
|
1424
1430
|
right: b,
|
|
@@ -1427,11 +1433,11 @@ function wt(e) {
|
|
|
1427
1433
|
let V = b != 0 ? b : (i.offsetX - E.x) * F + E.x, oe = $ != 0 ? $ : (i.offsetY - E.y) * F + E.y;
|
|
1428
1434
|
V = ae(Oe(V, J.left, J.right)), oe = ae(Oe(oe, J.top, J.bottom)), Q.width = `${k}px`, Q.height = `${w}px`, Q.transitionDuration = S ? kn(p) : "0s", Q.transform = be(V, oe, p), i.offsetX = V, i.offsetY = oe, i.level = p, r.value = Q, await Me(), S && c.startTransition(), e.onScale?.(p);
|
|
1429
1435
|
}
|
|
1430
|
-
function
|
|
1431
|
-
const p = i.level > 1 ? 1 :
|
|
1436
|
+
function T() {
|
|
1437
|
+
const p = i.level > 1 ? 1 : j();
|
|
1432
1438
|
I(p, void 0, !0);
|
|
1433
1439
|
}
|
|
1434
|
-
function
|
|
1440
|
+
function y(p, E) {
|
|
1435
1441
|
if (!i.preview)
|
|
1436
1442
|
return;
|
|
1437
1443
|
const S = s.value;
|
|
@@ -1440,10 +1446,10 @@ function wt(e) {
|
|
|
1440
1446
|
top: i.offsetY - E
|
|
1441
1447
|
});
|
|
1442
1448
|
}
|
|
1443
|
-
async function
|
|
1444
|
-
i.level >= n.value && i.level <= o.value ? i.zooming && await
|
|
1449
|
+
async function D() {
|
|
1450
|
+
i.level >= n.value && i.level <= o.value ? i.zooming && await m() : i.level < n.value ? await I(n.value, void 0, !0) : i.level > o.value && await I(o.value, i.lastCenter, !0), i.zooming = !1;
|
|
1445
1451
|
}
|
|
1446
|
-
function
|
|
1452
|
+
function j() {
|
|
1447
1453
|
const { width: p, height: E } = a.value, { width: S, height: Q } = d.value, k = 2.5;
|
|
1448
1454
|
let w;
|
|
1449
1455
|
return E == Q ? (w = S / p, w - 1 < 0.1 && (w = k)) : w = Math.max(k, S / p, Q / E), w;
|
|
@@ -1455,11 +1461,11 @@ function wt(e) {
|
|
|
1455
1461
|
scaleH: ae(p * S)
|
|
1456
1462
|
};
|
|
1457
1463
|
}
|
|
1458
|
-
function
|
|
1464
|
+
function N(p, E) {
|
|
1459
1465
|
const { width: S, height: Q } = d.value, k = Math.max(0, (Q - E) * 0.5), w = Math.max(0, (S - p) * 0.5);
|
|
1460
1466
|
return { top: k, left: w };
|
|
1461
1467
|
}
|
|
1462
|
-
async function
|
|
1468
|
+
async function C(p, E) {
|
|
1463
1469
|
if (p = p ?? l.value, E = E ?? s.value, !E)
|
|
1464
1470
|
return;
|
|
1465
1471
|
let S, { clientWidth: Q = 0, clientHeight: k = 0 } = p || {};
|
|
@@ -1476,10 +1482,10 @@ function wt(e) {
|
|
|
1476
1482
|
(Q === 0 || k === 0) && (Q = a.value.width || w, k = a.value.height || L), a.value = {
|
|
1477
1483
|
width: Math.min(Q, w),
|
|
1478
1484
|
height: Math.min(k, L)
|
|
1479
|
-
}, d.value = { width: w, height: L },
|
|
1485
|
+
}, d.value = { width: w, height: L }, m(void 0, !0);
|
|
1480
1486
|
}
|
|
1481
1487
|
function Y() {
|
|
1482
|
-
const p =
|
|
1488
|
+
const p = j();
|
|
1483
1489
|
o.value = Math.max(o.value, p * 2);
|
|
1484
1490
|
}
|
|
1485
1491
|
function X(p) {
|
|
@@ -1489,33 +1495,33 @@ function wt(e) {
|
|
|
1489
1495
|
touch: v,
|
|
1490
1496
|
state: i,
|
|
1491
1497
|
style: r,
|
|
1492
|
-
gesture:
|
|
1498
|
+
gesture: g,
|
|
1493
1499
|
transition: c,
|
|
1494
1500
|
imageRef: l,
|
|
1495
1501
|
containerRef: s,
|
|
1496
|
-
switchToZoom:
|
|
1497
|
-
switchToPreview:
|
|
1498
|
-
panTo:
|
|
1502
|
+
switchToZoom: M,
|
|
1503
|
+
switchToPreview: m,
|
|
1504
|
+
panTo: y,
|
|
1499
1505
|
zoomTo: I,
|
|
1500
|
-
zoomFinished:
|
|
1501
|
-
toggleZoom:
|
|
1506
|
+
zoomFinished: D,
|
|
1507
|
+
toggleZoom: T,
|
|
1502
1508
|
setDisableZoom: X
|
|
1503
1509
|
};
|
|
1504
1510
|
}
|
|
1505
1511
|
function Et(e, t) {
|
|
1506
1512
|
const { state: n, touch: o, transition: l, containerRef: s } = e, a = ln(s);
|
|
1507
1513
|
let d, i;
|
|
1508
|
-
function r(
|
|
1509
|
-
d =
|
|
1514
|
+
function r(g) {
|
|
1515
|
+
d = g;
|
|
1510
1516
|
}
|
|
1511
|
-
function v(
|
|
1512
|
-
return d ==
|
|
1517
|
+
function v(g) {
|
|
1518
|
+
return d == g;
|
|
1513
1519
|
}
|
|
1514
|
-
function c(
|
|
1520
|
+
function c(g, f, u, M) {
|
|
1515
1521
|
a.measure();
|
|
1516
|
-
const { top:
|
|
1517
|
-
if (
|
|
1518
|
-
i =
|
|
1522
|
+
const { top: m, left: I, right: T, bottom: y } = a.arrivedState;
|
|
1523
|
+
if (g == "start")
|
|
1524
|
+
i = m || I || T || y;
|
|
1519
1525
|
else if (d == 2)
|
|
1520
1526
|
i = !1;
|
|
1521
1527
|
else if (i) {
|
|
@@ -1523,15 +1529,15 @@ function Et(e, t) {
|
|
|
1523
1529
|
if (n.level != 1)
|
|
1524
1530
|
i = !1;
|
|
1525
1531
|
else {
|
|
1526
|
-
const
|
|
1527
|
-
i =
|
|
1532
|
+
const D = o.startY.value < u;
|
|
1533
|
+
i = m && D || y && !D;
|
|
1528
1534
|
}
|
|
1529
1535
|
else if (o.direction.value == "horizontal") {
|
|
1530
|
-
const
|
|
1531
|
-
i = I &&
|
|
1536
|
+
const D = o.startX.value < f;
|
|
1537
|
+
i = I && D || T && !D;
|
|
1532
1538
|
}
|
|
1533
1539
|
}
|
|
1534
|
-
i && l.transitioning.value && (i = !1,
|
|
1540
|
+
i && l.transitioning.value && (i = !1, M?.preventDefault()), g == "end" && !i && (f = o.startX.value, u = o.startY.value, i = !0), (g != "move" || i) && t?.(g, o.direction.value, f, u, M);
|
|
1535
1541
|
}
|
|
1536
1542
|
return { onSwipeEdge: c, setFingerNum: r, isEqualFingerNum: v };
|
|
1537
1543
|
}
|
|
@@ -1543,56 +1549,56 @@ function Ro(e) {
|
|
|
1543
1549
|
...e
|
|
1544
1550
|
}), { state: n, touch: o, gesture: l, transition: s } = t;
|
|
1545
1551
|
let a = !1, d = null;
|
|
1546
|
-
const i = { top: 0, left: 0 }, r = je(
|
|
1547
|
-
Ne("keyup",
|
|
1548
|
-
function
|
|
1549
|
-
const
|
|
1550
|
-
if (!
|
|
1552
|
+
const i = { top: 0, left: 0 }, r = je(m, 150), { onSwipeEdge: v } = Et(t, e.onSwipeEdge), c = h({ top: 0, left: 0 });
|
|
1553
|
+
Ne("keyup", T), Ne("keydown", I);
|
|
1554
|
+
function g(y) {
|
|
1555
|
+
const D = t.containerRef.value;
|
|
1556
|
+
if (!D)
|
|
1551
1557
|
return;
|
|
1552
|
-
const { left:
|
|
1553
|
-
c.value.left =
|
|
1554
|
-
let
|
|
1555
|
-
o.start(
|
|
1558
|
+
const { left: j, top: O } = D.getBoundingClientRect();
|
|
1559
|
+
c.value.left = j, c.value.top = O, l.startTap();
|
|
1560
|
+
let N = y.clientX - j, C = y.clientY - O;
|
|
1561
|
+
o.start(N, C), v("start", N, C, y), s.transitioning.value || (a = !0, i.left = j, i.top = O, n.offsetX = D.scrollLeft, n.offsetY = D.scrollTop), window.addEventListener("pointermove", f), window.addEventListener("pointerup", u);
|
|
1556
1562
|
}
|
|
1557
|
-
function f(
|
|
1563
|
+
function f(y) {
|
|
1558
1564
|
if (!a)
|
|
1559
1565
|
return;
|
|
1560
|
-
let
|
|
1561
|
-
o.move(
|
|
1566
|
+
let D = y.clientX, j = y.clientY;
|
|
1567
|
+
o.move(D, j), v(
|
|
1562
1568
|
"move",
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1569
|
+
D - c.value.left,
|
|
1570
|
+
j - c.value.top,
|
|
1571
|
+
y
|
|
1566
1572
|
), n.level !== 1 && t.panTo(
|
|
1567
1573
|
o.deltaX.value - i.left,
|
|
1568
1574
|
o.deltaY.value - i.top
|
|
1569
1575
|
);
|
|
1570
1576
|
}
|
|
1571
|
-
function u(
|
|
1572
|
-
v("end", o.offsetX.value, o.offsetY.value,
|
|
1577
|
+
function u(y) {
|
|
1578
|
+
v("end", o.offsetX.value, o.offsetY.value, y), l.checkTap(o.offsetX.value, o.offsetY.value), o.reset(), a = !1, window.removeEventListener("pointermove", f), window.removeEventListener("pointerup", u);
|
|
1573
1579
|
}
|
|
1574
|
-
function
|
|
1575
|
-
if (!
|
|
1580
|
+
function M(y) {
|
|
1581
|
+
if (!y.ctrlKey)
|
|
1576
1582
|
return;
|
|
1577
|
-
n.zooming || (n.zooming = !0, d == "Control" && window.addEventListener("keyup",
|
|
1578
|
-
let
|
|
1579
|
-
|
|
1580
|
-
const
|
|
1583
|
+
n.zooming || (n.zooming = !0, d == "Control" && window.addEventListener("keyup", m)), y.preventDefault();
|
|
1584
|
+
let D = -y.deltaY;
|
|
1585
|
+
y.deltaMode === 1 ? D *= 0.05 : D *= y.deltaMode ? 1 : 2e-3, d != "Control" && (D *= 10), D = 2 ** D;
|
|
1586
|
+
const j = n.level * D;
|
|
1581
1587
|
n.lastCenter = {
|
|
1582
|
-
x:
|
|
1583
|
-
y:
|
|
1584
|
-
}, t.zoomTo(
|
|
1588
|
+
x: y.clientX - c.value.left,
|
|
1589
|
+
y: y.clientY - c.value.top
|
|
1590
|
+
}, t.zoomTo(j, n.lastCenter), d != "Control" && r();
|
|
1585
1591
|
}
|
|
1586
|
-
function
|
|
1587
|
-
t.zoomFinished(), window.removeEventListener("keyup",
|
|
1592
|
+
function m() {
|
|
1593
|
+
t.zoomFinished(), window.removeEventListener("keyup", m);
|
|
1588
1594
|
}
|
|
1589
|
-
function I(
|
|
1590
|
-
d =
|
|
1595
|
+
function I(y) {
|
|
1596
|
+
d = y.key;
|
|
1591
1597
|
}
|
|
1592
|
-
function
|
|
1598
|
+
function T() {
|
|
1593
1599
|
d = null;
|
|
1594
1600
|
}
|
|
1595
|
-
return { core: t, onPointerDown:
|
|
1601
|
+
return { core: t, onPointerDown: g, onWheel: M };
|
|
1596
1602
|
}
|
|
1597
1603
|
function $o(e) {
|
|
1598
1604
|
const t = wt({
|
|
@@ -1608,26 +1614,26 @@ function $o(e) {
|
|
|
1608
1614
|
async function v(f) {
|
|
1609
1615
|
const { touches: u } = f;
|
|
1610
1616
|
s(u.length), n.zooming = d(2), l.startTap();
|
|
1611
|
-
const { clientX:
|
|
1612
|
-
o.start(
|
|
1617
|
+
const { clientX: M, clientY: m } = u[0];
|
|
1618
|
+
o.start(M, m), a("start", M, m, f), n.zooming && (f.preventDefault(), i = n.level, r = rt(u), await t.switchToZoom(), n.lastCenter = Qn(u));
|
|
1613
1619
|
}
|
|
1614
1620
|
async function c(f) {
|
|
1615
1621
|
const { touches: u } = f;
|
|
1616
1622
|
s(u.length);
|
|
1617
|
-
const { clientX:
|
|
1618
|
-
if (o.move(
|
|
1623
|
+
const { clientX: M, clientY: m } = u[0];
|
|
1624
|
+
if (o.move(M, m), a("move", M, m, f), n.zooming && d(2)) {
|
|
1619
1625
|
f.preventDefault();
|
|
1620
|
-
const I = rt(u),
|
|
1621
|
-
t.zoomTo(
|
|
1626
|
+
const I = rt(u), T = i * I / r;
|
|
1627
|
+
t.zoomTo(T, n.lastCenter);
|
|
1622
1628
|
}
|
|
1623
1629
|
}
|
|
1624
|
-
async function
|
|
1630
|
+
async function g(f) {
|
|
1625
1631
|
if (f.touches.length)
|
|
1626
1632
|
return;
|
|
1627
|
-
const { clientX: u, clientY:
|
|
1628
|
-
a("end", u,
|
|
1633
|
+
const { clientX: u, clientY: M } = f.changedTouches[0];
|
|
1634
|
+
a("end", u, M, f), l.checkTap(o.offsetX.value, o.offsetY.value), t.zoomFinished(), o.reset();
|
|
1629
1635
|
}
|
|
1630
|
-
return { core: t, onTouchStart: v, onTouchMove: c, onTouchEnd:
|
|
1636
|
+
return { core: t, onTouchStart: v, onTouchMove: c, onTouchEnd: g };
|
|
1631
1637
|
}
|
|
1632
1638
|
function Ho() {
|
|
1633
1639
|
const e = Te({
|
|
@@ -1651,7 +1657,7 @@ function Ho() {
|
|
|
1651
1657
|
return { state: e, dragStart: t, dragMove: n, dragEnd: o };
|
|
1652
1658
|
}
|
|
1653
1659
|
function Yn() {
|
|
1654
|
-
const e =
|
|
1660
|
+
const e = h(!1), t = h(!1);
|
|
1655
1661
|
return gt(() => {
|
|
1656
1662
|
!t.value || (e.value = !0);
|
|
1657
1663
|
}), ce(() => {
|
|
@@ -1695,7 +1701,7 @@ const Un = ["onClick"], Rn = /* @__PURE__ */ q({
|
|
|
1695
1701
|
buttonClickEvent: null
|
|
1696
1702
|
},
|
|
1697
1703
|
setup(e) {
|
|
1698
|
-
const t = e, n =
|
|
1704
|
+
const t = e, n = h(), o = h(), l = h(), s = z(() => {
|
|
1699
1705
|
switch (t.position) {
|
|
1700
1706
|
case "top":
|
|
1701
1707
|
return 10;
|
|
@@ -1811,58 +1817,58 @@ function Pn(e) {
|
|
|
1811
1817
|
performance: l = {},
|
|
1812
1818
|
maxHeightRatio: s = 0.9,
|
|
1813
1819
|
observeMethod: a = "classList"
|
|
1814
|
-
} = e, d =
|
|
1820
|
+
} = e, d = h(!0), i = je(X, 100);
|
|
1815
1821
|
let r, v = "";
|
|
1816
|
-
const c =
|
|
1822
|
+
const c = h(0), g = h(0), f = h(0), u = h({
|
|
1817
1823
|
top: 0,
|
|
1818
1824
|
scrollTop: 0,
|
|
1819
1825
|
scrollHeight: 0,
|
|
1820
1826
|
clientHeight: 0
|
|
1821
|
-
}),
|
|
1827
|
+
}), M = h({
|
|
1822
1828
|
clientHeight: 0
|
|
1823
|
-
}),
|
|
1829
|
+
}), m = z(() => !!g.value), I = z(() => u.value.scrollHeight > u.value.clientHeight), T = z(() => o ? u.value.clientHeight - j.value : u.value.clientHeight - M.value.clientHeight), y = z(() => u.value.scrollHeight - u.value.clientHeight), D = z(() => !u.value.clientHeight && !u.value.scrollHeight ? 1 : Math.max(
|
|
1824
1830
|
u.value.clientHeight / u.value.scrollHeight,
|
|
1825
1831
|
0.05
|
|
1826
|
-
)),
|
|
1832
|
+
)), j = z(() => D.value > s ? 0 : D.value * u.value.clientHeight), O = z(() => ({
|
|
1827
1833
|
willChange: "transform",
|
|
1828
1834
|
transform: `translate3d(0,${f.value}px,0)`,
|
|
1829
|
-
height: o ? `${
|
|
1835
|
+
height: o ? `${j.value}px` : void 0
|
|
1830
1836
|
}));
|
|
1831
1837
|
We(t, () => L());
|
|
1832
|
-
function
|
|
1833
|
-
Y(),
|
|
1838
|
+
function N(b) {
|
|
1839
|
+
Y(), g.value = b.clientY - n.value.getBoundingClientRect().top || 1, v = getComputedStyle(t.value).scrollBehavior, v === "smooth" && (t.value.style.scrollBehavior = "unset");
|
|
1834
1840
|
}
|
|
1835
|
-
function
|
|
1836
|
-
t.value.style.scrollBehavior = v,
|
|
1841
|
+
function C() {
|
|
1842
|
+
t.value.style.scrollBehavior = v, g.value = 0, i();
|
|
1837
1843
|
}
|
|
1838
1844
|
function Y() {
|
|
1839
1845
|
d.value = !1;
|
|
1840
1846
|
}
|
|
1841
1847
|
function X() {
|
|
1842
|
-
|
|
1848
|
+
m.value || (d.value = !0);
|
|
1843
1849
|
}
|
|
1844
1850
|
function p(b) {
|
|
1845
|
-
if (!
|
|
1851
|
+
if (!m.value)
|
|
1846
1852
|
return;
|
|
1847
|
-
let F = b.clientY - u.value.top -
|
|
1848
|
-
F < 0 ? f.value = 0 : F >=
|
|
1849
|
-
top: f.value /
|
|
1853
|
+
let F = b.clientY - u.value.top - g.value;
|
|
1854
|
+
F < 0 ? f.value = 0 : F >= T.value ? f.value = T.value : f.value = F, t.value.scrollTo({
|
|
1855
|
+
top: f.value / T.value * y.value
|
|
1850
1856
|
});
|
|
1851
1857
|
}
|
|
1852
1858
|
function E() {
|
|
1853
|
-
|
|
1859
|
+
m.value || S();
|
|
1854
1860
|
}
|
|
1855
1861
|
function S() {
|
|
1856
1862
|
cancelAnimationFrame(r), r = requestAnimationFrame(Q);
|
|
1857
1863
|
}
|
|
1858
1864
|
function Q() {
|
|
1859
|
-
t.value && (c.value = l.scrollTop?.value ?? t.value.scrollTop, f.value = c.value /
|
|
1865
|
+
t.value && (c.value = l.scrollTop?.value ?? t.value.scrollTop, f.value = c.value / y.value * T.value);
|
|
1860
1866
|
}
|
|
1861
1867
|
function k(b) {
|
|
1862
1868
|
let F = "addEventListener";
|
|
1863
|
-
b === "add" ? F = "addEventListener" : F = "removeEventListener", n.value?.[F]("pointerdown",
|
|
1869
|
+
b === "add" ? F = "addEventListener" : F = "removeEventListener", n.value?.[F]("pointerdown", N, {
|
|
1864
1870
|
passive: !0
|
|
1865
|
-
}), window[F]("pointermove", p, { passive: !0 }), window[F]("pointerup",
|
|
1871
|
+
}), window[F]("pointermove", p, { passive: !0 }), window[F]("pointerup", C, { passive: !0 });
|
|
1866
1872
|
}
|
|
1867
1873
|
const w = new MutationObserver((b) => {
|
|
1868
1874
|
(a == "classList" || b.map((J) => J.oldValue).join().includes("height")) && L();
|
|
@@ -1872,11 +1878,11 @@ function Pn(e) {
|
|
|
1872
1878
|
const { scrollHeight: b = 0, clientHeight: F = 0 } = t.value || {}, { scrollHeight: J, clientHeight: V } = u.value;
|
|
1873
1879
|
b != J && (u.value.scrollHeight = b, Q()), F != V && (u.value.clientHeight = F, Q());
|
|
1874
1880
|
const { clientHeight: oe = 0 } = n.value || {};
|
|
1875
|
-
oe !=
|
|
1881
|
+
oe != M.value.clientHeight && (M.value.clientHeight = oe);
|
|
1876
1882
|
}
|
|
1877
1883
|
function U() {
|
|
1878
1884
|
Y(), setTimeout(() => {
|
|
1879
|
-
|
|
1885
|
+
M.value.clientHeight = n.value?.clientHeight ?? 0, X();
|
|
1880
1886
|
}, 150);
|
|
1881
1887
|
}
|
|
1882
1888
|
function $() {
|
|
@@ -1899,14 +1905,14 @@ function Pn(e) {
|
|
|
1899
1905
|
Y(), i();
|
|
1900
1906
|
}), {
|
|
1901
1907
|
isScrollEnd: d,
|
|
1902
|
-
isDragSlider:
|
|
1908
|
+
isDragSlider: m,
|
|
1903
1909
|
offsetTop: f,
|
|
1904
1910
|
scrollTop: c,
|
|
1905
1911
|
scrollable: I,
|
|
1906
1912
|
sliderPos: O,
|
|
1907
1913
|
init: $,
|
|
1908
1914
|
modifySliderEventListener: k,
|
|
1909
|
-
heightRatio:
|
|
1915
|
+
heightRatio: D
|
|
1910
1916
|
};
|
|
1911
1917
|
}
|
|
1912
1918
|
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({
|
|
@@ -1920,13 +1926,13 @@ const Fn = (e) => (Ae("data-v-7fd39e51"), e = e(), ze(), e), Wn = /* @__PURE__ *
|
|
|
1920
1926
|
maxHeightRatio: { default: 0.9 }
|
|
1921
1927
|
},
|
|
1922
1928
|
setup(e, { expose: t }) {
|
|
1923
|
-
const n = e, o = !!Rt().default, l =
|
|
1929
|
+
const n = e, o = !!Rt().default, l = h(null), s = z(() => n.containerEl), a = Pn({
|
|
1924
1930
|
containerEl: s,
|
|
1925
1931
|
sliderEl: l,
|
|
1926
1932
|
autoHeight: o ? n.autoHeight : !0,
|
|
1927
1933
|
performance: n.performance,
|
|
1928
1934
|
observeMethod: n.observeMethod
|
|
1929
|
-
}), { scrollable: d, isScrollEnd: i, sliderPos: r, heightRatio: v } = a, c =
|
|
1935
|
+
}), { scrollable: d, isScrollEnd: i, sliderPos: r, heightRatio: v } = a, c = h(!1), g = n.autoHide ? z(() => n.maxHeightRatio < v.value ? !1 : c.value || !i.value) : z(() => n.maxHeightRatio < v.value ? !1 : d.value), { load: f } = Xe(
|
|
1930
1936
|
`.hide-scrollbar {
|
|
1931
1937
|
scrollbar-width: none;
|
|
1932
1938
|
-ms-overflow-style: none;
|
|
@@ -1946,24 +1952,24 @@ const Fn = (e) => (Ae("data-v-7fd39e51"), e = e(), ze(), e), Wn = /* @__PURE__ *
|
|
|
1946
1952
|
function u() {
|
|
1947
1953
|
c.value = !0;
|
|
1948
1954
|
}
|
|
1949
|
-
function
|
|
1955
|
+
function M() {
|
|
1950
1956
|
c.value = !1;
|
|
1951
1957
|
}
|
|
1952
|
-
return t({ uScrollBarReturn: a }), (
|
|
1958
|
+
return t({ uScrollBarReturn: a }), (m, I) => (B(), Ee(Ue, null, {
|
|
1953
1959
|
default: Re(() => [
|
|
1954
1960
|
re(R("div", {
|
|
1955
1961
|
ref_key: "sliderRef",
|
|
1956
1962
|
ref: l,
|
|
1957
1963
|
class: "slider-wrapper",
|
|
1958
1964
|
onMouseenter: u,
|
|
1959
|
-
onMouseleave:
|
|
1965
|
+
onMouseleave: M,
|
|
1960
1966
|
style: K(A(r))
|
|
1961
1967
|
}, [
|
|
1962
|
-
Ie(
|
|
1968
|
+
Ie(m.$slots, "default", {}, () => [
|
|
1963
1969
|
Wn
|
|
1964
1970
|
], !0)
|
|
1965
1971
|
], 36), [
|
|
1966
|
-
[Le, A(
|
|
1972
|
+
[Le, A(g)]
|
|
1967
1973
|
])
|
|
1968
1974
|
]),
|
|
1969
1975
|
_: 3
|
|
@@ -1985,34 +1991,34 @@ const Wo = /* @__PURE__ */ ne(Xn, [["__scopeId", "data-v-7fd39e51"]]), Zn = (e)
|
|
|
1985
1991
|
pullRefreshContainer: null
|
|
1986
1992
|
},
|
|
1987
1993
|
setup(e) {
|
|
1988
|
-
const t = e, n = 0.7, o = "#2EC1CC", l =
|
|
1989
|
-
transition: `${
|
|
1994
|
+
const t = e, n = 0.7, o = "#2EC1CC", l = h(-999), s = h(1), a = h(0), d = h(0.3), i = h(!1), r = h(0), v = h(0), c = h(0), g = h(0), f = h(0), u = h(), M = z(() => t.scrollTop), m = z(() => ({
|
|
1995
|
+
transition: `${g.value}ms`,
|
|
1990
1996
|
transform: `translate3d(0,${l.value}px, 0) scale(${s.value})`
|
|
1991
1997
|
})), I = z(() => ({
|
|
1992
1998
|
borderColor: o,
|
|
1993
|
-
transition:
|
|
1999
|
+
transition: g.value,
|
|
1994
2000
|
transform: `rotate(${100 + a.value}deg)`,
|
|
1995
2001
|
opacity: d.value
|
|
1996
2002
|
}));
|
|
1997
|
-
G(f, (
|
|
1998
|
-
|
|
1999
|
-
}), G(v, (
|
|
2003
|
+
G(f, (N) => {
|
|
2004
|
+
N === 0 && (l.value = -50, d.value = 0.3);
|
|
2005
|
+
}), G(v, (N) => {
|
|
2000
2006
|
if (f.value === 2)
|
|
2001
2007
|
return;
|
|
2002
|
-
const
|
|
2003
|
-
|
|
2008
|
+
const C = Math.pow(N, n);
|
|
2009
|
+
C === 0 && (l.value = -50), C <= 50 && C > 0 && (l.value = C - 45, a.value = Math.pow(C, 1.5), C > 15 ? i.value = !0 : i.value = !1), C > 50 && (l.value = 5, d.value = 1, f.value);
|
|
2004
2010
|
});
|
|
2005
|
-
const
|
|
2006
|
-
|
|
2007
|
-
},
|
|
2008
|
-
const
|
|
2009
|
-
|
|
2010
|
-
},
|
|
2011
|
+
const T = h(0), y = (N) => {
|
|
2012
|
+
T.value = N.touches[0].pageY;
|
|
2013
|
+
}, D = (N) => {
|
|
2014
|
+
const C = N.touches[0].pageY - T.value;
|
|
2015
|
+
T.value = N.touches[0].pageY, !t.refreshOff && (!t?.refresh || f.value !== 2 && M.value === 0 && (r.value === 0 && (r.value = N.touches[0].pageY), c.value = 0, O.value.style.transition = `${c.value}ms`, g.value = 0, v.value = N.touches[0].pageY - r.value, O.value.style.transform = `translate3d(0, ${Math.pow(v.value, n)}px, 0)`, C > 0 && N.preventDefault()));
|
|
2016
|
+
}, j = () => {
|
|
2011
2017
|
if (t.refreshOff || !t?.refresh || f.value === 2)
|
|
2012
2018
|
return;
|
|
2013
2019
|
r.value = 0, c.value = 300;
|
|
2014
|
-
const
|
|
2015
|
-
O.value.style.transition = `${c.value}ms`,
|
|
2020
|
+
const N = Math.pow(v.value, n);
|
|
2021
|
+
O.value.style.transition = `${c.value}ms`, N > 50 ? (f.value = 2, v.value = Math.pow(50, 1 / n), O.value.style.transform = `translate3d(0, ${Math.pow(v.value, n)}px, 0)`, g.value = 300, t?.refresh && t?.refresh().then(() => {
|
|
2016
2022
|
u.value = "\u5237\u65B0\u6210\u529F";
|
|
2017
2023
|
}).catch(() => {
|
|
2018
2024
|
u.value = "\u5237\u65B0\u5931\u8D25";
|
|
@@ -2023,18 +2029,18 @@ const Wo = /* @__PURE__ */ ne(Xn, [["__scopeId", "data-v-7fd39e51"]]), Zn = (e)
|
|
|
2023
2029
|
n
|
|
2024
2030
|
)}px, 0)`, setTimeout(() => {
|
|
2025
2031
|
u.value = void 0;
|
|
2026
|
-
},
|
|
2032
|
+
}, g.value);
|
|
2027
2033
|
}, 600);
|
|
2028
2034
|
})) : (v.value = 0, O.value.style.transform = `translate3d(0, ${Math.pow(v.value, n)}px, 0)`);
|
|
2029
|
-
}, O =
|
|
2035
|
+
}, O = h(null);
|
|
2030
2036
|
return ce(() => {
|
|
2031
2037
|
t?.refreshOff || (O.value = document.querySelector(
|
|
2032
2038
|
t.pullRefreshContainer
|
|
2033
|
-
), O.value?.addEventListener("touchstart",
|
|
2034
|
-
}), (
|
|
2039
|
+
), O.value?.addEventListener("touchstart", y), O.value?.addEventListener("touchmove", D), O.value?.addEventListener("touchend", j));
|
|
2040
|
+
}), (N, C) => (B(), H("div", Vn, [
|
|
2035
2041
|
R("div", {
|
|
2036
2042
|
class: "pull-refresh-box",
|
|
2037
|
-
style: K(A(
|
|
2043
|
+
style: K(A(m))
|
|
2038
2044
|
}, [
|
|
2039
2045
|
u.value ? (B(), H("div", no, He(u.value), 1)) : (B(), H("div", Kn, [
|
|
2040
2046
|
f.value == 2 ? (B(), H("div", Gn, [
|
|
@@ -2101,7 +2107,7 @@ const lo = /* @__PURE__ */ ne(oo, [["__scopeId", "data-v-df5da876"]]), so = ["da
|
|
|
2101
2107
|
vListReturn: l
|
|
2102
2108
|
});
|
|
2103
2109
|
const c = "virtualListWrapper" + new Date().getTime();
|
|
2104
|
-
function
|
|
2110
|
+
function g(f, u) {
|
|
2105
2111
|
return o.getItemKey ? o.getItemKey(f, u) : `${u}`;
|
|
2106
2112
|
}
|
|
2107
2113
|
return (f, u) => (B(), H(Qe, null, [
|
|
@@ -2116,23 +2122,23 @@ const lo = /* @__PURE__ */ ne(oo, [["__scopeId", "data-v-df5da876"]]), so = ["da
|
|
|
2116
2122
|
id: c
|
|
2117
2123
|
}, [
|
|
2118
2124
|
R("div", he({
|
|
2119
|
-
onScrollPassive: u[0] || (u[0] = (...
|
|
2125
|
+
onScrollPassive: u[0] || (u[0] = (...M) => A(a).onScroll && A(a).onScroll(...M)),
|
|
2120
2126
|
ref: A(a).ref,
|
|
2121
2127
|
class: "virtualList"
|
|
2122
2128
|
}, f.$attrs), [
|
|
2123
2129
|
R("div", _e(ke(A(d))), [
|
|
2124
2130
|
R("div", _e(ke(A(i))), [
|
|
2125
|
-
(B(!0), H(Qe, null, Ht(A(s), ({ data:
|
|
2126
|
-
key:
|
|
2127
|
-
"data-key":
|
|
2131
|
+
(B(!0), H(Qe, null, Ht(A(s), ({ data: M, index: m }) => (B(), H("div", {
|
|
2132
|
+
key: g(M, m),
|
|
2133
|
+
"data-key": g(M, m),
|
|
2128
2134
|
style: K({
|
|
2129
|
-
height: `${A(r)(
|
|
2135
|
+
height: `${A(r)(m).height}px`,
|
|
2130
2136
|
display: "flex"
|
|
2131
2137
|
})
|
|
2132
2138
|
}, [
|
|
2133
2139
|
Ie(f.$slots, "default", {
|
|
2134
|
-
data:
|
|
2135
|
-
index:
|
|
2140
|
+
data: M,
|
|
2141
|
+
index: m
|
|
2136
2142
|
}, void 0, !0)
|
|
2137
2143
|
], 12, so))), 128))
|
|
2138
2144
|
], 16)
|
|
@@ -2196,7 +2202,7 @@ const Zo = /* @__PURE__ */ ne(go, [["__scopeId", "data-v-33519afd"]]), ho = [
|
|
|
2196
2202
|
"image/x-livp"
|
|
2197
2203
|
];
|
|
2198
2204
|
function It(e, t) {
|
|
2199
|
-
const n =
|
|
2205
|
+
const n = h(e?.value), o = z(() => n.value?.startsWith("/_lzc")), l = h(!1), s = z(() => l.value), a = z(() => {
|
|
2200
2206
|
const i = t?.value;
|
|
2201
2207
|
return !i || i.startsWith("video/") ? !0 : i.startsWith("image/") ? o.value ? !0 : ho.includes(i) : !1;
|
|
2202
2208
|
});
|
|
@@ -2237,34 +2243,34 @@ const mo = ["title"], yo = { class: "tip" }, po = /* @__PURE__ */ Pt("\u5F53\u52
|
|
|
2237
2243
|
},
|
|
2238
2244
|
emits: ["load", "noSupport", "loadError"],
|
|
2239
2245
|
setup(e, { emit: t }) {
|
|
2240
|
-
const n = e, o =
|
|
2246
|
+
const n = e, o = h(), l = h(), s = h(!1), a = h(!1), d = h(!1), { src: i, mime: r } = ht(n), { imgSrc: v, isSupport: c, hasError: g, handleError: f } = It(i, r), { vImageCancel: u } = At(), { LoadingComp: M } = Nt({
|
|
2241
2247
|
component: hn,
|
|
2242
2248
|
delay: 300
|
|
2243
|
-
}),
|
|
2249
|
+
}), m = Wt(() => d.value && n.autoRemoveThumbnail ? !1 : n.thumbnail && !d.value);
|
|
2244
2250
|
function I() {
|
|
2245
2251
|
a.value = !0;
|
|
2246
2252
|
}
|
|
2247
|
-
function
|
|
2253
|
+
function T() {
|
|
2248
2254
|
a.value && (d.value = !0);
|
|
2249
2255
|
}
|
|
2250
|
-
async function
|
|
2251
|
-
I(),
|
|
2256
|
+
async function y() {
|
|
2257
|
+
I(), m.value ? (o.value?.addEventListener("animationend", D), o.value?.classList.add("showing"), await ot(10)) : o.value && t("load", o.value), o.value?.classList.remove("src-class");
|
|
2252
2258
|
}
|
|
2253
|
-
function
|
|
2254
|
-
o.value?.removeEventListener("animationend",
|
|
2259
|
+
function D() {
|
|
2260
|
+
o.value?.removeEventListener("animationend", D), o.value?.classList.remove("showing"), o.value && t("load", o.value), T();
|
|
2255
2261
|
}
|
|
2256
|
-
async function C
|
|
2257
|
-
|
|
2262
|
+
async function j(C) {
|
|
2263
|
+
C ? y() : l.value && t("load", l.value), s.value = !0;
|
|
2258
2264
|
}
|
|
2259
|
-
function O(
|
|
2260
|
-
|
|
2265
|
+
function O(C) {
|
|
2266
|
+
C ? (f(), t("loadError")) : I(), s.value = !0;
|
|
2261
2267
|
}
|
|
2262
|
-
function
|
|
2268
|
+
function N() {
|
|
2263
2269
|
t("noSupport");
|
|
2264
2270
|
}
|
|
2265
|
-
return (
|
|
2266
|
-
A(c) && !s.value ? (B(), Ee(A(
|
|
2267
|
-
A(c) ? A(
|
|
2271
|
+
return (C, Y) => (B(), H(Qe, null, [
|
|
2272
|
+
A(c) && !s.value ? (B(), Ee(A(M), { key: 0 })) : de("", !0),
|
|
2273
|
+
A(c) ? A(g) ? (B(), H("div", he({ key: 3 }, C.$attrs, {
|
|
2268
2274
|
title: A(v),
|
|
2269
2275
|
class: "tip-wrap"
|
|
2270
2276
|
}), [
|
|
@@ -2272,34 +2278,34 @@ const mo = ["title"], yo = { class: "tip" }, po = /* @__PURE__ */ Pt("\u5F53\u52
|
|
|
2272
2278
|
class: "bad-image",
|
|
2273
2279
|
name: e.badImageIconName
|
|
2274
2280
|
}, null, 8, ["name"])
|
|
2275
|
-
], 16, wo)) : Ie(
|
|
2281
|
+
], 16, wo)) : Ie(C.$slots, "default", {
|
|
2276
2282
|
key: 2,
|
|
2277
2283
|
src: A(v),
|
|
2278
|
-
onLoad:
|
|
2284
|
+
onLoad: j,
|
|
2279
2285
|
onError: O,
|
|
2280
2286
|
vImageCancel: A(u)
|
|
2281
2287
|
}, () => [
|
|
2282
|
-
A(
|
|
2288
|
+
A(m) ? re((B(), H("img", he({ key: 0 }, C.$attrs, {
|
|
2283
2289
|
ref_key: "thumbnailRef",
|
|
2284
2290
|
ref: l,
|
|
2285
|
-
onLoad: Y[0] || (Y[0] = (X) =>
|
|
2291
|
+
onLoad: Y[0] || (Y[0] = (X) => j()),
|
|
2286
2292
|
onError: Y[1] || (Y[1] = (X) => O()),
|
|
2287
2293
|
src: e.thumbnail
|
|
2288
2294
|
}), null, 16, To)), [
|
|
2289
2295
|
[A(u)]
|
|
2290
2296
|
]) : de("", !0),
|
|
2291
|
-
e.isShowSrc || a.value ? re((B(), H("img", he({ key: 1 },
|
|
2297
|
+
e.isShowSrc || a.value ? re((B(), H("img", he({ key: 1 }, C.$attrs, {
|
|
2292
2298
|
ref_key: "srcRef",
|
|
2293
2299
|
ref: o,
|
|
2294
2300
|
class: "src-class",
|
|
2295
|
-
onLoad: Y[2] || (Y[2] = (X) =>
|
|
2301
|
+
onLoad: Y[2] || (Y[2] = (X) => j(!0)),
|
|
2296
2302
|
onError: Y[3] || (Y[3] = (X) => O(!0)),
|
|
2297
2303
|
src: A(v)
|
|
2298
2304
|
}), null, 16, No)), [
|
|
2299
2305
|
[A(u)],
|
|
2300
2306
|
[Le, a.value]
|
|
2301
2307
|
]) : de("", !0)
|
|
2302
|
-
], !0) : (B(), H("div", he({ key: 1 },
|
|
2308
|
+
], !0) : (B(), H("div", he({ key: 1 }, C.$attrs, {
|
|
2303
2309
|
title: A(v),
|
|
2304
2310
|
class: "tip-wrap"
|
|
2305
2311
|
}), [
|
|
@@ -2308,7 +2314,7 @@ const mo = ["title"], yo = { class: "tip" }, po = /* @__PURE__ */ Pt("\u5F53\u52
|
|
|
2308
2314
|
name: e.noSupportIconName
|
|
2309
2315
|
}, null, 8, ["name"]),
|
|
2310
2316
|
re((B(), H("span", yo, Do)), [
|
|
2311
|
-
[A(mt),
|
|
2317
|
+
[A(mt), N]
|
|
2312
2318
|
])
|
|
2313
2319
|
], 16, mo))
|
|
2314
2320
|
], 64));
|
|
@@ -2322,11 +2328,11 @@ const Vo = /* @__PURE__ */ ne(Io, [["__scopeId", "data-v-bfec1a6b"]]), Ao = ["ti
|
|
|
2322
2328
|
},
|
|
2323
2329
|
emits: ["noSupport"],
|
|
2324
2330
|
setup(e, { emit: t }) {
|
|
2325
|
-
const n = e, o =
|
|
2331
|
+
const n = e, o = h(!1), { src: l, mime: s } = ht(n), { imgSrc: a, hasError: d, isSupport: i, handleError: r } = It(l, s), { vImageCancel: v } = At();
|
|
2326
2332
|
function c() {
|
|
2327
2333
|
t("noSupport");
|
|
2328
2334
|
}
|
|
2329
|
-
return (
|
|
2335
|
+
return (g, f) => A(i) ? A(d) ? (B(), H("div", {
|
|
2330
2336
|
key: 2,
|
|
2331
2337
|
title: A(a),
|
|
2332
2338
|
class: "icon-wrap"
|