@lazycatcloud/lzc-toolkit 0.0.220 → 0.0.223
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 +747 -725
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +6 -6
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/useVirtualList/PullRefresh.vue.d.ts +18 -5
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { shallowRef as mt, watchEffect as Yt, readonly as
|
|
1
|
+
import { shallowRef as mt, watchEffect as Yt, readonly as pt, getCurrentScope as Bt, onScopeDispose as yt, onMounted as ve, nextTick as De, ref as g, watch as G, customRef as Ut, unref as A, isRef as Rt, getCurrentInstance as We, onUpdated as $t, computed as z, reactive as Ie, onUnmounted as Dt, inject as le, provide as F, defineComponent as J, h as fe, render as Ee, openBlock as R, createBlock as Se, Transition as Xe, withCtx as Ze, withDirectives as de, createElementBlock as P, normalizeClass as ue, createElementVNode as B, withModifiers as we, renderSlot as he, createCommentVNode as ge, useCssVars as Ve, normalizeProps as $e, guardReactiveProps as He, pushScopeId as be, popScopeId as Oe, normalizeStyle as q, toDisplayString as Ke, vShow as _e, createVNode as Te, onBeforeUnmount as Tt, onActivated as Nt, onBeforeMount as Ht, onDeactivated as Pt, useSlots as Ft, createTextVNode as wt, toRef as Wt, Fragment as Pe, mergeProps as Ne, renderList as Xt, toRefs as It } from "vue";
|
|
2
2
|
const Zt = {
|
|
3
3
|
created(t, e) {
|
|
4
4
|
let n, o, l;
|
|
@@ -8,7 +8,7 @@ const Zt = {
|
|
|
8
8
|
function a(c) {
|
|
9
9
|
if (c.button != 0 || o === void 0)
|
|
10
10
|
return;
|
|
11
|
-
const
|
|
11
|
+
const d = c.clientX, i = c.clientY, f = Math.abs(d - o), r = Math.abs(i - l);
|
|
12
12
|
f > 5 || r > 5 || Date.now() - n > 300 || e.value?.(c);
|
|
13
13
|
}
|
|
14
14
|
t._down__ = s, t._up__ = a, t.addEventListener("pointerdown", s), t.addEventListener("pointerup", a);
|
|
@@ -40,7 +40,7 @@ function Vt(t, e) {
|
|
|
40
40
|
}, {
|
|
41
41
|
...e,
|
|
42
42
|
flush: (n = e?.flush) != null ? n : "sync"
|
|
43
|
-
}),
|
|
43
|
+
}), pt(o);
|
|
44
44
|
}
|
|
45
45
|
function Kt(t, e) {
|
|
46
46
|
let n, o, l;
|
|
@@ -48,21 +48,21 @@ function Kt(t, e) {
|
|
|
48
48
|
s.value = !0, l();
|
|
49
49
|
};
|
|
50
50
|
G(t, a, { flush: "sync" });
|
|
51
|
-
const c = typeof e == "function" ? e : e.get,
|
|
51
|
+
const c = typeof e == "function" ? e : e.get, d = typeof e == "function" ? void 0 : e.set, i = Ut((f, r) => (o = f, l = r, {
|
|
52
52
|
get() {
|
|
53
53
|
return s.value && (n = c(), s.value = !1), o(), n;
|
|
54
54
|
},
|
|
55
55
|
set(M) {
|
|
56
|
-
|
|
56
|
+
d?.(M);
|
|
57
57
|
}
|
|
58
58
|
}));
|
|
59
59
|
return Object.isExtensible(i) && (i.trigger = a), i;
|
|
60
60
|
}
|
|
61
61
|
function Ge(t) {
|
|
62
|
-
return Bt() ? (
|
|
62
|
+
return Bt() ? (yt(t), !0) : !1;
|
|
63
63
|
}
|
|
64
64
|
function se(t) {
|
|
65
|
-
return typeof t == "function" ? t() :
|
|
65
|
+
return typeof t == "function" ? t() : A(t);
|
|
66
66
|
}
|
|
67
67
|
const At = typeof window < "u" && typeof document < "u";
|
|
68
68
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
@@ -82,29 +82,29 @@ function Jt(t, e = {}) {
|
|
|
82
82
|
clearTimeout(c), l(), l = me;
|
|
83
83
|
};
|
|
84
84
|
return (c) => {
|
|
85
|
-
const
|
|
86
|
-
return n && s(n),
|
|
85
|
+
const d = se(t), i = se(e.maxWait);
|
|
86
|
+
return n && s(n), d <= 0 || i !== void 0 && i <= 0 ? (o && (s(o), o = null), Promise.resolve(c())) : new Promise((f, r) => {
|
|
87
87
|
l = e.rejectOnCancel ? r : f, i && !o && (o = setTimeout(() => {
|
|
88
88
|
n && s(n), o = null, f(c());
|
|
89
89
|
}, i)), n = setTimeout(() => {
|
|
90
90
|
o && s(o), o = null, f(c());
|
|
91
|
-
},
|
|
91
|
+
}, d);
|
|
92
92
|
});
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
95
|
function en(...t) {
|
|
96
|
-
let e = 0, n, o = !0, l = me, s, a, c,
|
|
97
|
-
!Rt(t[0]) && typeof t[0] == "object" ? { delay: a, trailing: c = !0, leading:
|
|
96
|
+
let e = 0, n, o = !0, l = me, s, a, c, d, i;
|
|
97
|
+
!Rt(t[0]) && typeof t[0] == "object" ? { delay: a, trailing: c = !0, leading: d = !0, rejectOnCancel: i = !1 } = t[0] : [a, c = !0, d = !0, i = !1] = t;
|
|
98
98
|
const f = () => {
|
|
99
99
|
n && (clearTimeout(n), n = void 0, l(), l = me);
|
|
100
100
|
};
|
|
101
101
|
return (M) => {
|
|
102
|
-
const
|
|
103
|
-
return f(),
|
|
104
|
-
l = i ? I :
|
|
105
|
-
e = Date.now(), o = !0, p(
|
|
106
|
-
}, Math.max(0,
|
|
107
|
-
})), !
|
|
102
|
+
const v = se(a), u = Date.now() - e, p = () => s = M();
|
|
103
|
+
return f(), v <= 0 ? (e = Date.now(), p()) : (u > v && (d || !o) ? (e = Date.now(), p()) : c && (s = new Promise((h, I) => {
|
|
104
|
+
l = i ? I : h, n = setTimeout(() => {
|
|
105
|
+
e = Date.now(), o = !0, h(p()), f();
|
|
106
|
+
}, Math.max(0, v - u));
|
|
107
|
+
})), !d && !n && (n = setTimeout(() => o = !0, v)), o = !1, s);
|
|
108
108
|
};
|
|
109
109
|
}
|
|
110
110
|
function tn(t) {
|
|
@@ -138,19 +138,19 @@ function Le(...t) {
|
|
|
138
138
|
Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);
|
|
139
139
|
const s = [], a = () => {
|
|
140
140
|
s.forEach((f) => f()), s.length = 0;
|
|
141
|
-
}, c = (f, r, M,
|
|
141
|
+
}, c = (f, r, M, v) => (f.addEventListener(r, M, v), () => f.removeEventListener(r, M, v)), d = G(
|
|
142
142
|
() => [ce(e), se(l)],
|
|
143
143
|
([f, r]) => {
|
|
144
144
|
if (a(), !f)
|
|
145
145
|
return;
|
|
146
146
|
const M = qt(r) ? { ...r } : r;
|
|
147
147
|
s.push(
|
|
148
|
-
...n.flatMap((
|
|
148
|
+
...n.flatMap((v) => o.map((u) => c(f, v, u, M)))
|
|
149
149
|
);
|
|
150
150
|
},
|
|
151
151
|
{ immediate: !0, flush: "post" }
|
|
152
152
|
), i = () => {
|
|
153
|
-
|
|
153
|
+
d(), a();
|
|
154
154
|
};
|
|
155
155
|
return Ge(i), i;
|
|
156
156
|
}
|
|
@@ -162,7 +162,7 @@ function on() {
|
|
|
162
162
|
}
|
|
163
163
|
function ln(t) {
|
|
164
164
|
const e = on();
|
|
165
|
-
return
|
|
165
|
+
return z(() => (e.value, Boolean(t())));
|
|
166
166
|
}
|
|
167
167
|
function sn(t) {
|
|
168
168
|
const e = We(), n = Kt(
|
|
@@ -176,8 +176,8 @@ function je(t, e, n = {}) {
|
|
|
176
176
|
let s;
|
|
177
177
|
const a = ln(() => o && "ResizeObserver" in o), c = () => {
|
|
178
178
|
s && (s.disconnect(), s = void 0);
|
|
179
|
-
},
|
|
180
|
-
|
|
179
|
+
}, d = z(() => Array.isArray(t) ? t.map((r) => ce(r)) : [ce(t)]), i = G(
|
|
180
|
+
d,
|
|
181
181
|
(r) => {
|
|
182
182
|
if (c(), a.value && o) {
|
|
183
183
|
s = new ResizeObserver(e);
|
|
@@ -195,22 +195,22 @@ function je(t, e, n = {}) {
|
|
|
195
195
|
};
|
|
196
196
|
}
|
|
197
197
|
function an(t, e = { width: 0, height: 0 }, n = {}) {
|
|
198
|
-
const { window: o = Qe, box: l = "content-box" } = n, s =
|
|
198
|
+
const { window: o = Qe, box: l = "content-box" } = n, s = z(() => {
|
|
199
199
|
var r, M;
|
|
200
200
|
return (M = (r = ce(t)) == null ? void 0 : r.namespaceURI) == null ? void 0 : M.includes("svg");
|
|
201
|
-
}), a = g(e.width), c = g(e.height), { stop:
|
|
201
|
+
}), a = g(e.width), c = g(e.height), { stop: d } = je(
|
|
202
202
|
t,
|
|
203
203
|
([r]) => {
|
|
204
204
|
const M = l === "border-box" ? r.borderBoxSize : l === "content-box" ? r.contentBoxSize : r.devicePixelContentBoxSize;
|
|
205
205
|
if (o && s.value) {
|
|
206
|
-
const
|
|
207
|
-
if (
|
|
208
|
-
const u = o.getComputedStyle(
|
|
206
|
+
const v = ce(t);
|
|
207
|
+
if (v) {
|
|
208
|
+
const u = o.getComputedStyle(v);
|
|
209
209
|
a.value = Number.parseFloat(u.width), c.value = Number.parseFloat(u.height);
|
|
210
210
|
}
|
|
211
211
|
} else if (M) {
|
|
212
|
-
const
|
|
213
|
-
a.value =
|
|
212
|
+
const v = Array.isArray(M) ? M : [M];
|
|
213
|
+
a.value = v.reduce((u, { inlineSize: p }) => u + p, 0), c.value = v.reduce((u, { blockSize: p }) => u + p, 0);
|
|
214
214
|
} else
|
|
215
215
|
a.value = r.contentRect.width, c.value = r.contentRect.height;
|
|
216
216
|
},
|
|
@@ -227,7 +227,7 @@ function an(t, e = { width: 0, height: 0 }, n = {}) {
|
|
|
227
227
|
}
|
|
228
228
|
);
|
|
229
229
|
function f() {
|
|
230
|
-
|
|
230
|
+
d(), i();
|
|
231
231
|
}
|
|
232
232
|
return {
|
|
233
233
|
width: a,
|
|
@@ -252,38 +252,38 @@ function un(t, e = {}) {
|
|
|
252
252
|
capture: !1,
|
|
253
253
|
passive: !0
|
|
254
254
|
},
|
|
255
|
-
behavior:
|
|
255
|
+
behavior: d = "auto",
|
|
256
256
|
window: i = Qe,
|
|
257
|
-
onError: f = (
|
|
258
|
-
console.error(
|
|
257
|
+
onError: f = (w) => {
|
|
258
|
+
console.error(w);
|
|
259
259
|
}
|
|
260
|
-
} = e, r = g(0), M = g(0),
|
|
260
|
+
} = e, r = g(0), M = g(0), v = z({
|
|
261
261
|
get() {
|
|
262
262
|
return r.value;
|
|
263
263
|
},
|
|
264
|
-
set(
|
|
265
|
-
|
|
264
|
+
set(w) {
|
|
265
|
+
p(w, void 0);
|
|
266
266
|
}
|
|
267
|
-
}), u =
|
|
267
|
+
}), u = z({
|
|
268
268
|
get() {
|
|
269
269
|
return M.value;
|
|
270
270
|
},
|
|
271
|
-
set(
|
|
272
|
-
|
|
271
|
+
set(w) {
|
|
272
|
+
p(void 0, w);
|
|
273
273
|
}
|
|
274
274
|
});
|
|
275
|
-
function
|
|
276
|
-
var
|
|
275
|
+
function p(w, _) {
|
|
276
|
+
var b, H, Q;
|
|
277
277
|
if (!i)
|
|
278
278
|
return;
|
|
279
|
-
const
|
|
280
|
-
!
|
|
281
|
-
top: (
|
|
282
|
-
left: (
|
|
283
|
-
behavior: se(
|
|
279
|
+
const U = se(t);
|
|
280
|
+
!U || (Q = U instanceof Document ? i.document.body : U) == null || Q.scrollTo({
|
|
281
|
+
top: (b = se(_)) != null ? b : u.value,
|
|
282
|
+
left: (H = se(w)) != null ? H : v.value,
|
|
283
|
+
behavior: se(d)
|
|
284
284
|
});
|
|
285
285
|
}
|
|
286
|
-
const
|
|
286
|
+
const h = g(!1), I = Ie({
|
|
287
287
|
left: !0,
|
|
288
288
|
right: !1,
|
|
289
289
|
top: !0,
|
|
@@ -293,26 +293,26 @@ function un(t, e = {}) {
|
|
|
293
293
|
right: !1,
|
|
294
294
|
top: !1,
|
|
295
295
|
bottom: !1
|
|
296
|
-
}),
|
|
297
|
-
!
|
|
298
|
-
},
|
|
299
|
-
var
|
|
296
|
+
}), L = (w) => {
|
|
297
|
+
!h.value || (h.value = !1, j.left = !1, j.right = !1, j.top = !1, j.bottom = !1, l(w));
|
|
298
|
+
}, m = ke(L, n + o), y = (w) => {
|
|
299
|
+
var _;
|
|
300
300
|
if (!i)
|
|
301
301
|
return;
|
|
302
|
-
const
|
|
303
|
-
j.left =
|
|
304
|
-
const ee = Math.abs(
|
|
305
|
-
|
|
306
|
-
let D =
|
|
307
|
-
|
|
308
|
-
const
|
|
309
|
-
|
|
310
|
-
}, E = (
|
|
311
|
-
var
|
|
302
|
+
const b = ((_ = w?.document) == null ? void 0 : _.documentElement) || w?.documentElement || ce(w), { display: H, flexDirection: Q } = getComputedStyle(b), U = b.scrollLeft;
|
|
303
|
+
j.left = U < r.value, j.right = U > r.value;
|
|
304
|
+
const ee = Math.abs(U) <= (a.left || 0), te = Math.abs(U) + b.clientWidth >= b.scrollWidth - (a.right || 0) - dt;
|
|
305
|
+
H === "flex" && Q === "row-reverse" ? (I.left = te, I.right = ee) : (I.left = ee, I.right = te), r.value = U;
|
|
306
|
+
let D = b.scrollTop;
|
|
307
|
+
w === i.document && !D && (D = i.document.body.scrollTop), j.top = D < M.value, j.bottom = D > M.value;
|
|
308
|
+
const N = Math.abs(D) <= (a.top || 0), T = Math.abs(D) + b.clientHeight >= b.scrollHeight - (a.bottom || 0) - dt;
|
|
309
|
+
H === "flex" && Q === "column-reverse" ? (I.top = T, I.bottom = N) : (I.top = N, I.bottom = T), M.value = D;
|
|
310
|
+
}, E = (w) => {
|
|
311
|
+
var _;
|
|
312
312
|
if (!i)
|
|
313
313
|
return;
|
|
314
|
-
const
|
|
315
|
-
|
|
314
|
+
const b = (_ = w.target.documentElement) != null ? _ : w.target;
|
|
315
|
+
y(b), h.value = !0, m(w), s(w);
|
|
316
316
|
};
|
|
317
317
|
return Le(
|
|
318
318
|
t,
|
|
@@ -321,27 +321,27 @@ function un(t, e = {}) {
|
|
|
321
321
|
c
|
|
322
322
|
), qe(() => {
|
|
323
323
|
try {
|
|
324
|
-
const
|
|
325
|
-
if (!
|
|
324
|
+
const w = se(t);
|
|
325
|
+
if (!w)
|
|
326
326
|
return;
|
|
327
|
-
|
|
328
|
-
} catch (
|
|
329
|
-
f(
|
|
327
|
+
y(w);
|
|
328
|
+
} catch (w) {
|
|
329
|
+
f(w);
|
|
330
330
|
}
|
|
331
331
|
}), Le(
|
|
332
332
|
t,
|
|
333
333
|
"scrollend",
|
|
334
|
-
|
|
334
|
+
L,
|
|
335
335
|
c
|
|
336
336
|
), {
|
|
337
|
-
x:
|
|
337
|
+
x: v,
|
|
338
338
|
y: u,
|
|
339
|
-
isScrolling:
|
|
339
|
+
isScrolling: h,
|
|
340
340
|
arrivedState: I,
|
|
341
341
|
directions: j,
|
|
342
342
|
measure() {
|
|
343
|
-
const
|
|
344
|
-
i &&
|
|
343
|
+
const w = se(t);
|
|
344
|
+
i && w && y(w);
|
|
345
345
|
}
|
|
346
346
|
};
|
|
347
347
|
}
|
|
@@ -353,13 +353,13 @@ function Je(t, e = {}) {
|
|
|
353
353
|
manual: s = !1,
|
|
354
354
|
id: a = `vueuse_styletag_${++rn}`
|
|
355
355
|
} = e, c = g(t);
|
|
356
|
-
let
|
|
356
|
+
let d = () => {
|
|
357
357
|
};
|
|
358
358
|
const i = () => {
|
|
359
359
|
if (!o)
|
|
360
360
|
return;
|
|
361
361
|
const r = o.getElementById(a) || o.createElement("style");
|
|
362
|
-
r.isConnected || (r.id = a, e.media && (r.media = e.media), o.head.appendChild(r)), !n.value && (
|
|
362
|
+
r.isConnected || (r.id = a, e.media && (r.media = e.media), o.head.appendChild(r)), !n.value && (d = G(
|
|
363
363
|
c,
|
|
364
364
|
(M) => {
|
|
365
365
|
r.textContent = M;
|
|
@@ -367,14 +367,14 @@ function Je(t, e = {}) {
|
|
|
367
367
|
{ immediate: !0 }
|
|
368
368
|
), n.value = !0);
|
|
369
369
|
}, f = () => {
|
|
370
|
-
!o || !n.value || (
|
|
370
|
+
!o || !n.value || (d(), o.head.removeChild(o.getElementById(a)), n.value = !1);
|
|
371
371
|
};
|
|
372
372
|
return l && !s && qe(i), s || Ge(f), {
|
|
373
373
|
id: a,
|
|
374
374
|
css: c,
|
|
375
375
|
unload: f,
|
|
376
376
|
load: i,
|
|
377
|
-
isLoaded:
|
|
377
|
+
isLoaded: pt(n)
|
|
378
378
|
};
|
|
379
379
|
}
|
|
380
380
|
function cn(t, e, n) {
|
|
@@ -386,16 +386,16 @@ function cn(t, e, n) {
|
|
|
386
386
|
};
|
|
387
387
|
}
|
|
388
388
|
function fn(t, e) {
|
|
389
|
-
const { scrollEndHook: n, itemHeight: o, overscan: l = 5 } = e, s = g(null), a = an(s), c = g(!0),
|
|
389
|
+
const { scrollEndHook: n, itemHeight: o, overscan: l = 5 } = e, s = g(null), a = an(s), c = g(!0), d = ke(y, 100);
|
|
390
390
|
let i;
|
|
391
|
-
const f = mt(t), r = g(0), M = g({ start: 0, end: 10 }),
|
|
391
|
+
const f = mt(t), r = g(0), M = g({ start: 0, end: 10 }), v = g({ start: 0, end: l });
|
|
392
392
|
let u = 0;
|
|
393
|
-
const
|
|
394
|
-
let { sum:
|
|
395
|
-
return f.value.map((
|
|
396
|
-
}), I =
|
|
397
|
-
const { start:
|
|
398
|
-
return
|
|
393
|
+
const p = g([]), h = z(() => {
|
|
394
|
+
let { sum: N, height: T } = { sum: 0, height: 0 };
|
|
395
|
+
return f.value.map((C, O) => (typeof o == "number" ? T = o : T = o(O), N += T, { height: T, sum: N }));
|
|
396
|
+
}), I = z(() => H(M.value.start)), j = z(() => typeof o == "number" ? h.value.length * o : h.value[h.value.length - 1]?.sum || 0), L = z(() => {
|
|
397
|
+
const { start: N, end: T } = v.value;
|
|
398
|
+
return p.value.slice(N, T);
|
|
399
399
|
});
|
|
400
400
|
ve(() => {
|
|
401
401
|
}), Dt(() => cancelAnimationFrame(i)), G(
|
|
@@ -406,81 +406,81 @@ function fn(t, e) {
|
|
|
406
406
|
{ deep: !0 }
|
|
407
407
|
), G(
|
|
408
408
|
[a.width, a.height],
|
|
409
|
-
([
|
|
410
|
-
(
|
|
409
|
+
([N, T]) => {
|
|
410
|
+
(N || T) && E();
|
|
411
411
|
},
|
|
412
412
|
{ deep: !0 }
|
|
413
413
|
), G(r, () => {
|
|
414
|
-
|
|
414
|
+
m(), d();
|
|
415
415
|
});
|
|
416
|
-
function
|
|
416
|
+
function m() {
|
|
417
417
|
c.value = !1;
|
|
418
418
|
}
|
|
419
|
-
function
|
|
419
|
+
function y() {
|
|
420
420
|
c.value = !0, n?.();
|
|
421
421
|
}
|
|
422
422
|
function E() {
|
|
423
|
-
cancelAnimationFrame(i), i = requestAnimationFrame(
|
|
423
|
+
cancelAnimationFrame(i), i = requestAnimationFrame(w);
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function w() {
|
|
426
426
|
if (s.value) {
|
|
427
427
|
r.value = s.value.scrollTop;
|
|
428
|
-
let
|
|
429
|
-
u =
|
|
430
|
-
let T = Math.max(0,
|
|
431
|
-
|
|
428
|
+
let N = _(r.value);
|
|
429
|
+
u = b(N);
|
|
430
|
+
let T = Math.max(0, N - l), C = Math.min(
|
|
431
|
+
N + u + l,
|
|
432
432
|
f.value.length
|
|
433
433
|
);
|
|
434
|
-
M.value = { start: T, end:
|
|
435
|
-
data:
|
|
434
|
+
M.value = { start: T, end: C }, p.value = f.value.slice(T, C).map((O, k) => ({
|
|
435
|
+
data: O,
|
|
436
436
|
index: k + T
|
|
437
|
-
})),
|
|
437
|
+
})), v.value.start = N - T, v.value.end = v.value.start + u;
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
|
-
function
|
|
441
|
-
let T = 0,
|
|
442
|
-
for (; T <=
|
|
443
|
-
const k = Math.floor((T +
|
|
444
|
-
|
|
440
|
+
function _(N) {
|
|
441
|
+
let T = 0, C = h.value.length - 1, O = -1;
|
|
442
|
+
for (; T <= C; ) {
|
|
443
|
+
const k = Math.floor((T + C) / 2);
|
|
444
|
+
h.value[k].sum >= N ? (O = k, C = k - 1) : T = k + 1;
|
|
445
445
|
}
|
|
446
|
-
return Math.max(0,
|
|
446
|
+
return Math.max(0, O);
|
|
447
447
|
}
|
|
448
|
-
function
|
|
449
|
-
let T = 0,
|
|
450
|
-
for (let
|
|
448
|
+
function b(N) {
|
|
449
|
+
let T = 0, C = 0;
|
|
450
|
+
for (let O = N; O < h.value.length && (T++, C += h.value[O].height, !(C >= a.height.value)); O++)
|
|
451
451
|
;
|
|
452
452
|
return T;
|
|
453
453
|
}
|
|
454
|
-
function
|
|
454
|
+
function H(N) {
|
|
455
455
|
if (typeof o == "number")
|
|
456
|
-
return
|
|
457
|
-
let T =
|
|
456
|
+
return N * o;
|
|
457
|
+
let T = h.value[N];
|
|
458
458
|
return T ? T.sum - T.height : 0;
|
|
459
459
|
}
|
|
460
|
-
function
|
|
461
|
-
return
|
|
460
|
+
function Q(N) {
|
|
461
|
+
return h.value[N] || { sum: 0, height: 0 };
|
|
462
462
|
}
|
|
463
|
-
function
|
|
463
|
+
function U(N, T = "smooth") {
|
|
464
464
|
if (s.value) {
|
|
465
|
-
const { reset:
|
|
465
|
+
const { reset: C } = cn(
|
|
466
466
|
s.value,
|
|
467
467
|
"scrollBehavior",
|
|
468
468
|
T
|
|
469
|
-
),
|
|
470
|
-
s.value.scrollTop =
|
|
469
|
+
), O = Q(N);
|
|
470
|
+
s.value.scrollTop = O.sum - O.height, w(), C();
|
|
471
471
|
}
|
|
472
472
|
if (s.value) {
|
|
473
|
-
const
|
|
474
|
-
s.value.scrollTop =
|
|
473
|
+
const C = Q(N);
|
|
474
|
+
s.value.scrollTop = C.sum - C.height, w();
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
const ee =
|
|
477
|
+
const ee = z(() => ({
|
|
478
478
|
style: {
|
|
479
479
|
width: "100%",
|
|
480
480
|
height: `${j.value}px`,
|
|
481
481
|
pointerEvents: c.value ? void 0 : "none"
|
|
482
482
|
}
|
|
483
|
-
})), te =
|
|
483
|
+
})), te = z(() => ({
|
|
484
484
|
style: {
|
|
485
485
|
transform: `translate3d(0, ${I.value}px, 0)`,
|
|
486
486
|
"will-change": "transform"
|
|
@@ -489,13 +489,13 @@ function fn(t, e) {
|
|
|
489
489
|
overflowY: "auto"
|
|
490
490
|
};
|
|
491
491
|
return {
|
|
492
|
-
list:
|
|
493
|
-
visiableList:
|
|
494
|
-
getItemHeightData:
|
|
495
|
-
getoffsetTopIndex:
|
|
492
|
+
list: p,
|
|
493
|
+
visiableList: L,
|
|
494
|
+
getItemHeightData: Q,
|
|
495
|
+
getoffsetTopIndex: _,
|
|
496
496
|
totalHeight: j,
|
|
497
497
|
clientHeight: a.height,
|
|
498
|
-
scrollTo:
|
|
498
|
+
scrollTo: U,
|
|
499
499
|
scrollTop: r,
|
|
500
500
|
isScrollEnd: c,
|
|
501
501
|
containerProps: {
|
|
@@ -512,33 +512,33 @@ function fn(t, e) {
|
|
|
512
512
|
const Lt = Symbol(), et = Symbol(), tt = Symbol(), nt = Symbol(), ot = Symbol(), lt = Symbol(), st = Symbol(), at = Symbol(), it = Symbol(), Ae = Symbol(), ut = Symbol();
|
|
513
513
|
function Qo() {
|
|
514
514
|
const { voidFn: t, boolFn: e, boolRef: n, numberRef: o, arrayRef: l } = {
|
|
515
|
-
voidFn: (
|
|
515
|
+
voidFn: (h) => {
|
|
516
516
|
},
|
|
517
|
-
boolFn: (
|
|
518
|
-
boolRef:
|
|
519
|
-
numberRef:
|
|
520
|
-
arrayRef:
|
|
521
|
-
}, s = le(Lt, "id"), a = le(ot, l), c = le(nt, e),
|
|
517
|
+
boolFn: (h) => !1,
|
|
518
|
+
boolRef: z(() => !1),
|
|
519
|
+
numberRef: z(() => 0),
|
|
520
|
+
arrayRef: z(() => [])
|
|
521
|
+
}, s = le(Lt, "id"), a = le(ot, l), c = le(nt, e), d = le(it, n), i = le(tt, t), f = le(et, t), r = le(lt, t), M = le(st, t), v = le(at, t), u = le(Ae, t), p = le(ut, o);
|
|
522
522
|
return {
|
|
523
523
|
itemKey: s,
|
|
524
524
|
selected: a,
|
|
525
525
|
isSelected: c,
|
|
526
|
-
isAllSelected:
|
|
526
|
+
isAllSelected: d,
|
|
527
527
|
toggle: i,
|
|
528
528
|
toggleAll: f,
|
|
529
529
|
select: r,
|
|
530
530
|
selectAll: M,
|
|
531
|
-
unselect:
|
|
531
|
+
unselect: v,
|
|
532
532
|
unselectAll: u,
|
|
533
|
-
selectedCount:
|
|
533
|
+
selectedCount: p
|
|
534
534
|
};
|
|
535
535
|
}
|
|
536
536
|
function Yo(t, e, n = { deep: !0, useAllFlagOptimizatiofn: !0 }) {
|
|
537
537
|
const o = g(!1), l = g(/* @__PURE__ */ new Set()), s = Ie(/* @__PURE__ */ new Map());
|
|
538
538
|
G(
|
|
539
539
|
t,
|
|
540
|
-
(
|
|
541
|
-
a(
|
|
540
|
+
(m) => {
|
|
541
|
+
a(m);
|
|
542
542
|
},
|
|
543
543
|
{
|
|
544
544
|
deep: n.deep,
|
|
@@ -549,37 +549,37 @@ function Yo(t, e, n = { deep: !0, useAllFlagOptimizatiofn: !0 }) {
|
|
|
549
549
|
() => {
|
|
550
550
|
a(t.value);
|
|
551
551
|
}
|
|
552
|
-
),
|
|
552
|
+
), yt(() => {
|
|
553
553
|
o.value = !1, l.value.clear(), s.clear();
|
|
554
554
|
});
|
|
555
|
-
function a(
|
|
556
|
-
s.clear(),
|
|
557
|
-
s.has(
|
|
558
|
-
}),
|
|
555
|
+
function a(m) {
|
|
556
|
+
s.clear(), m.forEach((y) => {
|
|
557
|
+
s.has(y[e]) || s.set(y[e], y);
|
|
558
|
+
}), L();
|
|
559
559
|
}
|
|
560
|
-
const c =
|
|
561
|
-
let
|
|
560
|
+
const c = z(() => {
|
|
561
|
+
let m = [];
|
|
562
562
|
if (o.value != null)
|
|
563
|
-
o.value && (
|
|
563
|
+
o.value && (m = Array.from(s.values()));
|
|
564
564
|
else if (l.value.size) {
|
|
565
|
-
let
|
|
565
|
+
let y;
|
|
566
566
|
l.value.forEach((E) => {
|
|
567
|
-
|
|
567
|
+
y = s.get(E), y && m.push(y);
|
|
568
568
|
});
|
|
569
569
|
}
|
|
570
|
-
return
|
|
571
|
-
}),
|
|
572
|
-
let
|
|
573
|
-
return o.value != null ? o.value && (
|
|
574
|
-
}), i =
|
|
575
|
-
let
|
|
570
|
+
return m;
|
|
571
|
+
}), d = z(() => {
|
|
572
|
+
let m = 0;
|
|
573
|
+
return o.value != null ? o.value && (m = s.size) : m = l.value.size, m;
|
|
574
|
+
}), i = z(() => {
|
|
575
|
+
let m;
|
|
576
576
|
if (o.value != null)
|
|
577
|
-
|
|
577
|
+
m = o.value;
|
|
578
578
|
else {
|
|
579
|
-
const
|
|
580
|
-
|
|
579
|
+
const y = l.value.size, E = s.size;
|
|
580
|
+
m = y == E;
|
|
581
581
|
}
|
|
582
|
-
return
|
|
582
|
+
return m;
|
|
583
583
|
});
|
|
584
584
|
function f() {
|
|
585
585
|
o.value = !0;
|
|
@@ -587,73 +587,73 @@ function Yo(t, e, n = { deep: !0, useAllFlagOptimizatiofn: !0 }) {
|
|
|
587
587
|
function r() {
|
|
588
588
|
o.value = !1;
|
|
589
589
|
}
|
|
590
|
-
function M(
|
|
591
|
-
s.has(
|
|
590
|
+
function M(m) {
|
|
591
|
+
s.has(m) && l.value.add(m);
|
|
592
592
|
}
|
|
593
|
-
function
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
M(
|
|
593
|
+
function v(m) {
|
|
594
|
+
h(() => {
|
|
595
|
+
m.forEach((y) => {
|
|
596
|
+
M(y[e]);
|
|
597
597
|
});
|
|
598
598
|
});
|
|
599
599
|
}
|
|
600
|
-
function u(
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
l.value.delete(
|
|
600
|
+
function u(m) {
|
|
601
|
+
h(() => {
|
|
602
|
+
m.forEach((y) => {
|
|
603
|
+
l.value.delete(y[e]);
|
|
604
604
|
});
|
|
605
605
|
});
|
|
606
606
|
}
|
|
607
|
-
function
|
|
608
|
-
return o.value != null ? o.value : l.value.has(
|
|
607
|
+
function p(m) {
|
|
608
|
+
return o.value != null ? o.value : l.value.has(m[e]);
|
|
609
609
|
}
|
|
610
|
-
function
|
|
611
|
-
o.value != null && (o.value ? l.value = new Set(Array.from(s.keys())) : l.value = /* @__PURE__ */ new Set()),
|
|
610
|
+
function h(m) {
|
|
611
|
+
o.value != null && (o.value ? l.value = new Set(Array.from(s.keys())) : l.value = /* @__PURE__ */ new Set()), m(), n.useAllFlagOptimizatiofn ? l.value.size == 0 ? o.value = !1 : l.value.size == s.size ? o.value = !0 : o.value = null : o.value = null;
|
|
612
612
|
}
|
|
613
|
-
function I(
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
y
|
|
613
|
+
function I(m) {
|
|
614
|
+
h(() => {
|
|
615
|
+
m.forEach((y) => {
|
|
616
|
+
p(y) ? l.value.delete(y[e]) : M(y[e]);
|
|
617
617
|
});
|
|
618
618
|
});
|
|
619
619
|
}
|
|
620
620
|
function j() {
|
|
621
|
-
const { value:
|
|
622
|
-
|
|
621
|
+
const { value: m } = i;
|
|
622
|
+
m ? r() : f();
|
|
623
623
|
}
|
|
624
|
-
function
|
|
625
|
-
const
|
|
626
|
-
l.value.forEach((
|
|
627
|
-
s.get(
|
|
628
|
-
}),
|
|
624
|
+
function L() {
|
|
625
|
+
const m = [];
|
|
626
|
+
l.value.forEach((y) => {
|
|
627
|
+
s.get(y) || m.push(y);
|
|
628
|
+
}), m.forEach((y) => l.value.delete(y));
|
|
629
629
|
}
|
|
630
|
-
return
|
|
630
|
+
return F(Lt, e), F(et, j), F(tt, I), F(nt, p), F(ot, c), F(lt, v), F(st, f), F(at, u), F(it, i), F(Ae, r), F(Ae, r), F(ut, d), {
|
|
631
631
|
selected: c,
|
|
632
|
-
select:
|
|
632
|
+
select: v,
|
|
633
633
|
selectAll: f,
|
|
634
634
|
unselect: u,
|
|
635
635
|
unselectAll: r,
|
|
636
636
|
toggle: I,
|
|
637
637
|
toggleAll: j,
|
|
638
|
-
isSelected:
|
|
638
|
+
isSelected: p,
|
|
639
639
|
isAllSelected: i,
|
|
640
|
-
selectedCount:
|
|
640
|
+
selectedCount: d
|
|
641
641
|
};
|
|
642
642
|
}
|
|
643
643
|
function Bo(t) {
|
|
644
|
-
const e = g(!1), n = g(/* @__PURE__ */ new Set()), o =
|
|
644
|
+
const e = g(!1), n = g(/* @__PURE__ */ new Set()), o = z(() => {
|
|
645
645
|
let u = [];
|
|
646
646
|
return e.value != null ? e.value && (u = t.value) : n.value.size && (u = Array.from(n.value.values())), u;
|
|
647
|
-
}), l =
|
|
647
|
+
}), l = z(() => {
|
|
648
648
|
let u = 0;
|
|
649
649
|
return e.value != null ? e.value && (u = t.value.length) : u = n.value.size, u;
|
|
650
|
-
}), s =
|
|
650
|
+
}), s = z(() => {
|
|
651
651
|
let u;
|
|
652
652
|
if (e.value != null)
|
|
653
653
|
u = e.value;
|
|
654
654
|
else {
|
|
655
|
-
const
|
|
656
|
-
u =
|
|
655
|
+
const p = n.value.size, h = t.value.length;
|
|
656
|
+
u = p == h;
|
|
657
657
|
}
|
|
658
658
|
return u;
|
|
659
659
|
});
|
|
@@ -663,17 +663,17 @@ function Bo(t) {
|
|
|
663
663
|
function c() {
|
|
664
664
|
e.value = !1;
|
|
665
665
|
}
|
|
666
|
-
function
|
|
666
|
+
function d(u) {
|
|
667
667
|
r(() => {
|
|
668
|
-
u.forEach((
|
|
669
|
-
n.value.add(
|
|
668
|
+
u.forEach((p) => {
|
|
669
|
+
n.value.add(p);
|
|
670
670
|
});
|
|
671
671
|
});
|
|
672
672
|
}
|
|
673
673
|
function i(u) {
|
|
674
674
|
r(() => {
|
|
675
|
-
u.forEach((
|
|
676
|
-
n.value.delete(
|
|
675
|
+
u.forEach((p) => {
|
|
676
|
+
n.value.delete(p);
|
|
677
677
|
});
|
|
678
678
|
});
|
|
679
679
|
}
|
|
@@ -685,23 +685,23 @@ function Bo(t) {
|
|
|
685
685
|
}
|
|
686
686
|
function M(u) {
|
|
687
687
|
r(() => {
|
|
688
|
-
u.forEach((
|
|
689
|
-
f(
|
|
688
|
+
u.forEach((p) => {
|
|
689
|
+
f(p) ? n.value.delete(p) : n.value.add(p);
|
|
690
690
|
});
|
|
691
691
|
});
|
|
692
692
|
}
|
|
693
|
-
function
|
|
693
|
+
function v() {
|
|
694
694
|
const { value: u } = s;
|
|
695
695
|
u ? c() : a();
|
|
696
696
|
}
|
|
697
|
-
return
|
|
697
|
+
return F(et, v), F(tt, M), F(nt, f), F(ot, o), F(lt, d), F(st, a), F(at, i), F(it, s), F(Ae, c), F(Ae, c), F(ut, l), {
|
|
698
698
|
selected: o,
|
|
699
|
-
select:
|
|
699
|
+
select: d,
|
|
700
700
|
selectAll: a,
|
|
701
701
|
unselect: i,
|
|
702
702
|
unselectAll: c,
|
|
703
703
|
toggle: M,
|
|
704
|
-
toggleAll:
|
|
704
|
+
toggleAll: v,
|
|
705
705
|
isSelected: f,
|
|
706
706
|
isAllSelected: s,
|
|
707
707
|
selectedCount: l
|
|
@@ -711,17 +711,17 @@ function dn(t, e) {
|
|
|
711
711
|
return t > e ? "horizontal" : e > t ? "vertical" : "";
|
|
712
712
|
}
|
|
713
713
|
function vn() {
|
|
714
|
-
const t = g(0), e = g(0), n = g(0), o = g(0), l = g(0), s = g(0), a = g(""), c = () => a.value === "vertical",
|
|
714
|
+
const t = g(0), e = g(0), n = g(0), o = g(0), l = g(0), s = g(0), a = g(""), c = () => a.value === "vertical", d = () => a.value === "horizontal", i = () => {
|
|
715
715
|
n.value = 0, o.value = 0, l.value = 0, s.value = 0, a.value = "";
|
|
716
716
|
};
|
|
717
717
|
return {
|
|
718
|
-
move: (M,
|
|
719
|
-
n.value = (M < 0 ? 0 : M) - t.value, o.value =
|
|
718
|
+
move: (M, v) => {
|
|
719
|
+
n.value = (M < 0 ? 0 : M) - t.value, o.value = v - e.value, l.value = Math.abs(n.value), s.value = Math.abs(o.value);
|
|
720
720
|
const u = 10;
|
|
721
721
|
(!a.value || l.value < u && s.value < u) && (a.value = dn(l.value, s.value));
|
|
722
722
|
},
|
|
723
|
-
start: (M,
|
|
724
|
-
i(), t.value = M, e.value =
|
|
723
|
+
start: (M, v) => {
|
|
724
|
+
i(), t.value = M, e.value = v;
|
|
725
725
|
},
|
|
726
726
|
reset: i,
|
|
727
727
|
startX: t,
|
|
@@ -732,7 +732,7 @@ function vn() {
|
|
|
732
732
|
offsetY: s,
|
|
733
733
|
direction: a,
|
|
734
734
|
isVertical: c,
|
|
735
|
-
isHorizontal:
|
|
735
|
+
isHorizontal: d
|
|
736
736
|
};
|
|
737
737
|
}
|
|
738
738
|
function Be(t) {
|
|
@@ -751,133 +751,133 @@ function jt({
|
|
|
751
751
|
const {
|
|
752
752
|
select: a = Be("\u9009\u62E9"),
|
|
753
753
|
unselect: c = Be("\u53D6\u6D88\u9009\u62E9"),
|
|
754
|
-
unselectAll:
|
|
755
|
-
selected: i =
|
|
754
|
+
unselectAll: d = Be("\u53D6\u6D88\u5168\u9009"),
|
|
755
|
+
selected: i = z(() => [])
|
|
756
756
|
} = s();
|
|
757
757
|
let f = {};
|
|
758
|
-
const r =
|
|
758
|
+
const r = z(
|
|
759
759
|
() => Fe(o === "colum" ? _t : kt, 50)
|
|
760
|
-
), M =
|
|
761
|
-
let
|
|
762
|
-
const
|
|
760
|
+
), M = z(() => t ?? n), v = (() => e ? (S) => e(S) : (S) => S)(), u = /* @__PURE__ */ new Set();
|
|
761
|
+
let p = /* @__PURE__ */ new Set();
|
|
762
|
+
const h = g(!0), I = g(), j = g(!1), L = g({ x: 0, y: 0 }), m = g({ x: 0, y: 0, scrollTop: 0 }), y = g({}), E = g({
|
|
763
763
|
top: 0,
|
|
764
764
|
height: 0,
|
|
765
|
-
sync(
|
|
766
|
-
E.value.top = I.value?.scrollTop || 0,
|
|
765
|
+
sync(S = !1) {
|
|
766
|
+
E.value.top = I.value?.scrollTop || 0, S && (E.value.height = I.value?.scrollHeight || 0);
|
|
767
767
|
}
|
|
768
|
-
}),
|
|
769
|
-
left: Math.min(
|
|
770
|
-
top: Math.min(
|
|
771
|
-
width: Math.abs(
|
|
772
|
-
height: Math.abs(
|
|
773
|
-
} : { left: 0, top: 0, width: 0, height: 0 }),
|
|
774
|
-
let
|
|
775
|
-
const ee =
|
|
768
|
+
}), w = z(() => j.value ? {
|
|
769
|
+
left: Math.min(L.value.x, m.value.x) - y.value.left,
|
|
770
|
+
top: Math.min(L.value.y, m.value.y) - y.value.top,
|
|
771
|
+
width: Math.abs(L.value.x - m.value.x),
|
|
772
|
+
height: Math.abs(L.value.y - m.value.y)
|
|
773
|
+
} : { left: 0, top: 0, width: 0, height: 0 }), _ = g(!1), { margin: b = 50, startSpeed: H = 30, maxSpeed: Q = 30 } = l;
|
|
774
|
+
let U;
|
|
775
|
+
const ee = b, te = H, D = Q, N = (S) => S ** 1;
|
|
776
776
|
let T = 0;
|
|
777
|
-
function S
|
|
778
|
-
if (cancelAnimationFrame(
|
|
777
|
+
function C(S) {
|
|
778
|
+
if (cancelAnimationFrame(U), T = O(S), T = Math.max(
|
|
779
779
|
Math.min(T, D),
|
|
780
780
|
-D
|
|
781
781
|
), T !== 0) {
|
|
782
|
-
const
|
|
783
|
-
if (!
|
|
782
|
+
const x = I.value;
|
|
783
|
+
if (!x || !j.value)
|
|
784
784
|
return;
|
|
785
|
-
const
|
|
786
|
-
let
|
|
787
|
-
|
|
785
|
+
const X = E.value.height - y.value.height;
|
|
786
|
+
let W = E.value.top + Number(T);
|
|
787
|
+
W = Math.min(Math.max(0, W), X), x.scrollTop = W, Y(), U = requestAnimationFrame(() => C(S));
|
|
788
788
|
}
|
|
789
789
|
}
|
|
790
|
-
function
|
|
790
|
+
function O(S) {
|
|
791
791
|
if (I.value) {
|
|
792
|
-
const
|
|
793
|
-
if (
|
|
794
|
-
return te *
|
|
795
|
-
const K =
|
|
792
|
+
const X = y.value, W = X.bottom - S;
|
|
793
|
+
if (W < ee)
|
|
794
|
+
return te * N(1 - W / ee);
|
|
795
|
+
const K = S - X.top;
|
|
796
796
|
if (K < ee)
|
|
797
|
-
return -te *
|
|
797
|
+
return -te * N(1 - K / ee);
|
|
798
798
|
}
|
|
799
799
|
return 0;
|
|
800
800
|
}
|
|
801
|
-
function k(
|
|
802
|
-
const
|
|
803
|
-
return
|
|
801
|
+
function k(S) {
|
|
802
|
+
const x = { ...w.value, right: 0, bottom: 0 };
|
|
803
|
+
return x.left += y.value.left, x.top += y.value.top - E.value.top, x.right = x.width + x.left, x.bottom = x.height + x.top, x.left < S.right && x.right > S.left && x.top < S.bottom && x.bottom > S.top;
|
|
804
804
|
}
|
|
805
|
-
function
|
|
805
|
+
function Y() {
|
|
806
806
|
E.value.sync();
|
|
807
|
-
const { top:
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
),
|
|
812
|
-
}
|
|
813
|
-
function
|
|
814
|
-
let
|
|
815
|
-
|
|
816
|
-
const K =
|
|
817
|
-
for (let
|
|
818
|
-
const Ye = K[
|
|
819
|
-
if (Ye.selectorText ===
|
|
807
|
+
const { top: S, height: x } = E.value;
|
|
808
|
+
m.value.y = Math.min(
|
|
809
|
+
x + y.value.top,
|
|
810
|
+
m.value.y + S - m.value.scrollTop
|
|
811
|
+
), m.value.scrollTop = S;
|
|
812
|
+
}
|
|
813
|
+
function $(S, x, X = "dynamic-styles") {
|
|
814
|
+
let W = document.getElementById(X);
|
|
815
|
+
W || (W = document.createElement("style"), W.id = X, document.head.appendChild(W));
|
|
816
|
+
const K = W.sheet.cssRules, oe = K.length, ze = `${S} { ${x} }`;
|
|
817
|
+
for (let ye = 0; ye < oe; ye++) {
|
|
818
|
+
const Ye = K[ye];
|
|
819
|
+
if (Ye.selectorText === S && Ye.style.cssText === x)
|
|
820
820
|
return;
|
|
821
821
|
}
|
|
822
|
-
|
|
823
|
-
}
|
|
824
|
-
function V(
|
|
825
|
-
|
|
826
|
-
const
|
|
827
|
-
|
|
828
|
-
const
|
|
829
|
-
|
|
830
|
-
|
|
822
|
+
W.sheet.insertRule(ze, oe);
|
|
823
|
+
}
|
|
824
|
+
function V(S, x) {
|
|
825
|
+
h.value = !0, j.value = !0, E.value.sync(!0);
|
|
826
|
+
const X = x + E.value.top;
|
|
827
|
+
L.value.x = S, L.value.y = X, m.value.x = S, m.value.y = X, I.value?.classList.add("disable-scroll-behavior"), u.clear();
|
|
828
|
+
const W = i.value;
|
|
829
|
+
p = new Set(
|
|
830
|
+
W.map((K) => K[M.value])
|
|
831
831
|
), ft();
|
|
832
832
|
}
|
|
833
|
-
function ne(
|
|
834
|
-
!j.value || (
|
|
835
|
-
|
|
836
|
-
E.value.height +
|
|
837
|
-
),
|
|
833
|
+
function ne(S, x, X) {
|
|
834
|
+
!j.value || (h.value && (o === "colum" && Z() || (h.value = !1)), X?.(), C(x), m.value.x = Math.max(S, y.value.left), m.value.y = Math.min(
|
|
835
|
+
x + E.value.top,
|
|
836
|
+
E.value.height + y.value.top
|
|
837
|
+
), m.value.scrollTop = E.value.top, r.value());
|
|
838
838
|
}
|
|
839
839
|
function Me() {
|
|
840
840
|
j.value = !1, I.value?.classList.remove("disable-scroll-behavior");
|
|
841
841
|
}
|
|
842
842
|
function ie() {
|
|
843
|
-
!j.value || (T ||
|
|
843
|
+
!j.value || (T || Y(), r.value());
|
|
844
844
|
}
|
|
845
|
-
function
|
|
845
|
+
function Z() {
|
|
846
846
|
if (!j.value)
|
|
847
847
|
return !1;
|
|
848
|
-
const { width:
|
|
849
|
-
return !(Math.max(
|
|
848
|
+
const { width: S, height: x } = w.value;
|
|
849
|
+
return !(Math.max(S, x) > 5);
|
|
850
850
|
}
|
|
851
|
-
function
|
|
852
|
-
|
|
851
|
+
function pe() {
|
|
852
|
+
Z() && ct();
|
|
853
853
|
}
|
|
854
854
|
function ct() {
|
|
855
|
-
|
|
855
|
+
d();
|
|
856
856
|
}
|
|
857
857
|
function _t() {
|
|
858
|
-
|
|
859
|
-
const
|
|
860
|
-
f[M.value] =
|
|
861
|
-
const
|
|
862
|
-
k(
|
|
858
|
+
Z() || I.value?.querySelectorAll(`[${n}]`).forEach((S) => {
|
|
859
|
+
const x = v(S.getAttribute(`${n}`));
|
|
860
|
+
f[M.value] = x;
|
|
861
|
+
const X = p.has(x), W = u.has(x);
|
|
862
|
+
k(S.getBoundingClientRect()) ? W || (X ? c([f]) : a([f]), u.add(x)) : W && (X ? a([f]) : c([f]), u.delete(x));
|
|
863
863
|
});
|
|
864
864
|
}
|
|
865
865
|
function kt() {
|
|
866
|
-
const
|
|
867
|
-
let
|
|
868
|
-
I.value?.querySelectorAll(`[${n}]`).forEach((
|
|
869
|
-
const oe =
|
|
870
|
-
|
|
871
|
-
}), I.value?.querySelectorAll(`[${n}]`).forEach((
|
|
872
|
-
const oe =
|
|
873
|
-
|
|
866
|
+
const S = [];
|
|
867
|
+
let x = null, X = 0;
|
|
868
|
+
I.value?.querySelectorAll(`[${n}]`).forEach((W, K) => {
|
|
869
|
+
const oe = v(W.getAttribute(`${n}`));
|
|
870
|
+
S.push(oe), k(W.getBoundingClientRect()) && (x === null && (x = K), x = Math.min(x, K), X = Math.max(X, K));
|
|
871
|
+
}), I.value?.querySelectorAll(`[${n}]`).forEach((W, K) => {
|
|
872
|
+
const oe = S[K], ze = p.has(oe), ye = u.has(oe);
|
|
873
|
+
x !== null && K >= x && K <= X ? ye || (f[M.value] = oe, ze ? c([f]) : a([f]), u.add(oe)) : ye && (f[M.value] = oe, ze ? a([f]) : c([f]), u.delete(oe));
|
|
874
874
|
});
|
|
875
875
|
}
|
|
876
876
|
function ft() {
|
|
877
|
-
!I.value || (
|
|
877
|
+
!I.value || (y.value = I.value.getBoundingClientRect());
|
|
878
878
|
}
|
|
879
|
-
function Qt(
|
|
880
|
-
return !
|
|
879
|
+
function Qt(S) {
|
|
880
|
+
return !S?.value || (I.value = S.value, !I?.value) ? !1 : (ft(), $(".disable-scroll-behavior", "scroll-behavior: unset !important;"), !0);
|
|
881
881
|
}
|
|
882
882
|
return {
|
|
883
883
|
init: Qt,
|
|
@@ -885,13 +885,13 @@ function jt({
|
|
|
885
885
|
dragMove: ne,
|
|
886
886
|
dragEnd: Me,
|
|
887
887
|
onScroll: ie,
|
|
888
|
-
isSingleClick:
|
|
888
|
+
isSingleClick: Z,
|
|
889
889
|
cancelSelect: ct,
|
|
890
|
-
cancelSelectAllBySingleClick:
|
|
890
|
+
cancelSelectAllBySingleClick: pe,
|
|
891
891
|
selectFn: r,
|
|
892
|
-
getAttributeValue:
|
|
893
|
-
incrementalSelect:
|
|
894
|
-
selectRange:
|
|
892
|
+
getAttributeValue: v,
|
|
893
|
+
incrementalSelect: _,
|
|
894
|
+
selectRange: w,
|
|
895
895
|
isPressing: j,
|
|
896
896
|
containerEl: I
|
|
897
897
|
};
|
|
@@ -903,7 +903,7 @@ function Uo(t) {
|
|
|
903
903
|
dragMove: s,
|
|
904
904
|
dragEnd: a,
|
|
905
905
|
cancelSelectAllBySingleClick: c
|
|
906
|
-
} = e,
|
|
906
|
+
} = e, d = z(() => ({
|
|
907
907
|
left: `${n.value.left}px`,
|
|
908
908
|
top: `${n.value.top}px`,
|
|
909
909
|
width: `${n.value.width}px`,
|
|
@@ -921,26 +921,26 @@ function Uo(t) {
|
|
|
921
921
|
return fe("div", {
|
|
922
922
|
id: "selectBoxEl",
|
|
923
923
|
class: "drag-select-box",
|
|
924
|
-
style:
|
|
924
|
+
style: d.value
|
|
925
925
|
});
|
|
926
926
|
}
|
|
927
927
|
});
|
|
928
|
-
function r(
|
|
929
|
-
|
|
928
|
+
function r(h) {
|
|
929
|
+
h.button === 0 && (h.ctrlKey || h.metaKey ? e.incrementalSelect.value = !0 : e.incrementalSelect.value = !1, l(h.x, h.y), window.addEventListener("mousemove", M), window.addEventListener("mouseup", v));
|
|
930
930
|
}
|
|
931
|
-
function M(
|
|
932
|
-
s(
|
|
931
|
+
function M(h) {
|
|
932
|
+
s(h.x, h.y);
|
|
933
933
|
}
|
|
934
|
-
function
|
|
935
|
-
window.removeEventListener("mousemove", M), window.removeEventListener("mouseup",
|
|
934
|
+
function v(h) {
|
|
935
|
+
window.removeEventListener("mousemove", M), window.removeEventListener("mouseup", v), h.composedPath().some(
|
|
936
936
|
(j) => e.getAttributeValue(
|
|
937
937
|
j?.getAttribute?.(t.attribute)
|
|
938
938
|
)
|
|
939
939
|
) || c(), a(), e.incrementalSelect.value = !1;
|
|
940
940
|
}
|
|
941
|
-
function u(
|
|
941
|
+
function u(h) {
|
|
942
942
|
try {
|
|
943
|
-
if (!e.init(
|
|
943
|
+
if (!e.init(h))
|
|
944
944
|
throw "\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";
|
|
945
945
|
if (!e.containerEl?.value)
|
|
946
946
|
return !1;
|
|
@@ -949,10 +949,10 @@ function Uo(t) {
|
|
|
949
949
|
console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25", I);
|
|
950
950
|
}
|
|
951
951
|
}
|
|
952
|
-
function
|
|
952
|
+
function p() {
|
|
953
953
|
e.containerEl.value?.removeEventListener("scroll", o), e.containerEl.value?.removeEventListener("mousedown", r);
|
|
954
954
|
}
|
|
955
|
-
return { init: u, unMount:
|
|
955
|
+
return { init: u, unMount: p };
|
|
956
956
|
}
|
|
957
957
|
function Ro(t, e = {}) {
|
|
958
958
|
const { joinSelectMode: n, pressTime: o = 600, selectModeRef: l } = e, s = jt({
|
|
@@ -962,58 +962,58 @@ function Ro(t, e = {}) {
|
|
|
962
962
|
startSpeed: 5,
|
|
963
963
|
maxSpeed: 5
|
|
964
964
|
}
|
|
965
|
-
}), { onScroll: a, dragStart: c, dragMove:
|
|
965
|
+
}), { onScroll: a, dragStart: c, dragMove: d, dragEnd: i } = s;
|
|
966
966
|
let f;
|
|
967
967
|
const r = vn();
|
|
968
968
|
function M() {
|
|
969
969
|
clearTimeout(f);
|
|
970
970
|
}
|
|
971
|
-
function
|
|
972
|
-
return
|
|
971
|
+
function v(y) {
|
|
972
|
+
return y.composedPath().some((E) => !!E?.getAttribute?.(t.attribute));
|
|
973
973
|
}
|
|
974
974
|
function u() {
|
|
975
975
|
return l?.value && !s.isPressing.value && r.isHorizontal();
|
|
976
976
|
}
|
|
977
|
-
function y
|
|
978
|
-
(E == null ||
|
|
977
|
+
function p(y, E, w) {
|
|
978
|
+
(E == null || w == null) && (E = y.targetTouches[0].clientX, w = y.targetTouches[0].clientY), c(E, w), n?.(), d(E, w, () => y.preventDefault());
|
|
979
979
|
}
|
|
980
|
-
function
|
|
981
|
-
const { clientX: E, clientY:
|
|
982
|
-
r.start(E,
|
|
983
|
-
y
|
|
980
|
+
function h(y) {
|
|
981
|
+
const { clientX: E, clientY: w } = y.targetTouches[0];
|
|
982
|
+
r.start(E, w), M(), v(y) && (f = setTimeout(() => {
|
|
983
|
+
p(y), y.preventDefault();
|
|
984
984
|
}, o));
|
|
985
985
|
}
|
|
986
|
-
function I(
|
|
986
|
+
function I(y) {
|
|
987
987
|
M();
|
|
988
|
-
const { clientX: E, clientY:
|
|
989
|
-
if (r.move(E,
|
|
990
|
-
y
|
|
988
|
+
const { clientX: E, clientY: w } = y.targetTouches[0];
|
|
989
|
+
if (r.move(E, w), u()) {
|
|
990
|
+
p(y, r.startX.value, r.startY.value);
|
|
991
991
|
return;
|
|
992
992
|
}
|
|
993
|
-
|
|
993
|
+
d(E, w, () => y.preventDefault());
|
|
994
994
|
}
|
|
995
995
|
function j() {
|
|
996
996
|
M(), i();
|
|
997
997
|
}
|
|
998
|
-
function
|
|
998
|
+
function L(y) {
|
|
999
999
|
try {
|
|
1000
|
-
if (!s.init(
|
|
1000
|
+
if (!s.init(y))
|
|
1001
1001
|
throw new Error("\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E");
|
|
1002
1002
|
if (!s.containerEl?.value)
|
|
1003
1003
|
return !1;
|
|
1004
1004
|
const E = s.containerEl.value;
|
|
1005
|
-
E.addEventListener("scroll", a), E.addEventListener("touchstart",
|
|
1005
|
+
E.addEventListener("scroll", a), E.addEventListener("touchstart", h), E.addEventListener("touchmove", I), window.addEventListener("pointerup", j);
|
|
1006
1006
|
} catch (E) {
|
|
1007
1007
|
console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25", E);
|
|
1008
1008
|
}
|
|
1009
1009
|
}
|
|
1010
|
-
function
|
|
1010
|
+
function m() {
|
|
1011
1011
|
if (!s.containerEl?.value)
|
|
1012
1012
|
return;
|
|
1013
|
-
const
|
|
1014
|
-
|
|
1013
|
+
const y = s.containerEl.value;
|
|
1014
|
+
y.removeEventListener("scroll", a), y.removeEventListener("touchstart", h), y.removeEventListener("touchmove", I), window.removeEventListener("pointerup", j);
|
|
1015
1015
|
}
|
|
1016
|
-
return { init:
|
|
1016
|
+
return { init: L, unMount: m };
|
|
1017
1017
|
}
|
|
1018
1018
|
const Mn = Symbol(), gn = /* @__PURE__ */ J({
|
|
1019
1019
|
__name: "Dialog",
|
|
@@ -1030,13 +1030,13 @@ const Mn = Symbol(), gn = /* @__PURE__ */ J({
|
|
|
1030
1030
|
const n = t, o = () => {
|
|
1031
1031
|
n.onClickOverlay?.(), n.closeOnClickOverlay && e("update:visiable", !1);
|
|
1032
1032
|
};
|
|
1033
|
-
return
|
|
1033
|
+
return F(Mn, () => e("update:visiable", !1)), (l, s) => (R(), Se(Xe, { name: "modal" }, {
|
|
1034
1034
|
default: Ze(() => [
|
|
1035
|
-
t.visiable ? de((
|
|
1035
|
+
t.visiable ? de((R(), P("div", {
|
|
1036
1036
|
key: 0,
|
|
1037
1037
|
class: ue([t.hiddenOverlay ? "no-overlay-modal" : "lzc-modal", t.modalClass])
|
|
1038
1038
|
}, [
|
|
1039
|
-
|
|
1039
|
+
B("div", {
|
|
1040
1040
|
onMousedown: s[0] || (s[0] = we(() => {
|
|
1041
1041
|
}, ["stop"])),
|
|
1042
1042
|
class: ue(["lzc-dialog", t.dialogClass])
|
|
@@ -1044,7 +1044,7 @@ const Mn = Symbol(), gn = /* @__PURE__ */ J({
|
|
|
1044
1044
|
he(l.$slots, "default", {}, void 0, !0)
|
|
1045
1045
|
], 34)
|
|
1046
1046
|
], 2)), [
|
|
1047
|
-
[
|
|
1047
|
+
[A(Zt), () => o()]
|
|
1048
1048
|
]) : ge("", !0)
|
|
1049
1049
|
]),
|
|
1050
1050
|
_: 3
|
|
@@ -1118,19 +1118,21 @@ function Ho({
|
|
|
1118
1118
|
component: t,
|
|
1119
1119
|
componentProps: e,
|
|
1120
1120
|
delay: n
|
|
1121
|
-
})
|
|
1122
|
-
|
|
1123
|
-
|
|
1121
|
+
});
|
|
1122
|
+
let l = 0, s = 0;
|
|
1123
|
+
const a = g(!1);
|
|
1124
|
+
function c() {
|
|
1125
|
+
l++, a.value = !0;
|
|
1124
1126
|
}
|
|
1125
|
-
function
|
|
1126
|
-
l.value = !1;
|
|
1127
|
+
function d() {
|
|
1128
|
+
s++, l === s && (a.value = !1);
|
|
1127
1129
|
}
|
|
1128
|
-
return { LoadingComp: o, loading:
|
|
1130
|
+
return { LoadingComp: o, loading: a, load: c, unload: d };
|
|
1129
1131
|
}
|
|
1130
|
-
const mn = (t) => (be("data-v-92a1804d"), t = t(), Oe(), t),
|
|
1131
|
-
/* @__PURE__ */
|
|
1132
|
-
], -1)),
|
|
1133
|
-
|
|
1132
|
+
const mn = (t) => (be("data-v-92a1804d"), t = t(), Oe(), t), pn = /* @__PURE__ */ mn(() => /* @__PURE__ */ B("div", { class: "ldio-mm5gwljcryb" }, [
|
|
1133
|
+
/* @__PURE__ */ B("div")
|
|
1134
|
+
], -1)), yn = [
|
|
1135
|
+
pn
|
|
1134
1136
|
], Dn = /* @__PURE__ */ J({
|
|
1135
1137
|
__name: "DefaultLoading",
|
|
1136
1138
|
props: {
|
|
@@ -1141,7 +1143,7 @@ const mn = (t) => (be("data-v-92a1804d"), t = t(), Oe(), t), yn = /* @__PURE__ *
|
|
|
1141
1143
|
return Ve((e) => ({
|
|
1142
1144
|
"4e4a9ce4": t.width + "px",
|
|
1143
1145
|
e56fe5c2: t.height + "px"
|
|
1144
|
-
})), (e, n) => (
|
|
1146
|
+
})), (e, n) => (R(), P("div", $e(He(e.$attrs)), yn, 16));
|
|
1145
1147
|
}
|
|
1146
1148
|
});
|
|
1147
1149
|
const Tn = /* @__PURE__ */ ae(Dn, [["__scopeId", "data-v-92a1804d"]]), Nn = "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", wn = { class: "loading-wrap" }, In = ["src"], En = /* @__PURE__ */ J({
|
|
@@ -1155,15 +1157,15 @@ const Tn = /* @__PURE__ */ ae(Dn, [["__scopeId", "data-v-92a1804d"]]), Nn = "dat
|
|
|
1155
1157
|
Ve((o) => ({
|
|
1156
1158
|
b1cf73a8: t.delay
|
|
1157
1159
|
}));
|
|
1158
|
-
const n =
|
|
1160
|
+
const n = z(() => {
|
|
1159
1161
|
const o = {};
|
|
1160
1162
|
return e.size === "mini" ? (o.width = "22px", o.height = "22px") : e.size === "large" && (o.width = "28px", o.height = "28px"), o;
|
|
1161
1163
|
});
|
|
1162
|
-
return (o, l) => (
|
|
1163
|
-
|
|
1164
|
+
return (o, l) => (R(), P("div", wn, [
|
|
1165
|
+
B("img", {
|
|
1164
1166
|
class: "loading-circle",
|
|
1165
|
-
src:
|
|
1166
|
-
style: q(
|
|
1167
|
+
src: A(Nn),
|
|
1168
|
+
style: q(A(n))
|
|
1167
1169
|
}, null, 12, In)
|
|
1168
1170
|
]));
|
|
1169
1171
|
}
|
|
@@ -1191,10 +1193,10 @@ const An = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTJweCIgaGVpZ2h0PSIxMnB4Ii
|
|
|
1191
1193
|
},
|
|
1192
1194
|
emits: ["close"],
|
|
1193
1195
|
setup(t, { emit: e }) {
|
|
1194
|
-
const n = t, o = "lzc-loading-toast", l =
|
|
1196
|
+
const n = t, o = "lzc-loading-toast", l = z(() => {
|
|
1195
1197
|
let i = {};
|
|
1196
1198
|
return n.captureEventP && (i.pointerEvents = "none"), i;
|
|
1197
|
-
}), s =
|
|
1199
|
+
}), s = z(() => {
|
|
1198
1200
|
let i = {
|
|
1199
1201
|
padding: "12px"
|
|
1200
1202
|
};
|
|
@@ -1202,52 +1204,52 @@ const An = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTJweCIgaGVpZ2h0PSIxMnB4Ii
|
|
|
1202
1204
|
...i,
|
|
1203
1205
|
...n.overlayContentStyle
|
|
1204
1206
|
}), i;
|
|
1205
|
-
}), a =
|
|
1207
|
+
}), a = z(() => {
|
|
1206
1208
|
let i = {};
|
|
1207
1209
|
return n.showClose && !n.icon && (i.paddingRight = "16px"), i;
|
|
1208
1210
|
});
|
|
1209
1211
|
function c() {
|
|
1210
1212
|
n.closeOnClickOverlay && e("close");
|
|
1211
1213
|
}
|
|
1212
|
-
function
|
|
1214
|
+
function d() {
|
|
1213
1215
|
n.closeOnClick && e("close");
|
|
1214
1216
|
}
|
|
1215
|
-
return (i, f) => (
|
|
1217
|
+
return (i, f) => (R(), Se(Xe, {
|
|
1216
1218
|
"enter-active-class": "lzc-animate-fade-in lzc-animate-duration-300",
|
|
1217
1219
|
"leave-active-class": "lzc-animate-fade-out lzc-animate-duration-300"
|
|
1218
1220
|
}, {
|
|
1219
1221
|
default: Ze(() => [
|
|
1220
|
-
|
|
1222
|
+
B("div", {
|
|
1221
1223
|
id: o,
|
|
1222
|
-
style: q(
|
|
1224
|
+
style: q(A(l))
|
|
1223
1225
|
}, [
|
|
1224
|
-
de(
|
|
1226
|
+
de(B("div", {
|
|
1225
1227
|
class: ue(`${o} ${t.className}`),
|
|
1226
1228
|
onClick: we(c, ["stop"])
|
|
1227
1229
|
}, [
|
|
1228
|
-
|
|
1230
|
+
B("div", {
|
|
1229
1231
|
class: ue(`${o}-wrap`),
|
|
1230
|
-
onClick: we(
|
|
1232
|
+
onClick: we(d, ["stop"])
|
|
1231
1233
|
}, [
|
|
1232
|
-
|
|
1234
|
+
B("div", {
|
|
1233
1235
|
class: ue(`${o}-content`),
|
|
1234
|
-
style: q(
|
|
1236
|
+
style: q(A(s))
|
|
1235
1237
|
}, [
|
|
1236
|
-
t.showClose ? (
|
|
1238
|
+
t.showClose ? (R(), P("img", {
|
|
1237
1239
|
key: 0,
|
|
1238
1240
|
onClick: f[0] || (f[0] = we((r) => e("close"), ["stop"])),
|
|
1239
|
-
src:
|
|
1241
|
+
src: A(An),
|
|
1240
1242
|
class: ue(`${o}-close`)
|
|
1241
1243
|
}, null, 10, Cn)) : ge("", !0),
|
|
1242
|
-
t.showIcon ? (
|
|
1244
|
+
t.showIcon ? (R(), P("img", {
|
|
1243
1245
|
key: 1,
|
|
1244
|
-
src: t.icon ||
|
|
1246
|
+
src: t.icon || A(zn),
|
|
1245
1247
|
class: ue(`${o}-icon`)
|
|
1246
1248
|
}, null, 10, xn)) : ge("", !0),
|
|
1247
|
-
t.message ? (
|
|
1249
|
+
t.message ? (R(), P("div", {
|
|
1248
1250
|
key: 2,
|
|
1249
1251
|
class: ue(`${o}-message`),
|
|
1250
|
-
style: q(
|
|
1252
|
+
style: q(A(a))
|
|
1251
1253
|
}, Ke(t.message), 7)) : ge("", !0)
|
|
1252
1254
|
], 6)
|
|
1253
1255
|
], 10, jn)
|
|
@@ -1294,7 +1296,7 @@ class On {
|
|
|
1294
1296
|
}
|
|
1295
1297
|
}
|
|
1296
1298
|
function Fo(t, e) {
|
|
1297
|
-
const n = !!e?.debug, o = e?.printErrorLog !== !1, l = e?.loading !== !1, s = e?.autoClose !== !1, a = e?.delay !== void 0 ? e.delay : 300, c = e?.hook !== void 0 ? e.hook : !0,
|
|
1299
|
+
const n = !!e?.debug, o = e?.printErrorLog !== !1, l = e?.loading !== !1, s = e?.autoClose !== !1, a = e?.delay !== void 0 ? e.delay : 300, c = e?.hook !== void 0 ? e.hook : !0, d = {
|
|
1298
1300
|
...e,
|
|
1299
1301
|
showIcon: e?.showIcon !== !1,
|
|
1300
1302
|
captureEventP: e?.captureEventP === !0
|
|
@@ -1304,11 +1306,11 @@ function Fo(t, e) {
|
|
|
1304
1306
|
l,
|
|
1305
1307
|
s,
|
|
1306
1308
|
a,
|
|
1307
|
-
|
|
1309
|
+
d
|
|
1308
1310
|
);
|
|
1309
1311
|
const i = g(!1);
|
|
1310
1312
|
let f = null;
|
|
1311
|
-
const r = new On(
|
|
1313
|
+
const r = new On(d);
|
|
1312
1314
|
async function M(...u) {
|
|
1313
1315
|
if (n && console.log(`useDelayAsync - handler - processing: ${i.value}`), !i.value) {
|
|
1314
1316
|
i.value = !0, f = setTimeout(() => {
|
|
@@ -1320,36 +1322,36 @@ function Fo(t, e) {
|
|
|
1320
1322
|
}, a);
|
|
1321
1323
|
try {
|
|
1322
1324
|
n && console.time("useDelayAsync - handler-execute-time");
|
|
1323
|
-
const
|
|
1324
|
-
return n && console.log("useDelayAsync - execute res: ",
|
|
1325
|
-
} catch (
|
|
1326
|
-
n && console.timeEnd("useDelayAsync - handler-execute-time"), o && console.error(
|
|
1325
|
+
const p = await t(...u);
|
|
1326
|
+
return n && console.log("useDelayAsync - execute res: ", p), n && console.timeEnd("useDelayAsync - handler-execute-time"), await v(s), await e?.onSuccess?.(p, [...u]), p;
|
|
1327
|
+
} catch (p) {
|
|
1328
|
+
n && console.timeEnd("useDelayAsync - handler-execute-time"), o && console.error(p), await v(s), await e?.onError?.(p, [...u]);
|
|
1327
1329
|
}
|
|
1328
1330
|
}
|
|
1329
1331
|
}
|
|
1330
|
-
async function
|
|
1332
|
+
async function v(u = !0) {
|
|
1331
1333
|
n && console.log("useDelayAsync - close - closeLoading: ", u), i.value = !1, f && clearTimeout(f), f = null, u && await r.destory();
|
|
1332
1334
|
}
|
|
1333
1335
|
return c && Tt(() => {
|
|
1334
|
-
n && console.log("useDelayAsync - onBeforeUnmount - close"),
|
|
1336
|
+
n && console.log("useDelayAsync - onBeforeUnmount - close"), v();
|
|
1335
1337
|
}), {
|
|
1336
1338
|
processing: i,
|
|
1337
1339
|
handler: M,
|
|
1338
|
-
close:
|
|
1340
|
+
close: v
|
|
1339
1341
|
};
|
|
1340
1342
|
}
|
|
1341
1343
|
function _n(t, e) {
|
|
1342
1344
|
return t > e ? "horizontal" : e > t ? "vertical" : "";
|
|
1343
1345
|
}
|
|
1344
1346
|
function kn() {
|
|
1345
|
-
const t = g(0), e = g(0), n = g(0), o = g(0), l = g(0), s = g(0), a = g(""), c = () => a.value === "vertical",
|
|
1347
|
+
const t = g(0), e = g(0), n = g(0), o = g(0), l = g(0), s = g(0), a = g(""), c = () => a.value === "vertical", d = () => a.value === "horizontal", i = () => {
|
|
1346
1348
|
n.value = 0, o.value = 0, l.value = 0, s.value = 0, a.value = "";
|
|
1347
1349
|
};
|
|
1348
|
-
function f(M,
|
|
1349
|
-
i(), t.value = M, e.value =
|
|
1350
|
+
function f(M, v) {
|
|
1351
|
+
i(), t.value = M, e.value = v;
|
|
1350
1352
|
}
|
|
1351
|
-
function r(M,
|
|
1352
|
-
n.value = (M < 0 ? 0 : M) - t.value, o.value =
|
|
1353
|
+
function r(M, v) {
|
|
1354
|
+
n.value = (M < 0 ? 0 : M) - t.value, o.value = v - e.value, l.value = Math.abs(n.value), s.value = Math.abs(o.value);
|
|
1353
1355
|
const u = 10;
|
|
1354
1356
|
(!a.value || l.value < u && s.value < u) && (a.value = _n(l.value, s.value));
|
|
1355
1357
|
}
|
|
@@ -1365,7 +1367,7 @@ function kn() {
|
|
|
1365
1367
|
offsetY: s,
|
|
1366
1368
|
direction: a,
|
|
1367
1369
|
isVertical: c,
|
|
1368
|
-
isHorizontal:
|
|
1370
|
+
isHorizontal: d
|
|
1369
1371
|
};
|
|
1370
1372
|
}
|
|
1371
1373
|
const vt = 250, Mt = 5, Qn = 500;
|
|
@@ -1376,20 +1378,20 @@ function Yn(t) {
|
|
|
1376
1378
|
n = Date.now();
|
|
1377
1379
|
}
|
|
1378
1380
|
async function s(a, c) {
|
|
1379
|
-
const
|
|
1380
|
-
a < Mt && c < Mt && (
|
|
1381
|
+
const d = Date.now() - n;
|
|
1382
|
+
a < Mt && c < Mt && (d < vt ? e ? o ? (clearTimeout(o), o = null, t.onDoubleTap?.()) : o = setTimeout(async () => {
|
|
1381
1383
|
t.onTap?.(), o = null;
|
|
1382
|
-
}, vt) : t.onTap?.() :
|
|
1384
|
+
}, vt) : t.onTap?.() : d > Qn && t.onLongPress?.());
|
|
1383
1385
|
}
|
|
1384
1386
|
return { startTap: l, checkTap: s };
|
|
1385
1387
|
}
|
|
1386
1388
|
function Bn(t, e) {
|
|
1387
1389
|
const n = g(!1);
|
|
1388
1390
|
function o() {
|
|
1389
|
-
n.value || (n.value = !0,
|
|
1391
|
+
n.value || (n.value = !0, A(t)?.addEventListener("transitionend", l));
|
|
1390
1392
|
}
|
|
1391
1393
|
function l() {
|
|
1392
|
-
|
|
1394
|
+
A(t)?.removeEventListener("transitionend", l), n.value = !1, e.onComplate?.();
|
|
1393
1395
|
}
|
|
1394
1396
|
return { transitioning: n, startTransition: o };
|
|
1395
1397
|
}
|
|
@@ -1427,7 +1429,7 @@ function $n(t) {
|
|
|
1427
1429
|
};
|
|
1428
1430
|
}
|
|
1429
1431
|
function xt(t) {
|
|
1430
|
-
const e = g(!1), n = g(!1), o = g(1), l = g(9), s = g(), a = g(), c = g({ width: 0, height: 0 }),
|
|
1432
|
+
const e = g(!1), n = g(!1), o = g(1), l = g(9), s = g(), a = g(), c = g({ width: 0, height: 0 }), d = g({ width: 0, height: 0 }), i = Ie({
|
|
1431
1433
|
level: 1,
|
|
1432
1434
|
offsetX: 0,
|
|
1433
1435
|
offsetY: 0,
|
|
@@ -1438,7 +1440,7 @@ function xt(t) {
|
|
|
1438
1440
|
onComplate() {
|
|
1439
1441
|
i.preview || I();
|
|
1440
1442
|
}
|
|
1441
|
-
}),
|
|
1443
|
+
}), v = Yn({
|
|
1442
1444
|
onTap() {
|
|
1443
1445
|
t.onTap?.();
|
|
1444
1446
|
},
|
|
@@ -1451,118 +1453,118 @@ function xt(t) {
|
|
|
1451
1453
|
});
|
|
1452
1454
|
je(a, (D) => u(D)), G(
|
|
1453
1455
|
[s, a],
|
|
1454
|
-
([D,
|
|
1455
|
-
|
|
1456
|
+
([D, N]) => {
|
|
1457
|
+
p(D, N);
|
|
1456
1458
|
},
|
|
1457
1459
|
{ immediate: !0 }
|
|
1458
1460
|
);
|
|
1459
1461
|
async function u(D) {
|
|
1460
|
-
const [
|
|
1461
|
-
|
|
1462
|
+
const [N] = D;
|
|
1463
|
+
N.contentRect.width == d.value.width && N.contentRect.height == d.value.height || (await p(s.value), await I(i.level, !0));
|
|
1462
1464
|
}
|
|
1463
|
-
async function
|
|
1464
|
-
await
|
|
1465
|
+
async function p(D, N) {
|
|
1466
|
+
await H(D, N), D && Q();
|
|
1465
1467
|
}
|
|
1466
|
-
async function
|
|
1468
|
+
async function h(D) {
|
|
1467
1469
|
if (!i.preview)
|
|
1468
1470
|
return;
|
|
1469
1471
|
i.preview = !1, D = D ?? i.level;
|
|
1470
|
-
const
|
|
1471
|
-
if (!
|
|
1472
|
+
const N = a.value;
|
|
1473
|
+
if (!N)
|
|
1472
1474
|
return;
|
|
1473
|
-
const { scrollTop: T, scrollLeft:
|
|
1474
|
-
|
|
1475
|
-
const { value:
|
|
1476
|
-
|
|
1475
|
+
const { scrollTop: T, scrollLeft: C } = N, { width: O, height: k } = c.value, { scaleW: Y, scaleH: $ } = _(D), { top: V, left: ne } = b(Y, $), Me = ne != 0 ? ne : C * -1, ie = V != 0 ? V : T * -1;
|
|
1476
|
+
N.scrollTop = 0, N.scrollLeft = 0;
|
|
1477
|
+
const { value: Z } = f;
|
|
1478
|
+
Z.width = `${O}px`, Z.height = `${k}px`, Z.maxHeight = "none", Z.transitionDuration = "0s", Z.transform = Re(Me, ie, D), f.value = Z, await De(), i.offsetX = Me, i.offsetY = ie, await Ce(20);
|
|
1477
1479
|
}
|
|
1478
|
-
async function I(D,
|
|
1479
|
-
if (!
|
|
1480
|
+
async function I(D, N) {
|
|
1481
|
+
if (!N && i.preview)
|
|
1480
1482
|
return;
|
|
1481
1483
|
i.preview = !0, D = D ?? i.level;
|
|
1482
|
-
const { value: T } = f, { scaleW:
|
|
1483
|
-
D === 1 && (T.maxHeight = "100%"), T.width = `${
|
|
1484
|
-
const
|
|
1485
|
-
if (
|
|
1484
|
+
const { value: T } = f, { scaleW: C, scaleH: O } = _(D), { left: k, top: Y } = b(C, O);
|
|
1485
|
+
D === 1 && (T.maxHeight = "100%"), T.width = `${C}px`, T.height = `${O}px`, T.transitionDuration = "0s", T.filter = "blur(0.1px)", T.transform = Re(k, Y, 1), f.value = T, await De();
|
|
1486
|
+
const $ = a.value;
|
|
1487
|
+
if (!$)
|
|
1486
1488
|
return;
|
|
1487
1489
|
const { offsetX: V, offsetY: ne } = i;
|
|
1488
|
-
V < 0 && (
|
|
1490
|
+
V < 0 && ($.scrollLeft = Math.abs(V)), ne < 0 && ($.scrollTop = Math.abs(ne)), await j();
|
|
1489
1491
|
}
|
|
1490
1492
|
async function j() {
|
|
1491
1493
|
await Ce(15), delete f.value.filter;
|
|
1492
1494
|
}
|
|
1493
|
-
async function
|
|
1495
|
+
async function L(D, N, T) {
|
|
1494
1496
|
if (e.value || (D = re(D), D = Ue(
|
|
1495
1497
|
D,
|
|
1496
1498
|
o.value - o.value * 0.5,
|
|
1497
1499
|
l.value + l.value * 0.5
|
|
1498
1500
|
), D == i.level))
|
|
1499
1501
|
return;
|
|
1500
|
-
i.preview && await
|
|
1501
|
-
const { value:
|
|
1502
|
-
left: Math.abs(
|
|
1503
|
-
top: Math.abs(k * D -
|
|
1502
|
+
i.preview && await h(), N || (N = { x: r.startX.value, y: r.startY.value });
|
|
1503
|
+
const { value: C } = f, { width: O, height: k } = c.value, { scaleW: Y, scaleH: $ } = _(D), { top: V, left: ne } = b(Y, $), Me = D / i.level, ie = {
|
|
1504
|
+
left: Math.abs(O * D - d.value.width) * -1,
|
|
1505
|
+
top: Math.abs(k * D - d.value.height) * -1,
|
|
1504
1506
|
right: ne,
|
|
1505
1507
|
bottom: V
|
|
1506
1508
|
};
|
|
1507
|
-
let
|
|
1508
|
-
|
|
1509
|
+
let Z = ne != 0 ? ne : (i.offsetX - N.x) * Me + N.x, pe = V != 0 ? V : (i.offsetY - N.y) * Me + N.y;
|
|
1510
|
+
Z = re(Ue(Z, ie.left, ie.right)), pe = re(Ue(pe, ie.top, ie.bottom)), C.width = `${O}px`, C.height = `${k}px`, C.transitionDuration = T ? Rn(D) : "0s", C.transform = Re(Z, pe, D), i.offsetX = Z, i.offsetY = pe, i.level = D, f.value = C, await De(), T && M.startTransition(), t.onScale?.(D);
|
|
1509
1511
|
}
|
|
1510
|
-
function
|
|
1511
|
-
const D = i.level > 1 ? 1 :
|
|
1512
|
-
|
|
1512
|
+
function m() {
|
|
1513
|
+
const D = i.level > 1 ? 1 : w();
|
|
1514
|
+
L(D, void 0, !0);
|
|
1513
1515
|
}
|
|
1514
|
-
function
|
|
1516
|
+
function y(D, N) {
|
|
1515
1517
|
if (!i.preview)
|
|
1516
1518
|
return;
|
|
1517
1519
|
const T = a.value;
|
|
1518
1520
|
!T || T.scrollTo({
|
|
1519
1521
|
left: i.offsetX - D,
|
|
1520
|
-
top: i.offsetY -
|
|
1522
|
+
top: i.offsetY - N
|
|
1521
1523
|
});
|
|
1522
1524
|
}
|
|
1523
1525
|
async function E() {
|
|
1524
|
-
i.level >= o.value && i.level <= l.value ? i.zooming && await I() : i.level < o.value ? await
|
|
1526
|
+
i.level >= o.value && i.level <= l.value ? i.zooming && await I() : i.level < o.value ? await L(o.value, void 0, !0) : i.level > l.value && await L(l.value, i.lastCenter, !0), i.zooming = !1;
|
|
1525
1527
|
}
|
|
1526
|
-
function
|
|
1527
|
-
const { width: D, height:
|
|
1528
|
+
function w() {
|
|
1529
|
+
const { width: D, height: N } = c.value, { width: T, height: C } = d.value, O = 2.5;
|
|
1528
1530
|
let k;
|
|
1529
|
-
return
|
|
1531
|
+
return N == C ? (k = T / D, k - 1 < 0.1 && (k = O)) : k = Math.max(O, T / D, C / N), isNaN(k) ? O : k;
|
|
1530
1532
|
}
|
|
1531
|
-
function
|
|
1532
|
-
const { width:
|
|
1533
|
+
function _(D) {
|
|
1534
|
+
const { width: N, height: T } = c.value;
|
|
1533
1535
|
return {
|
|
1534
|
-
scaleW: re(D *
|
|
1536
|
+
scaleW: re(D * N),
|
|
1535
1537
|
scaleH: re(D * T)
|
|
1536
1538
|
};
|
|
1537
1539
|
}
|
|
1538
|
-
function
|
|
1539
|
-
const { width: T, height:
|
|
1540
|
-
return { top:
|
|
1540
|
+
function b(D, N) {
|
|
1541
|
+
const { width: T, height: C } = d.value, O = Math.max(0, (C - N) * 0.5), k = Math.max(0, (T - D) * 0.5);
|
|
1542
|
+
return { top: O, left: k };
|
|
1541
1543
|
}
|
|
1542
|
-
async function
|
|
1543
|
-
if (D = D ?? s.value,
|
|
1544
|
+
async function H(D, N) {
|
|
1545
|
+
if (D = D ?? s.value, N = N ?? a.value, !N)
|
|
1544
1546
|
return;
|
|
1545
|
-
let T, { clientWidth:
|
|
1546
|
-
const { clientWidth: k, clientHeight:
|
|
1547
|
+
let T, { clientWidth: C = 0, clientHeight: O = 0 } = D || {};
|
|
1548
|
+
const { clientWidth: k, clientHeight: Y } = N;
|
|
1547
1549
|
if (D instanceof HTMLImageElement ? T = { width: D.naturalWidth, height: D.naturalHeight } : D instanceof HTMLVideoElement && (T = { width: D.videoWidth, height: D.videoHeight }), T) {
|
|
1548
|
-
const
|
|
1550
|
+
const $ = Un(
|
|
1549
1551
|
T.width,
|
|
1550
1552
|
T.height,
|
|
1551
1553
|
k,
|
|
1552
|
-
|
|
1554
|
+
Y
|
|
1553
1555
|
);
|
|
1554
|
-
|
|
1556
|
+
C = $.width, O = $.height;
|
|
1555
1557
|
}
|
|
1556
|
-
(
|
|
1557
|
-
width: Math.min(
|
|
1558
|
-
height: Math.min(
|
|
1559
|
-
},
|
|
1558
|
+
(C === 0 || O === 0) && (C = c.value.width || k, O = c.value.height || Y), c.value = {
|
|
1559
|
+
width: Math.min(C, k),
|
|
1560
|
+
height: Math.min(O, Y)
|
|
1561
|
+
}, d.value = { width: k, height: Y }, I(void 0, !0);
|
|
1560
1562
|
}
|
|
1561
|
-
function
|
|
1562
|
-
const D =
|
|
1563
|
+
function Q() {
|
|
1564
|
+
const D = w();
|
|
1563
1565
|
l.value = Math.max(l.value, D * 2);
|
|
1564
1566
|
}
|
|
1565
|
-
function
|
|
1567
|
+
function U(D) {
|
|
1566
1568
|
e.value = D;
|
|
1567
1569
|
}
|
|
1568
1570
|
function ee() {
|
|
@@ -1575,51 +1577,51 @@ function xt(t) {
|
|
|
1575
1577
|
touch: r,
|
|
1576
1578
|
state: i,
|
|
1577
1579
|
style: f,
|
|
1578
|
-
gesture:
|
|
1580
|
+
gesture: v,
|
|
1579
1581
|
transition: M,
|
|
1580
1582
|
imageRef: s,
|
|
1581
1583
|
containerRef: a,
|
|
1582
|
-
switchToZoom:
|
|
1584
|
+
switchToZoom: h,
|
|
1583
1585
|
switchToPreview: I,
|
|
1584
|
-
panTo:
|
|
1585
|
-
zoomTo:
|
|
1586
|
+
panTo: y,
|
|
1587
|
+
zoomTo: L,
|
|
1586
1588
|
zoomFinished: E,
|
|
1587
|
-
toggleZoom:
|
|
1588
|
-
setDisableZoom:
|
|
1589
|
+
toggleZoom: m,
|
|
1590
|
+
setDisableZoom: U,
|
|
1589
1591
|
setDisableMove: te,
|
|
1590
1592
|
getDisableMove: ee
|
|
1591
1593
|
};
|
|
1592
1594
|
}
|
|
1593
1595
|
function St(t, e) {
|
|
1594
1596
|
const { state: n, touch: o, transition: l, containerRef: s } = t, a = un(s);
|
|
1595
|
-
let c,
|
|
1597
|
+
let c, d;
|
|
1596
1598
|
function i(M) {
|
|
1597
1599
|
c = M;
|
|
1598
1600
|
}
|
|
1599
1601
|
function f(M) {
|
|
1600
1602
|
return c == M;
|
|
1601
1603
|
}
|
|
1602
|
-
function r(M,
|
|
1604
|
+
function r(M, v, u, p) {
|
|
1603
1605
|
a.measure();
|
|
1604
|
-
const { top:
|
|
1606
|
+
const { top: h, left: I, right: j, bottom: L } = a.arrivedState;
|
|
1605
1607
|
if (M == "start")
|
|
1606
|
-
|
|
1608
|
+
d = h || I || j || L;
|
|
1607
1609
|
else if (c == 2)
|
|
1608
|
-
|
|
1609
|
-
else if (
|
|
1610
|
+
d = !1;
|
|
1611
|
+
else if (d) {
|
|
1610
1612
|
if (o.direction.value == "vertical")
|
|
1611
1613
|
if (n.level != 1)
|
|
1612
|
-
|
|
1614
|
+
d = !1;
|
|
1613
1615
|
else {
|
|
1614
|
-
const
|
|
1615
|
-
|
|
1616
|
+
const m = o.startY.value < u;
|
|
1617
|
+
d = h && m || L && !m;
|
|
1616
1618
|
}
|
|
1617
1619
|
else if (o.direction.value == "horizontal") {
|
|
1618
|
-
const
|
|
1619
|
-
|
|
1620
|
+
const m = o.startX.value < v;
|
|
1621
|
+
d = I && m || j && !m;
|
|
1620
1622
|
}
|
|
1621
1623
|
}
|
|
1622
|
-
|
|
1624
|
+
d && l.transitioning.value && (d = !1, p?.preventDefault()), M == "end" && !d && (v = o.startX.value, u = o.startY.value, d = !0), (M != "move" || d) && e?.(M, o.direction.value, v, u, p);
|
|
1623
1625
|
}
|
|
1624
1626
|
return { onSwipeEdge: r, setFingerNum: i, isEqualFingerNum: f };
|
|
1625
1627
|
}
|
|
@@ -1631,56 +1633,56 @@ function Wo(t) {
|
|
|
1631
1633
|
...t
|
|
1632
1634
|
}), { state: n, touch: o, gesture: l, transition: s } = e;
|
|
1633
1635
|
let a = !1, c = null;
|
|
1634
|
-
const
|
|
1636
|
+
const d = { top: 0, left: 0 }, i = ke(h, 150), { onSwipeEdge: f } = St(e, t.onSwipeEdge), r = g({ top: 0, left: 0 });
|
|
1635
1637
|
Le("keyup", j), Le("keydown", I);
|
|
1636
|
-
function M(
|
|
1637
|
-
const
|
|
1638
|
-
if (!
|
|
1638
|
+
function M(L) {
|
|
1639
|
+
const m = e.containerRef.value;
|
|
1640
|
+
if (!m)
|
|
1639
1641
|
return;
|
|
1640
|
-
const { left:
|
|
1641
|
-
r.value.left =
|
|
1642
|
-
let
|
|
1643
|
-
o.start(
|
|
1642
|
+
const { left: y, top: E } = m.getBoundingClientRect();
|
|
1643
|
+
r.value.left = y, r.value.top = E, l.startTap();
|
|
1644
|
+
let w = L.clientX - y, _ = L.clientY - E;
|
|
1645
|
+
o.start(w, _), f("start", w, _, L), s.transitioning.value || (a = !0, d.left = y, d.top = E, n.offsetX = m.scrollLeft, n.offsetY = m.scrollTop), window.addEventListener("pointermove", v), window.addEventListener("pointerup", u);
|
|
1644
1646
|
}
|
|
1645
|
-
function
|
|
1647
|
+
function v(L) {
|
|
1646
1648
|
if (!a || e.getDisableMove())
|
|
1647
1649
|
return;
|
|
1648
|
-
let
|
|
1649
|
-
o.move(
|
|
1650
|
+
let m = L.clientX, y = L.clientY;
|
|
1651
|
+
o.move(m, y), f(
|
|
1650
1652
|
"move",
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1653
|
+
m - r.value.left,
|
|
1654
|
+
y - r.value.top,
|
|
1655
|
+
L
|
|
1654
1656
|
), n.level !== 1 && e.panTo(
|
|
1655
|
-
o.deltaX.value -
|
|
1656
|
-
o.deltaY.value -
|
|
1657
|
+
o.deltaX.value - d.left,
|
|
1658
|
+
o.deltaY.value - d.top
|
|
1657
1659
|
);
|
|
1658
1660
|
}
|
|
1659
|
-
function u(
|
|
1660
|
-
f("end", o.offsetX.value, o.offsetY.value,
|
|
1661
|
+
function u(L) {
|
|
1662
|
+
f("end", o.offsetX.value, o.offsetY.value, L), l.checkTap(o.offsetX.value, o.offsetY.value), o.reset(), a = !1, window.removeEventListener("pointermove", v), window.removeEventListener("pointerup", u);
|
|
1661
1663
|
}
|
|
1662
|
-
function
|
|
1663
|
-
if (!
|
|
1664
|
+
function p(L) {
|
|
1665
|
+
if (!L.ctrlKey)
|
|
1664
1666
|
return;
|
|
1665
|
-
n.zooming || (n.zooming = !0, c == "Control" && window.addEventListener("keyup",
|
|
1666
|
-
let
|
|
1667
|
-
|
|
1668
|
-
const
|
|
1667
|
+
n.zooming || (n.zooming = !0, c == "Control" && window.addEventListener("keyup", h)), L.preventDefault();
|
|
1668
|
+
let m = -L.deltaY;
|
|
1669
|
+
L.deltaMode === 1 ? m *= 0.05 : m *= L.deltaMode ? 1 : 2e-3, c != "Control" && (m *= 10), m = 2 ** m;
|
|
1670
|
+
const y = n.level * m;
|
|
1669
1671
|
n.lastCenter = {
|
|
1670
|
-
x:
|
|
1671
|
-
y:
|
|
1672
|
-
}, e.zoomTo(
|
|
1672
|
+
x: L.clientX - r.value.left,
|
|
1673
|
+
y: L.clientY - r.value.top
|
|
1674
|
+
}, e.zoomTo(y, n.lastCenter), c != "Control" && i();
|
|
1673
1675
|
}
|
|
1674
|
-
function
|
|
1675
|
-
e.zoomFinished(), window.removeEventListener("keyup",
|
|
1676
|
+
function h() {
|
|
1677
|
+
e.zoomFinished(), window.removeEventListener("keyup", h);
|
|
1676
1678
|
}
|
|
1677
|
-
function I(
|
|
1678
|
-
c =
|
|
1679
|
+
function I(L) {
|
|
1680
|
+
c = L.key;
|
|
1679
1681
|
}
|
|
1680
1682
|
function j() {
|
|
1681
1683
|
c = null;
|
|
1682
1684
|
}
|
|
1683
|
-
return { core: e, onPointerDown: M, onWheel:
|
|
1685
|
+
return { core: e, onPointerDown: M, onWheel: p };
|
|
1684
1686
|
}
|
|
1685
1687
|
function Xo(t) {
|
|
1686
1688
|
const e = xt({
|
|
@@ -1692,30 +1694,30 @@ function Xo(t) {
|
|
|
1692
1694
|
e,
|
|
1693
1695
|
t.onSwipeEdge
|
|
1694
1696
|
);
|
|
1695
|
-
let
|
|
1696
|
-
async function f(
|
|
1697
|
-
const { touches: u } =
|
|
1697
|
+
let d, i;
|
|
1698
|
+
async function f(v) {
|
|
1699
|
+
const { touches: u } = v;
|
|
1698
1700
|
s(u.length), n.zooming = c(2), l.startTap();
|
|
1699
|
-
const { clientX:
|
|
1700
|
-
o.start(
|
|
1701
|
+
const { clientX: p, clientY: h } = u[0];
|
|
1702
|
+
o.start(p, h), a("start", p, h, v), n.zooming && (v.preventDefault(), d = n.level, i = gt(u), await e.switchToZoom(), n.lastCenter = $n(u));
|
|
1701
1703
|
}
|
|
1702
|
-
async function r(
|
|
1704
|
+
async function r(v) {
|
|
1703
1705
|
if (e.getDisableMove())
|
|
1704
1706
|
return;
|
|
1705
|
-
const { touches: u } =
|
|
1707
|
+
const { touches: u } = v;
|
|
1706
1708
|
s(u.length);
|
|
1707
|
-
const { clientX:
|
|
1708
|
-
if (o.move(
|
|
1709
|
-
|
|
1710
|
-
const I = gt(u), j =
|
|
1709
|
+
const { clientX: p, clientY: h } = u[0];
|
|
1710
|
+
if (o.move(p, h), a("move", p, h, v), n.zooming && c(2)) {
|
|
1711
|
+
v.preventDefault();
|
|
1712
|
+
const I = gt(u), j = d * I / i;
|
|
1711
1713
|
e.zoomTo(j, n.lastCenter);
|
|
1712
1714
|
}
|
|
1713
1715
|
}
|
|
1714
|
-
async function M(
|
|
1715
|
-
if (
|
|
1716
|
+
async function M(v) {
|
|
1717
|
+
if (v.touches.length)
|
|
1716
1718
|
return;
|
|
1717
|
-
const { clientX: u, clientY:
|
|
1718
|
-
a("end", u,
|
|
1719
|
+
const { clientX: u, clientY: p } = v.changedTouches[0];
|
|
1720
|
+
a("end", u, p, v), l.checkTap(o.offsetX.value, o.offsetY.value), e.zoomFinished(), o.reset();
|
|
1719
1721
|
}
|
|
1720
1722
|
return { core: e, onTouchStart: f, onTouchMove: r, onTouchEnd: M };
|
|
1721
1723
|
}
|
|
@@ -1785,7 +1787,7 @@ const Fn = ["onClick"], Wn = /* @__PURE__ */ J({
|
|
|
1785
1787
|
buttonClickEvent: null
|
|
1786
1788
|
},
|
|
1787
1789
|
setup(t) {
|
|
1788
|
-
const e = t, n = g(), o = g(), l = g(), s =
|
|
1790
|
+
const e = t, n = g(), o = g(), l = g(), s = z(() => {
|
|
1789
1791
|
switch (e.position) {
|
|
1790
1792
|
case "top":
|
|
1791
1793
|
return 10;
|
|
@@ -1794,14 +1796,14 @@ const Fn = ["onClick"], Wn = /* @__PURE__ */ J({
|
|
|
1794
1796
|
case "bottom":
|
|
1795
1797
|
return 85;
|
|
1796
1798
|
}
|
|
1797
|
-
}), a =
|
|
1799
|
+
}), a = z(() => ({
|
|
1798
1800
|
position: "absolute",
|
|
1799
1801
|
borderRadius: "10px",
|
|
1800
1802
|
backgroundColor: "rgba(0, 0, 0, 0.8)",
|
|
1801
1803
|
padding: "14px 19px",
|
|
1802
1804
|
top: `calc(${s.value}% - ${l.value}px)`,
|
|
1803
1805
|
left: `calc(50% - ${o.value}px)`
|
|
1804
|
-
})), c =
|
|
1806
|
+
})), c = z(() => ({
|
|
1805
1807
|
width: "fit-content",
|
|
1806
1808
|
display: "flex",
|
|
1807
1809
|
justifyContent: "center",
|
|
@@ -1809,23 +1811,23 @@ const Fn = ["onClick"], Wn = /* @__PURE__ */ J({
|
|
|
1809
1811
|
color: "white",
|
|
1810
1812
|
fontSize: "14px"
|
|
1811
1813
|
}));
|
|
1812
|
-
function
|
|
1814
|
+
function d() {
|
|
1813
1815
|
!e.buttonClickEvent || e.buttonClickEvent();
|
|
1814
1816
|
}
|
|
1815
1817
|
return De(() => {
|
|
1816
1818
|
o.value = n.value.offsetWidth / 2, l.value = n.value.offsetHeight / 2;
|
|
1817
|
-
}), (i, f) => (
|
|
1818
|
-
onClick: we(
|
|
1819
|
+
}), (i, f) => (R(), P("div", {
|
|
1820
|
+
onClick: we(d, ["stop"]),
|
|
1819
1821
|
id: "toastWrapper",
|
|
1820
1822
|
ref_key: "toastWrapper",
|
|
1821
1823
|
ref: n,
|
|
1822
1824
|
class: "toastWrapper",
|
|
1823
|
-
style: q([
|
|
1825
|
+
style: q([A(a), { zIndex: 9999999 }])
|
|
1824
1826
|
}, [
|
|
1825
|
-
|
|
1826
|
-
style: q(
|
|
1827
|
+
B("div", {
|
|
1828
|
+
style: q(A(c))
|
|
1827
1829
|
}, [
|
|
1828
|
-
|
|
1830
|
+
B("span", null, Ke(t.message), 1)
|
|
1829
1831
|
], 4)
|
|
1830
1832
|
], 12, Fn));
|
|
1831
1833
|
}
|
|
@@ -1872,7 +1874,7 @@ const Zn = ["xlink:href", "fill", "color"], xe = /* @__PURE__ */ J({
|
|
|
1872
1874
|
height: null
|
|
1873
1875
|
},
|
|
1874
1876
|
setup(t) {
|
|
1875
|
-
const e = t, n =
|
|
1877
|
+
const e = t, n = z(() => `#${e.prefix}-${e.name}`), o = z(() => ({
|
|
1876
1878
|
width: `${e.width ?? e.height}px`,
|
|
1877
1879
|
height: `${e.height ?? e.width}px`,
|
|
1878
1880
|
aspectRatio: e.width && e.height ? void 0 : "1/1"
|
|
@@ -1881,12 +1883,12 @@ const Zn = ["xlink:href", "fill", "color"], xe = /* @__PURE__ */ J({
|
|
|
1881
1883
|
const { style: a } = s;
|
|
1882
1884
|
return typeof a == "object" ? a : {};
|
|
1883
1885
|
}
|
|
1884
|
-
return (s, a) => (
|
|
1886
|
+
return (s, a) => (R(), P("svg", {
|
|
1885
1887
|
"aria-hidden": "",
|
|
1886
|
-
style: q({ ...
|
|
1888
|
+
style: q({ ...A(o), ...l(s.$attrs) })
|
|
1887
1889
|
}, [
|
|
1888
|
-
|
|
1889
|
-
"xlink:href":
|
|
1890
|
+
B("use", {
|
|
1891
|
+
"xlink:href": A(n),
|
|
1890
1892
|
fill: t.color,
|
|
1891
1893
|
color: t.color
|
|
1892
1894
|
}, null, 8, Zn)
|
|
@@ -1901,108 +1903,108 @@ function Vn(t) {
|
|
|
1901
1903
|
performance: l = {},
|
|
1902
1904
|
maxHeightRatio: s = 0.9,
|
|
1903
1905
|
observeMethod: a = "classList"
|
|
1904
|
-
} = t, c = g(!0),
|
|
1906
|
+
} = t, c = g(!0), d = ke(H, 100);
|
|
1905
1907
|
let i, f = "";
|
|
1906
|
-
const r = g(0), M = g(0),
|
|
1908
|
+
const r = g(0), M = g(0), v = g(0), u = g({
|
|
1907
1909
|
top: 0,
|
|
1908
1910
|
scrollTop: 0,
|
|
1909
1911
|
scrollHeight: 0,
|
|
1910
1912
|
clientHeight: 0
|
|
1911
|
-
}),
|
|
1913
|
+
}), p = g({
|
|
1912
1914
|
clientHeight: 0
|
|
1913
|
-
}),
|
|
1915
|
+
}), h = z(() => !!M.value), I = z(() => u.value.scrollHeight > u.value.clientHeight), j = z(() => o ? u.value.clientHeight - y.value : u.value.clientHeight - p.value.clientHeight), L = z(() => u.value.scrollHeight - u.value.clientHeight), m = z(() => !u.value.clientHeight && !u.value.scrollHeight ? 1 : Math.max(
|
|
1914
1916
|
u.value.clientHeight / u.value.scrollHeight,
|
|
1915
1917
|
0.05
|
|
1916
|
-
)),
|
|
1918
|
+
)), y = z(() => m.value > s ? 0 : m.value * u.value.clientHeight), E = z(() => ({
|
|
1917
1919
|
willChange: "transform",
|
|
1918
|
-
transform: `translate3d(0,${
|
|
1919
|
-
height: o ? `${
|
|
1920
|
+
transform: `translate3d(0,${v.value}px,0)`,
|
|
1921
|
+
height: o ? `${y.value}px` : void 0
|
|
1920
1922
|
}));
|
|
1921
|
-
je(e, () => T()), je(n, () =>
|
|
1922
|
-
function
|
|
1923
|
-
|
|
1923
|
+
je(e, () => T()), je(n, () => C());
|
|
1924
|
+
function w(Y) {
|
|
1925
|
+
b(), M.value = Y.clientY - n.value.getBoundingClientRect().top || 1, f = getComputedStyle(e.value).scrollBehavior, f === "smooth" && (e.value.style.scrollBehavior = "unset");
|
|
1924
1926
|
}
|
|
1925
|
-
function
|
|
1926
|
-
e.value.style.scrollBehavior = f, M.value = 0,
|
|
1927
|
+
function _() {
|
|
1928
|
+
e.value.style.scrollBehavior = f, M.value = 0, d();
|
|
1927
1929
|
}
|
|
1928
|
-
function
|
|
1930
|
+
function b() {
|
|
1929
1931
|
c.value = !1;
|
|
1930
1932
|
}
|
|
1931
|
-
function
|
|
1932
|
-
|
|
1933
|
+
function H() {
|
|
1934
|
+
h.value || (c.value = !0);
|
|
1933
1935
|
}
|
|
1934
|
-
function
|
|
1935
|
-
if (!
|
|
1936
|
+
function Q(Y) {
|
|
1937
|
+
if (!h.value)
|
|
1936
1938
|
return;
|
|
1937
|
-
let
|
|
1938
|
-
|
|
1939
|
-
top:
|
|
1939
|
+
let $ = Y.clientY - u.value.top - M.value;
|
|
1940
|
+
$ < 0 ? v.value = 0 : $ >= j.value ? v.value = j.value : v.value = $, e.value.scrollTo({
|
|
1941
|
+
top: v.value / j.value * L.value
|
|
1940
1942
|
});
|
|
1941
1943
|
}
|
|
1942
|
-
function
|
|
1943
|
-
|
|
1944
|
+
function U() {
|
|
1945
|
+
h.value || ee();
|
|
1944
1946
|
}
|
|
1945
1947
|
function ee() {
|
|
1946
1948
|
cancelAnimationFrame(i), i = requestAnimationFrame(te);
|
|
1947
1949
|
}
|
|
1948
1950
|
function te() {
|
|
1949
|
-
e.value && (r.value = l.scrollTop?.value ?? e.value.scrollTop,
|
|
1951
|
+
e.value && (r.value = l.scrollTop?.value ?? e.value.scrollTop, v.value = r.value / L.value * j.value);
|
|
1950
1952
|
}
|
|
1951
|
-
function D(
|
|
1952
|
-
let
|
|
1953
|
-
|
|
1953
|
+
function D(Y) {
|
|
1954
|
+
let $ = "addEventListener";
|
|
1955
|
+
Y === "add" ? $ = "addEventListener" : $ = "removeEventListener", n.value?.[$]("pointerdown", w, {
|
|
1954
1956
|
passive: !0
|
|
1955
|
-
}), window[
|
|
1957
|
+
}), window[$]("pointermove", Q, { passive: !0 }), window[$]("pointerup", _, { passive: !0 });
|
|
1956
1958
|
}
|
|
1957
|
-
const
|
|
1958
|
-
(a == "classList" ||
|
|
1959
|
+
const N = new MutationObserver((Y) => {
|
|
1960
|
+
(a == "classList" || Y.map((V) => V.oldValue).join().includes("height")) && T();
|
|
1959
1961
|
});
|
|
1960
1962
|
function T() {
|
|
1961
1963
|
u.value.top = e.value?.getBoundingClientRect().top ?? 0;
|
|
1962
|
-
const { scrollHeight:
|
|
1963
|
-
|
|
1964
|
+
const { scrollHeight: Y = 0, clientHeight: $ = 0 } = e.value || {}, { scrollHeight: V, clientHeight: ne } = u.value;
|
|
1965
|
+
Y != V && (u.value.scrollHeight = Y, te()), $ != ne && (u.value.clientHeight = $, te());
|
|
1964
1966
|
}
|
|
1965
|
-
function
|
|
1966
|
-
const { clientHeight:
|
|
1967
|
-
|
|
1967
|
+
function C() {
|
|
1968
|
+
const { clientHeight: Y = 0 } = n.value || {};
|
|
1969
|
+
Y != p.value.clientHeight && (p.value.clientHeight = Y);
|
|
1968
1970
|
}
|
|
1969
|
-
function
|
|
1970
|
-
|
|
1971
|
-
|
|
1971
|
+
function O() {
|
|
1972
|
+
b(), setTimeout(() => {
|
|
1973
|
+
p.value.clientHeight = n.value?.clientHeight ?? 0, H();
|
|
1972
1974
|
}, 150);
|
|
1973
1975
|
}
|
|
1974
1976
|
function k() {
|
|
1975
1977
|
if (e.value && n.value) {
|
|
1976
|
-
e.value.classList.add("hide-scrollbar"), e.value.addEventListener("scroll",
|
|
1978
|
+
e.value.classList.add("hide-scrollbar"), e.value.addEventListener("scroll", U, {
|
|
1977
1979
|
passive: !0
|
|
1978
1980
|
}), D("add");
|
|
1979
|
-
const
|
|
1980
|
-
a === "classList" ? Object.assign(
|
|
1981
|
+
const Y = {};
|
|
1982
|
+
a === "classList" ? Object.assign(Y, { subtree: !0, childList: !0 }) : Object.assign(Y, {
|
|
1981
1983
|
subtree: !0,
|
|
1982
1984
|
attributeOldValue: !0,
|
|
1983
1985
|
attributeFilter: ["style"]
|
|
1984
|
-
}),
|
|
1986
|
+
}), N.observe(e.value, Y), setTimeout(() => {
|
|
1985
1987
|
T();
|
|
1986
|
-
}, 100),
|
|
1988
|
+
}, 100), O();
|
|
1987
1989
|
} else
|
|
1988
1990
|
console.error("useScrollBar:", "\u521D\u59CB\u5316\u5931\u8D25!", { containerEl: e, sliderEl: n });
|
|
1989
1991
|
}
|
|
1990
1992
|
return G(r, () => {
|
|
1991
|
-
|
|
1993
|
+
b(), d();
|
|
1992
1994
|
}), {
|
|
1993
1995
|
isScrollEnd: c,
|
|
1994
|
-
isDragSlider:
|
|
1995
|
-
offsetTop:
|
|
1996
|
+
isDragSlider: h,
|
|
1997
|
+
offsetTop: v,
|
|
1996
1998
|
scrollTop: r,
|
|
1997
1999
|
scrollable: I,
|
|
1998
2000
|
sliderPos: E,
|
|
1999
2001
|
sliderRollableHeight: j,
|
|
2000
2002
|
init: k,
|
|
2001
2003
|
modifySliderEventListener: D,
|
|
2002
|
-
heightRatio:
|
|
2004
|
+
heightRatio: m
|
|
2003
2005
|
};
|
|
2004
2006
|
}
|
|
2005
|
-
const Kn = (t) => (be("data-v-7fd39e51"), t = t(), Oe(), t), Gn = /* @__PURE__ */ Kn(() => /* @__PURE__ */
|
|
2007
|
+
const Kn = (t) => (be("data-v-7fd39e51"), t = t(), Oe(), t), Gn = /* @__PURE__ */ Kn(() => /* @__PURE__ */ B("div", { class: "default-slider" }, null, -1)), qn = /* @__PURE__ */ J({
|
|
2006
2008
|
__name: "ScrollBar",
|
|
2007
2009
|
props: {
|
|
2008
2010
|
containerEl: null,
|
|
@@ -2013,13 +2015,13 @@ const Kn = (t) => (be("data-v-7fd39e51"), t = t(), Oe(), t), Gn = /* @__PURE__ *
|
|
|
2013
2015
|
maxHeightRatio: { default: 0.9 }
|
|
2014
2016
|
},
|
|
2015
2017
|
setup(t, { expose: e }) {
|
|
2016
|
-
const n = t, o = !!Ft().default, l = g(null), s =
|
|
2018
|
+
const n = t, o = !!Ft().default, l = g(null), s = z(() => n.containerEl), a = Vn({
|
|
2017
2019
|
containerEl: s,
|
|
2018
2020
|
sliderEl: l,
|
|
2019
2021
|
autoHeight: o ? n.autoHeight : !0,
|
|
2020
2022
|
performance: n.performance,
|
|
2021
2023
|
observeMethod: n.observeMethod
|
|
2022
|
-
}), { scrollable: c, isScrollEnd:
|
|
2024
|
+
}), { scrollable: c, isScrollEnd: d, sliderPos: i, heightRatio: f } = a, r = g(!1), M = n.autoHide ? z(() => n.maxHeightRatio < f.value ? !1 : r.value || !d.value) : z(() => n.maxHeightRatio < f.value ? !1 : c.value), { load: v } = Je(
|
|
2023
2025
|
`.hide-scrollbar {
|
|
2024
2026
|
scrollbar-width: none;
|
|
2025
2027
|
-ms-overflow-style: none;
|
|
@@ -2030,7 +2032,7 @@ const Kn = (t) => (be("data-v-7fd39e51"), t = t(), Oe(), t), Gn = /* @__PURE__ *
|
|
|
2030
2032
|
{ id: "styletag_lzc_scrollbar", manual: !0 }
|
|
2031
2033
|
);
|
|
2032
2034
|
ve(() => {
|
|
2033
|
-
|
|
2035
|
+
v(), De(() => {
|
|
2034
2036
|
a.init();
|
|
2035
2037
|
});
|
|
2036
2038
|
}), Dt(() => {
|
|
@@ -2039,37 +2041,37 @@ const Kn = (t) => (be("data-v-7fd39e51"), t = t(), Oe(), t), Gn = /* @__PURE__ *
|
|
|
2039
2041
|
function u() {
|
|
2040
2042
|
r.value = !0;
|
|
2041
2043
|
}
|
|
2042
|
-
function
|
|
2044
|
+
function p() {
|
|
2043
2045
|
r.value = !1;
|
|
2044
2046
|
}
|
|
2045
|
-
return e({ uScrollBarReturn: a }), (
|
|
2047
|
+
return e({ uScrollBarReturn: a }), (h, I) => (R(), Se(Xe, null, {
|
|
2046
2048
|
default: Ze(() => [
|
|
2047
|
-
de(
|
|
2049
|
+
de(B("div", {
|
|
2048
2050
|
ref_key: "sliderRef",
|
|
2049
2051
|
ref: l,
|
|
2050
2052
|
class: "slider-wrapper",
|
|
2051
2053
|
onMouseenter: u,
|
|
2052
|
-
onMouseleave:
|
|
2053
|
-
style: q(
|
|
2054
|
+
onMouseleave: p,
|
|
2055
|
+
style: q(A(i))
|
|
2054
2056
|
}, [
|
|
2055
|
-
he(
|
|
2057
|
+
he(h.$slots, "default", {}, () => [
|
|
2056
2058
|
Gn
|
|
2057
2059
|
], !0)
|
|
2058
2060
|
], 36), [
|
|
2059
|
-
[_e,
|
|
2061
|
+
[_e, A(M)]
|
|
2060
2062
|
])
|
|
2061
2063
|
]),
|
|
2062
2064
|
_: 3
|
|
2063
2065
|
}));
|
|
2064
2066
|
}
|
|
2065
2067
|
});
|
|
2066
|
-
const Go = /* @__PURE__ */ ae(qn, [["__scopeId", "data-v-7fd39e51"]]), Jn = (t) => (be("data-v-
|
|
2068
|
+
const Go = /* @__PURE__ */ ae(qn, [["__scopeId", "data-v-7fd39e51"]]), Jn = (t) => (be("data-v-b28b4e7e"), t = t(), Oe(), t), eo = { class: "pull-refresh" }, to = {
|
|
2067
2069
|
key: 0,
|
|
2068
2070
|
class: "pull-arrow-circle"
|
|
2069
2071
|
}, no = {
|
|
2070
2072
|
key: 0,
|
|
2071
2073
|
class: "box-load"
|
|
2072
|
-
}, oo = { class: "left-load" }, lo = { class: "right-load" }, so = /* @__PURE__ */ Jn(() => /* @__PURE__ */
|
|
2074
|
+
}, oo = { class: "left-load" }, lo = { class: "right-load" }, so = /* @__PURE__ */ Jn(() => /* @__PURE__ */ B("div", { class: "among-load" }, null, -1)), ao = { class: "pull-arrow" }, io = { key: 1 }, uo = /* @__PURE__ */ J({
|
|
2073
2075
|
__name: "PullRefresh",
|
|
2074
2076
|
props: {
|
|
2075
2077
|
refresh: null,
|
|
@@ -2077,94 +2079,114 @@ const Go = /* @__PURE__ */ ae(qn, [["__scopeId", "data-v-7fd39e51"]]), Jn = (t)
|
|
|
2077
2079
|
scrollTop: null,
|
|
2078
2080
|
pullRefreshContainer: null
|
|
2079
2081
|
},
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
transition:
|
|
2087
|
-
transform: `
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2082
|
+
emits: ["pull-move"],
|
|
2083
|
+
setup(t, { emit: e }) {
|
|
2084
|
+
const n = t, o = 0.7, l = "#2EC1CC", s = g(-999), a = g(1), c = g(0), d = g(0.3), i = g(!1), f = g(0), r = g(0), M = g(0), v = g(0), u = g(0), p = g(), h = g({
|
|
2085
|
+
transition: "0ms",
|
|
2086
|
+
transform: "translate3d(0, 0, 0)"
|
|
2087
|
+
}), I = z(() => n.scrollTop), j = z(() => ({
|
|
2088
|
+
transition: `${v.value}ms`,
|
|
2089
|
+
transform: `translate3d(0,${s.value}px, 0) scale(${a.value})`
|
|
2090
|
+
})), L = z(() => ({
|
|
2091
|
+
borderColor: l,
|
|
2092
|
+
transition: v.value,
|
|
2093
|
+
transform: `rotate(${100 + c.value}deg)`,
|
|
2094
|
+
opacity: d.value
|
|
2095
|
+
})), m = z(() => {
|
|
2096
|
+
if (!!p.value)
|
|
2097
|
+
switch (p.value) {
|
|
2092
2098
|
case "success":
|
|
2093
2099
|
return "\u5237\u65B0\u6210\u529F";
|
|
2094
2100
|
case "failed":
|
|
2095
2101
|
return "\u5237\u65B0\u5931\u8D25";
|
|
2096
2102
|
}
|
|
2097
2103
|
});
|
|
2098
|
-
G(
|
|
2099
|
-
|
|
2100
|
-
}), G(
|
|
2101
|
-
if (
|
|
2104
|
+
G(u, (Q) => {
|
|
2105
|
+
Q === 0 && (s.value = -50, d.value = 0.3);
|
|
2106
|
+
}), G(r, (Q) => {
|
|
2107
|
+
if (u.value === 2)
|
|
2102
2108
|
return;
|
|
2103
|
-
const
|
|
2104
|
-
|
|
2109
|
+
const U = Math.pow(Q, o);
|
|
2110
|
+
U === 0 && (s.value = -50), U <= 50 && U > 0 && (s.value = U - 45, c.value = Math.pow(U, 1.5), U > 15 ? i.value = !0 : i.value = !1), U > 50 && (s.value = 5, d.value = 1, u.value);
|
|
2105
2111
|
});
|
|
2106
|
-
const
|
|
2107
|
-
|
|
2108
|
-
},
|
|
2109
|
-
const
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2112
|
+
const y = g(0), E = (Q) => {
|
|
2113
|
+
y.value = Q.touches[0].pageY;
|
|
2114
|
+
}, w = (Q) => {
|
|
2115
|
+
const U = Q.touches[0].pageY - y.value;
|
|
2116
|
+
y.value = Q.touches[0].pageY, !n.refreshOff && (!n?.refresh || u.value !== 2 && I.value === 0 && (f.value === 0 && (f.value = Q.touches[0].pageY), M.value = 0, h.value.transition = `${M.value}ms`, v.value = 0, r.value = Q.touches[0].pageY - f.value, h.value.transform = `translate3d(0, ${Math.pow(
|
|
2117
|
+
r.value,
|
|
2118
|
+
o
|
|
2119
|
+
)}px, 0)`, b(), U > 0 && Q.preventDefault()));
|
|
2120
|
+
}, _ = () => {
|
|
2121
|
+
if (n.refreshOff || !n?.refresh || u.value === 2)
|
|
2113
2122
|
return;
|
|
2114
|
-
|
|
2115
|
-
const
|
|
2116
|
-
|
|
2117
|
-
|
|
2123
|
+
f.value = 0, M.value = 300;
|
|
2124
|
+
const Q = Math.pow(r.value, o);
|
|
2125
|
+
h.value.transition = `${M.value}ms`, b(), Q > 50 ? (u.value = 2, r.value = Math.pow(50, 1 / o), h.value.transform = `translate3d(0, ${Math.pow(
|
|
2126
|
+
r.value,
|
|
2127
|
+
o
|
|
2128
|
+
)}px, 0)`, b(), v.value = 300, n?.refresh && n?.refresh().then(() => {
|
|
2129
|
+
p.value = "success";
|
|
2118
2130
|
}).catch(() => {
|
|
2119
|
-
|
|
2131
|
+
p.value = "failed";
|
|
2120
2132
|
}).finally(() => {
|
|
2121
2133
|
setTimeout(() => {
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
)}px, 0)`, setTimeout(() => {
|
|
2126
|
-
|
|
2127
|
-
},
|
|
2134
|
+
u.value = 0, r.value = 0, h.value.transform = `translate3d(0, ${Math.pow(
|
|
2135
|
+
r.value,
|
|
2136
|
+
o
|
|
2137
|
+
)}px, 0)`, b(), setTimeout(() => {
|
|
2138
|
+
p.value = void 0;
|
|
2139
|
+
}, v.value);
|
|
2128
2140
|
}, 600);
|
|
2129
|
-
})) : (
|
|
2130
|
-
|
|
2141
|
+
})) : (r.value = 0, h.value.transform = `translate3d(0, ${Math.pow(
|
|
2142
|
+
r.value,
|
|
2143
|
+
o
|
|
2144
|
+
)}px, 0)`, b());
|
|
2145
|
+
};
|
|
2146
|
+
function b() {
|
|
2147
|
+
!H.value || (Object.assign(
|
|
2148
|
+
H.value.style,
|
|
2149
|
+
h.value
|
|
2150
|
+
), e("pull-move", h.value));
|
|
2151
|
+
}
|
|
2152
|
+
const H = g(null);
|
|
2131
2153
|
return ve(() => {
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
),
|
|
2135
|
-
}), (
|
|
2136
|
-
|
|
2154
|
+
n?.refreshOff || (H.value = document.querySelector(
|
|
2155
|
+
n.pullRefreshContainer
|
|
2156
|
+
), H.value?.addEventListener("touchstart", E), H.value?.addEventListener("touchmove", w), H.value?.addEventListener("touchend", _));
|
|
2157
|
+
}), (Q, U) => (R(), P("div", eo, [
|
|
2158
|
+
B("div", {
|
|
2137
2159
|
class: "pull-refresh-box",
|
|
2138
|
-
style: q(
|
|
2160
|
+
style: q(A(j))
|
|
2139
2161
|
}, [
|
|
2140
|
-
|
|
2141
|
-
he(
|
|
2142
|
-
wt(Ke(
|
|
2162
|
+
A(m) ? (R(), P("div", io, [
|
|
2163
|
+
he(Q.$slots, "tip", { status: p.value }, () => [
|
|
2164
|
+
wt(Ke(A(m)), 1)
|
|
2143
2165
|
], !0)
|
|
2144
|
-
])) : (
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2166
|
+
])) : (R(), P("div", to, [
|
|
2167
|
+
u.value == 2 ? (R(), P("div", no, [
|
|
2168
|
+
B("div", oo, [
|
|
2169
|
+
B("div", {
|
|
2148
2170
|
class: "left-circle",
|
|
2149
|
-
style: q({ backgroundColor:
|
|
2171
|
+
style: q({ backgroundColor: l })
|
|
2150
2172
|
}, null, 4)
|
|
2151
2173
|
]),
|
|
2152
|
-
|
|
2153
|
-
|
|
2174
|
+
B("div", lo, [
|
|
2175
|
+
B("div", {
|
|
2154
2176
|
class: "right-circle",
|
|
2155
|
-
style: q({ backgroundColor:
|
|
2177
|
+
style: q({ backgroundColor: l })
|
|
2156
2178
|
}, null, 4)
|
|
2157
2179
|
]),
|
|
2158
2180
|
so
|
|
2159
|
-
])) : (
|
|
2181
|
+
])) : (R(), P("div", {
|
|
2160
2182
|
key: 1,
|
|
2161
2183
|
class: "pull-circle-line",
|
|
2162
|
-
style: q(
|
|
2184
|
+
style: q(A(L))
|
|
2163
2185
|
}, [
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
class: ue(["arrows", { opacity:
|
|
2167
|
-
style: q({ borderBottomColor:
|
|
2186
|
+
B("div", ao, [
|
|
2187
|
+
B("div", {
|
|
2188
|
+
class: ue(["arrows", { opacity: i.value }]),
|
|
2189
|
+
style: q({ borderBottomColor: l })
|
|
2168
2190
|
}, null, 6)
|
|
2169
2191
|
])
|
|
2170
2192
|
], 4))
|
|
@@ -2173,7 +2195,7 @@ const Go = /* @__PURE__ */ ae(qn, [["__scopeId", "data-v-7fd39e51"]]), Jn = (t)
|
|
|
2173
2195
|
]));
|
|
2174
2196
|
}
|
|
2175
2197
|
});
|
|
2176
|
-
const ro = /* @__PURE__ */ ae(uo, [["__scopeId", "data-v-
|
|
2198
|
+
const ro = /* @__PURE__ */ ae(uo, [["__scopeId", "data-v-b28b4e7e"]]), co = ["data-key"], fo = {
|
|
2177
2199
|
inheritAttrs: !1
|
|
2178
2200
|
}, vo = /* @__PURE__ */ J({
|
|
2179
2201
|
...fo,
|
|
@@ -2189,7 +2211,7 @@ const ro = /* @__PURE__ */ ae(uo, [["__scopeId", "data-v-759822db"]]), co = ["da
|
|
|
2189
2211
|
emits: ["scrollEnd"],
|
|
2190
2212
|
setup(t, { expose: e, emit: n }) {
|
|
2191
2213
|
const o = t, l = fn(Wt(o, "data"), {
|
|
2192
|
-
itemHeight: (
|
|
2214
|
+
itemHeight: (v) => o.itemHeight(o.data[v]),
|
|
2193
2215
|
overscan: o.overscan,
|
|
2194
2216
|
scrollEndHook: () => {
|
|
2195
2217
|
n("scrollEnd");
|
|
@@ -2198,7 +2220,7 @@ const ro = /* @__PURE__ */ ae(uo, [["__scopeId", "data-v-759822db"]]), co = ["da
|
|
|
2198
2220
|
list: s,
|
|
2199
2221
|
containerProps: a,
|
|
2200
2222
|
wrapperProps: c,
|
|
2201
|
-
innerProps:
|
|
2223
|
+
innerProps: d,
|
|
2202
2224
|
getItemHeightData: i,
|
|
2203
2225
|
scrollTop: f
|
|
2204
2226
|
} = l;
|
|
@@ -2206,38 +2228,38 @@ const ro = /* @__PURE__ */ ae(uo, [["__scopeId", "data-v-759822db"]]), co = ["da
|
|
|
2206
2228
|
vListReturn: l
|
|
2207
2229
|
});
|
|
2208
2230
|
const r = "virtualListWrapper" + new Date().getTime();
|
|
2209
|
-
function M(
|
|
2210
|
-
return o.getItemKey ? o.getItemKey(
|
|
2231
|
+
function M(v, u) {
|
|
2232
|
+
return o.getItemKey ? o.getItemKey(v, u) : `${u}`;
|
|
2211
2233
|
}
|
|
2212
|
-
return (
|
|
2234
|
+
return (v, u) => (R(), P(Pe, null, [
|
|
2213
2235
|
Te(ro, {
|
|
2214
2236
|
refresh: t.refresh,
|
|
2215
2237
|
refreshOff: t.refreshOff,
|
|
2216
|
-
scrollTop:
|
|
2238
|
+
scrollTop: A(f),
|
|
2217
2239
|
pullRefreshContainer: "#" + r
|
|
2218
2240
|
}, null, 8, ["refresh", "refreshOff", "scrollTop", "pullRefreshContainer"]),
|
|
2219
|
-
|
|
2241
|
+
B("div", {
|
|
2220
2242
|
class: "virtualListWrapper",
|
|
2221
2243
|
id: r
|
|
2222
2244
|
}, [
|
|
2223
|
-
|
|
2224
|
-
onScrollPassive: u[0] || (u[0] = (...
|
|
2225
|
-
ref:
|
|
2245
|
+
B("div", Ne({
|
|
2246
|
+
onScrollPassive: u[0] || (u[0] = (...p) => A(a).onScroll && A(a).onScroll(...p)),
|
|
2247
|
+
ref: A(a).ref,
|
|
2226
2248
|
class: "virtualList"
|
|
2227
|
-
},
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
(
|
|
2231
|
-
key: M(
|
|
2232
|
-
"data-key": M(
|
|
2249
|
+
}, v.$attrs), [
|
|
2250
|
+
B("div", $e(He(A(c))), [
|
|
2251
|
+
B("div", $e(He(A(d))), [
|
|
2252
|
+
(R(!0), P(Pe, null, Xt(A(s), ({ data: p, index: h }) => (R(), P("div", {
|
|
2253
|
+
key: M(p, h),
|
|
2254
|
+
"data-key": M(p, h),
|
|
2233
2255
|
style: q({
|
|
2234
|
-
height: `${
|
|
2256
|
+
height: `${A(i)(h).height}px`,
|
|
2235
2257
|
display: "flex"
|
|
2236
2258
|
})
|
|
2237
2259
|
}, [
|
|
2238
|
-
he(
|
|
2239
|
-
data:
|
|
2240
|
-
index:
|
|
2260
|
+
he(v.$slots, "default", {
|
|
2261
|
+
data: p,
|
|
2262
|
+
index: h
|
|
2241
2263
|
}, void 0, !0)
|
|
2242
2264
|
], 12, co))), 128))
|
|
2243
2265
|
], 16)
|
|
@@ -2247,21 +2269,21 @@ const ro = /* @__PURE__ */ ae(uo, [["__scopeId", "data-v-759822db"]]), co = ["da
|
|
|
2247
2269
|
], 64));
|
|
2248
2270
|
}
|
|
2249
2271
|
});
|
|
2250
|
-
const qo = /* @__PURE__ */ ae(vo, [["__scopeId", "data-v-dfe60586"]]), rt = (t) => (be("data-v-33519afd"), t = t(), Oe(), t), Mo = { style: { position: "absolute" } }, go = /* @__PURE__ */ rt(() => /* @__PURE__ */
|
|
2272
|
+
const qo = /* @__PURE__ */ ae(vo, [["__scopeId", "data-v-dfe60586"]]), rt = (t) => (be("data-v-33519afd"), t = t(), Oe(), t), Mo = { style: { position: "absolute" } }, go = /* @__PURE__ */ rt(() => /* @__PURE__ */ B("div", { class: "wrapper" }, null, -1)), ho = ["width", "height"], mo = /* @__PURE__ */ rt(() => /* @__PURE__ */ B("title", null, "logo", -1)), po = /* @__PURE__ */ rt(() => /* @__PURE__ */ B("g", {
|
|
2251
2273
|
id: "group-1",
|
|
2252
2274
|
stroke: "none",
|
|
2253
2275
|
"stroke-width": "1",
|
|
2254
2276
|
fill: "none",
|
|
2255
2277
|
"fill-rule": "evenodd"
|
|
2256
2278
|
}, [
|
|
2257
|
-
/* @__PURE__ */
|
|
2279
|
+
/* @__PURE__ */ B("path", {
|
|
2258
2280
|
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",
|
|
2259
2281
|
id: "path-1",
|
|
2260
2282
|
fill: "#FFF"
|
|
2261
2283
|
})
|
|
2262
|
-
], -1)),
|
|
2284
|
+
], -1)), yo = [
|
|
2263
2285
|
mo,
|
|
2264
|
-
|
|
2286
|
+
po
|
|
2265
2287
|
], Do = /* @__PURE__ */ J({
|
|
2266
2288
|
__name: "Loading",
|
|
2267
2289
|
props: {
|
|
@@ -2275,16 +2297,16 @@ const qo = /* @__PURE__ */ ae(vo, [["__scopeId", "data-v-dfe60586"]]), rt = (t)
|
|
|
2275
2297
|
"312487ac": n
|
|
2276
2298
|
}));
|
|
2277
2299
|
const n = `${e.duration}ms`;
|
|
2278
|
-
return (o, l) => (
|
|
2300
|
+
return (o, l) => (R(), P("div", Mo, [
|
|
2279
2301
|
go,
|
|
2280
|
-
(
|
|
2302
|
+
(R(), P("svg", {
|
|
2281
2303
|
style: { position: "relative" },
|
|
2282
2304
|
width: t.width,
|
|
2283
2305
|
height: t.height,
|
|
2284
2306
|
viewBox: "0 0 260 260",
|
|
2285
2307
|
version: "1.1",
|
|
2286
2308
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2287
|
-
},
|
|
2309
|
+
}, yo, 8, ho))
|
|
2288
2310
|
]));
|
|
2289
2311
|
}
|
|
2290
2312
|
});
|
|
@@ -2295,12 +2317,12 @@ const Jo = /* @__PURE__ */ ae(Do, [["__scopeId", "data-v-33519afd"]]), To = [
|
|
|
2295
2317
|
"image/pcx"
|
|
2296
2318
|
];
|
|
2297
2319
|
function bt(t, e) {
|
|
2298
|
-
const n = g(t?.value), o =
|
|
2299
|
-
const
|
|
2300
|
-
return !
|
|
2320
|
+
const n = g(t?.value), o = z(() => n.value?.startsWith("/_lzc")), l = g(!1), s = z(() => l.value), a = z(() => {
|
|
2321
|
+
const d = e?.value;
|
|
2322
|
+
return !d || d.startsWith("video/") ? !0 : d.startsWith("image/") ? o.value ? !0 : !To.includes(d) : !1;
|
|
2301
2323
|
});
|
|
2302
|
-
t && G(t, (
|
|
2303
|
-
n.value =
|
|
2324
|
+
t && G(t, (d) => {
|
|
2325
|
+
n.value = d, l.value = !1;
|
|
2304
2326
|
});
|
|
2305
2327
|
function c() {
|
|
2306
2328
|
l.value = !0;
|
|
@@ -2336,78 +2358,78 @@ const No = ["title"], wo = { class: "tip" }, Io = /* @__PURE__ */ wt("\u5F53\u52
|
|
|
2336
2358
|
},
|
|
2337
2359
|
emits: ["load", "noSupport", "loadError"],
|
|
2338
2360
|
setup(t, { emit: e }) {
|
|
2339
|
-
const n = t, o = g(), l = g(), s = g(!1), a = g(!1), c = g(!1), { src:
|
|
2361
|
+
const n = t, o = g(), l = g(), s = g(!1), a = g(!1), c = g(!1), { src: d, mime: i } = It(n), { imgSrc: f, isSupport: r, hasError: M, handleError: v } = bt(d, i), { vImageCancel: u } = Ot(), { LoadingComp: p } = Ct({
|
|
2340
2362
|
component: Tn,
|
|
2341
2363
|
delay: 300
|
|
2342
|
-
}),
|
|
2364
|
+
}), h = Vt(() => c.value && n.autoRemoveThumbnail ? !1 : n.thumbnail && !c.value);
|
|
2343
2365
|
function I() {
|
|
2344
2366
|
a.value = !0;
|
|
2345
2367
|
}
|
|
2346
2368
|
function j() {
|
|
2347
2369
|
a.value && (c.value = !0);
|
|
2348
2370
|
}
|
|
2349
|
-
async function
|
|
2350
|
-
I(),
|
|
2371
|
+
async function L() {
|
|
2372
|
+
I(), h.value ? (o.value?.addEventListener("animationend", m), o.value?.classList.add("showing"), await Ce(10)) : o.value && e("load", o.value), o.value?.classList.remove("src-class");
|
|
2351
2373
|
}
|
|
2352
|
-
function
|
|
2353
|
-
o.value?.removeEventListener("animationend",
|
|
2374
|
+
function m() {
|
|
2375
|
+
o.value?.removeEventListener("animationend", m), o.value?.classList.remove("showing"), o.value && e("load", o.value), j();
|
|
2354
2376
|
}
|
|
2355
|
-
async function
|
|
2356
|
-
|
|
2377
|
+
async function y(_) {
|
|
2378
|
+
_ ? L() : l.value && e("load", l.value), s.value = !0;
|
|
2357
2379
|
}
|
|
2358
|
-
function E(
|
|
2359
|
-
|
|
2380
|
+
function E(_) {
|
|
2381
|
+
_ ? (v(), e("loadError")) : I(), s.value = !0;
|
|
2360
2382
|
}
|
|
2361
|
-
function
|
|
2383
|
+
function w() {
|
|
2362
2384
|
e("noSupport");
|
|
2363
2385
|
}
|
|
2364
|
-
return (
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
title:
|
|
2386
|
+
return (_, b) => (R(), P(Pe, null, [
|
|
2387
|
+
A(r) && !s.value ? (R(), Se(A(p), { key: 0 })) : ge("", !0),
|
|
2388
|
+
A(r) ? A(M) ? (R(), P("div", Ne({ key: 3 }, _.$attrs, {
|
|
2389
|
+
title: A(f),
|
|
2368
2390
|
class: "tip-wrap"
|
|
2369
2391
|
}), [
|
|
2370
2392
|
Te(xe, {
|
|
2371
2393
|
class: "bad-image",
|
|
2372
2394
|
name: t.badImageIconName
|
|
2373
2395
|
}, null, 8, ["name"])
|
|
2374
|
-
], 16, Lo)) : he(
|
|
2396
|
+
], 16, Lo)) : he(_.$slots, "default", {
|
|
2375
2397
|
key: 2,
|
|
2376
|
-
src:
|
|
2377
|
-
onLoad:
|
|
2398
|
+
src: A(f),
|
|
2399
|
+
onLoad: y,
|
|
2378
2400
|
onError: E,
|
|
2379
|
-
vImageCancel:
|
|
2401
|
+
vImageCancel: A(u)
|
|
2380
2402
|
}, () => [
|
|
2381
|
-
|
|
2403
|
+
A(h) ? de((R(), P("img", Ne({ key: 0 }, _.$attrs, {
|
|
2382
2404
|
ref_key: "thumbnailRef",
|
|
2383
2405
|
ref: l,
|
|
2384
|
-
onLoad:
|
|
2385
|
-
onError:
|
|
2406
|
+
onLoad: b[0] || (b[0] = (H) => y()),
|
|
2407
|
+
onError: b[1] || (b[1] = (H) => E()),
|
|
2386
2408
|
src: t.thumbnail
|
|
2387
2409
|
}), null, 16, Ao)), [
|
|
2388
|
-
[
|
|
2410
|
+
[A(u)]
|
|
2389
2411
|
]) : ge("", !0),
|
|
2390
|
-
t.isShowSrc || a.value ? de((
|
|
2412
|
+
t.isShowSrc || a.value ? de((R(), P("img", Ne({ key: 1 }, _.$attrs, {
|
|
2391
2413
|
ref_key: "srcRef",
|
|
2392
2414
|
ref: o,
|
|
2393
2415
|
class: "src-class",
|
|
2394
|
-
onLoad:
|
|
2395
|
-
onError:
|
|
2396
|
-
src:
|
|
2416
|
+
onLoad: b[2] || (b[2] = (H) => y(!0)),
|
|
2417
|
+
onError: b[3] || (b[3] = (H) => E(!0)),
|
|
2418
|
+
src: A(f)
|
|
2397
2419
|
}), null, 16, zo)), [
|
|
2398
|
-
[
|
|
2420
|
+
[A(u)],
|
|
2399
2421
|
[_e, a.value]
|
|
2400
2422
|
]) : ge("", !0)
|
|
2401
|
-
], !0) : (
|
|
2402
|
-
title:
|
|
2423
|
+
], !0) : (R(), P("div", Ne({ key: 1 }, _.$attrs, {
|
|
2424
|
+
title: A(f),
|
|
2403
2425
|
class: "tip-wrap"
|
|
2404
2426
|
}), [
|
|
2405
2427
|
Te(xe, {
|
|
2406
2428
|
class: "no-support-icon",
|
|
2407
2429
|
name: t.noSupportIconName
|
|
2408
2430
|
}, null, 8, ["name"]),
|
|
2409
|
-
de((
|
|
2410
|
-
[
|
|
2431
|
+
de((R(), P("span", wo, Eo)), [
|
|
2432
|
+
[A(Et), w]
|
|
2411
2433
|
])
|
|
2412
2434
|
], 16, No))
|
|
2413
2435
|
], 64));
|
|
@@ -2421,13 +2443,13 @@ const el = /* @__PURE__ */ ae(Co, [["__scopeId", "data-v-bfec1a6b"]]), xo = ["ti
|
|
|
2421
2443
|
},
|
|
2422
2444
|
emits: ["noSupport"],
|
|
2423
2445
|
setup(t, { emit: e }) {
|
|
2424
|
-
const n = t, o = g(!1), { src: l, mime: s } = It(n), { imgSrc: a, hasError: c, isSupport:
|
|
2446
|
+
const n = t, o = g(!1), { src: l, mime: s } = It(n), { imgSrc: a, hasError: c, isSupport: d, handleError: i } = bt(l, s), { vImageCancel: f } = Ot();
|
|
2425
2447
|
function r() {
|
|
2426
2448
|
e("noSupport");
|
|
2427
2449
|
}
|
|
2428
|
-
return (M,
|
|
2429
|
-
|
|
2430
|
-
title:
|
|
2450
|
+
return (M, v) => A(d) ? A(c) ? he(M.$slots, "imageError", { key: 2 }, () => [
|
|
2451
|
+
B("div", {
|
|
2452
|
+
title: A(a),
|
|
2431
2453
|
class: "icon-wrap"
|
|
2432
2454
|
}, [
|
|
2433
2455
|
Te(xe, {
|
|
@@ -2435,25 +2457,25 @@ const el = /* @__PURE__ */ ae(Co, [["__scopeId", "data-v-bfec1a6b"]]), xo = ["ti
|
|
|
2435
2457
|
name: "\u56FE\u7247\u635F\u574F"
|
|
2436
2458
|
})
|
|
2437
2459
|
], 8, bo)
|
|
2438
|
-
], !0) : de((
|
|
2460
|
+
], !0) : de((R(), P("img", {
|
|
2439
2461
|
key: 1,
|
|
2440
2462
|
fetchpriority: "high",
|
|
2441
|
-
onLoad:
|
|
2442
|
-
onError:
|
|
2443
|
-
src:
|
|
2463
|
+
onLoad: v[0] || (v[0] = (u) => o.value = !0),
|
|
2464
|
+
onError: v[1] || (v[1] = (...u) => A(i) && A(i)(...u)),
|
|
2465
|
+
src: A(a)
|
|
2444
2466
|
}, null, 40, So)), [
|
|
2445
|
-
[
|
|
2467
|
+
[A(f)],
|
|
2446
2468
|
[_e, o.value]
|
|
2447
2469
|
]) : he(M.$slots, "noSupport", { key: 0 }, () => [
|
|
2448
|
-
|
|
2449
|
-
title:
|
|
2470
|
+
B("div", {
|
|
2471
|
+
title: A(a),
|
|
2450
2472
|
class: "icon-wrap"
|
|
2451
2473
|
}, [
|
|
2452
2474
|
de(Te(xe, {
|
|
2453
2475
|
class: "icon",
|
|
2454
2476
|
name: "\u672A\u77E5\u7C7B\u578B"
|
|
2455
2477
|
}, null, 512), [
|
|
2456
|
-
[
|
|
2478
|
+
[A(Et), r]
|
|
2457
2479
|
])
|
|
2458
2480
|
], 8, xo)
|
|
2459
2481
|
], !0);
|