@lazycatcloud/lzc-toolkit 0.0.192 → 0.0.194
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
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { shallowRef as dt, watchEffect as Ot, readonly as ft, getCurrentScope as
|
|
1
|
+
import { shallowRef as dt, watchEffect as Ot, readonly as ft, getCurrentScope as _t, onScopeDispose as bt, onMounted as ce, nextTick as Me, ref as h, watch as G, customRef as kt, unref as A, isRef as Qt, getCurrentInstance as Be, onUpdated as Yt, computed as z, reactive as Te, onUnmounted as vt, inject as ee, provide as P, defineComponent as q, h as ue, render as ye, openBlock as B, createBlock as Ee, Transition as Ue, withCtx as Re, withDirectives as re, createElementBlock as H, normalizeClass as se, createElementVNode as R, withModifiers as me, renderSlot as Ie, createCommentVNode as de, useCssVars as $e, normalizeProps as be, guardReactiveProps as ke, pushScopeId as Ae, popScopeId as ze, normalizeStyle as K, toDisplayString as He, vShow as Le, createVNode as ge, onBeforeUnmount as Mt, onActivated as gt, onBeforeMount as Bt, onDeactivated as Ut, useSlots as Rt, toRef as $t, Fragment as Qe, mergeProps as he, renderList as Ht, toRefs as ht, createTextVNode as Pt } from "vue";
|
|
2
2
|
const Ft = {
|
|
3
3
|
created(e, t) {
|
|
4
4
|
let n, o;
|
|
@@ -59,7 +59,7 @@ function Xt(e, t) {
|
|
|
59
59
|
return Object.isExtensible(r) && (r.trigger = a), r;
|
|
60
60
|
}
|
|
61
61
|
function Pe(e) {
|
|
62
|
-
return
|
|
62
|
+
return _t() ? (bt(e), !0) : !1;
|
|
63
63
|
}
|
|
64
64
|
function te(e) {
|
|
65
65
|
return typeof e == "function" ? e() : A(e);
|
|
@@ -431,17 +431,17 @@ function un(e, t) {
|
|
|
431
431
|
w + u + l,
|
|
432
432
|
v.value.length
|
|
433
433
|
);
|
|
434
|
-
g.value = { start: L, end: U }, M.value = v.value.slice(L, U).map(($,
|
|
434
|
+
g.value = { start: L, end: U }, M.value = v.value.slice(L, U).map(($, _) => ({
|
|
435
435
|
data: $,
|
|
436
|
-
index:
|
|
436
|
+
index: _ + L
|
|
437
437
|
})), f.value.start = w - L, f.value.end = f.value.start + u;
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
440
|
function C(w) {
|
|
441
441
|
let L = 0, U = m.value.length - 1, $ = -1;
|
|
442
442
|
for (; L <= U; ) {
|
|
443
|
-
const
|
|
444
|
-
m.value[
|
|
443
|
+
const _ = Math.floor((L + U) / 2);
|
|
444
|
+
m.value[_].sum >= w ? ($ = _, U = _ - 1) : L = _ + 1;
|
|
445
445
|
}
|
|
446
446
|
return Math.max(0, $);
|
|
447
447
|
}
|
|
@@ -533,7 +533,7 @@ function So() {
|
|
|
533
533
|
selectedCount: M
|
|
534
534
|
};
|
|
535
535
|
}
|
|
536
|
-
function Oo(e, t, n = { deep: !0 }) {
|
|
536
|
+
function Oo(e, t, n = { deep: !0, useAllFlagOptimizatiofn: !0 }) {
|
|
537
537
|
const o = h(!1), l = h(/* @__PURE__ */ new Set()), s = h(/* @__PURE__ */ new Map());
|
|
538
538
|
G(
|
|
539
539
|
e,
|
|
@@ -596,7 +596,7 @@ function Oo(e, t, n = { deep: !0 }) {
|
|
|
596
596
|
return o.value != null ? o.value : l.value.has(y[t]);
|
|
597
597
|
}
|
|
598
598
|
function M(y) {
|
|
599
|
-
o.value != null && (o.value ? l.value = new Set(Array.from(s.value.keys())) : l.value = /* @__PURE__ */ new Set()), y(), l.value.size == 0 ? o.value = !1 : l.value.size == s.value.size ? o.value = !0 : o.value = null;
|
|
599
|
+
o.value != null && (o.value ? l.value = new Set(Array.from(s.value.keys())) : l.value = /* @__PURE__ */ new Set()), y(), n.useAllFlagOptimizatiofn ? l.value.size == 0 ? o.value = !1 : l.value.size == s.value.size ? o.value = !0 : o.value = null : o.value = null;
|
|
600
600
|
}
|
|
601
601
|
function m(y) {
|
|
602
602
|
M(() => {
|
|
@@ -628,7 +628,7 @@ function Oo(e, t, n = { deep: !0 }) {
|
|
|
628
628
|
selectedCount: d
|
|
629
629
|
};
|
|
630
630
|
}
|
|
631
|
-
function
|
|
631
|
+
function _o(e) {
|
|
632
632
|
const t = h(!1), n = h(/* @__PURE__ */ new Set()), o = z(() => {
|
|
633
633
|
let u = [];
|
|
634
634
|
return t.value != null ? t.value && (u = e.value) : n.value.size && (u = Array.from(n.value.values())), u;
|
|
@@ -738,12 +738,12 @@ function Tt({
|
|
|
738
738
|
Math.min(w, Q),
|
|
739
739
|
-Q
|
|
740
740
|
), w !== 0) {
|
|
741
|
-
const
|
|
742
|
-
if (!
|
|
741
|
+
const b = M.value;
|
|
742
|
+
if (!b || !m.value)
|
|
743
743
|
return;
|
|
744
744
|
const Z = j.value.height - D.value.height;
|
|
745
745
|
let W = j.value.top + Number(w);
|
|
746
|
-
W = Math.min(Math.max(0, W), Z),
|
|
746
|
+
W = Math.min(Math.max(0, W), Z), b.scrollTop = W, _(), p = requestAnimationFrame(() => L(x));
|
|
747
747
|
}
|
|
748
748
|
}
|
|
749
749
|
function U(x) {
|
|
@@ -758,36 +758,36 @@ function Tt({
|
|
|
758
758
|
return 0;
|
|
759
759
|
}
|
|
760
760
|
function $(x) {
|
|
761
|
-
const
|
|
762
|
-
return
|
|
761
|
+
const b = { ...O.value, right: 0, bottom: 0 };
|
|
762
|
+
return b.left += D.value.left, b.top += D.value.top - j.value.top, b.right = b.width + b.left, b.bottom = b.height + b.top, b.left < x.right && b.right > x.left && b.top < x.bottom && b.bottom > x.top;
|
|
763
763
|
}
|
|
764
|
-
function
|
|
764
|
+
function _() {
|
|
765
765
|
j.value.sync();
|
|
766
|
-
const { top: x, height:
|
|
766
|
+
const { top: x, height: b } = j.value;
|
|
767
767
|
T.value.y = Math.min(
|
|
768
|
-
|
|
768
|
+
b + D.value.top,
|
|
769
769
|
T.value.y + x - T.value.scrollTop
|
|
770
770
|
), T.value.scrollTop = x;
|
|
771
771
|
}
|
|
772
|
-
function F(x,
|
|
772
|
+
function F(x, b, Z = "dynamic-styles") {
|
|
773
773
|
let W = document.getElementById(Z);
|
|
774
774
|
W || (W = document.createElement("style"), W.id = Z, document.head.appendChild(W));
|
|
775
|
-
const le = W.sheet.cssRules, ve = le.length, St = `${x} { ${
|
|
775
|
+
const le = W.sheet.cssRules, ve = le.length, St = `${x} { ${b} }`;
|
|
776
776
|
for (let Ce = 0; Ce < ve; Ce++) {
|
|
777
777
|
const st = le[Ce];
|
|
778
|
-
if (st.selectorText === x && st.style.cssText ===
|
|
778
|
+
if (st.selectorText === x && st.style.cssText === b)
|
|
779
779
|
return;
|
|
780
780
|
}
|
|
781
781
|
W.sheet.insertRule(St, ve);
|
|
782
782
|
}
|
|
783
|
-
function J(x,
|
|
783
|
+
function J(x, b) {
|
|
784
784
|
u.value = !0, m.value = !0, j.value.sync(!0);
|
|
785
|
-
const Z =
|
|
785
|
+
const Z = b + j.value.top;
|
|
786
786
|
I.value.x = x, I.value.y = Z, T.value.x = x, T.value.y = Z, M.value?.classList.add("disable-scroll-behavior"), f.clear();
|
|
787
787
|
}
|
|
788
|
-
function V(x,
|
|
789
|
-
!m.value || (u.value && o === "colum" && !De() && (N.value || i(), u.value = !1), Z?.(), L(
|
|
790
|
-
|
|
788
|
+
function V(x, b, Z) {
|
|
789
|
+
!m.value || (u.value && o === "colum" && !De() && (N.value || i(), u.value = !1), Z?.(), L(b), T.value.x = Math.max(x, D.value.left), T.value.y = Math.min(
|
|
790
|
+
b + j.value.top,
|
|
791
791
|
j.value.height + D.value.top
|
|
792
792
|
), T.value.scrollTop = j.value.top, v.value());
|
|
793
793
|
}
|
|
@@ -795,13 +795,13 @@ function Tt({
|
|
|
795
795
|
m.value = !1, M.value?.classList.remove("disable-scroll-behavior");
|
|
796
796
|
}
|
|
797
797
|
function zt() {
|
|
798
|
-
!m.value || (w ||
|
|
798
|
+
!m.value || (w || _(), v.value());
|
|
799
799
|
}
|
|
800
800
|
function De() {
|
|
801
801
|
if (!m.value)
|
|
802
802
|
return !1;
|
|
803
|
-
const { width: x, height:
|
|
804
|
-
return !(Math.max(x,
|
|
803
|
+
const { width: x, height: b } = O.value;
|
|
804
|
+
return !(Math.max(x, b) > 5);
|
|
805
805
|
}
|
|
806
806
|
function Lt() {
|
|
807
807
|
De() && i();
|
|
@@ -815,12 +815,12 @@ function Tt({
|
|
|
815
815
|
}
|
|
816
816
|
function xt() {
|
|
817
817
|
const x = [];
|
|
818
|
-
let
|
|
818
|
+
let b = null, Z = 0;
|
|
819
819
|
M.value?.querySelectorAll(`[${n}]`).forEach((W, le) => {
|
|
820
820
|
const ve = g(W.getAttribute(`${n}`));
|
|
821
|
-
x.push(ve), $(W.getBoundingClientRect()) ? (
|
|
821
|
+
x.push(ve), $(W.getBoundingClientRect()) ? (b === null && (b = le), b = Math.min(b, le), Z = Math.max(Z, le)) : (r[c.value] = ve, f.has(ve) && d([r]));
|
|
822
822
|
});
|
|
823
|
-
for (let W =
|
|
823
|
+
for (let W = b; W < Z + 1; W++)
|
|
824
824
|
r[c.value] = x[W], a([r]), f.add(x[W]);
|
|
825
825
|
}
|
|
826
826
|
function Ct(x) {
|
|
@@ -843,7 +843,7 @@ function Tt({
|
|
|
843
843
|
observer: y
|
|
844
844
|
};
|
|
845
845
|
}
|
|
846
|
-
function
|
|
846
|
+
function bo(e, t = !1) {
|
|
847
847
|
const n = Tt(e), { observer: o, selectRange: l } = n, {
|
|
848
848
|
onScroll: s,
|
|
849
849
|
dragStart: a,
|
|
@@ -1070,7 +1070,7 @@ const fn = (e) => (Ae("data-v-92a1804d"), e = e(), ze(), e), vn = /* @__PURE__ *
|
|
|
1070
1070
|
return $e((t) => ({
|
|
1071
1071
|
"4e4a9ce4": e.width + "px",
|
|
1072
1072
|
e56fe5c2: e.height + "px"
|
|
1073
|
-
})), (t, n) => (B(), H("div",
|
|
1073
|
+
})), (t, n) => (B(), H("div", be(ke(t.$attrs)), Mn, 16));
|
|
1074
1074
|
}
|
|
1075
1075
|
});
|
|
1076
1076
|
const hn = /* @__PURE__ */ ne(gn, [["__scopeId", "data-v-92a1804d"]]), mn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAQAAAC0jZKKAAAAAnNCSVQICFXsRgQAAAABc1JHQgCuzhzpAAAEMklEQVRIx62XzW9VZRDGn2fmPff23qYtlvIRqVVQICgGoS21wYUGEA0x0YUYE/8BNTHujBsNiS5cGBeujAtXLiTGjUnFjRKNQWgJVoqxC/m2RMpX7cf9OOedcXFrg1qutPc+ZzM5b84vc+bNZOYh6sp5tKWQr2qmBZ/Biqxq03Eybsh6I63+l7z90Wirts0VoyU2bYm1ZdFXZtf9shUMWckL8XGrBw+Lvx7pqHTN5Toy9cQSZMgtnLR7m19Hj//i9TNeBDyU7+jOWj2mDgBVlqXqRmHOgXZPvNOLXsHzSwWPdeKelMEiDKlkThMIhSVGTqGKaZRxxm/4VlsSeLTb17ojkpkESwlPrDhTLmn6VXbQACd4RFbhBoElgEfur6yJMXhE9Aoz+mz56sDMP+7a4TDcgW4Bn7wPax05VpGnQ6u4NPgnlq0F8Ojq6n2puxehXkFydeAsDWgYfLFwcYtLztQjieLv2y6hQc2DJx5qSYAUZJV+rr9hLCAAcGoNu6oSSZrI5K7zaIICAJQ2iwZGuGHuwjiaIgFGV2sHmQpIJr8eiM0BB6Byr6i7OBAmd0yiSRJXWQeQFDA5g6YpDK+SxB2As7z1SvPA0rKKJElQ/qA3MeNyp4Raxuk1NFGBHSZwcUFhqqlgKZgAjoj8bFPBlhephQ+kDdM4vKkWmAdXE0DRjL4YCfiiFmk1MGPemEFxJIdyg+QO3zQ/+q8FTa1VCER2tDUM7kE2v1BcEUyBoItLpavRUtiDNNSeccFNBARqIi3dDXfbIFJkyBD9tJQmMq1lbBvelkawrthDh8Hd9XvJT+Qi1NUSa9+3oRHw8T2+0iNNImbtqPSl6VkToVAlP9BQIV6hubuZyVDfnAA4LSoaNaqv/3HjsvPdLb3IkDFjhk8BAQbOZpNGpRCUp8dyy8GOtspBczgNjtO938wP08IP1BiyQJWVc88uB1x5F+sYEd0Y/f2FKb1tPJ4nhVFMuO34niW38mu639ycRuN3/UMLYCAbktSFKkrVvcf2LQV74lW8jChRMzOfxpv/2uhHHrYDokYVYab4acWhjZU7yLWIt3w/1Uklo+D1nV/+xyqc3Bt3O11JCMmb9nn/WH3s8C68Id0QV9CV9I/6P1jUg5x4Tgar6hLoQgX9nH69/dRiy+Eh3fhofMl7QSoE4qT6Z/0Hb2tuTjyFJ10gLlTSleKzPMXx7FL75OUSUCjm11TW6yMYRBfpAURwUZroxzs+rOuaRnb4C1Ks/ZoFCNUFAZTg4oFiQeiJi4gJlOJKasnf6T38v3ZspAsv2hYq6YFCqZXFEsyDhAguVK/FiuPxvZ0X79DnDW/nM94DodRu/G+wEOriAQIlqfjNP+n7dokGcnirPma93jJf73ALWF00xVE/3HdsGc605vk6Nydb0GN38y4UqV7BjE/ggv48NfZE3UH2F3Kp4Zn6aTweAAAAAElFTkSuQmCC", yn = { class: "loading-wrap" }, pn = ["src"], Dn = /* @__PURE__ */ q({
|
|
@@ -1312,7 +1312,7 @@ function On(e) {
|
|
|
1312
1312
|
}
|
|
1313
1313
|
return { startTap: l, checkTap: s };
|
|
1314
1314
|
}
|
|
1315
|
-
function
|
|
1315
|
+
function _n(e, t) {
|
|
1316
1316
|
const n = h(!1);
|
|
1317
1317
|
function o() {
|
|
1318
1318
|
n.value || (n.value = !0, A(e)?.addEventListener("transitionend", l));
|
|
@@ -1322,7 +1322,7 @@ function bn(e, t) {
|
|
|
1322
1322
|
}
|
|
1323
1323
|
return { transitioning: n, startTransition: o };
|
|
1324
1324
|
}
|
|
1325
|
-
function
|
|
1325
|
+
function bn(e, t, n, o) {
|
|
1326
1326
|
var l = Math.min(
|
|
1327
1327
|
n / e,
|
|
1328
1328
|
o / t
|
|
@@ -1341,7 +1341,7 @@ function Oe(e, t, n) {
|
|
|
1341
1341
|
function ae(e, t = 2) {
|
|
1342
1342
|
return parseFloat(e.toFixed(t));
|
|
1343
1343
|
}
|
|
1344
|
-
function
|
|
1344
|
+
function _e(e, t, n) {
|
|
1345
1345
|
return e = ae(e), t = ae(t), `translate3d(${e}px, ${t}px, 0) scale3d(${n},${n},${n})`;
|
|
1346
1346
|
}
|
|
1347
1347
|
function rt(e) {
|
|
@@ -1363,7 +1363,7 @@ function wt(e) {
|
|
|
1363
1363
|
zooming: !1,
|
|
1364
1364
|
preview: !0,
|
|
1365
1365
|
lastCenter: { x: 0, y: 0 }
|
|
1366
|
-
}), r = h({}), v = Cn(), c =
|
|
1366
|
+
}), r = h({}), v = Cn(), c = _n(s, {
|
|
1367
1367
|
onComplate() {
|
|
1368
1368
|
i.preview || m();
|
|
1369
1369
|
}
|
|
@@ -1399,22 +1399,22 @@ function wt(e) {
|
|
|
1399
1399
|
const E = s.value;
|
|
1400
1400
|
if (!E)
|
|
1401
1401
|
return;
|
|
1402
|
-
const { scrollTop: S, scrollLeft: Q } = E, { width: k, height: w } = a.value, { scaleW: L, scaleH: U } = O(p), { top: $, left:
|
|
1402
|
+
const { scrollTop: S, scrollLeft: Q } = E, { width: k, height: w } = a.value, { scaleW: L, scaleH: U } = O(p), { top: $, left: _ } = N(L, U), F = _ != 0 ? _ : Q * -1, J = $ != 0 ? $ : S * -1;
|
|
1403
1403
|
E.scrollTop = 0, E.scrollLeft = 0;
|
|
1404
1404
|
const { value: V } = r;
|
|
1405
|
-
V.width = `${k}px`, V.height = `${w}px`, V.maxHeight = "none", V.transitionDuration = "0s", V.transform =
|
|
1405
|
+
V.width = `${k}px`, V.height = `${w}px`, V.maxHeight = "none", V.transitionDuration = "0s", V.transform = _e(F, J, p), r.value = V, await Me(), i.offsetX = F, i.offsetY = J, await ot(20);
|
|
1406
1406
|
}
|
|
1407
1407
|
async function m(p, E) {
|
|
1408
1408
|
if (!E && i.preview)
|
|
1409
1409
|
return;
|
|
1410
1410
|
i.preview = !0, p = p ?? i.level;
|
|
1411
1411
|
const { value: S } = r, { scaleW: Q, scaleH: k } = O(p), { left: w, top: L } = N(Q, k);
|
|
1412
|
-
p === 1 && (S.maxHeight = "100%"), S.width = `${Q}px`, S.height = `${k}px`, S.transitionDuration = "0s", S.transform =
|
|
1412
|
+
p === 1 && (S.maxHeight = "100%"), S.width = `${Q}px`, S.height = `${k}px`, S.transitionDuration = "0s", S.transform = _e(w, L, 1), r.value = S, await Me();
|
|
1413
1413
|
const U = s.value;
|
|
1414
1414
|
if (!U)
|
|
1415
1415
|
return;
|
|
1416
|
-
const { offsetX: $, offsetY:
|
|
1417
|
-
$ < 0 && (U.scrollLeft = Math.abs($)),
|
|
1416
|
+
const { offsetX: $, offsetY: _ } = i;
|
|
1417
|
+
$ < 0 && (U.scrollLeft = Math.abs($)), _ < 0 && (U.scrollTop = Math.abs(_));
|
|
1418
1418
|
}
|
|
1419
1419
|
async function I(p, E, S) {
|
|
1420
1420
|
if (t.value || (p = ae(p), p = Oe(
|
|
@@ -1424,14 +1424,14 @@ function wt(e) {
|
|
|
1424
1424
|
), p == i.level))
|
|
1425
1425
|
return;
|
|
1426
1426
|
i.preview && await M(), E || (E = { x: v.startX.value, y: v.startY.value });
|
|
1427
|
-
const { value: Q } = r, { width: k, height: w } = a.value, { scaleW: L, scaleH: U } = O(p), { top: $, left:
|
|
1427
|
+
const { value: Q } = r, { width: k, height: w } = a.value, { scaleW: L, scaleH: U } = O(p), { top: $, left: _ } = N(L, U), F = p / i.level, J = {
|
|
1428
1428
|
left: Math.abs(k * p - d.value.width) * -1,
|
|
1429
1429
|
top: Math.abs(w * p - d.value.height) * -1,
|
|
1430
|
-
right:
|
|
1430
|
+
right: _,
|
|
1431
1431
|
bottom: $
|
|
1432
1432
|
};
|
|
1433
|
-
let V =
|
|
1434
|
-
V = ae(Oe(V, J.left, J.right)), oe = ae(Oe(oe, J.top, J.bottom)), Q.width = `${k}px`, Q.height = `${w}px`, Q.transitionDuration = S ? kn(p) : "0s", Q.transform =
|
|
1433
|
+
let V = _ != 0 ? _ : (i.offsetX - E.x) * F + E.x, oe = $ != 0 ? $ : (i.offsetY - E.y) * F + E.y;
|
|
1434
|
+
V = ae(Oe(V, J.left, J.right)), oe = ae(Oe(oe, J.top, J.bottom)), Q.width = `${k}px`, Q.height = `${w}px`, Q.transitionDuration = S ? kn(p) : "0s", Q.transform = _e(V, oe, p), i.offsetX = V, i.offsetY = oe, i.level = p, r.value = Q, await Me(), S && c.startTransition(), e.onScale?.(p);
|
|
1435
1435
|
}
|
|
1436
1436
|
function T() {
|
|
1437
1437
|
const p = i.level > 1 ? 1 : j();
|
|
@@ -1471,7 +1471,7 @@ function wt(e) {
|
|
|
1471
1471
|
let S, { clientWidth: Q = 0, clientHeight: k = 0 } = p || {};
|
|
1472
1472
|
const { clientWidth: w, clientHeight: L } = E;
|
|
1473
1473
|
if (p instanceof HTMLImageElement ? S = { width: p.naturalWidth, height: p.naturalHeight } : p instanceof HTMLVideoElement && (S = { width: p.videoWidth, height: p.videoHeight }), S) {
|
|
1474
|
-
const U =
|
|
1474
|
+
const U = bn(
|
|
1475
1475
|
S.width,
|
|
1476
1476
|
S.height,
|
|
1477
1477
|
w,
|
|
@@ -1835,8 +1835,8 @@ function Pn(e) {
|
|
|
1835
1835
|
height: o ? `${j.value}px` : void 0
|
|
1836
1836
|
}));
|
|
1837
1837
|
We(t, () => L());
|
|
1838
|
-
function N(
|
|
1839
|
-
Y(), g.value =
|
|
1838
|
+
function N(_) {
|
|
1839
|
+
Y(), g.value = _.clientY - n.value.getBoundingClientRect().top || 1, v = getComputedStyle(t.value).scrollBehavior, v === "smooth" && (t.value.style.scrollBehavior = "unset");
|
|
1840
1840
|
}
|
|
1841
1841
|
function C() {
|
|
1842
1842
|
t.value.style.scrollBehavior = v, g.value = 0, i();
|
|
@@ -1847,10 +1847,10 @@ function Pn(e) {
|
|
|
1847
1847
|
function X() {
|
|
1848
1848
|
m.value || (d.value = !0);
|
|
1849
1849
|
}
|
|
1850
|
-
function p(
|
|
1850
|
+
function p(_) {
|
|
1851
1851
|
if (!m.value)
|
|
1852
1852
|
return;
|
|
1853
|
-
let F =
|
|
1853
|
+
let F = _.clientY - u.value.top - g.value;
|
|
1854
1854
|
F < 0 ? f.value = 0 : F >= T.value ? f.value = T.value : f.value = F, t.value.scrollTo({
|
|
1855
1855
|
top: f.value / T.value * y.value
|
|
1856
1856
|
});
|
|
@@ -1864,19 +1864,19 @@ function Pn(e) {
|
|
|
1864
1864
|
function Q() {
|
|
1865
1865
|
t.value && (c.value = l.scrollTop?.value ?? t.value.scrollTop, f.value = c.value / y.value * T.value);
|
|
1866
1866
|
}
|
|
1867
|
-
function k(
|
|
1867
|
+
function k(_) {
|
|
1868
1868
|
let F = "addEventListener";
|
|
1869
|
-
|
|
1869
|
+
_ === "add" ? F = "addEventListener" : F = "removeEventListener", n.value?.[F]("pointerdown", N, {
|
|
1870
1870
|
passive: !0
|
|
1871
1871
|
}), window[F]("pointermove", p, { passive: !0 }), window[F]("pointerup", C, { passive: !0 });
|
|
1872
1872
|
}
|
|
1873
|
-
const w = new MutationObserver((
|
|
1874
|
-
(a == "classList" ||
|
|
1873
|
+
const w = new MutationObserver((_) => {
|
|
1874
|
+
(a == "classList" || _.map((J) => J.oldValue).join().includes("height")) && L();
|
|
1875
1875
|
});
|
|
1876
1876
|
function L() {
|
|
1877
1877
|
u.value.top = t.value?.getBoundingClientRect().top ?? 0;
|
|
1878
|
-
const { scrollHeight:
|
|
1879
|
-
|
|
1878
|
+
const { scrollHeight: _ = 0, clientHeight: F = 0 } = t.value || {}, { scrollHeight: J, clientHeight: V } = u.value;
|
|
1879
|
+
_ != J && (u.value.scrollHeight = _, Q()), F != V && (u.value.clientHeight = F, Q());
|
|
1880
1880
|
const { clientHeight: oe = 0 } = n.value || {};
|
|
1881
1881
|
oe != M.value.clientHeight && (M.value.clientHeight = oe);
|
|
1882
1882
|
}
|
|
@@ -1890,12 +1890,12 @@ function Pn(e) {
|
|
|
1890
1890
|
t.value.classList.add("hide-scrollbar"), t.value.addEventListener("scroll", E, {
|
|
1891
1891
|
passive: !0
|
|
1892
1892
|
}), k("add");
|
|
1893
|
-
const
|
|
1894
|
-
a === "classList" ? Object.assign(
|
|
1893
|
+
const _ = {};
|
|
1894
|
+
a === "classList" ? Object.assign(_, { subtree: !0, childList: !0 }) : Object.assign(_, {
|
|
1895
1895
|
subtree: !0,
|
|
1896
1896
|
attributeOldValue: !0,
|
|
1897
1897
|
attributeFilter: ["style"]
|
|
1898
|
-
}), w.observe(t.value,
|
|
1898
|
+
}), w.observe(t.value, _), setTimeout(() => {
|
|
1899
1899
|
L();
|
|
1900
1900
|
}, 100), U();
|
|
1901
1901
|
} else
|
|
@@ -2126,8 +2126,8 @@ const lo = /* @__PURE__ */ ne(oo, [["__scopeId", "data-v-df5da876"]]), so = ["da
|
|
|
2126
2126
|
ref: A(a).ref,
|
|
2127
2127
|
class: "virtualList"
|
|
2128
2128
|
}, f.$attrs), [
|
|
2129
|
-
R("div",
|
|
2130
|
-
R("div",
|
|
2129
|
+
R("div", be(ke(A(d))), [
|
|
2130
|
+
R("div", be(ke(A(i))), [
|
|
2131
2131
|
(B(!0), H(Qe, null, Ht(A(s), ({ data: M, index: m }) => (B(), H("div", {
|
|
2132
2132
|
key: g(M, m),
|
|
2133
2133
|
"data-key": g(M, m),
|
|
@@ -2190,21 +2190,15 @@ const Xo = /* @__PURE__ */ ne(io, [["__scopeId", "data-v-dfe60586"]]), lt = (e)
|
|
|
2190
2190
|
}
|
|
2191
2191
|
});
|
|
2192
2192
|
const Zo = /* @__PURE__ */ ne(go, [["__scopeId", "data-v-33519afd"]]), ho = [
|
|
2193
|
-
"image/
|
|
2194
|
-
"image/
|
|
2195
|
-
"image/
|
|
2196
|
-
"image/
|
|
2197
|
-
"image/heic",
|
|
2198
|
-
"image/heif",
|
|
2199
|
-
"image/png",
|
|
2200
|
-
"image/webp",
|
|
2201
|
-
"image/svg+xml",
|
|
2202
|
-
"image/x-livp"
|
|
2193
|
+
"image/vnd.adobe.photoshop",
|
|
2194
|
+
"image/x-photoshop",
|
|
2195
|
+
"image/jp2",
|
|
2196
|
+
"image/pcx"
|
|
2203
2197
|
];
|
|
2204
2198
|
function It(e, t) {
|
|
2205
2199
|
const n = h(e?.value), o = z(() => n.value?.startsWith("/_lzc")), l = h(!1), s = z(() => l.value), a = z(() => {
|
|
2206
2200
|
const i = t?.value;
|
|
2207
|
-
return !i || i.startsWith("video/") ? !0 : i.startsWith("image/") ? o.value ? !0 : ho.includes(i) : !1;
|
|
2201
|
+
return !i || i.startsWith("video/") ? !0 : i.startsWith("image/") ? o.value ? !0 : !ho.includes(i) : !1;
|
|
2208
2202
|
});
|
|
2209
2203
|
e && G(e, (i) => {
|
|
2210
2204
|
n.value = i, l.value = !1;
|
|
@@ -2380,7 +2374,7 @@ export {
|
|
|
2380
2374
|
Ge as allSelectedKey,
|
|
2381
2375
|
rn as closeDialogKey,
|
|
2382
2376
|
Qo as dialogController,
|
|
2383
|
-
|
|
2377
|
+
_e as getTransform,
|
|
2384
2378
|
tt as isAllSelectedKey,
|
|
2385
2379
|
Ke as isSelectedKey,
|
|
2386
2380
|
Dt as itemKeyKey,
|
|
@@ -2399,12 +2393,12 @@ export {
|
|
|
2399
2393
|
Ho as useDownDrag,
|
|
2400
2394
|
Tt as useDragSelect,
|
|
2401
2395
|
ko as useDragSelectByMobile,
|
|
2402
|
-
|
|
2396
|
+
bo as useDragSelectByPc,
|
|
2403
2397
|
Yn as useRouterActivated,
|
|
2404
2398
|
$o as useScaleImageByMobile,
|
|
2405
2399
|
Ro as useScaleImageByPc,
|
|
2406
2400
|
Oo as useSelectable,
|
|
2407
|
-
|
|
2401
|
+
_o as useSelectableByBase,
|
|
2408
2402
|
So as useSelectableInjectors,
|
|
2409
2403
|
un as useVirtualList,
|
|
2410
2404
|
Co as vDebounceClick,
|
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(I,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(I=typeof globalThis<"u"?globalThis:I||self,e(I.ui={},I.Vue))})(this,function(I,e){"use strict";const Ce={created(t,n){let o,l;function s(i){i.button==0&&(o=i.clientX,l=i.clientY)}function a(i){if(i.button!=0||o===void 0)return;const f=i.clientX,r=i.clientY,u=Math.abs(f-o),g=Math.abs(r-l);u>5||g>5||n.value&&n.value(i)}t.__mouse_down__=s,t.__mouse_up__=a,t.addEventListener("mousedown",s),t.addEventListener("mouseup",a)},unmounted(t){t.removeEventListener("mousedown",t.__mouse_down__),t.removeEventListener("mouseup",t.__mouse_up__)}},Ze={created(t,n){const{fn:o,ms:l=1500}=n.value;let s=null;function a(i){s||(o(i),s=setTimeout(()=>{s=null},l))}t.addEventListener("click",a)}},he={beforeMount(t,n){n.value()}};function Ge(t,n){var o;const l=e.shallowRef();return e.watchEffect(()=>{l.value=t()},{...n,flush:(o=n?.flush)!=null?o:"sync"}),e.readonly(l)}function qe(t,n){let o,l,s;const a=e.ref(!0),i=()=>{a.value=!0,s()};e.watch(t,i,{flush:"sync"});const f=typeof n=="function"?n:n.get,r=typeof n=="function"?void 0:n.set,u=e.customRef((g,d)=>(l=g,s=d,{get(){return a.value&&(o=f(),a.value=!1),l(),o},set(h){r?.(h)}}));return Object.isExtensible(u)&&(u.trigger=i),u}function pe(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}function V(t){return typeof t=="function"?t():e.unref(t)}const Se=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Je=Object.prototype.toString,et=t=>Je.call(t)==="[object Object]",q=()=>{};function xe(t,n){function o(...l){return new Promise((s,a)=>{Promise.resolve(t(()=>n.apply(this,l),{fn:n,thisArg:this,args:l})).then(s).catch(a)})}return o}function tt(t,n={}){let o,l,s=q;const a=f=>{clearTimeout(f),s(),s=q};return f=>{const r=V(t),u=V(n.maxWait);return o&&a(o),r<=0||u!==void 0&&u<=0?(l&&(a(l),l=null),Promise.resolve(f())):new Promise((g,d)=>{s=n.rejectOnCancel?d:g,u&&!l&&(l=setTimeout(()=>{o&&a(o),l=null,g(f())},u)),o=setTimeout(()=>{l&&a(l),l=null,g(f())},r)})}}function nt(...t){let n=0,o,l=!0,s=q,a,i,f,r,u;!e.isRef(t[0])&&typeof t[0]=="object"?{delay:i,trailing:f=!0,leading:r=!0,rejectOnCancel:u=!1}=t[0]:[i,f=!0,r=!0,u=!1]=t;const g=()=>{o&&(clearTimeout(o),o=void 0,s(),s=q)};return h=>{const M=V(i),c=Date.now()-n,m=()=>a=h();return g(),M<=0?(n=Date.now(),m()):(c>M&&(r||!l)?(n=Date.now(),m()):f&&(a=new Promise((p,z)=>{s=u?z:p,o=setTimeout(()=>{n=Date.now(),l=!0,p(m()),g()},Math.max(0,M-c))})),!r&&!o&&(o=setTimeout(()=>l=!0,M)),l=!1,a)}}function ot(t){return t||e.getCurrentInstance()}function ne(t,n=200,o={}){return xe(tt(n,o),t)}function ye(t,n=200,o=!1,l=!0,s=!1){return xe(nt(n,o,l,s),t)}function De(t,n=!0,o){ot()?e.onMounted(t,o):n?t():e.nextTick(t)}function X(t){var n;const o=V(t);return(n=o?.$el)!=null?n:o}const oe=Se?window:void 0,lt=Se?window.document:void 0;function le(...t){let n,o,l,s;if(typeof t[0]=="string"||Array.isArray(t[0])?([o,l,s]=t,n=oe):[n,o,l,s]=t,!n)return q;Array.isArray(o)||(o=[o]),Array.isArray(l)||(l=[l]);const a=[],i=()=>{a.forEach(g=>g()),a.length=0},f=(g,d,h,M)=>(g.addEventListener(d,h,M),()=>g.removeEventListener(d,h,M)),r=e.watch(()=>[X(n),V(s)],([g,d])=>{if(i(),!g)return;const h=et(d)?{...d}:d;a.push(...o.flatMap(M=>l.map(c=>f(g,M,c,h))))},{immediate:!0,flush:"post"}),u=()=>{r(),i()};return pe(u),u}function st(){const t=e.ref(!1),n=e.getCurrentInstance();return n&&e.onMounted(()=>{t.value=!0},n),t}function at(t){const n=st();return e.computed(()=>(n.value,Boolean(t())))}function it(t){const n=e.getCurrentInstance(),o=qe(()=>null,()=>t?X(t):n.proxy.$el);return e.onUpdated(o.trigger),e.onMounted(o.trigger),o}function Te(t,n,o={}){const{window:l=oe,...s}=o;let a;const i=at(()=>l&&"ResizeObserver"in l),f=()=>{a&&(a.disconnect(),a=void 0)},r=e.computed(()=>Array.isArray(t)?t.map(d=>X(d)):[X(t)]),u=e.watch(r,d=>{if(f(),i.value&&l){a=new ResizeObserver(n);for(const h of d)h&&a.observe(h,s)}},{immediate:!0,flush:"post"}),g=()=>{f(),u()};return pe(g),{isSupported:i,stop:g}}function rt(t,n={width:0,height:0},o={}){const{window:l=oe,box:s="content-box"}=o,a=e.computed(()=>{var d,h;return(h=(d=X(t))==null?void 0:d.namespaceURI)==null?void 0:h.includes("svg")}),i=e.ref(n.width),f=e.ref(n.height),{stop:r}=Te(t,([d])=>{const h=s==="border-box"?d.borderBoxSize:s==="content-box"?d.contentBoxSize:d.devicePixelContentBoxSize;if(l&&a.value){const M=X(t);if(M){const c=l.getComputedStyle(M);i.value=Number.parseFloat(c.width),f.value=Number.parseFloat(c.height)}}else if(h){const M=Array.isArray(h)?h:[h];i.value=M.reduce((c,{inlineSize:m})=>c+m,0),f.value=M.reduce((c,{blockSize:m})=>c+m,0)}else i.value=d.contentRect.width,f.value=d.contentRect.height},o);De(()=>{const d=X(t);d&&(i.value="offsetWidth"in d?d.offsetWidth:n.width,f.value="offsetHeight"in d?d.offsetHeight:n.height)});const u=e.watch(()=>X(t),d=>{i.value=d?n.width:0,f.value=d?n.height:0});function g(){r(),u()}return{width:i,height:f,stop:g}}const _e=1;function ct(t,n={}){const{throttle:o=0,idle:l=200,onStop:s=q,onScroll:a=q,offset:i={left:0,right:0,top:0,bottom:0},eventListenerOptions:f={capture:!1,passive:!0},behavior:r="auto",window:u=oe,onError:g=w=>{console.error(w)}}=n,d=e.ref(0),h=e.ref(0),M=e.computed({get(){return d.value},set(w){m(w,void 0)}}),c=e.computed({get(){return h.value},set(w){m(void 0,w)}});function m(w,C){var B,P,D;if(!u)return;const E=V(t);!E||(D=E instanceof Document?u.document.body:E)==null||D.scrollTo({top:(B=V(C))!=null?B:c.value,left:(P=V(w))!=null?P:M.value,behavior:V(r)})}const p=e.ref(!1),z=e.reactive({left:!0,right:!1,top:!0,bottom:!1}),N=e.reactive({left:!1,right:!1,top:!1,bottom:!1}),y=w=>{!p.value||(p.value=!1,N.left=!1,N.right=!1,N.top=!1,N.bottom=!1,s(w))},T=ne(y,o+l),L=w=>{var C;if(!u)return;const B=((C=w?.document)==null?void 0:C.documentElement)||w?.documentElement||X(w),{display:P,flexDirection:D}=getComputedStyle(B),E=B.scrollLeft;N.left=E<d.value,N.right=E>d.value;const S=Math.abs(E)<=(i.left||0),k=Math.abs(E)+B.clientWidth>=B.scrollWidth-(i.right||0)-_e;P==="flex"&&D==="row-reverse"?(z.left=k,z.right=S):(z.left=S,z.right=k),d.value=E;let O=B.scrollTop;w===u.document&&!O&&(O=u.document.body.scrollTop),N.top=O<h.value,N.bottom=O>h.value;const v=Math.abs(O)<=(i.top||0),A=Math.abs(O)+B.clientHeight>=B.scrollHeight-(i.bottom||0)-_e;P==="flex"&&D==="column-reverse"?(z.top=A,z.bottom=v):(z.top=v,z.bottom=A),h.value=O},x=w=>{var C;if(!u)return;const B=(C=w.target.documentElement)!=null?C:w.target;L(B),p.value=!0,T(w),a(w)};return le(t,"scroll",o?ye(x,o,!0,!1):x,f),De(()=>{try{const w=V(t);if(!w)return;L(w)}catch(w){g(w)}}),le(t,"scrollend",y,f),{x:M,y:c,isScrolling:p,arrivedState:z,directions:N,measure(){const w=V(t);u&&w&&L(w)}}}let ut=0;function Ne(t,n={}){const o=e.ref(!1),{document:l=lt,immediate:s=!0,manual:a=!1,id:i=`vueuse_styletag_${++ut}`}=n,f=e.ref(t);let r=()=>{};const u=()=>{if(!l)return;const d=l.getElementById(i)||l.createElement("style");d.isConnected||(d.id=i,n.media&&(d.media=n.media),l.head.appendChild(d)),!o.value&&(r=e.watch(f,h=>{d.textContent=h},{immediate:!0}),o.value=!0)},g=()=>{!l||!o.value||(r(),l.head.removeChild(l.getElementById(i)),o.value=!1)};return s&&!a&&De(u),a||pe(g),{id:i,css:f,unload:g,load:u,isLoaded:e.readonly(o)}}function dt(t,n,o){const l=t.style[n];return l!=o&&(t.style[n]=o),{reset(){l!=o&&(t.style[n]=l)}}}function be(t,n){const{scrollEndHook:o,itemHeight:l,overscan:s=5}=n,a=e.ref(null),i=rt(a),f=e.ref(!0),r=ne(L,100);let u;const g=e.shallowRef(t),d=e.ref(0),h=e.ref({start:0,end:10}),M=e.ref({start:0,end:s});let c=0;const m=e.ref([]),p=e.computed(()=>{let{sum:v,height:A}={sum:0,height:0};return g.value.map((Q,Y)=>(typeof l=="number"?A=l:A=l(Y),v+=A,{height:A,sum:v}))}),z=e.computed(()=>P(h.value.start)),N=e.computed(()=>typeof l=="number"?p.value.length*l:p.value[p.value.length-1]?.sum||0),y=e.computed(()=>{const{start:v,end:A}=M.value;return m.value.slice(v,A)});e.onMounted(()=>{}),e.onUnmounted(()=>cancelAnimationFrame(u)),e.watch(g,()=>{(i.width.value||i.height.value)&&x()},{deep:!0}),e.watch([i.width,i.height],([v,A])=>{(v||A)&&x()},{deep:!0}),e.watch(d,()=>{T(),r()});function T(){f.value=!1}function L(){f.value=!0,o?.()}function x(){cancelAnimationFrame(u),u=requestAnimationFrame(w)}function w(){if(a.value){d.value=a.value.scrollTop;let v=C(d.value);c=B(v);let A=Math.max(0,v-s),Q=Math.min(v+c+s,g.value.length);h.value={start:A,end:Q},m.value=g.value.slice(A,Q).map((Y,_)=>({data:Y,index:_+A})),M.value.start=v-A,M.value.end=M.value.start+c}}function C(v){let A=0,Q=p.value.length-1,Y=-1;for(;A<=Q;){const _=Math.floor((A+Q)/2);p.value[_].sum>=v?(Y=_,Q=_-1):A=_+1}return Math.max(0,Y)}function B(v){let A=0,Q=0;for(let Y=v;Y<p.value.length&&(A++,Q+=p.value[Y].height,!(Q>=i.height.value));Y++);return A}function P(v){if(typeof l=="number")return v*l;let A=p.value[v];return A?A.sum-A.height:0}function D(v){return p.value[v]||{sum:0,height:0}}function E(v,A="smooth"){if(a.value){const{reset:Q}=dt(a.value,"scrollBehavior",A),Y=D(v);a.value.scrollTop=Y.sum-Y.height,w(),Q()}if(a.value){const Q=D(v);a.value.scrollTop=Q.sum-Q.height,w()}}const S=e.computed(()=>({style:{width:"100%",height:`${N.value}px`,pointerEvents:f.value?void 0:"none"}})),k=e.computed(()=>({style:{transform:`translate3d(0, ${z.value}px, 0)`,"will-change":"transform"}})),O={overflowY:"auto"};return{list:m,visiableList:y,getItemHeightData:D,getoffsetTopIndex:C,totalHeight:N,clientHeight:i.height,scrollTo:E,scrollTop:d,isScrollEnd:f,containerProps:{ref:a,onScroll:()=>{x()},style:O},wrapperProps:S,innerProps:k}}const we=Symbol(),se=Symbol(),ae=Symbol(),ie=Symbol(),re=Symbol(),ce=Symbol(),ue=Symbol(),de=Symbol(),fe=Symbol(),J=Symbol(),Me=Symbol();function ft(){const{voidFn:t,boolFn:n,boolRef:o,numberRef:l,arrayRef:s}={voidFn:p=>{},boolFn:p=>!1,boolRef:e.computed(()=>!1),numberRef:e.computed(()=>0),arrayRef:e.computed(()=>[])},a=e.inject(we,"id"),i=e.inject(re,s),f=e.inject(ie,n),r=e.inject(fe,o),u=e.inject(ae,t),g=e.inject(se,t),d=e.inject(ce,t),h=e.inject(ue,t),M=e.inject(de,t),c=e.inject(J,t),m=e.inject(Me,l);return{itemKey:a,selected:i,isSelected:f,isAllSelected:r,toggle:u,toggleAll:g,select:d,selectAll:h,unselect:M,unselectAll:c,selectedCount:m}}function Mt(t,n,o={deep:!0}){const l=e.ref(!1),s=e.ref(new Set),a=e.ref(new Map);e.watch(t,y=>{a.value=y.reduce((T,L)=>(T.set(L[n],L),T),new Map),N()},{deep:o.deep,immediate:!0});const i=e.computed(()=>{let y=[];if(l.value!=null)l.value&&(y=Array.from(a.value.values()));else if(s.value.size){let T;s.value.forEach(L=>{T=a.value.get(L),T&&y.push(T)})}return y}),f=e.computed(()=>{let y=0;return l.value!=null?l.value&&(y=a.value.size):y=s.value.size,y}),r=e.computed(()=>{let y;if(l.value!=null)y=l.value;else{const T=s.value.size,L=a.value.size;y=T==L}return y});function u(){l.value=!0}function g(){l.value=!1}function d(y){a.value.has(y)&&s.value.add(y)}function h(y){m(()=>{y.forEach(T=>{d(T[n])})})}function M(y){m(()=>{y.forEach(T=>{s.value.delete(T[n])})})}function c(y){return l.value!=null?l.value:s.value.has(y[n])}function m(y){l.value!=null&&(l.value?s.value=new Set(Array.from(a.value.keys())):s.value=new Set),y(),s.value.size==0?l.value=!1:s.value.size==a.value.size?l.value=!0:l.value=null}function p(y){m(()=>{y.forEach(T=>{c(T)?s.value.delete(T[n]):d(T[n])})})}function z(){const{value:y}=r;y?g():u()}function N(){const y=[];s.value.forEach(T=>{a.value.get(T)||y.push(T)}),y.forEach(T=>s.value.delete(T))}return e.provide(we,n),e.provide(se,z),e.provide(ae,p),e.provide(ie,c),e.provide(re,i),e.provide(ce,h),e.provide(ue,u),e.provide(de,M),e.provide(fe,r),e.provide(J,g),e.provide(J,g),e.provide(Me,f),{selected:i,select:h,selectAll:u,unselect:M,unselectAll:g,toggle:p,toggleAll:z,isSelected:c,isAllSelected:r,selectedCount:f}}function gt(t){const n=e.ref(!1),o=e.ref(new Set),l=e.computed(()=>{let c=[];return n.value!=null?n.value&&(c=t.value):o.value.size&&(c=Array.from(o.value.values())),c}),s=e.computed(()=>{let c=0;return n.value!=null?n.value&&(c=t.value.length):c=o.value.size,c}),a=e.computed(()=>{let c;if(n.value!=null)c=n.value;else{const m=o.value.size,p=t.value.length;c=m==p}return c});function i(){n.value=!0}function f(){n.value=!1}function r(c){d(()=>{c.forEach(m=>{o.value.add(m)})})}function u(c){d(()=>{c.forEach(m=>{o.value.delete(m)})})}function g(c){return n.value!=null?n.value:o.value.has(c)}function d(c){n.value!=null&&(n.value?o.value=new Set(Array.from(t.value)):o.value=new Set),c(),o.value.size==0?n.value=!1:o.value.size==t.value.length?n.value=!0:n.value=null}function h(c){d(()=>{c.forEach(m=>{g(m)?o.value.delete(m):o.value.add(m)})})}function M(){const{value:c}=a;c?f():i()}return e.provide(se,M),e.provide(ae,h),e.provide(ie,g),e.provide(re,l),e.provide(ce,r),e.provide(ue,i),e.provide(de,u),e.provide(fe,a),e.provide(J,f),e.provide(J,f),e.provide(Me,s),{selected:l,select:r,selectAll:i,unselect:u,unselectAll:f,toggle:h,toggleAll:M,isSelected:g,isAllSelected:a,selectedCount:s}}function ve(t){return()=>{console.debug(`\u9ED8\u8BA4${t}\u65B9\u6CD5,\u9700\u8981\u81EA\u5B9A\u4E49\u751F\u6548`)}}function Ee({key:t,customAttributeValue:n,attribute:o,selectWay:l="colum",scrollOptions:s={},getSelectMap:a=()=>({})}){const{select:i=ve("\u9009\u62E9"),unselect:f=ve("\u53D6\u6D88\u9009\u62E9"),unselectAll:r=ve("\u53D6\u6D88\u5168\u9009")}=a();let u={};const g=e.computed(()=>ye(l==="colum"?Pn:$n,50)),d=e.computed(()=>t??o),h=(()=>n?j=>n(j):j=>j)(),M=new Set,c=e.ref(!0),m=e.ref(),p=e.ref(!1),z=e.ref({x:0,y:0}),N=e.ref({x:0,y:0,scrollTop:0}),y=new ResizeObserver(j=>T.value=j[0].target.getBoundingClientRect()),T=e.ref({}),L=e.ref({top:0,height:0,sync(j=!1){L.value.top=m.value?.scrollTop||0,j&&(L.value.height=m.value?.scrollHeight||0)}}),x=e.computed(()=>p.value?{left:Math.min(z.value.x,N.value.x)-T.value.left,top:Math.min(z.value.y,N.value.y)-T.value.top,width:Math.abs(z.value.x-N.value.x),height:Math.abs(z.value.y-N.value.y)}:{left:0,top:0,width:0,height:0}),w=e.ref(!1),{margin:C=50,startSpeed:B=30,maxSpeed:P=30}=s;let D;const E=C,S=B,k=P,O=j=>j**1;let v=0;function A(j){if(cancelAnimationFrame(D),v=Q(j),v=Math.max(Math.min(v,k),-k),v!==0){const b=m.value;if(!b||!p.value)return;const $=L.value.height-T.value.height;let R=L.value.top+Number(v);R=Math.min(Math.max(0,R),$),b.scrollTop=R,_(),D=requestAnimationFrame(()=>A(j))}}function Q(j){if(m.value){const $=T.value,R=$.bottom-j;if(R<E)return S*O(1-R/E);const G=j-$.top;if(G<E)return-S*O(1-G/E)}return 0}function Y(j){const b={...x.value,right:0,bottom:0};return b.left+=T.value.left,b.top+=T.value.top-L.value.top,b.right=b.width+b.left,b.bottom=b.height+b.top,b.left<j.right&&b.right>j.left&&b.top<j.bottom&&b.bottom>j.top}function _(){L.value.sync();const{top:j,height:b}=L.value;N.value.y=Math.min(b+T.value.top,N.value.y+j-N.value.scrollTop),N.value.scrollTop=j}function U(j,b,$="dynamic-styles"){let R=document.getElementById($);R||(R=document.createElement("style"),R.id=$,document.head.appendChild(R));const G=R.sheet.cssRules,ee=G.length,Fn=`${j} { ${b} }`;for(let je=0;je<ee;je++){const Ke=G[je];if(Ke.selectorText===j&&Ke.style.cssText===b)return}R.sheet.insertRule(Fn,ee)}function F(j,b){c.value=!0,p.value=!0,L.value.sync(!0);const $=b+L.value.top;z.value.x=j,z.value.y=$,N.value.x=j,N.value.y=$,m.value?.classList.add("disable-scroll-behavior"),M.clear()}function H(j,b,$){!p.value||(c.value&&l==="colum"&&!me()&&(w.value||r(),c.value=!1),$?.(),A(b),N.value.x=Math.max(j,T.value.left),N.value.y=Math.min(b+L.value.top,L.value.height+T.value.top),N.value.scrollTop=L.value.top,g.value())}function Z(){p.value=!1,m.value?.classList.remove("disable-scroll-behavior")}function Un(){!p.value||(v||_(),g.value())}function me(){if(!p.value)return!1;const{width:j,height:b}=x.value;return!(Math.max(j,b)>5)}function Rn(){me()&&r()}function Pn(){me()||m.value?.querySelectorAll(`[${o}]`).forEach(j=>{u[d.value]=h(j.getAttribute(`${o}`)),Y(j.getBoundingClientRect())?i([u]):w.value||f([u])})}function $n(){const j=[];let b=null,$=0;m.value?.querySelectorAll(`[${o}]`).forEach((R,G)=>{const ee=h(R.getAttribute(`${o}`));j.push(ee),Y(R.getBoundingClientRect())?(b===null&&(b=G),b=Math.min(b,G),$=Math.max($,G)):(u[d.value]=ee,M.has(ee)&&f([u]))});for(let R=b;R<$+1;R++)u[d.value]=j[R],i([u]),M.add(j[R])}function Hn(j){return!j?.value||(m.value=j.value,!m?.value)?!1:(y.observe(m.value),U(".disable-scroll-behavior","scroll-behavior: unset !important;"),!0)}return{init:Hn,dragStart:F,dragMove:H,dragEnd:Z,onScroll:Un,isSingleClick:me,cancelSelectAllBySingleClick:Rn,selectFn:g,getAttributeValue:h,incrementalSelect:w,selectRange:x,isPressing:p,containerEl:m,observer:y}}function mt(t,n=!1){const o=Ee(t),{observer:l,selectRange:s}=o,{onScroll:a,dragStart:i,dragMove:f,dragEnd:r,cancelSelectAllBySingleClick:u}=o,g=e.computed(()=>({left:`${s.value.left}px`,top:`${s.value.top}px`,width:`${s.value.width}px`,height:`${s.value.height}px`})),{load:d}=Ne(`.drag-select-box {
|
|
1
|
+
(function(I,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(I=typeof globalThis<"u"?globalThis:I||self,e(I.ui={},I.Vue))})(this,function(I,e){"use strict";const Ce={created(t,n){let o,l;function s(i){i.button==0&&(o=i.clientX,l=i.clientY)}function a(i){if(i.button!=0||o===void 0)return;const f=i.clientX,r=i.clientY,u=Math.abs(f-o),g=Math.abs(r-l);u>5||g>5||n.value&&n.value(i)}t.__mouse_down__=s,t.__mouse_up__=a,t.addEventListener("mousedown",s),t.addEventListener("mouseup",a)},unmounted(t){t.removeEventListener("mousedown",t.__mouse_down__),t.removeEventListener("mouseup",t.__mouse_up__)}},Ze={created(t,n){const{fn:o,ms:l=1500}=n.value;let s=null;function a(i){s||(o(i),s=setTimeout(()=>{s=null},l))}t.addEventListener("click",a)}},he={beforeMount(t,n){n.value()}};function Ge(t,n){var o;const l=e.shallowRef();return e.watchEffect(()=>{l.value=t()},{...n,flush:(o=n?.flush)!=null?o:"sync"}),e.readonly(l)}function qe(t,n){let o,l,s;const a=e.ref(!0),i=()=>{a.value=!0,s()};e.watch(t,i,{flush:"sync"});const f=typeof n=="function"?n:n.get,r=typeof n=="function"?void 0:n.set,u=e.customRef((g,d)=>(l=g,s=d,{get(){return a.value&&(o=f(),a.value=!1),l(),o},set(h){r?.(h)}}));return Object.isExtensible(u)&&(u.trigger=i),u}function pe(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}function V(t){return typeof t=="function"?t():e.unref(t)}const Se=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Je=Object.prototype.toString,et=t=>Je.call(t)==="[object Object]",q=()=>{};function xe(t,n){function o(...l){return new Promise((s,a)=>{Promise.resolve(t(()=>n.apply(this,l),{fn:n,thisArg:this,args:l})).then(s).catch(a)})}return o}function tt(t,n={}){let o,l,s=q;const a=f=>{clearTimeout(f),s(),s=q};return f=>{const r=V(t),u=V(n.maxWait);return o&&a(o),r<=0||u!==void 0&&u<=0?(l&&(a(l),l=null),Promise.resolve(f())):new Promise((g,d)=>{s=n.rejectOnCancel?d:g,u&&!l&&(l=setTimeout(()=>{o&&a(o),l=null,g(f())},u)),o=setTimeout(()=>{l&&a(l),l=null,g(f())},r)})}}function nt(...t){let n=0,o,l=!0,s=q,a,i,f,r,u;!e.isRef(t[0])&&typeof t[0]=="object"?{delay:i,trailing:f=!0,leading:r=!0,rejectOnCancel:u=!1}=t[0]:[i,f=!0,r=!0,u=!1]=t;const g=()=>{o&&(clearTimeout(o),o=void 0,s(),s=q)};return h=>{const M=V(i),c=Date.now()-n,m=()=>a=h();return g(),M<=0?(n=Date.now(),m()):(c>M&&(r||!l)?(n=Date.now(),m()):f&&(a=new Promise((p,z)=>{s=u?z:p,o=setTimeout(()=>{n=Date.now(),l=!0,p(m()),g()},Math.max(0,M-c))})),!r&&!o&&(o=setTimeout(()=>l=!0,M)),l=!1,a)}}function ot(t){return t||e.getCurrentInstance()}function ne(t,n=200,o={}){return xe(tt(n,o),t)}function ye(t,n=200,o=!1,l=!0,s=!1){return xe(nt(n,o,l,s),t)}function De(t,n=!0,o){ot()?e.onMounted(t,o):n?t():e.nextTick(t)}function X(t){var n;const o=V(t);return(n=o?.$el)!=null?n:o}const oe=Se?window:void 0,lt=Se?window.document:void 0;function le(...t){let n,o,l,s;if(typeof t[0]=="string"||Array.isArray(t[0])?([o,l,s]=t,n=oe):[n,o,l,s]=t,!n)return q;Array.isArray(o)||(o=[o]),Array.isArray(l)||(l=[l]);const a=[],i=()=>{a.forEach(g=>g()),a.length=0},f=(g,d,h,M)=>(g.addEventListener(d,h,M),()=>g.removeEventListener(d,h,M)),r=e.watch(()=>[X(n),V(s)],([g,d])=>{if(i(),!g)return;const h=et(d)?{...d}:d;a.push(...o.flatMap(M=>l.map(c=>f(g,M,c,h))))},{immediate:!0,flush:"post"}),u=()=>{r(),i()};return pe(u),u}function st(){const t=e.ref(!1),n=e.getCurrentInstance();return n&&e.onMounted(()=>{t.value=!0},n),t}function at(t){const n=st();return e.computed(()=>(n.value,Boolean(t())))}function it(t){const n=e.getCurrentInstance(),o=qe(()=>null,()=>t?X(t):n.proxy.$el);return e.onUpdated(o.trigger),e.onMounted(o.trigger),o}function Te(t,n,o={}){const{window:l=oe,...s}=o;let a;const i=at(()=>l&&"ResizeObserver"in l),f=()=>{a&&(a.disconnect(),a=void 0)},r=e.computed(()=>Array.isArray(t)?t.map(d=>X(d)):[X(t)]),u=e.watch(r,d=>{if(f(),i.value&&l){a=new ResizeObserver(n);for(const h of d)h&&a.observe(h,s)}},{immediate:!0,flush:"post"}),g=()=>{f(),u()};return pe(g),{isSupported:i,stop:g}}function rt(t,n={width:0,height:0},o={}){const{window:l=oe,box:s="content-box"}=o,a=e.computed(()=>{var d,h;return(h=(d=X(t))==null?void 0:d.namespaceURI)==null?void 0:h.includes("svg")}),i=e.ref(n.width),f=e.ref(n.height),{stop:r}=Te(t,([d])=>{const h=s==="border-box"?d.borderBoxSize:s==="content-box"?d.contentBoxSize:d.devicePixelContentBoxSize;if(l&&a.value){const M=X(t);if(M){const c=l.getComputedStyle(M);i.value=Number.parseFloat(c.width),f.value=Number.parseFloat(c.height)}}else if(h){const M=Array.isArray(h)?h:[h];i.value=M.reduce((c,{inlineSize:m})=>c+m,0),f.value=M.reduce((c,{blockSize:m})=>c+m,0)}else i.value=d.contentRect.width,f.value=d.contentRect.height},o);De(()=>{const d=X(t);d&&(i.value="offsetWidth"in d?d.offsetWidth:n.width,f.value="offsetHeight"in d?d.offsetHeight:n.height)});const u=e.watch(()=>X(t),d=>{i.value=d?n.width:0,f.value=d?n.height:0});function g(){r(),u()}return{width:i,height:f,stop:g}}const _e=1;function ct(t,n={}){const{throttle:o=0,idle:l=200,onStop:s=q,onScroll:a=q,offset:i={left:0,right:0,top:0,bottom:0},eventListenerOptions:f={capture:!1,passive:!0},behavior:r="auto",window:u=oe,onError:g=w=>{console.error(w)}}=n,d=e.ref(0),h=e.ref(0),M=e.computed({get(){return d.value},set(w){m(w,void 0)}}),c=e.computed({get(){return h.value},set(w){m(void 0,w)}});function m(w,C){var B,P,D;if(!u)return;const E=V(t);!E||(D=E instanceof Document?u.document.body:E)==null||D.scrollTo({top:(B=V(C))!=null?B:c.value,left:(P=V(w))!=null?P:M.value,behavior:V(r)})}const p=e.ref(!1),z=e.reactive({left:!0,right:!1,top:!0,bottom:!1}),N=e.reactive({left:!1,right:!1,top:!1,bottom:!1}),y=w=>{!p.value||(p.value=!1,N.left=!1,N.right=!1,N.top=!1,N.bottom=!1,s(w))},T=ne(y,o+l),L=w=>{var C;if(!u)return;const B=((C=w?.document)==null?void 0:C.documentElement)||w?.documentElement||X(w),{display:P,flexDirection:D}=getComputedStyle(B),E=B.scrollLeft;N.left=E<d.value,N.right=E>d.value;const S=Math.abs(E)<=(i.left||0),k=Math.abs(E)+B.clientWidth>=B.scrollWidth-(i.right||0)-_e;P==="flex"&&D==="row-reverse"?(z.left=k,z.right=S):(z.left=S,z.right=k),d.value=E;let O=B.scrollTop;w===u.document&&!O&&(O=u.document.body.scrollTop),N.top=O<h.value,N.bottom=O>h.value;const v=Math.abs(O)<=(i.top||0),A=Math.abs(O)+B.clientHeight>=B.scrollHeight-(i.bottom||0)-_e;P==="flex"&&D==="column-reverse"?(z.top=A,z.bottom=v):(z.top=v,z.bottom=A),h.value=O},x=w=>{var C;if(!u)return;const B=(C=w.target.documentElement)!=null?C:w.target;L(B),p.value=!0,T(w),a(w)};return le(t,"scroll",o?ye(x,o,!0,!1):x,f),De(()=>{try{const w=V(t);if(!w)return;L(w)}catch(w){g(w)}}),le(t,"scrollend",y,f),{x:M,y:c,isScrolling:p,arrivedState:z,directions:N,measure(){const w=V(t);u&&w&&L(w)}}}let ut=0;function Ne(t,n={}){const o=e.ref(!1),{document:l=lt,immediate:s=!0,manual:a=!1,id:i=`vueuse_styletag_${++ut}`}=n,f=e.ref(t);let r=()=>{};const u=()=>{if(!l)return;const d=l.getElementById(i)||l.createElement("style");d.isConnected||(d.id=i,n.media&&(d.media=n.media),l.head.appendChild(d)),!o.value&&(r=e.watch(f,h=>{d.textContent=h},{immediate:!0}),o.value=!0)},g=()=>{!l||!o.value||(r(),l.head.removeChild(l.getElementById(i)),o.value=!1)};return s&&!a&&De(u),a||pe(g),{id:i,css:f,unload:g,load:u,isLoaded:e.readonly(o)}}function dt(t,n,o){const l=t.style[n];return l!=o&&(t.style[n]=o),{reset(){l!=o&&(t.style[n]=l)}}}function be(t,n){const{scrollEndHook:o,itemHeight:l,overscan:s=5}=n,a=e.ref(null),i=rt(a),f=e.ref(!0),r=ne(L,100);let u;const g=e.shallowRef(t),d=e.ref(0),h=e.ref({start:0,end:10}),M=e.ref({start:0,end:s});let c=0;const m=e.ref([]),p=e.computed(()=>{let{sum:v,height:A}={sum:0,height:0};return g.value.map((Q,Y)=>(typeof l=="number"?A=l:A=l(Y),v+=A,{height:A,sum:v}))}),z=e.computed(()=>P(h.value.start)),N=e.computed(()=>typeof l=="number"?p.value.length*l:p.value[p.value.length-1]?.sum||0),y=e.computed(()=>{const{start:v,end:A}=M.value;return m.value.slice(v,A)});e.onMounted(()=>{}),e.onUnmounted(()=>cancelAnimationFrame(u)),e.watch(g,()=>{(i.width.value||i.height.value)&&x()},{deep:!0}),e.watch([i.width,i.height],([v,A])=>{(v||A)&&x()},{deep:!0}),e.watch(d,()=>{T(),r()});function T(){f.value=!1}function L(){f.value=!0,o?.()}function x(){cancelAnimationFrame(u),u=requestAnimationFrame(w)}function w(){if(a.value){d.value=a.value.scrollTop;let v=C(d.value);c=B(v);let A=Math.max(0,v-s),Q=Math.min(v+c+s,g.value.length);h.value={start:A,end:Q},m.value=g.value.slice(A,Q).map((Y,_)=>({data:Y,index:_+A})),M.value.start=v-A,M.value.end=M.value.start+c}}function C(v){let A=0,Q=p.value.length-1,Y=-1;for(;A<=Q;){const _=Math.floor((A+Q)/2);p.value[_].sum>=v?(Y=_,Q=_-1):A=_+1}return Math.max(0,Y)}function B(v){let A=0,Q=0;for(let Y=v;Y<p.value.length&&(A++,Q+=p.value[Y].height,!(Q>=i.height.value));Y++);return A}function P(v){if(typeof l=="number")return v*l;let A=p.value[v];return A?A.sum-A.height:0}function D(v){return p.value[v]||{sum:0,height:0}}function E(v,A="smooth"){if(a.value){const{reset:Q}=dt(a.value,"scrollBehavior",A),Y=D(v);a.value.scrollTop=Y.sum-Y.height,w(),Q()}if(a.value){const Q=D(v);a.value.scrollTop=Q.sum-Q.height,w()}}const S=e.computed(()=>({style:{width:"100%",height:`${N.value}px`,pointerEvents:f.value?void 0:"none"}})),k=e.computed(()=>({style:{transform:`translate3d(0, ${z.value}px, 0)`,"will-change":"transform"}})),O={overflowY:"auto"};return{list:m,visiableList:y,getItemHeightData:D,getoffsetTopIndex:C,totalHeight:N,clientHeight:i.height,scrollTo:E,scrollTop:d,isScrollEnd:f,containerProps:{ref:a,onScroll:()=>{x()},style:O},wrapperProps:S,innerProps:k}}const we=Symbol(),se=Symbol(),ae=Symbol(),ie=Symbol(),re=Symbol(),ce=Symbol(),ue=Symbol(),de=Symbol(),fe=Symbol(),J=Symbol(),Me=Symbol();function ft(){const{voidFn:t,boolFn:n,boolRef:o,numberRef:l,arrayRef:s}={voidFn:p=>{},boolFn:p=>!1,boolRef:e.computed(()=>!1),numberRef:e.computed(()=>0),arrayRef:e.computed(()=>[])},a=e.inject(we,"id"),i=e.inject(re,s),f=e.inject(ie,n),r=e.inject(fe,o),u=e.inject(ae,t),g=e.inject(se,t),d=e.inject(ce,t),h=e.inject(ue,t),M=e.inject(de,t),c=e.inject(J,t),m=e.inject(Me,l);return{itemKey:a,selected:i,isSelected:f,isAllSelected:r,toggle:u,toggleAll:g,select:d,selectAll:h,unselect:M,unselectAll:c,selectedCount:m}}function Mt(t,n,o={deep:!0,useAllFlagOptimizatiofn:!0}){const l=e.ref(!1),s=e.ref(new Set),a=e.ref(new Map);e.watch(t,y=>{a.value=y.reduce((T,L)=>(T.set(L[n],L),T),new Map),N()},{deep:o.deep,immediate:!0});const i=e.computed(()=>{let y=[];if(l.value!=null)l.value&&(y=Array.from(a.value.values()));else if(s.value.size){let T;s.value.forEach(L=>{T=a.value.get(L),T&&y.push(T)})}return y}),f=e.computed(()=>{let y=0;return l.value!=null?l.value&&(y=a.value.size):y=s.value.size,y}),r=e.computed(()=>{let y;if(l.value!=null)y=l.value;else{const T=s.value.size,L=a.value.size;y=T==L}return y});function u(){l.value=!0}function g(){l.value=!1}function d(y){a.value.has(y)&&s.value.add(y)}function h(y){m(()=>{y.forEach(T=>{d(T[n])})})}function M(y){m(()=>{y.forEach(T=>{s.value.delete(T[n])})})}function c(y){return l.value!=null?l.value:s.value.has(y[n])}function m(y){l.value!=null&&(l.value?s.value=new Set(Array.from(a.value.keys())):s.value=new Set),y(),o.useAllFlagOptimizatiofn?s.value.size==0?l.value=!1:s.value.size==a.value.size?l.value=!0:l.value=null:l.value=null}function p(y){m(()=>{y.forEach(T=>{c(T)?s.value.delete(T[n]):d(T[n])})})}function z(){const{value:y}=r;y?g():u()}function N(){const y=[];s.value.forEach(T=>{a.value.get(T)||y.push(T)}),y.forEach(T=>s.value.delete(T))}return e.provide(we,n),e.provide(se,z),e.provide(ae,p),e.provide(ie,c),e.provide(re,i),e.provide(ce,h),e.provide(ue,u),e.provide(de,M),e.provide(fe,r),e.provide(J,g),e.provide(J,g),e.provide(Me,f),{selected:i,select:h,selectAll:u,unselect:M,unselectAll:g,toggle:p,toggleAll:z,isSelected:c,isAllSelected:r,selectedCount:f}}function gt(t){const n=e.ref(!1),o=e.ref(new Set),l=e.computed(()=>{let c=[];return n.value!=null?n.value&&(c=t.value):o.value.size&&(c=Array.from(o.value.values())),c}),s=e.computed(()=>{let c=0;return n.value!=null?n.value&&(c=t.value.length):c=o.value.size,c}),a=e.computed(()=>{let c;if(n.value!=null)c=n.value;else{const m=o.value.size,p=t.value.length;c=m==p}return c});function i(){n.value=!0}function f(){n.value=!1}function r(c){d(()=>{c.forEach(m=>{o.value.add(m)})})}function u(c){d(()=>{c.forEach(m=>{o.value.delete(m)})})}function g(c){return n.value!=null?n.value:o.value.has(c)}function d(c){n.value!=null&&(n.value?o.value=new Set(Array.from(t.value)):o.value=new Set),c(),o.value.size==0?n.value=!1:o.value.size==t.value.length?n.value=!0:n.value=null}function h(c){d(()=>{c.forEach(m=>{g(m)?o.value.delete(m):o.value.add(m)})})}function M(){const{value:c}=a;c?f():i()}return e.provide(se,M),e.provide(ae,h),e.provide(ie,g),e.provide(re,l),e.provide(ce,r),e.provide(ue,i),e.provide(de,u),e.provide(fe,a),e.provide(J,f),e.provide(J,f),e.provide(Me,s),{selected:l,select:r,selectAll:i,unselect:u,unselectAll:f,toggle:h,toggleAll:M,isSelected:g,isAllSelected:a,selectedCount:s}}function ve(t){return()=>{console.debug(`\u9ED8\u8BA4${t}\u65B9\u6CD5,\u9700\u8981\u81EA\u5B9A\u4E49\u751F\u6548`)}}function Ee({key:t,customAttributeValue:n,attribute:o,selectWay:l="colum",scrollOptions:s={},getSelectMap:a=()=>({})}){const{select:i=ve("\u9009\u62E9"),unselect:f=ve("\u53D6\u6D88\u9009\u62E9"),unselectAll:r=ve("\u53D6\u6D88\u5168\u9009")}=a();let u={};const g=e.computed(()=>ye(l==="colum"?Pn:$n,50)),d=e.computed(()=>t??o),h=(()=>n?j=>n(j):j=>j)(),M=new Set,c=e.ref(!0),m=e.ref(),p=e.ref(!1),z=e.ref({x:0,y:0}),N=e.ref({x:0,y:0,scrollTop:0}),y=new ResizeObserver(j=>T.value=j[0].target.getBoundingClientRect()),T=e.ref({}),L=e.ref({top:0,height:0,sync(j=!1){L.value.top=m.value?.scrollTop||0,j&&(L.value.height=m.value?.scrollHeight||0)}}),x=e.computed(()=>p.value?{left:Math.min(z.value.x,N.value.x)-T.value.left,top:Math.min(z.value.y,N.value.y)-T.value.top,width:Math.abs(z.value.x-N.value.x),height:Math.abs(z.value.y-N.value.y)}:{left:0,top:0,width:0,height:0}),w=e.ref(!1),{margin:C=50,startSpeed:B=30,maxSpeed:P=30}=s;let D;const E=C,S=B,k=P,O=j=>j**1;let v=0;function A(j){if(cancelAnimationFrame(D),v=Q(j),v=Math.max(Math.min(v,k),-k),v!==0){const b=m.value;if(!b||!p.value)return;const $=L.value.height-T.value.height;let R=L.value.top+Number(v);R=Math.min(Math.max(0,R),$),b.scrollTop=R,_(),D=requestAnimationFrame(()=>A(j))}}function Q(j){if(m.value){const $=T.value,R=$.bottom-j;if(R<E)return S*O(1-R/E);const G=j-$.top;if(G<E)return-S*O(1-G/E)}return 0}function Y(j){const b={...x.value,right:0,bottom:0};return b.left+=T.value.left,b.top+=T.value.top-L.value.top,b.right=b.width+b.left,b.bottom=b.height+b.top,b.left<j.right&&b.right>j.left&&b.top<j.bottom&&b.bottom>j.top}function _(){L.value.sync();const{top:j,height:b}=L.value;N.value.y=Math.min(b+T.value.top,N.value.y+j-N.value.scrollTop),N.value.scrollTop=j}function U(j,b,$="dynamic-styles"){let R=document.getElementById($);R||(R=document.createElement("style"),R.id=$,document.head.appendChild(R));const G=R.sheet.cssRules,ee=G.length,Fn=`${j} { ${b} }`;for(let je=0;je<ee;je++){const Ke=G[je];if(Ke.selectorText===j&&Ke.style.cssText===b)return}R.sheet.insertRule(Fn,ee)}function F(j,b){c.value=!0,p.value=!0,L.value.sync(!0);const $=b+L.value.top;z.value.x=j,z.value.y=$,N.value.x=j,N.value.y=$,m.value?.classList.add("disable-scroll-behavior"),M.clear()}function H(j,b,$){!p.value||(c.value&&l==="colum"&&!me()&&(w.value||r(),c.value=!1),$?.(),A(b),N.value.x=Math.max(j,T.value.left),N.value.y=Math.min(b+L.value.top,L.value.height+T.value.top),N.value.scrollTop=L.value.top,g.value())}function Z(){p.value=!1,m.value?.classList.remove("disable-scroll-behavior")}function Un(){!p.value||(v||_(),g.value())}function me(){if(!p.value)return!1;const{width:j,height:b}=x.value;return!(Math.max(j,b)>5)}function Rn(){me()&&r()}function Pn(){me()||m.value?.querySelectorAll(`[${o}]`).forEach(j=>{u[d.value]=h(j.getAttribute(`${o}`)),Y(j.getBoundingClientRect())?i([u]):w.value||f([u])})}function $n(){const j=[];let b=null,$=0;m.value?.querySelectorAll(`[${o}]`).forEach((R,G)=>{const ee=h(R.getAttribute(`${o}`));j.push(ee),Y(R.getBoundingClientRect())?(b===null&&(b=G),b=Math.min(b,G),$=Math.max($,G)):(u[d.value]=ee,M.has(ee)&&f([u]))});for(let R=b;R<$+1;R++)u[d.value]=j[R],i([u]),M.add(j[R])}function Hn(j){return!j?.value||(m.value=j.value,!m?.value)?!1:(y.observe(m.value),U(".disable-scroll-behavior","scroll-behavior: unset !important;"),!0)}return{init:Hn,dragStart:F,dragMove:H,dragEnd:Z,onScroll:Un,isSingleClick:me,cancelSelectAllBySingleClick:Rn,selectFn:g,getAttributeValue:h,incrementalSelect:w,selectRange:x,isPressing:p,containerEl:m,observer:y}}function mt(t,n=!1){const o=Ee(t),{observer:l,selectRange:s}=o,{onScroll:a,dragStart:i,dragMove:f,dragEnd:r,cancelSelectAllBySingleClick:u}=o,g=e.computed(()=>({left:`${s.value.left}px`,top:`${s.value.top}px`,width:`${s.value.width}px`,height:`${s.value.height}px`})),{load:d}=Ne(`.drag-select-box {
|
|
2
2
|
position: absolute;
|
|
3
3
|
z-index: 99999;
|
|
4
4
|
background-color: rgb(191 219 254);
|
|
@@ -17,4 +17,4 @@
|
|
|
17
17
|
}
|
|
18
18
|
.hide-scrollbar::-webkit-scrollbar {
|
|
19
19
|
display: none;
|
|
20
|
-
}`,{id:"styletag_lzc_scrollbar",manual:!0});e.onMounted(()=>{M(),e.nextTick(()=>{i.init()})}),e.onUnmounted(()=>{i.modifySliderEventListener("remove")});function c(){d.value=!0}function m(){d.value=!1}return n({uScrollBarReturn:i}),(p,z)=>(e.openBlock(),e.createBlock(e.Transition,null,{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"sliderRef",ref:s,class:"slider-wrapper",onMouseenter:c,onMouseleave:m,style:e.normalizeStyle(e.unref(u))},[e.renderSlot(p.$slots,"default",{},()=>[tn],!0)],36),[[e.vShow,e.unref(h)]])]),_:3}))}}),to="",on=W(nn,[["__scopeId","data-v-7fd39e51"]]),ln=t=>(e.pushScopeId("data-v-df5da876"),t=t(),e.popScopeId(),t),sn={class:"pull-refresh"},an={key:0,class:"pull-arrow-circle"},rn={key:0,class:"box-load"},cn={class:"left-load"},un={class:"right-load"},dn=ln(()=>e.createElementVNode("div",{class:"among-load"},null,-1)),fn={class:"pull-arrow"},Mn={key:1},gn=e.defineComponent({__name:"PullRefresh",props:{refresh:null,refreshOff:{type:Boolean,default:!1},scrollTop:null,pullRefreshContainer:null},setup(t){const n=t,o=.7,l="#2EC1CC",s=e.ref(-999),a=e.ref(1),i=e.ref(0),f=e.ref(.3),r=e.ref(!1),u=e.ref(0),g=e.ref(0),d=e.ref(0),h=e.ref(0),M=e.ref(0),c=e.ref(),m=e.computed(()=>n.scrollTop),p=e.computed(()=>({transition:`${h.value}ms`,transform:`translate3d(0,${s.value}px, 0) scale(${a.value})`})),z=e.computed(()=>({borderColor:l,transition:h.value,transform:`rotate(${100+i.value}deg)`,opacity:f.value}));e.watch(M,w=>{w===0&&(s.value=-50,f.value=.3)}),e.watch(g,w=>{if(M.value===2)return;const C=Math.pow(w,o);C===0&&(s.value=-50),C<=50&&C>0&&(s.value=C-45,i.value=Math.pow(C,1.5),C>15?r.value=!0:r.value=!1),C>50&&(s.value=5,f.value=1,M.value)});const N=e.ref(0),y=w=>{N.value=w.touches[0].pageY},T=w=>{const C=w.touches[0].pageY-N.value;N.value=w.touches[0].pageY,!n.refreshOff&&(!n?.refresh||M.value!==2&&m.value===0&&(u.value===0&&(u.value=w.touches[0].pageY),d.value=0,x.value.style.transition=`${d.value}ms`,h.value=0,g.value=w.touches[0].pageY-u.value,x.value.style.transform=`translate3d(0, ${Math.pow(g.value,o)}px, 0)`,C>0&&w.preventDefault()))},L=()=>{if(n.refreshOff||!n?.refresh||M.value===2)return;u.value=0,d.value=300;const w=Math.pow(g.value,o);x.value.style.transition=`${d.value}ms`,w>50?(M.value=2,g.value=Math.pow(50,1/o),x.value.style.transform=`translate3d(0, ${Math.pow(g.value,o)}px, 0)`,h.value=300,n?.refresh&&n?.refresh().then(()=>{c.value="\u5237\u65B0\u6210\u529F"}).catch(()=>{c.value="\u5237\u65B0\u5931\u8D25"}).finally(()=>{setTimeout(()=>{M.value=0,g.value=0,x.value.style.transform=`translate3d(0, ${Math.pow(g.value,o)}px, 0)`,setTimeout(()=>{c.value=void 0},h.value)},600)})):(g.value=0,x.value.style.transform=`translate3d(0, ${Math.pow(g.value,o)}px, 0)`)},x=e.ref(null);return e.onMounted(()=>{n?.refreshOff||(x.value=document.querySelector(n.pullRefreshContainer),x.value?.addEventListener("touchstart",y),x.value?.addEventListener("touchmove",T),x.value?.addEventListener("touchend",L))}),(w,C)=>(e.openBlock(),e.createElementBlock("div",sn,[e.createElementVNode("div",{class:"pull-refresh-box",style:e.normalizeStyle(e.unref(p))},[c.value?(e.openBlock(),e.createElementBlock("div",Mn,e.toDisplayString(c.value),1)):(e.openBlock(),e.createElementBlock("div",an,[M.value==2?(e.openBlock(),e.createElementBlock("div",rn,[e.createElementVNode("div",cn,[e.createElementVNode("div",{class:"left-circle",style:e.normalizeStyle({backgroundColor:l})},null,4)]),e.createElementVNode("div",un,[e.createElementVNode("div",{class:"right-circle",style:e.normalizeStyle({backgroundColor:l})},null,4)]),dn])):(e.openBlock(),e.createElementBlock("div",{key:1,class:"pull-circle-line",style:e.normalizeStyle(e.unref(z))},[e.createElementVNode("div",fn,[e.createElementVNode("div",{class:e.normalizeClass(["arrows",{opacity:r.value}]),style:e.normalizeStyle({borderBottomColor:l})},null,6)])],4))]))],4)]))}}),no="",Ve=W(gn,[["__scopeId","data-v-df5da876"]]),mn=["data-key"],hn={inheritAttrs:!1},pn=e.defineComponent({...hn,__name:"VirtualList",props:{data:null,getItemKey:null,itemHeight:null,overscan:{default:10},refresh:null,refreshOff:{type:Boolean,default:!1}},emits:["scrollEnd"],setup(t,{expose:n,emit:o}){const l=t,s=be(e.toRef(l,"data"),{itemHeight:M=>l.itemHeight(l.data[M]),overscan:l.overscan,scrollEndHook:()=>{o("scrollEnd")}}),{list:a,containerProps:i,wrapperProps:f,innerProps:r,getItemHeightData:u,scrollTop:g}=s;n({vListReturn:s});const d="virtualListWrapper"+new Date().getTime();function h(M,c){return l.getItemKey?l.getItemKey(M,c):`${c}`}return(M,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(Ve,{refresh:t.refresh,refreshOff:t.refreshOff,scrollTop:e.unref(g),pullRefreshContainer:"#"+d},null,8,["refresh","refreshOff","scrollTop","pullRefreshContainer"]),e.createElementVNode("div",{class:"virtualListWrapper",id:d},[e.createElementVNode("div",e.mergeProps({onScrollPassive:c[0]||(c[0]=(...m)=>e.unref(i).onScroll&&e.unref(i).onScroll(...m)),ref:e.unref(i).ref,class:"virtualList"},M.$attrs),[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(f))),[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(r))),[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),({data:m,index:p})=>(e.openBlock(),e.createElementBlock("div",{key:h(m,p),"data-key":h(m,p),style:e.normalizeStyle({height:`${e.unref(u)(p).height}px`,display:"flex"})},[e.renderSlot(M.$slots,"default",{data:m,index:p},void 0,!0)],12,mn))),128))],16)],16)],16)])],64))}}),oo="",yn=W(pn,[["__scopeId","data-v-dfe60586"]]),Le=t=>(e.pushScopeId("data-v-33519afd"),t=t(),e.popScopeId(),t),Dn={style:{position:"absolute"}},Tn=Le(()=>e.createElementVNode("div",{class:"wrapper"},null,-1)),Nn=["width","height"],wn=[Le(()=>e.createElementVNode("title",null,"logo",-1)),Le(()=>e.createElementVNode("g",{id:"group-1",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createElementVNode("path",{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",id:"path-1",fill:"#FFF"})],-1))],vn=e.defineComponent({__name:"Loading",props:{width:{default:"90"},height:{default:"90"},duration:{default:1300}},setup(t){const n=t;e.useCssVars(l=>({"312487ac":o}));const o=`${n.duration}ms`;return(l,s)=>(e.openBlock(),e.createElementBlock("div",Dn,[Tn,(e.openBlock(),e.createElementBlock("svg",{style:{position:"relative"},width:t.width,height:t.height,viewBox:"0 0 260 260",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},wn,8,Nn))]))}}),ao="",En=W(vn,[["__scopeId","data-v-33519afd"]]),In=["image/bmp","image/jpg","image/jpeg","image/gif","image/heic","image/heif","image/png","image/webp","image/svg+xml","image/x-livp"];function We(t,n){const o=e.ref(t?.value),l=e.computed(()=>o.value?.startsWith("/_lzc")),s=e.ref(!1),a=e.computed(()=>s.value),i=e.computed(()=>{const r=n?.value;return!r||r.startsWith("video/")?!0:r.startsWith("image/")?l.value?!0:In.includes(r):!1});t&&e.watch(t,r=>{o.value=r,s.value=!1});function f(){s.value=!0}return{imgSrc:o,isError:s,hasError:a,isSupport:i,handleError:f}}function Xe(){return{vImageCancel:{beforeUnmount(n){!n||(n.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}}}}const zn=["title"],An={class:"tip"},Ln=[e.createTextVNode("\u5F53\u524D\u683C\u5F0F\u4E0D\u652F\u6301")],jn=["src"],Cn=["src"],Sn=["title"],xn={inheritAttrs:!1},_n=e.defineComponent({...xn,__name:"Image",props:{src:null,mime:null,thumbnail:null,isShowSrc:{type:Boolean},autoRemoveThumbnail:{type:Boolean},noSupportIconName:{default:"\u4E0D\u652F\u6301\u663E\u793A"},badImageIconName:{default:"\u56FE\u7247\u635F\u574F"}},emits:["load","noSupport","loadError"],setup(t,{emit:n}){const o=t,l=e.ref(),s=e.ref(),a=e.ref(!1),i=e.ref(!1),f=e.ref(!1),{src:r,mime:u}=e.toRefs(o),{imgSrc:g,isSupport:d,hasError:h,handleError:M}=We(r,u),{vImageCancel:c}=Xe(),{LoadingComp:m}=Ie({component:ke,delay:300}),p=Ge(()=>f.value&&o.autoRemoveThumbnail?!1:o.thumbnail&&!f.value);function z(){i.value=!0}function N(){i.value&&(f.value=!0)}async function y(){z(),p.value?(l.value?.addEventListener("animationend",T),l.value?.classList.add("showing"),await ze(10)):l.value&&n("load",l.value),l.value?.classList.remove("src-class")}function T(){l.value?.removeEventListener("animationend",T),l.value?.classList.remove("showing"),l.value&&n("load",l.value),N()}async function L(C){C?y():s.value&&n("load",s.value),a.value=!0}function x(C){C?(M(),n("loadError")):z(),a.value=!0}function w(){n("noSupport")}return(C,B)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(d)&&!a.value?(e.openBlock(),e.createBlock(e.unref(m),{key:0})):e.createCommentVNode("",!0),e.unref(d)?e.unref(h)?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:3},C.$attrs,{title:e.unref(g),class:"tip-wrap"}),[e.createVNode(te,{class:"bad-image",name:t.badImageIconName},null,8,["name"])],16,Sn)):e.renderSlot(C.$slots,"default",{key:2,src:e.unref(g),onLoad:L,onError:x,vImageCancel:e.unref(c)},()=>[e.unref(p)?e.withDirectives((e.openBlock(),e.createElementBlock("img",e.mergeProps({key:0},C.$attrs,{ref_key:"thumbnailRef",ref:s,onLoad:B[0]||(B[0]=P=>L()),onError:B[1]||(B[1]=P=>x()),src:t.thumbnail}),null,16,jn)),[[e.unref(c)]]):e.createCommentVNode("",!0),t.isShowSrc||i.value?e.withDirectives((e.openBlock(),e.createElementBlock("img",e.mergeProps({key:1},C.$attrs,{ref_key:"srcRef",ref:l,class:"src-class",onLoad:B[2]||(B[2]=P=>L(!0)),onError:B[3]||(B[3]=P=>x(!0)),src:e.unref(g)}),null,16,Cn)),[[e.unref(c)],[e.vShow,i.value]]):e.createCommentVNode("",!0)],!0):(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:1},C.$attrs,{title:e.unref(g),class:"tip-wrap"}),[e.createVNode(te,{class:"no-support-icon",name:t.noSupportIconName},null,8,["name"]),e.withDirectives((e.openBlock(),e.createElementBlock("span",An,Ln)),[[e.unref(he),w]])],16,zn))],64))}}),ro="",bn=W(_n,[["__scopeId","data-v-bfec1a6b"]]),On=["title"],kn=["src"],Bn=["title"],Qn=e.defineComponent({__name:"Thumbnail",props:{src:null,mime:null},emits:["noSupport"],setup(t,{emit:n}){const o=t,l=e.ref(!1),{src:s,mime:a}=e.toRefs(o),{imgSrc:i,hasError:f,isSupport:r,handleError:u}=We(s,a),{vImageCancel:g}=Xe();function d(){n("noSupport")}return(h,M)=>e.unref(r)?e.unref(f)?(e.openBlock(),e.createElementBlock("div",{key:2,title:e.unref(i),class:"icon-wrap"},[e.createVNode(te,{class:"icon",name:"\u56FE\u7247\u635F\u574F"})],8,Bn)):e.withDirectives((e.openBlock(),e.createElementBlock("img",{key:1,fetchpriority:"high",onLoad:M[0]||(M[0]=c=>l.value=!0),onError:M[1]||(M[1]=(...c)=>e.unref(u)&&e.unref(u)(...c)),src:e.unref(i)},null,40,kn)),[[e.unref(g)],[e.vShow,l.value]]):(e.openBlock(),e.createElementBlock("div",{key:0,title:e.unref(i),class:"icon-wrap"},[e.withDirectives(e.createVNode(te,{class:"icon",name:"\u672A\u77E5\u7C7B\u578B"},null,512),[[e.unref(he),d]])],8,On))}}),co="",Yn=W(Qn,[["__scopeId","data-v-2f606efa"]]);I.DefaultLoading=ke,I.Image=bn,I.Loading=En,I.LoadingToast=Be,I.PageLoading=At,I.PullRefresh=Ve,I.ScrollBar=on,I.SvgIcon=te,I.Thumbnail=Yn,I.ToastCreator=qt,I.VirtualList=yn,I.allSelectedKey=re,I.closeDialogKey=Oe,I.dialogController=Dt,I.getTransform=ge,I.isAllSelectedKey=fe,I.isSelectedKey=ie,I.itemKeyKey=we,I.once=He,I.selectAllKey=ue,I.selectKey=ce,I.selectedCountKey=Me,I.toggleAllKey=se,I.toggleKey=ae,I.unselectAllKey=J,I.unselectKey=de,I.useBackPress=Xt,I.useDelayAsync=kt,I.useDelayLoad=Tt,I.useDelayLoadComp=Ie,I.useDownDrag=Wt,I.useDragSelect=Ee,I.useDragSelectByMobile=ht,I.useDragSelectByPc=mt,I.useRouterActivated=$e,I.useScaleImageByMobile=Vt,I.useScaleImageByPc=Ft,I.useSelectable=Mt,I.useSelectableByBase=gt,I.useSelectableInjectors=ft,I.useVirtualList=be,I.vDebounceClick=Ze,I.vEnter=he,I.vSingleClick=Ce,Object.defineProperties(I,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
20
|
+
}`,{id:"styletag_lzc_scrollbar",manual:!0});e.onMounted(()=>{M(),e.nextTick(()=>{i.init()})}),e.onUnmounted(()=>{i.modifySliderEventListener("remove")});function c(){d.value=!0}function m(){d.value=!1}return n({uScrollBarReturn:i}),(p,z)=>(e.openBlock(),e.createBlock(e.Transition,null,{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"sliderRef",ref:s,class:"slider-wrapper",onMouseenter:c,onMouseleave:m,style:e.normalizeStyle(e.unref(u))},[e.renderSlot(p.$slots,"default",{},()=>[tn],!0)],36),[[e.vShow,e.unref(h)]])]),_:3}))}}),to="",on=W(nn,[["__scopeId","data-v-7fd39e51"]]),ln=t=>(e.pushScopeId("data-v-df5da876"),t=t(),e.popScopeId(),t),sn={class:"pull-refresh"},an={key:0,class:"pull-arrow-circle"},rn={key:0,class:"box-load"},cn={class:"left-load"},un={class:"right-load"},dn=ln(()=>e.createElementVNode("div",{class:"among-load"},null,-1)),fn={class:"pull-arrow"},Mn={key:1},gn=e.defineComponent({__name:"PullRefresh",props:{refresh:null,refreshOff:{type:Boolean,default:!1},scrollTop:null,pullRefreshContainer:null},setup(t){const n=t,o=.7,l="#2EC1CC",s=e.ref(-999),a=e.ref(1),i=e.ref(0),f=e.ref(.3),r=e.ref(!1),u=e.ref(0),g=e.ref(0),d=e.ref(0),h=e.ref(0),M=e.ref(0),c=e.ref(),m=e.computed(()=>n.scrollTop),p=e.computed(()=>({transition:`${h.value}ms`,transform:`translate3d(0,${s.value}px, 0) scale(${a.value})`})),z=e.computed(()=>({borderColor:l,transition:h.value,transform:`rotate(${100+i.value}deg)`,opacity:f.value}));e.watch(M,w=>{w===0&&(s.value=-50,f.value=.3)}),e.watch(g,w=>{if(M.value===2)return;const C=Math.pow(w,o);C===0&&(s.value=-50),C<=50&&C>0&&(s.value=C-45,i.value=Math.pow(C,1.5),C>15?r.value=!0:r.value=!1),C>50&&(s.value=5,f.value=1,M.value)});const N=e.ref(0),y=w=>{N.value=w.touches[0].pageY},T=w=>{const C=w.touches[0].pageY-N.value;N.value=w.touches[0].pageY,!n.refreshOff&&(!n?.refresh||M.value!==2&&m.value===0&&(u.value===0&&(u.value=w.touches[0].pageY),d.value=0,x.value.style.transition=`${d.value}ms`,h.value=0,g.value=w.touches[0].pageY-u.value,x.value.style.transform=`translate3d(0, ${Math.pow(g.value,o)}px, 0)`,C>0&&w.preventDefault()))},L=()=>{if(n.refreshOff||!n?.refresh||M.value===2)return;u.value=0,d.value=300;const w=Math.pow(g.value,o);x.value.style.transition=`${d.value}ms`,w>50?(M.value=2,g.value=Math.pow(50,1/o),x.value.style.transform=`translate3d(0, ${Math.pow(g.value,o)}px, 0)`,h.value=300,n?.refresh&&n?.refresh().then(()=>{c.value="\u5237\u65B0\u6210\u529F"}).catch(()=>{c.value="\u5237\u65B0\u5931\u8D25"}).finally(()=>{setTimeout(()=>{M.value=0,g.value=0,x.value.style.transform=`translate3d(0, ${Math.pow(g.value,o)}px, 0)`,setTimeout(()=>{c.value=void 0},h.value)},600)})):(g.value=0,x.value.style.transform=`translate3d(0, ${Math.pow(g.value,o)}px, 0)`)},x=e.ref(null);return e.onMounted(()=>{n?.refreshOff||(x.value=document.querySelector(n.pullRefreshContainer),x.value?.addEventListener("touchstart",y),x.value?.addEventListener("touchmove",T),x.value?.addEventListener("touchend",L))}),(w,C)=>(e.openBlock(),e.createElementBlock("div",sn,[e.createElementVNode("div",{class:"pull-refresh-box",style:e.normalizeStyle(e.unref(p))},[c.value?(e.openBlock(),e.createElementBlock("div",Mn,e.toDisplayString(c.value),1)):(e.openBlock(),e.createElementBlock("div",an,[M.value==2?(e.openBlock(),e.createElementBlock("div",rn,[e.createElementVNode("div",cn,[e.createElementVNode("div",{class:"left-circle",style:e.normalizeStyle({backgroundColor:l})},null,4)]),e.createElementVNode("div",un,[e.createElementVNode("div",{class:"right-circle",style:e.normalizeStyle({backgroundColor:l})},null,4)]),dn])):(e.openBlock(),e.createElementBlock("div",{key:1,class:"pull-circle-line",style:e.normalizeStyle(e.unref(z))},[e.createElementVNode("div",fn,[e.createElementVNode("div",{class:e.normalizeClass(["arrows",{opacity:r.value}]),style:e.normalizeStyle({borderBottomColor:l})},null,6)])],4))]))],4)]))}}),no="",Ve=W(gn,[["__scopeId","data-v-df5da876"]]),mn=["data-key"],hn={inheritAttrs:!1},pn=e.defineComponent({...hn,__name:"VirtualList",props:{data:null,getItemKey:null,itemHeight:null,overscan:{default:10},refresh:null,refreshOff:{type:Boolean,default:!1}},emits:["scrollEnd"],setup(t,{expose:n,emit:o}){const l=t,s=be(e.toRef(l,"data"),{itemHeight:M=>l.itemHeight(l.data[M]),overscan:l.overscan,scrollEndHook:()=>{o("scrollEnd")}}),{list:a,containerProps:i,wrapperProps:f,innerProps:r,getItemHeightData:u,scrollTop:g}=s;n({vListReturn:s});const d="virtualListWrapper"+new Date().getTime();function h(M,c){return l.getItemKey?l.getItemKey(M,c):`${c}`}return(M,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(Ve,{refresh:t.refresh,refreshOff:t.refreshOff,scrollTop:e.unref(g),pullRefreshContainer:"#"+d},null,8,["refresh","refreshOff","scrollTop","pullRefreshContainer"]),e.createElementVNode("div",{class:"virtualListWrapper",id:d},[e.createElementVNode("div",e.mergeProps({onScrollPassive:c[0]||(c[0]=(...m)=>e.unref(i).onScroll&&e.unref(i).onScroll(...m)),ref:e.unref(i).ref,class:"virtualList"},M.$attrs),[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(f))),[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(r))),[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),({data:m,index:p})=>(e.openBlock(),e.createElementBlock("div",{key:h(m,p),"data-key":h(m,p),style:e.normalizeStyle({height:`${e.unref(u)(p).height}px`,display:"flex"})},[e.renderSlot(M.$slots,"default",{data:m,index:p},void 0,!0)],12,mn))),128))],16)],16)],16)])],64))}}),oo="",yn=W(pn,[["__scopeId","data-v-dfe60586"]]),Le=t=>(e.pushScopeId("data-v-33519afd"),t=t(),e.popScopeId(),t),Dn={style:{position:"absolute"}},Tn=Le(()=>e.createElementVNode("div",{class:"wrapper"},null,-1)),Nn=["width","height"],wn=[Le(()=>e.createElementVNode("title",null,"logo",-1)),Le(()=>e.createElementVNode("g",{id:"group-1",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createElementVNode("path",{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",id:"path-1",fill:"#FFF"})],-1))],vn=e.defineComponent({__name:"Loading",props:{width:{default:"90"},height:{default:"90"},duration:{default:1300}},setup(t){const n=t;e.useCssVars(l=>({"312487ac":o}));const o=`${n.duration}ms`;return(l,s)=>(e.openBlock(),e.createElementBlock("div",Dn,[Tn,(e.openBlock(),e.createElementBlock("svg",{style:{position:"relative"},width:t.width,height:t.height,viewBox:"0 0 260 260",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},wn,8,Nn))]))}}),ao="",En=W(vn,[["__scopeId","data-v-33519afd"]]),In=["image/vnd.adobe.photoshop","image/x-photoshop","image/jp2","image/pcx"];function We(t,n){const o=e.ref(t?.value),l=e.computed(()=>o.value?.startsWith("/_lzc")),s=e.ref(!1),a=e.computed(()=>s.value),i=e.computed(()=>{const r=n?.value;return!r||r.startsWith("video/")?!0:r.startsWith("image/")?l.value?!0:!In.includes(r):!1});t&&e.watch(t,r=>{o.value=r,s.value=!1});function f(){s.value=!0}return{imgSrc:o,isError:s,hasError:a,isSupport:i,handleError:f}}function Xe(){return{vImageCancel:{beforeUnmount(n){!n||(n.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}}}}const zn=["title"],An={class:"tip"},Ln=[e.createTextVNode("\u5F53\u524D\u683C\u5F0F\u4E0D\u652F\u6301")],jn=["src"],Cn=["src"],Sn=["title"],xn={inheritAttrs:!1},_n=e.defineComponent({...xn,__name:"Image",props:{src:null,mime:null,thumbnail:null,isShowSrc:{type:Boolean},autoRemoveThumbnail:{type:Boolean},noSupportIconName:{default:"\u4E0D\u652F\u6301\u663E\u793A"},badImageIconName:{default:"\u56FE\u7247\u635F\u574F"}},emits:["load","noSupport","loadError"],setup(t,{emit:n}){const o=t,l=e.ref(),s=e.ref(),a=e.ref(!1),i=e.ref(!1),f=e.ref(!1),{src:r,mime:u}=e.toRefs(o),{imgSrc:g,isSupport:d,hasError:h,handleError:M}=We(r,u),{vImageCancel:c}=Xe(),{LoadingComp:m}=Ie({component:ke,delay:300}),p=Ge(()=>f.value&&o.autoRemoveThumbnail?!1:o.thumbnail&&!f.value);function z(){i.value=!0}function N(){i.value&&(f.value=!0)}async function y(){z(),p.value?(l.value?.addEventListener("animationend",T),l.value?.classList.add("showing"),await ze(10)):l.value&&n("load",l.value),l.value?.classList.remove("src-class")}function T(){l.value?.removeEventListener("animationend",T),l.value?.classList.remove("showing"),l.value&&n("load",l.value),N()}async function L(C){C?y():s.value&&n("load",s.value),a.value=!0}function x(C){C?(M(),n("loadError")):z(),a.value=!0}function w(){n("noSupport")}return(C,B)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(d)&&!a.value?(e.openBlock(),e.createBlock(e.unref(m),{key:0})):e.createCommentVNode("",!0),e.unref(d)?e.unref(h)?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:3},C.$attrs,{title:e.unref(g),class:"tip-wrap"}),[e.createVNode(te,{class:"bad-image",name:t.badImageIconName},null,8,["name"])],16,Sn)):e.renderSlot(C.$slots,"default",{key:2,src:e.unref(g),onLoad:L,onError:x,vImageCancel:e.unref(c)},()=>[e.unref(p)?e.withDirectives((e.openBlock(),e.createElementBlock("img",e.mergeProps({key:0},C.$attrs,{ref_key:"thumbnailRef",ref:s,onLoad:B[0]||(B[0]=P=>L()),onError:B[1]||(B[1]=P=>x()),src:t.thumbnail}),null,16,jn)),[[e.unref(c)]]):e.createCommentVNode("",!0),t.isShowSrc||i.value?e.withDirectives((e.openBlock(),e.createElementBlock("img",e.mergeProps({key:1},C.$attrs,{ref_key:"srcRef",ref:l,class:"src-class",onLoad:B[2]||(B[2]=P=>L(!0)),onError:B[3]||(B[3]=P=>x(!0)),src:e.unref(g)}),null,16,Cn)),[[e.unref(c)],[e.vShow,i.value]]):e.createCommentVNode("",!0)],!0):(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:1},C.$attrs,{title:e.unref(g),class:"tip-wrap"}),[e.createVNode(te,{class:"no-support-icon",name:t.noSupportIconName},null,8,["name"]),e.withDirectives((e.openBlock(),e.createElementBlock("span",An,Ln)),[[e.unref(he),w]])],16,zn))],64))}}),ro="",bn=W(_n,[["__scopeId","data-v-bfec1a6b"]]),On=["title"],kn=["src"],Bn=["title"],Qn=e.defineComponent({__name:"Thumbnail",props:{src:null,mime:null},emits:["noSupport"],setup(t,{emit:n}){const o=t,l=e.ref(!1),{src:s,mime:a}=e.toRefs(o),{imgSrc:i,hasError:f,isSupport:r,handleError:u}=We(s,a),{vImageCancel:g}=Xe();function d(){n("noSupport")}return(h,M)=>e.unref(r)?e.unref(f)?(e.openBlock(),e.createElementBlock("div",{key:2,title:e.unref(i),class:"icon-wrap"},[e.createVNode(te,{class:"icon",name:"\u56FE\u7247\u635F\u574F"})],8,Bn)):e.withDirectives((e.openBlock(),e.createElementBlock("img",{key:1,fetchpriority:"high",onLoad:M[0]||(M[0]=c=>l.value=!0),onError:M[1]||(M[1]=(...c)=>e.unref(u)&&e.unref(u)(...c)),src:e.unref(i)},null,40,kn)),[[e.unref(g)],[e.vShow,l.value]]):(e.openBlock(),e.createElementBlock("div",{key:0,title:e.unref(i),class:"icon-wrap"},[e.withDirectives(e.createVNode(te,{class:"icon",name:"\u672A\u77E5\u7C7B\u578B"},null,512),[[e.unref(he),d]])],8,On))}}),co="",Yn=W(Qn,[["__scopeId","data-v-2f606efa"]]);I.DefaultLoading=ke,I.Image=bn,I.Loading=En,I.LoadingToast=Be,I.PageLoading=At,I.PullRefresh=Ve,I.ScrollBar=on,I.SvgIcon=te,I.Thumbnail=Yn,I.ToastCreator=qt,I.VirtualList=yn,I.allSelectedKey=re,I.closeDialogKey=Oe,I.dialogController=Dt,I.getTransform=ge,I.isAllSelectedKey=fe,I.isSelectedKey=ie,I.itemKeyKey=we,I.once=He,I.selectAllKey=ue,I.selectKey=ce,I.selectedCountKey=Me,I.toggleAllKey=se,I.toggleKey=ae,I.unselectAllKey=J,I.unselectKey=de,I.useBackPress=Xt,I.useDelayAsync=kt,I.useDelayLoad=Tt,I.useDelayLoadComp=Ie,I.useDownDrag=Wt,I.useDragSelect=Ee,I.useDragSelectByMobile=ht,I.useDragSelectByPc=mt,I.useRouterActivated=$e,I.useScaleImageByMobile=Vt,I.useScaleImageByPc=Ft,I.useSelectable=Mt,I.useSelectableByBase=gt,I.useSelectableInjectors=ft,I.useVirtualList=be,I.vDebounceClick=Ze,I.vEnter=he,I.vSingleClick=Ce,Object.defineProperties(I,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Ref } from "vue";
|
|
2
2
|
export declare const cloudSupportList: string[];
|
|
3
3
|
export declare const localSupportList: string[];
|
|
4
|
+
export declare const localNoSupportList: string[];
|
|
4
5
|
export declare function useLzcImage(url?: Ref<string | undefined>, mime?: Ref<string | undefined>): {
|
|
5
6
|
imgSrc: Ref<string | undefined>;
|
|
6
7
|
isError: Ref<boolean>;
|
|
@@ -13,9 +13,11 @@ export declare function useSelectableInjectors<T = any>(): {
|
|
|
13
13
|
unselectAll: (_?: T[]) => void;
|
|
14
14
|
selectedCount: import("vue").ComputedRef<number>;
|
|
15
15
|
};
|
|
16
|
-
|
|
17
|
-
deep
|
|
18
|
-
|
|
16
|
+
declare type UseSelectableOptions = {
|
|
17
|
+
deep?: boolean;
|
|
18
|
+
useAllFlagOptimizatiofn?: boolean;
|
|
19
|
+
};
|
|
20
|
+
export declare function useSelectable<T extends Record<K, string | number>, K extends keyof T>(data: Ref<T[]>, key: K, opts?: UseSelectableOptions): {
|
|
19
21
|
selected: import("vue").ComputedRef<T[]>;
|
|
20
22
|
select: (items: Array<T>) => void;
|
|
21
23
|
selectAll: () => void;
|