@lazycatcloud/lzc-toolkit 0.0.72 → 0.0.75
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,168 +1,168 @@
|
|
|
1
|
-
import { ref as h, watch as
|
|
2
|
-
var
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
function ie(
|
|
6
|
-
return typeof
|
|
1
|
+
import { ref as h, watch as Y, customRef as lt, getCurrentScope as ot, onScopeDispose as st, getCurrentInstance as Be, onMounted as oe, nextTick as _e, unref as B, onUpdated as at, readonly as rt, shallowRef as ut, computed as w, onUnmounted as Ie, inject as j, provide as z, defineComponent as K, h as Q, render as ue, openBlock as M, createBlock as Me, Transition as Pe, withCtx as He, createElementBlock as A, createElementVNode as T, withModifiers as Ae, normalizeClass as Fe, renderSlot as ye, createCommentVNode as it, normalizeProps as he, guardReactiveProps as pe, pushScopeId as ce, popScopeId as de, normalizeStyle as W, toDisplayString as ke, useSlots as ct, withDirectives as dt, vShow as vt, toRef as ft, Fragment as Ee, createVNode as ht, mergeProps as pt, renderList as mt, useCssVars as gt } from "vue";
|
|
2
|
+
var Se;
|
|
3
|
+
const be = typeof window < "u", xe = (t) => typeof t == "function";
|
|
4
|
+
be && ((Se = window?.navigator) == null ? void 0 : Se.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
5
|
+
function ie(t) {
|
|
6
|
+
return typeof t == "function" ? t() : B(t);
|
|
7
7
|
}
|
|
8
|
-
function
|
|
9
|
-
function
|
|
10
|
-
|
|
8
|
+
function ze(t, e) {
|
|
9
|
+
function n(...l) {
|
|
10
|
+
t(() => e.apply(this, l), { fn: e, thisArg: this, args: l });
|
|
11
11
|
}
|
|
12
|
-
return
|
|
12
|
+
return n;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
let
|
|
14
|
+
function _t(t, e = {}) {
|
|
15
|
+
let n, l;
|
|
16
16
|
return (a) => {
|
|
17
|
-
const s = ie(
|
|
18
|
-
if (
|
|
19
|
-
return
|
|
20
|
-
i && !
|
|
21
|
-
|
|
22
|
-
}, i)),
|
|
23
|
-
|
|
17
|
+
const s = ie(t), i = ie(e.maxWait);
|
|
18
|
+
if (n && clearTimeout(n), s <= 0 || i !== void 0 && i <= 0)
|
|
19
|
+
return l && (clearTimeout(l), l = null), a();
|
|
20
|
+
i && !l && (l = setTimeout(() => {
|
|
21
|
+
n && clearTimeout(n), l = null, a();
|
|
22
|
+
}, i)), n = setTimeout(() => {
|
|
23
|
+
l && clearTimeout(l), l = null, a();
|
|
24
24
|
}, s);
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
let
|
|
27
|
+
function yt(t, e = !0, n = !0) {
|
|
28
|
+
let l = 0, o, a = !0;
|
|
29
29
|
const s = () => {
|
|
30
30
|
o && (clearTimeout(o), o = void 0);
|
|
31
31
|
};
|
|
32
32
|
return (f) => {
|
|
33
|
-
const
|
|
34
|
-
if (s(),
|
|
35
|
-
return
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
},
|
|
33
|
+
const v = ie(t), c = Date.now() - l;
|
|
34
|
+
if (s(), v <= 0)
|
|
35
|
+
return l = Date.now(), f();
|
|
36
|
+
c > v && (n || !a) ? (l = Date.now(), f()) : e && (o = setTimeout(() => {
|
|
37
|
+
l = Date.now(), a = !0, s(), f();
|
|
38
|
+
}, v)), !n && !o && (o = setTimeout(() => a = !0, v)), a = !1;
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
return
|
|
41
|
+
function bt(t) {
|
|
42
|
+
return t;
|
|
43
43
|
}
|
|
44
|
-
function wt(
|
|
45
|
-
let
|
|
44
|
+
function wt(t, e) {
|
|
45
|
+
let n, l, o;
|
|
46
46
|
const a = h(!0), s = () => {
|
|
47
47
|
a.value = !0, o();
|
|
48
48
|
};
|
|
49
|
-
|
|
50
|
-
const i = xe(
|
|
49
|
+
Y(t, s, { flush: "sync" });
|
|
50
|
+
const i = xe(e) ? e : e.get, f = xe(e) ? void 0 : e.set, v = lt((c, d) => (l = c, o = d, {
|
|
51
51
|
get() {
|
|
52
|
-
return a.value && (
|
|
52
|
+
return a.value && (n = i(), a.value = !1), l(), n;
|
|
53
53
|
},
|
|
54
54
|
set(u) {
|
|
55
55
|
f?.(u);
|
|
56
56
|
}
|
|
57
57
|
}));
|
|
58
|
-
return Object.isExtensible(
|
|
58
|
+
return Object.isExtensible(v) && (v.trigger = s), v;
|
|
59
59
|
}
|
|
60
|
-
function
|
|
61
|
-
return
|
|
60
|
+
function We(t) {
|
|
61
|
+
return ot() ? (st(t), !0) : !1;
|
|
62
62
|
}
|
|
63
|
-
function
|
|
64
|
-
return
|
|
63
|
+
function Ne(t, e = 200, n = {}) {
|
|
64
|
+
return ze(_t(e, n), t);
|
|
65
65
|
}
|
|
66
|
-
function Te(
|
|
67
|
-
return
|
|
66
|
+
function Te(t, e = 200, n = !1, l = !0) {
|
|
67
|
+
return ze(yt(e, n, l), t);
|
|
68
68
|
}
|
|
69
|
-
function
|
|
70
|
-
Be() ? oe(
|
|
69
|
+
function Ve(t, e = !0) {
|
|
70
|
+
Be() ? oe(t) : e ? t() : _e(t);
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
var
|
|
74
|
-
const
|
|
75
|
-
return (
|
|
72
|
+
function je(t) {
|
|
73
|
+
var e;
|
|
74
|
+
const n = ie(t);
|
|
75
|
+
return (e = n?.$el) != null ? e : n;
|
|
76
76
|
}
|
|
77
|
-
const
|
|
78
|
-
function
|
|
79
|
-
const
|
|
80
|
-
return
|
|
77
|
+
const Ct = be ? window : void 0, Et = be ? window.document : void 0;
|
|
78
|
+
function St(t, e = !1) {
|
|
79
|
+
const n = h(), l = () => n.value = Boolean(t());
|
|
80
|
+
return l(), Ve(l, e), n;
|
|
81
81
|
}
|
|
82
82
|
const me = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, ge = "__vueuse_ssr_handlers__";
|
|
83
83
|
me[ge] = me[ge] || {};
|
|
84
84
|
me[ge];
|
|
85
|
-
function
|
|
86
|
-
const
|
|
87
|
-
return
|
|
85
|
+
function xt() {
|
|
86
|
+
const t = Be(), e = wt(() => null, () => t.proxy.$el);
|
|
87
|
+
return at(e.trigger), oe(e.trigger), e;
|
|
88
88
|
}
|
|
89
|
-
var Le = Object.getOwnPropertySymbols,
|
|
90
|
-
var
|
|
91
|
-
for (var
|
|
92
|
-
|
|
93
|
-
if (
|
|
94
|
-
for (var
|
|
95
|
-
|
|
96
|
-
return
|
|
89
|
+
var Le = Object.getOwnPropertySymbols, Tt = Object.prototype.hasOwnProperty, Lt = Object.prototype.propertyIsEnumerable, Ot = (t, e) => {
|
|
90
|
+
var n = {};
|
|
91
|
+
for (var l in t)
|
|
92
|
+
Tt.call(t, l) && e.indexOf(l) < 0 && (n[l] = t[l]);
|
|
93
|
+
if (t != null && Le)
|
|
94
|
+
for (var l of Le(t))
|
|
95
|
+
e.indexOf(l) < 0 && Lt.call(t, l) && (n[l] = t[l]);
|
|
96
|
+
return n;
|
|
97
97
|
};
|
|
98
|
-
function
|
|
99
|
-
const
|
|
98
|
+
function $t(t, e, n = {}) {
|
|
99
|
+
const l = n, { window: o = Ct } = l, a = Ot(l, ["window"]);
|
|
100
100
|
let s;
|
|
101
|
-
const i =
|
|
101
|
+
const i = St(() => o && "ResizeObserver" in o), f = () => {
|
|
102
102
|
s && (s.disconnect(), s = void 0);
|
|
103
|
-
},
|
|
104
|
-
f(), i.value && o &&
|
|
105
|
-
}, { immediate: !0, flush: "post" }),
|
|
106
|
-
f(),
|
|
103
|
+
}, v = Y(() => je(t), (d) => {
|
|
104
|
+
f(), i.value && o && d && (s = new ResizeObserver(e), s.observe(d, a));
|
|
105
|
+
}, { immediate: !0, flush: "post" }), c = () => {
|
|
106
|
+
f(), v();
|
|
107
107
|
};
|
|
108
|
-
return
|
|
108
|
+
return We(c), {
|
|
109
109
|
isSupported: i,
|
|
110
|
-
stop:
|
|
110
|
+
stop: c
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
|
-
function
|
|
114
|
-
const { box:
|
|
115
|
-
return
|
|
116
|
-
const i =
|
|
117
|
-
i ? (o.value = i.reduce((f, { inlineSize:
|
|
118
|
-
},
|
|
119
|
-
o.value = s ?
|
|
113
|
+
function Dt(t, e = { width: 0, height: 0 }, n = {}) {
|
|
114
|
+
const { box: l = "content-box" } = n, o = h(e.width), a = h(e.height);
|
|
115
|
+
return $t(t, ([s]) => {
|
|
116
|
+
const i = l === "border-box" ? s.borderBoxSize : l === "content-box" ? s.contentBoxSize : s.devicePixelContentBoxSize;
|
|
117
|
+
i ? (o.value = i.reduce((f, { inlineSize: v }) => f + v, 0), a.value = i.reduce((f, { blockSize: v }) => f + v, 0)) : (o.value = s.contentRect.width, a.value = s.contentRect.height);
|
|
118
|
+
}, n), Y(() => je(t), (s) => {
|
|
119
|
+
o.value = s ? e.width : 0, a.value = s ? e.height : 0;
|
|
120
120
|
}), {
|
|
121
121
|
width: o,
|
|
122
122
|
height: a
|
|
123
123
|
};
|
|
124
124
|
}
|
|
125
125
|
var Oe;
|
|
126
|
-
(function(
|
|
127
|
-
|
|
126
|
+
(function(t) {
|
|
127
|
+
t.UP = "UP", t.RIGHT = "RIGHT", t.DOWN = "DOWN", t.LEFT = "LEFT", t.NONE = "NONE";
|
|
128
128
|
})(Oe || (Oe = {}));
|
|
129
|
-
let
|
|
130
|
-
function
|
|
131
|
-
const
|
|
132
|
-
document:
|
|
129
|
+
let Rt = 0;
|
|
130
|
+
function Ye(t, e = {}) {
|
|
131
|
+
const n = h(!1), {
|
|
132
|
+
document: l = Et,
|
|
133
133
|
immediate: o = !0,
|
|
134
134
|
manual: a = !1,
|
|
135
|
-
id: s = `vueuse_styletag_${++
|
|
136
|
-
} =
|
|
135
|
+
id: s = `vueuse_styletag_${++Rt}`
|
|
136
|
+
} = e, i = h(t);
|
|
137
137
|
let f = () => {
|
|
138
138
|
};
|
|
139
|
-
const
|
|
140
|
-
if (!
|
|
139
|
+
const v = () => {
|
|
140
|
+
if (!l)
|
|
141
141
|
return;
|
|
142
|
-
const
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
}, { immediate: !0 }),
|
|
146
|
-
},
|
|
147
|
-
!
|
|
142
|
+
const d = l.getElementById(s) || l.createElement("style");
|
|
143
|
+
d.type = "text/css", d.id = s, e.media && (d.media = e.media), l.head.appendChild(d), !n.value && (f = Y(i, (u) => {
|
|
144
|
+
d.innerText = u;
|
|
145
|
+
}, { immediate: !0 }), n.value = !0);
|
|
146
|
+
}, c = () => {
|
|
147
|
+
!l || !n.value || (f(), l.head.removeChild(l.getElementById(s)), n.value = !1);
|
|
148
148
|
};
|
|
149
|
-
return o && !a &&
|
|
149
|
+
return o && !a && Ve(v), a || We(c), {
|
|
150
150
|
id: s,
|
|
151
151
|
css: i,
|
|
152
|
-
unload:
|
|
153
|
-
load:
|
|
154
|
-
isLoaded:
|
|
152
|
+
unload: c,
|
|
153
|
+
load: v,
|
|
154
|
+
isLoaded: rt(n)
|
|
155
155
|
};
|
|
156
156
|
}
|
|
157
|
-
var Bt = Object.defineProperty, $e = Object.getOwnPropertySymbols, It = Object.prototype.hasOwnProperty, Mt = Object.prototype.propertyIsEnumerable, De = (
|
|
158
|
-
for (var
|
|
159
|
-
It.call(
|
|
157
|
+
var Bt = Object.defineProperty, $e = Object.getOwnPropertySymbols, It = Object.prototype.hasOwnProperty, Mt = Object.prototype.propertyIsEnumerable, De = (t, e, n) => e in t ? Bt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Pt = (t, e) => {
|
|
158
|
+
for (var n in e || (e = {}))
|
|
159
|
+
It.call(e, n) && De(t, n, e[n]);
|
|
160
160
|
if ($e)
|
|
161
|
-
for (var
|
|
162
|
-
Mt.call(
|
|
163
|
-
return
|
|
161
|
+
for (var n of $e(e))
|
|
162
|
+
Mt.call(e, n) && De(t, n, e[n]);
|
|
163
|
+
return t;
|
|
164
164
|
};
|
|
165
|
-
const
|
|
165
|
+
const Ht = {
|
|
166
166
|
easeInSine: [0.12, 0, 0.39, 0],
|
|
167
167
|
easeOutSine: [0.61, 1, 0.88, 1],
|
|
168
168
|
easeInOutSine: [0.37, 0, 0.63, 1],
|
|
@@ -188,72 +188,72 @@ const Pt = {
|
|
|
188
188
|
easeOutBack: [0.34, 1.56, 0.64, 1],
|
|
189
189
|
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
|
|
190
190
|
};
|
|
191
|
-
|
|
192
|
-
linear:
|
|
193
|
-
},
|
|
194
|
-
function At(
|
|
195
|
-
const { scrollEndHook:
|
|
196
|
-
let
|
|
197
|
-
const
|
|
191
|
+
Pt({
|
|
192
|
+
linear: bt
|
|
193
|
+
}, Ht);
|
|
194
|
+
function At(t, e) {
|
|
195
|
+
const { scrollEndHook: n, itemHeight: l, overscan: o = 5 } = e, a = h(null), s = Dt(a), i = h(!0), f = Ne(N, 100);
|
|
196
|
+
let v;
|
|
197
|
+
const c = ut(t), d = h(0), u = h({ start: 0, end: 10 });
|
|
198
198
|
let r = 0;
|
|
199
|
-
const
|
|
200
|
-
let { sum: g, height:
|
|
201
|
-
return
|
|
202
|
-
}),
|
|
203
|
-
let g =
|
|
204
|
-
return
|
|
199
|
+
const p = h([]), S = w(() => {
|
|
200
|
+
let { sum: g, height: y } = { sum: 0, height: 0 };
|
|
201
|
+
return c.value.map((F, H) => (typeof l == "number" ? y = l : y = l(H), g += y, { height: y, sum: g }));
|
|
202
|
+
}), E = w(() => G(u.value.start)), b = w(() => typeof l == "number" ? S.value.length * l : S.value[S.value.length - 1]?.sum || 0), C = w(() => {
|
|
203
|
+
let g = p.value.length - o, y = Math.max(g - r, 0);
|
|
204
|
+
return p.value.slice(y, g);
|
|
205
205
|
});
|
|
206
206
|
oe(() => {
|
|
207
|
-
}), Ie(() => cancelAnimationFrame(
|
|
208
|
-
[s.width, s.height,
|
|
209
|
-
([g,
|
|
210
|
-
(g ||
|
|
207
|
+
}), Ie(() => cancelAnimationFrame(v)), Y(
|
|
208
|
+
[s.width, s.height, c],
|
|
209
|
+
([g, y]) => {
|
|
210
|
+
(g || y) && U();
|
|
211
211
|
},
|
|
212
212
|
{ deep: !0 }
|
|
213
|
-
),
|
|
214
|
-
|
|
213
|
+
), Y(d, () => {
|
|
214
|
+
P(), f();
|
|
215
215
|
});
|
|
216
|
-
function
|
|
216
|
+
function P() {
|
|
217
217
|
i.value = !1;
|
|
218
218
|
}
|
|
219
|
-
function
|
|
220
|
-
i.value = !0,
|
|
219
|
+
function N() {
|
|
220
|
+
i.value = !0, n?.();
|
|
221
221
|
}
|
|
222
|
-
function
|
|
223
|
-
cancelAnimationFrame(
|
|
222
|
+
function U() {
|
|
223
|
+
cancelAnimationFrame(v), v = requestAnimationFrame($);
|
|
224
224
|
}
|
|
225
225
|
function $() {
|
|
226
226
|
if (a.value) {
|
|
227
|
-
|
|
228
|
-
let g =
|
|
229
|
-
g = g - o, g = g < 0 ? 0 : g,
|
|
230
|
-
data:
|
|
227
|
+
d.value = a.value.scrollTop, r = O();
|
|
228
|
+
let g = x(d.value), y = g + r + o;
|
|
229
|
+
g = g - o, g = g < 0 ? 0 : g, y = y > c.value.length ? c.value.length : y, u.value = { start: g, end: y }, p.value = c.value.slice(g, y).map((F, H) => ({
|
|
230
|
+
data: F,
|
|
231
231
|
index: H + g
|
|
232
232
|
}));
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
|
-
function
|
|
236
|
-
let
|
|
237
|
-
for (;
|
|
238
|
-
const R = Math.floor((
|
|
239
|
-
|
|
235
|
+
function x(g) {
|
|
236
|
+
let y = 0, F = S.value.length - 1, H = -1;
|
|
237
|
+
for (; y <= F; ) {
|
|
238
|
+
const R = Math.floor((y + F) / 2);
|
|
239
|
+
S.value[R].sum >= g ? (H = R, F = R - 1) : y = R + 1;
|
|
240
240
|
}
|
|
241
241
|
return Math.max(0, H);
|
|
242
242
|
}
|
|
243
243
|
function O() {
|
|
244
|
-
let g = 0,
|
|
245
|
-
for (let H =
|
|
244
|
+
let g = 0, y = 0, F = k();
|
|
245
|
+
for (let H = F; H < S.value.length && (g++, y += S.value[H].height, !(y >= s.height.value)); H++)
|
|
246
246
|
;
|
|
247
247
|
return g;
|
|
248
248
|
}
|
|
249
249
|
function G(g) {
|
|
250
|
-
if (typeof
|
|
251
|
-
return g *
|
|
252
|
-
let
|
|
253
|
-
return
|
|
250
|
+
if (typeof l == "number")
|
|
251
|
+
return g * l;
|
|
252
|
+
let y = S.value[g];
|
|
253
|
+
return y ? y.sum - y.height : 0;
|
|
254
254
|
}
|
|
255
255
|
function X(g) {
|
|
256
|
-
return
|
|
256
|
+
return S.value[g] || { sum: 0, height: 0 };
|
|
257
257
|
}
|
|
258
258
|
function k() {
|
|
259
259
|
let g = u.value.start;
|
|
@@ -261,38 +261,38 @@ function At(e, t) {
|
|
|
261
261
|
}
|
|
262
262
|
function ee(g) {
|
|
263
263
|
if (a.value) {
|
|
264
|
-
const
|
|
265
|
-
a.value.scrollTop =
|
|
264
|
+
const y = X(g);
|
|
265
|
+
a.value.scrollTop = y.sum - y.height, $();
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
|
-
const se =
|
|
268
|
+
const se = w(() => ({
|
|
269
269
|
style: {
|
|
270
270
|
width: "100%",
|
|
271
|
-
height: `${
|
|
271
|
+
height: `${b.value}px`,
|
|
272
272
|
pointerEvents: i.value ? void 0 : "none"
|
|
273
273
|
}
|
|
274
|
-
})), Z =
|
|
274
|
+
})), Z = w(() => ({
|
|
275
275
|
style: {
|
|
276
|
-
transform: `translate3d(0, ${
|
|
276
|
+
transform: `translate3d(0, ${E.value}px, 0)`,
|
|
277
277
|
"will-change": "transform"
|
|
278
278
|
}
|
|
279
279
|
})), te = {
|
|
280
280
|
overflowY: "auto"
|
|
281
281
|
};
|
|
282
282
|
return {
|
|
283
|
-
list:
|
|
284
|
-
visiableList:
|
|
283
|
+
list: p,
|
|
284
|
+
visiableList: C,
|
|
285
285
|
getItemHeightData: X,
|
|
286
|
-
getoffsetTopIndex:
|
|
287
|
-
totalHeight:
|
|
286
|
+
getoffsetTopIndex: x,
|
|
287
|
+
totalHeight: b,
|
|
288
288
|
clientHeight: s.height,
|
|
289
289
|
scrollTo: ee,
|
|
290
|
-
scrollTop:
|
|
290
|
+
scrollTop: d,
|
|
291
291
|
isScrollEnd: i,
|
|
292
292
|
containerProps: {
|
|
293
293
|
ref: a,
|
|
294
294
|
onScroll: () => {
|
|
295
|
-
|
|
295
|
+
U();
|
|
296
296
|
},
|
|
297
297
|
style: te
|
|
298
298
|
},
|
|
@@ -300,164 +300,164 @@ function At(e, t) {
|
|
|
300
300
|
innerProps: Z
|
|
301
301
|
};
|
|
302
302
|
}
|
|
303
|
-
const
|
|
304
|
-
function
|
|
305
|
-
const { voidFn:
|
|
303
|
+
const Ke = Symbol(), Ue = Symbol(), qe = Symbol(), Qe = Symbol(), Ge = Symbol(), Xe = Symbol(), Ze = Symbol(), Je = Symbol(), et = Symbol();
|
|
304
|
+
function En() {
|
|
305
|
+
const { voidFn: t, boolFn: e, boolRef: n, arrayRef: l } = {
|
|
306
306
|
voidFn: (r) => {
|
|
307
307
|
},
|
|
308
308
|
boolFn: (r) => !1,
|
|
309
|
-
boolRef:
|
|
310
|
-
arrayRef:
|
|
311
|
-
}, o =
|
|
309
|
+
boolRef: w(() => !1),
|
|
310
|
+
arrayRef: w(() => [])
|
|
311
|
+
}, o = j(Qe, l), a = j(qe, e), s = j(Je, n), i = j(Ue, t), f = j(Ke, t), v = j(Ge, t), c = j(Xe, t), d = j(Ze, t), u = j(et, t);
|
|
312
312
|
return {
|
|
313
313
|
selected: o,
|
|
314
314
|
isSelected: a,
|
|
315
315
|
isAllSelected: s,
|
|
316
316
|
toggle: i,
|
|
317
317
|
toggleAll: f,
|
|
318
|
-
select:
|
|
319
|
-
selectAll:
|
|
320
|
-
unselect:
|
|
318
|
+
select: v,
|
|
319
|
+
selectAll: c,
|
|
320
|
+
unselect: d,
|
|
321
321
|
unselectAll: u
|
|
322
322
|
};
|
|
323
323
|
}
|
|
324
|
-
function
|
|
325
|
-
const
|
|
324
|
+
function Sn(t, e) {
|
|
325
|
+
const n = h({}), l = w(() => t.value.filter((u) => n.value[u[e]])), o = w(() => l.value.length != 0 && Object.keys(n.value).length == t.value.length);
|
|
326
326
|
function a() {
|
|
327
|
-
|
|
328
|
-
|
|
327
|
+
t.value.forEach((u) => {
|
|
328
|
+
n.value[u[e]] = !0;
|
|
329
329
|
});
|
|
330
330
|
}
|
|
331
331
|
function s() {
|
|
332
|
-
|
|
332
|
+
n.value = {};
|
|
333
333
|
}
|
|
334
334
|
function i(u) {
|
|
335
335
|
u.forEach((r) => {
|
|
336
|
-
|
|
336
|
+
n.value[r[e]] || (n.value[r[e]] = !0);
|
|
337
337
|
});
|
|
338
338
|
}
|
|
339
339
|
function f(u) {
|
|
340
340
|
u.forEach((r) => {
|
|
341
|
-
|
|
341
|
+
n.value[r[e]] && delete n.value[r[e]];
|
|
342
342
|
});
|
|
343
343
|
}
|
|
344
|
-
function d(u) {
|
|
345
|
-
return !!l.value[u[t]];
|
|
346
|
-
}
|
|
347
344
|
function v(u) {
|
|
345
|
+
return !!n.value[u[e]];
|
|
346
|
+
}
|
|
347
|
+
function c(u) {
|
|
348
348
|
u.forEach((r) => {
|
|
349
|
-
|
|
349
|
+
v(r) ? delete n.value[r[e]] : n.value[r[e]] = !0;
|
|
350
350
|
});
|
|
351
351
|
}
|
|
352
|
-
function
|
|
352
|
+
function d() {
|
|
353
353
|
o.value ? s() : a();
|
|
354
354
|
}
|
|
355
|
-
return z(
|
|
356
|
-
selected:
|
|
355
|
+
return z(Ke, d), z(Ue, c), z(qe, v), z(Qe, l), z(Ge, i), z(Xe, a), z(Ze, f), z(Je, o), z(et, s), {
|
|
356
|
+
selected: l,
|
|
357
357
|
select: i,
|
|
358
358
|
selectAll: a,
|
|
359
359
|
unselect: f,
|
|
360
360
|
unselectAll: s,
|
|
361
|
-
toggle:
|
|
362
|
-
toggleAll:
|
|
363
|
-
isSelected:
|
|
361
|
+
toggle: c,
|
|
362
|
+
toggleAll: d,
|
|
363
|
+
isSelected: v,
|
|
364
364
|
isAllSelected: o
|
|
365
365
|
};
|
|
366
366
|
}
|
|
367
|
-
function fe(
|
|
367
|
+
function fe(t) {
|
|
368
368
|
return () => {
|
|
369
|
-
console.debug(`\u9ED8\u8BA4${
|
|
369
|
+
console.debug(`\u9ED8\u8BA4${t}\u65B9\u6CD5,\u9700\u8981\u81EA\u5B9A\u4E49\u751F\u6548`);
|
|
370
370
|
};
|
|
371
371
|
}
|
|
372
|
-
function
|
|
373
|
-
attribute:
|
|
374
|
-
selectWay:
|
|
375
|
-
scrollOptions:
|
|
376
|
-
getSelectMap:
|
|
372
|
+
function tt({
|
|
373
|
+
attribute: t,
|
|
374
|
+
selectWay: e = "colum",
|
|
375
|
+
scrollOptions: n = {},
|
|
376
|
+
getSelectMap: l = () => ({})
|
|
377
377
|
}) {
|
|
378
378
|
const {
|
|
379
379
|
select: o = fe("\u9009\u62E9"),
|
|
380
380
|
unselect: a = fe("\u53D6\u6D88\u9009\u62E9"),
|
|
381
381
|
unselectAll: s = fe("\u53D6\u6D88\u5168\u9009")
|
|
382
|
-
} =
|
|
382
|
+
} = l();
|
|
383
383
|
let i = {};
|
|
384
|
-
const f =
|
|
385
|
-
() => Te(
|
|
386
|
-
),
|
|
387
|
-
(
|
|
388
|
-
),
|
|
384
|
+
const f = w(
|
|
385
|
+
() => Te(e === "colum" ? q : ae, 50)
|
|
386
|
+
), v = /* @__PURE__ */ new Set(), c = h(!0), d = h(), u = h(!1), r = h({ x: 0, y: 0 }), p = h({ x: 0, y: 0, scrollTop: 0 }), S = new ResizeObserver(
|
|
387
|
+
(m) => E.value = m[0].target.getBoundingClientRect()
|
|
388
|
+
), E = h({}), b = h({
|
|
389
389
|
top: 0,
|
|
390
390
|
height: 0,
|
|
391
|
-
sync(
|
|
392
|
-
|
|
391
|
+
sync(m = !1) {
|
|
392
|
+
b.value.top = d.value?.scrollTop || 0, m && (b.value.height = d.value?.scrollHeight || 0);
|
|
393
393
|
}
|
|
394
|
-
}),
|
|
395
|
-
left: Math.min(r.value.x,
|
|
396
|
-
top: Math.min(r.value.y,
|
|
397
|
-
width: Math.abs(r.value.x -
|
|
398
|
-
height: Math.abs(r.value.y -
|
|
399
|
-
} : { left: 0, top: 0, width: 0, height: 0 }), { margin:
|
|
394
|
+
}), C = w(() => u.value ? {
|
|
395
|
+
left: Math.min(r.value.x, p.value.x) - E.value.left,
|
|
396
|
+
top: Math.min(r.value.y, p.value.y) - E.value.top,
|
|
397
|
+
width: Math.abs(r.value.x - p.value.x),
|
|
398
|
+
height: Math.abs(r.value.y - p.value.y)
|
|
399
|
+
} : { left: 0, top: 0, width: 0, height: 0 }), { margin: P = 50, startSpeed: N = 30, maxSpeed: U = 30 } = n;
|
|
400
400
|
let $;
|
|
401
|
-
const
|
|
401
|
+
const x = P, O = N, G = U, X = (m) => m ** 1;
|
|
402
402
|
let k = 0;
|
|
403
|
-
function ee(
|
|
404
|
-
if (cancelAnimationFrame($), k = se(
|
|
403
|
+
function ee(m) {
|
|
404
|
+
if (cancelAnimationFrame($), k = se(m), k = Math.max(
|
|
405
405
|
Math.min(k, G),
|
|
406
406
|
-G
|
|
407
407
|
), k !== 0) {
|
|
408
|
-
const _ =
|
|
408
|
+
const _ = d.value;
|
|
409
409
|
if (!_ || !u.value)
|
|
410
410
|
return;
|
|
411
|
-
const I =
|
|
412
|
-
let L =
|
|
413
|
-
L = Math.min(Math.max(0, L), I), _.scrollTop = L, te(), $ = requestAnimationFrame(() => ee(
|
|
411
|
+
const I = b.value.height - E.value.height;
|
|
412
|
+
let L = b.value.top + Number(k);
|
|
413
|
+
L = Math.min(Math.max(0, L), I), _.scrollTop = L, te(), $ = requestAnimationFrame(() => ee(m));
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
|
-
function se(
|
|
417
|
-
if (
|
|
418
|
-
const I =
|
|
419
|
-
if (L <
|
|
420
|
-
return O * X(1 - L /
|
|
421
|
-
const
|
|
422
|
-
if (
|
|
423
|
-
return -O * X(1 -
|
|
416
|
+
function se(m) {
|
|
417
|
+
if (d.value) {
|
|
418
|
+
const I = E.value, L = I.bottom - m;
|
|
419
|
+
if (L < x)
|
|
420
|
+
return O * X(1 - L / x);
|
|
421
|
+
const V = m - I.top;
|
|
422
|
+
if (V < x)
|
|
423
|
+
return -O * X(1 - V / x);
|
|
424
424
|
}
|
|
425
425
|
return 0;
|
|
426
426
|
}
|
|
427
|
-
function Z(
|
|
428
|
-
const _ = { ...
|
|
429
|
-
return _.left +=
|
|
427
|
+
function Z(m) {
|
|
428
|
+
const _ = { ...C.value, right: 0, bottom: 0 };
|
|
429
|
+
return _.left += E.value.left, _.top += E.value.top - b.value.top, _.right = _.width + _.left, _.bottom = _.height + _.top, _.left < m.right && _.right > m.left && _.top < m.bottom && _.bottom > m.top;
|
|
430
430
|
}
|
|
431
431
|
function te() {
|
|
432
|
-
|
|
433
|
-
const { top:
|
|
434
|
-
|
|
435
|
-
_ +
|
|
436
|
-
|
|
437
|
-
),
|
|
438
|
-
}
|
|
439
|
-
function g(
|
|
432
|
+
b.value.sync();
|
|
433
|
+
const { top: m, height: _ } = b.value;
|
|
434
|
+
p.value.y = Math.min(
|
|
435
|
+
_ + E.value.top,
|
|
436
|
+
p.value.y + m - p.value.scrollTop
|
|
437
|
+
), p.value.scrollTop = m;
|
|
438
|
+
}
|
|
439
|
+
function g(m, _, I = "dynamic-styles") {
|
|
440
440
|
let L = document.getElementById(I);
|
|
441
441
|
L || (L = document.createElement("style"), L.id = I, document.head.appendChild(L));
|
|
442
|
-
const
|
|
443
|
-
for (let ve = 0; ve <
|
|
444
|
-
const
|
|
445
|
-
if (
|
|
442
|
+
const V = L.sheet.cssRules, le = V.length, nt = `${m} { ${_} }`;
|
|
443
|
+
for (let ve = 0; ve < le; ve++) {
|
|
444
|
+
const Ce = V[ve];
|
|
445
|
+
if (Ce.selectorText === m && Ce.style.cssText === _)
|
|
446
446
|
return;
|
|
447
447
|
}
|
|
448
|
-
L.sheet.insertRule(
|
|
448
|
+
L.sheet.insertRule(nt, le);
|
|
449
449
|
}
|
|
450
|
-
function
|
|
451
|
-
|
|
450
|
+
function y(m, _) {
|
|
451
|
+
c.value = !0, u.value = !0, b.value.height ? b.value.sync() : b.value.sync(!0), r.value.x = m, r.value.y = _ + b.value.top, p.value.x = r.value.x, p.value.y = r.value.y, d.value?.classList.add("disable-scroll-behavior"), v.clear();
|
|
452
452
|
}
|
|
453
|
-
function
|
|
454
|
-
!u.value || (
|
|
455
|
-
_ +
|
|
456
|
-
|
|
457
|
-
),
|
|
453
|
+
function F(m, _, I) {
|
|
454
|
+
!u.value || (c.value && e === "colum" && !D() && (s(), c.value = !1), I?.(), ee(_), p.value.x = Math.max(m, E.value.left), p.value.y = Math.min(
|
|
455
|
+
_ + b.value.top,
|
|
456
|
+
b.value.height + E.value.top
|
|
457
|
+
), p.value.scrollTop = b.value.top, f.value());
|
|
458
458
|
}
|
|
459
459
|
function H() {
|
|
460
|
-
u.value = !1,
|
|
460
|
+
u.value = !1, d.value?.classList.remove("disable-scroll-behavior");
|
|
461
461
|
}
|
|
462
462
|
function R() {
|
|
463
463
|
!u.value || (k || te(), f.value());
|
|
@@ -465,138 +465,145 @@ function Je({
|
|
|
465
465
|
function D() {
|
|
466
466
|
if (!u.value)
|
|
467
467
|
return !1;
|
|
468
|
-
const { width:
|
|
469
|
-
return !(Math.max(
|
|
468
|
+
const { width: m, height: _ } = C.value;
|
|
469
|
+
return !(Math.max(m, _) > 5);
|
|
470
470
|
}
|
|
471
|
-
function
|
|
471
|
+
function ne() {
|
|
472
472
|
D() && s();
|
|
473
473
|
}
|
|
474
|
-
function
|
|
475
|
-
D() ||
|
|
476
|
-
i[`${
|
|
474
|
+
function q() {
|
|
475
|
+
D() || d.value?.querySelectorAll(`[${t}]`).forEach((m) => {
|
|
476
|
+
i[`${t}`] = m.getAttribute(`${t}`), Z(m.getBoundingClientRect()) ? o([i]) : a([i]);
|
|
477
477
|
});
|
|
478
478
|
}
|
|
479
479
|
function ae() {
|
|
480
|
-
const
|
|
480
|
+
const m = [];
|
|
481
481
|
let _ = null, I = 0;
|
|
482
|
-
|
|
483
|
-
const
|
|
484
|
-
|
|
482
|
+
d.value?.querySelectorAll(`[${t}]`).forEach((L, V) => {
|
|
483
|
+
const le = L.getAttribute(`${t}`);
|
|
484
|
+
m.push(le), Z(L.getBoundingClientRect()) ? (_ === null && (_ = V), _ = Math.min(_, V), I = Math.max(I, V)) : (i[`${t}`] = le, v.has(le) && a([i]));
|
|
485
485
|
});
|
|
486
486
|
for (let L = _; L < I + 1; L++)
|
|
487
|
-
i[`${
|
|
487
|
+
i[`${t}`] = m[L], o([i]), v.add(m[L]);
|
|
488
488
|
}
|
|
489
|
-
function re(
|
|
490
|
-
return !
|
|
489
|
+
function re(m) {
|
|
490
|
+
return !m?.value || (d.value = m.value, !d?.value) ? !1 : (S.observe(d.value), g(
|
|
491
491
|
".disable-scroll-behavior",
|
|
492
492
|
"scroll-behavior: unset !important;"
|
|
493
493
|
), !0);
|
|
494
494
|
}
|
|
495
495
|
return {
|
|
496
496
|
init: re,
|
|
497
|
-
dragStart:
|
|
498
|
-
dragMove:
|
|
497
|
+
dragStart: y,
|
|
498
|
+
dragMove: F,
|
|
499
499
|
dragEnd: H,
|
|
500
500
|
onScroll: R,
|
|
501
501
|
isSingleClick: D,
|
|
502
|
-
cancelSelectAllBySingleClick:
|
|
502
|
+
cancelSelectAllBySingleClick: ne,
|
|
503
503
|
selectFn: f,
|
|
504
|
-
selectRange:
|
|
504
|
+
selectRange: C,
|
|
505
505
|
isPressing: u,
|
|
506
|
-
containerEl:
|
|
507
|
-
observer:
|
|
506
|
+
containerEl: d,
|
|
507
|
+
observer: S
|
|
508
508
|
};
|
|
509
509
|
}
|
|
510
|
-
function
|
|
511
|
-
const
|
|
510
|
+
function xn(t) {
|
|
511
|
+
const e = tt(t), { observer: n, selectRange: l } = e, {
|
|
512
512
|
onScroll: o,
|
|
513
513
|
dragStart: a,
|
|
514
514
|
dragMove: s,
|
|
515
515
|
dragEnd: i,
|
|
516
516
|
cancelSelectAllBySingleClick: f
|
|
517
|
-
} =
|
|
518
|
-
left: `${
|
|
519
|
-
top: `${
|
|
520
|
-
width: `${
|
|
521
|
-
height: `${
|
|
522
|
-
})),
|
|
517
|
+
} = e, v = w(() => ({
|
|
518
|
+
left: `${l.value.left}px`,
|
|
519
|
+
top: `${l.value.top}px`,
|
|
520
|
+
width: `${l.value.width}px`,
|
|
521
|
+
height: `${l.value.height}px`
|
|
522
|
+
})), { load: c, unload: d } = Ye(
|
|
523
|
+
`.drag-select-box {
|
|
524
|
+
position: absolute;
|
|
525
|
+
z-index: 99999;
|
|
526
|
+
background-color: rgb(191 219 254);
|
|
527
|
+
opacity: 0.5;
|
|
528
|
+
}`
|
|
529
|
+
), u = K({
|
|
523
530
|
render() {
|
|
524
|
-
return
|
|
531
|
+
return Q("div", {
|
|
525
532
|
id: "selectBoxEl",
|
|
526
|
-
class: "
|
|
527
|
-
style:
|
|
533
|
+
class: "drag-select-box",
|
|
534
|
+
style: v.value
|
|
528
535
|
});
|
|
529
536
|
}
|
|
530
537
|
});
|
|
531
|
-
function
|
|
532
|
-
|
|
538
|
+
function r(C) {
|
|
539
|
+
C.button === 0 && a(C.x, C.y);
|
|
533
540
|
}
|
|
534
|
-
function
|
|
535
|
-
s(
|
|
541
|
+
function p(C) {
|
|
542
|
+
s(C.x, C.y);
|
|
536
543
|
}
|
|
537
|
-
function
|
|
538
|
-
|
|
544
|
+
function S(C) {
|
|
545
|
+
C.composedPath().some((N) => N?.getAttribute?.(t.attribute)) || f(), i();
|
|
539
546
|
}
|
|
540
|
-
function
|
|
547
|
+
function E(C) {
|
|
541
548
|
try {
|
|
542
|
-
if (!
|
|
549
|
+
if (!e.init(C))
|
|
543
550
|
throw "\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";
|
|
544
|
-
if (!
|
|
551
|
+
if (!e.containerEl?.value)
|
|
545
552
|
return !1;
|
|
546
|
-
ue(
|
|
547
|
-
} catch (
|
|
548
|
-
console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25",
|
|
553
|
+
ue(Q(u), e.containerEl.value), c(), e.containerEl.value?.addEventListener("scroll", o), e.containerEl.value?.addEventListener("mousedown", r), window.addEventListener("mousemove", p), window.addEventListener("mouseup", S);
|
|
554
|
+
} catch (P) {
|
|
555
|
+
console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25", P);
|
|
549
556
|
}
|
|
550
557
|
}
|
|
551
|
-
function
|
|
552
|
-
|
|
558
|
+
function b() {
|
|
559
|
+
d(), n.disconnect(), e.containerEl.value?.removeEventListener("scroll", o), e.containerEl.value?.removeEventListener("mousedown", r), window.removeEventListener("mousemove", p), window.removeEventListener("mouseup", S);
|
|
553
560
|
}
|
|
554
|
-
return { init:
|
|
561
|
+
return { init: E, unMount: b };
|
|
555
562
|
}
|
|
556
|
-
function
|
|
557
|
-
const
|
|
558
|
-
...
|
|
563
|
+
function Tn(t, e, n = 600) {
|
|
564
|
+
const l = tt({
|
|
565
|
+
...t,
|
|
559
566
|
selectWay: "row",
|
|
560
567
|
scrollOptions: {
|
|
561
568
|
startSpeed: 5,
|
|
562
569
|
maxSpeed: 5
|
|
563
570
|
}
|
|
564
|
-
}), { observer: o } =
|
|
565
|
-
let
|
|
566
|
-
function
|
|
567
|
-
clearTimeout(
|
|
568
|
-
}
|
|
569
|
-
function
|
|
570
|
-
|
|
571
|
-
const { clientX:
|
|
572
|
-
s(
|
|
573
|
-
},
|
|
574
|
-
}
|
|
575
|
-
function u(
|
|
576
|
-
|
|
577
|
-
const { clientX:
|
|
578
|
-
i(
|
|
571
|
+
}), { observer: o } = l, { onScroll: a, dragStart: s, dragMove: i, dragEnd: f } = l;
|
|
572
|
+
let v;
|
|
573
|
+
function c() {
|
|
574
|
+
clearTimeout(v);
|
|
575
|
+
}
|
|
576
|
+
function d(E) {
|
|
577
|
+
c(), E.composedPath().some((C) => !!C?.getAttribute?.(t.attribute)) && (v = setTimeout(() => {
|
|
578
|
+
const { clientX: C, clientY: P } = E.targetTouches[0];
|
|
579
|
+
s(C, P), e?.(), i(C, P, () => E.preventDefault()), E.preventDefault();
|
|
580
|
+
}, n));
|
|
581
|
+
}
|
|
582
|
+
function u(E) {
|
|
583
|
+
c();
|
|
584
|
+
const { clientX: b, clientY: C } = E.targetTouches[0];
|
|
585
|
+
i(b, C, () => E.preventDefault());
|
|
579
586
|
}
|
|
580
587
|
function r() {
|
|
581
|
-
|
|
588
|
+
c(), f();
|
|
582
589
|
}
|
|
583
|
-
function
|
|
590
|
+
function p(E) {
|
|
584
591
|
try {
|
|
585
|
-
if (!
|
|
592
|
+
if (!l.init(E))
|
|
586
593
|
throw "\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";
|
|
587
|
-
if (!
|
|
594
|
+
if (!l.containerEl?.value)
|
|
588
595
|
return !1;
|
|
589
|
-
|
|
590
|
-
} catch (
|
|
591
|
-
console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25",
|
|
596
|
+
l.containerEl.value?.addEventListener("scroll", a), l.containerEl.value?.addEventListener("touchstart", d), l.containerEl.value?.addEventListener("touchmove", u), window.addEventListener("touchcancel", r), window.addEventListener("touchend", r);
|
|
597
|
+
} catch (b) {
|
|
598
|
+
console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25", b);
|
|
592
599
|
}
|
|
593
600
|
}
|
|
594
|
-
function
|
|
595
|
-
o.disconnect(),
|
|
601
|
+
function S() {
|
|
602
|
+
o.disconnect(), l.containerEl.value?.removeEventListener("scroll", a), l.containerEl.value?.removeEventListener("touchstart", d), l.containerEl.value?.removeEventListener("touchmove", u), window.removeEventListener("touchcancel", r), window.removeEventListener("touchEnd", r);
|
|
596
603
|
}
|
|
597
|
-
return { init:
|
|
604
|
+
return { init: p, unMount: S };
|
|
598
605
|
}
|
|
599
|
-
const Ft = Symbol(), kt = /* @__PURE__ */
|
|
606
|
+
const Ft = Symbol(), kt = /* @__PURE__ */ K({
|
|
600
607
|
__name: "Dialog",
|
|
601
608
|
props: {
|
|
602
609
|
visiable: { type: Boolean, default: !1 },
|
|
@@ -604,69 +611,69 @@ const Ft = Symbol(), kt = /* @__PURE__ */ Y({
|
|
|
604
611
|
dialogClass: { default: "" }
|
|
605
612
|
},
|
|
606
613
|
emits: ["update:visiable"],
|
|
607
|
-
setup(
|
|
608
|
-
const
|
|
609
|
-
|
|
614
|
+
setup(t, { emit: e }) {
|
|
615
|
+
const n = t, l = () => {
|
|
616
|
+
n.closeOnClickOverlay && e("update:visiable", !1);
|
|
610
617
|
};
|
|
611
|
-
return z(Ft, () =>
|
|
612
|
-
default:
|
|
613
|
-
|
|
618
|
+
return z(Ft, () => e("update:visiable", !1)), (o, a) => (M(), Me(Pe, { name: "modal" }, {
|
|
619
|
+
default: He(() => [
|
|
620
|
+
t.visiable ? (M(), A("div", {
|
|
614
621
|
key: 0,
|
|
615
|
-
onClick:
|
|
622
|
+
onClick: l,
|
|
616
623
|
class: "lzc-modal"
|
|
617
624
|
}, [
|
|
618
|
-
|
|
619
|
-
onClick: a[0] || (a[0] =
|
|
625
|
+
T("div", {
|
|
626
|
+
onClick: a[0] || (a[0] = Ae(() => {
|
|
620
627
|
}, ["stop"])),
|
|
621
|
-
class:
|
|
628
|
+
class: Fe(["lzc-dialog", t.dialogClass])
|
|
622
629
|
}, [
|
|
623
630
|
ye(o.$slots, "default", {}, void 0, !0)
|
|
624
631
|
], 2)
|
|
625
|
-
])) :
|
|
632
|
+
])) : it("", !0)
|
|
626
633
|
]),
|
|
627
634
|
_: 3
|
|
628
635
|
}));
|
|
629
636
|
}
|
|
630
637
|
});
|
|
631
|
-
const J = (
|
|
632
|
-
const
|
|
633
|
-
for (const [
|
|
634
|
-
l
|
|
635
|
-
return
|
|
638
|
+
const J = (t, e) => {
|
|
639
|
+
const n = t.__vccOpts || t;
|
|
640
|
+
for (const [l, o] of e)
|
|
641
|
+
n[l] = o;
|
|
642
|
+
return n;
|
|
636
643
|
}, zt = /* @__PURE__ */ J(kt, [["__scopeId", "data-v-e171c24d"]]);
|
|
637
|
-
function
|
|
638
|
-
function
|
|
644
|
+
function Ln(t) {
|
|
645
|
+
function e(n, l) {
|
|
639
646
|
const o = document.createElement("div"), a = {
|
|
640
647
|
setup() {
|
|
641
|
-
return () =>
|
|
648
|
+
return () => Q(
|
|
642
649
|
zt,
|
|
643
650
|
{
|
|
644
651
|
visiable: !0,
|
|
645
652
|
"onUpdate:visiable": () => {
|
|
646
653
|
o?.remove();
|
|
647
654
|
},
|
|
648
|
-
...
|
|
655
|
+
...t
|
|
649
656
|
},
|
|
650
657
|
{
|
|
651
|
-
default: () =>
|
|
658
|
+
default: () => Q(n, l)
|
|
652
659
|
}
|
|
653
660
|
);
|
|
654
661
|
}
|
|
655
662
|
};
|
|
656
|
-
return document.body.appendChild(o), ue(
|
|
663
|
+
return document.body.appendChild(o), ue(Q(a), o), {
|
|
657
664
|
close: () => o?.remove()
|
|
658
665
|
};
|
|
659
666
|
}
|
|
660
667
|
return {
|
|
661
|
-
create:
|
|
668
|
+
create: e
|
|
662
669
|
};
|
|
663
670
|
}
|
|
664
|
-
function
|
|
665
|
-
component:
|
|
666
|
-
componentProps:
|
|
667
|
-
delay:
|
|
671
|
+
function Wt({
|
|
672
|
+
component: t,
|
|
673
|
+
componentProps: e,
|
|
674
|
+
delay: n = 300
|
|
668
675
|
}) {
|
|
669
|
-
const
|
|
676
|
+
const l = `${n}ms`, { load: o } = Ye(
|
|
670
677
|
`@keyframes lzcDelayLoad {
|
|
671
678
|
to {
|
|
672
679
|
opacity: 1;
|
|
@@ -674,41 +681,54 @@ function xl({
|
|
|
674
681
|
}
|
|
675
682
|
.lzc-delay-loading {
|
|
676
683
|
opacity: 0;
|
|
677
|
-
animation: lzcDelayLoad 0s ${
|
|
684
|
+
animation: lzcDelayLoad 0s ${l} forwards;
|
|
678
685
|
}`
|
|
679
|
-
)
|
|
686
|
+
);
|
|
687
|
+
return { LoadingComp: K({
|
|
680
688
|
setup() {
|
|
681
|
-
const
|
|
689
|
+
const s = xt();
|
|
682
690
|
return oe(() => {
|
|
683
|
-
|
|
684
|
-
}), () =>
|
|
691
|
+
o(), s.value.classList.add("lzc-delay-loading");
|
|
692
|
+
}), () => Q(t, e);
|
|
685
693
|
}
|
|
686
|
-
});
|
|
687
|
-
|
|
694
|
+
}) };
|
|
695
|
+
}
|
|
696
|
+
function On({
|
|
697
|
+
component: t,
|
|
698
|
+
componentProps: e,
|
|
699
|
+
delay: n = 300
|
|
700
|
+
}) {
|
|
701
|
+
const { LoadingComp: l } = Wt({
|
|
702
|
+
component: t,
|
|
703
|
+
componentProps: e,
|
|
704
|
+
delay: n
|
|
705
|
+
}), o = h(!1);
|
|
706
|
+
function a() {
|
|
688
707
|
o.value = !0;
|
|
689
708
|
}
|
|
690
|
-
function
|
|
709
|
+
function s() {
|
|
691
710
|
o.value = !1;
|
|
692
711
|
}
|
|
693
|
-
return { LoadingComp:
|
|
712
|
+
return { LoadingComp: l, loading: o, load: a, unload: s };
|
|
694
713
|
}
|
|
695
|
-
const
|
|
696
|
-
/* @__PURE__ */
|
|
697
|
-
], -1)),
|
|
698
|
-
|
|
714
|
+
const Nt = {}, Vt = (t) => (ce("data-v-76a2728a"), t = t(), de(), t), jt = /* @__PURE__ */ Vt(() => /* @__PURE__ */ T("div", { class: "ldio-mm5gwljcryb" }, [
|
|
715
|
+
/* @__PURE__ */ T("div")
|
|
716
|
+
], -1)), Yt = [
|
|
717
|
+
jt
|
|
699
718
|
];
|
|
700
|
-
function
|
|
701
|
-
return M(),
|
|
719
|
+
function Kt(t, e) {
|
|
720
|
+
return M(), A("div", he(pe(t.$attrs)), Yt, 16);
|
|
702
721
|
}
|
|
703
|
-
const
|
|
722
|
+
const $n = /* @__PURE__ */ J(Nt, [["render", Kt], ["__scopeId", "data-v-76a2728a"]]), Ut = ["onClick"], qt = /* @__PURE__ */ K({
|
|
704
723
|
__name: "Toast",
|
|
705
724
|
props: {
|
|
706
725
|
message: null,
|
|
707
|
-
position: null
|
|
726
|
+
position: null,
|
|
727
|
+
buttonClickEvent: null
|
|
708
728
|
},
|
|
709
|
-
setup(
|
|
710
|
-
const
|
|
711
|
-
switch (
|
|
729
|
+
setup(t) {
|
|
730
|
+
const e = t, n = h(), l = h(), o = h(), a = w(() => {
|
|
731
|
+
switch (e.position) {
|
|
712
732
|
case "top":
|
|
713
733
|
return 10;
|
|
714
734
|
case "middle":
|
|
@@ -716,14 +736,14 @@ const Tl = /* @__PURE__ */ J(Wt, [["render", Yt], ["__scopeId", "data-v-76a2728a
|
|
|
716
736
|
case "bottom":
|
|
717
737
|
return 85;
|
|
718
738
|
}
|
|
719
|
-
}), s =
|
|
739
|
+
}), s = w(() => ({
|
|
720
740
|
position: "absolute",
|
|
721
741
|
borderRadius: "10px",
|
|
722
742
|
backgroundColor: "rgba(0, 0, 0, 0.8)",
|
|
723
743
|
padding: "14px 19px",
|
|
724
744
|
top: `calc(${a.value}% - ${o.value}px)`,
|
|
725
|
-
left: `calc(50% - ${
|
|
726
|
-
})), i =
|
|
745
|
+
left: `calc(50% - ${l.value}px)`
|
|
746
|
+
})), i = w(() => ({
|
|
727
747
|
width: "fit-content",
|
|
728
748
|
display: "flex",
|
|
729
749
|
justifyContent: "center",
|
|
@@ -731,54 +751,60 @@ const Tl = /* @__PURE__ */ J(Wt, [["render", Yt], ["__scopeId", "data-v-76a2728a
|
|
|
731
751
|
color: "white",
|
|
732
752
|
fontSize: "14px"
|
|
733
753
|
}));
|
|
754
|
+
function f() {
|
|
755
|
+
!e.buttonClickEvent || e.buttonClickEvent();
|
|
756
|
+
}
|
|
734
757
|
return _e(() => {
|
|
735
|
-
|
|
736
|
-
}), (
|
|
758
|
+
l.value = n.value.offsetWidth / 2, o.value = n.value.offsetHeight / 2;
|
|
759
|
+
}), (v, c) => (M(), A("div", {
|
|
760
|
+
onClick: Ae(f, ["stop"]),
|
|
737
761
|
id: "toastWrapper",
|
|
738
762
|
ref_key: "toastWrapper",
|
|
739
|
-
ref:
|
|
763
|
+
ref: n,
|
|
740
764
|
class: "toastWrapper",
|
|
741
|
-
style: W([B(s), { zIndex:
|
|
765
|
+
style: W([B(s), { zIndex: 9999999 }])
|
|
742
766
|
}, [
|
|
743
|
-
|
|
767
|
+
T("div", {
|
|
744
768
|
style: W(B(i))
|
|
745
769
|
}, [
|
|
746
|
-
|
|
770
|
+
T("span", null, ke(t.message), 1)
|
|
747
771
|
], 4)
|
|
748
|
-
],
|
|
772
|
+
], 12, Ut));
|
|
749
773
|
}
|
|
750
774
|
});
|
|
751
|
-
const
|
|
775
|
+
const Qt = /* @__PURE__ */ J(qt, [["__scopeId", "data-v-533e986b"]]), Re = {
|
|
752
776
|
message: "\u61D2\u732B\u4E91 Yes!!!",
|
|
753
777
|
position: "middle",
|
|
754
|
-
duration: 1500
|
|
778
|
+
duration: 1500,
|
|
779
|
+
buttonClickEvent: () => {
|
|
780
|
+
}
|
|
755
781
|
};
|
|
756
|
-
class
|
|
782
|
+
class Dn {
|
|
757
783
|
options;
|
|
758
784
|
container;
|
|
759
|
-
constructor(
|
|
760
|
-
this.options =
|
|
785
|
+
constructor(e) {
|
|
786
|
+
this.options = e, this.container = document.createElement("div");
|
|
761
787
|
}
|
|
762
788
|
present() {
|
|
763
|
-
const
|
|
764
|
-
ue(
|
|
765
|
-
const
|
|
789
|
+
const e = Q(Q(Qt), { ...Re, ...this.options });
|
|
790
|
+
ue(e, this.container), document.body.insertBefore(this.container, document.body.firstChild);
|
|
791
|
+
const n = this.options.duration || Re.duration;
|
|
766
792
|
setTimeout(() => {
|
|
767
793
|
this.dismiss();
|
|
768
|
-
},
|
|
794
|
+
}, n);
|
|
769
795
|
}
|
|
770
796
|
dismiss() {
|
|
771
797
|
if (this.container) {
|
|
772
|
-
const
|
|
798
|
+
const e = this.container.querySelector(
|
|
773
799
|
"#toastWrapper"
|
|
774
800
|
);
|
|
775
|
-
|
|
801
|
+
e.style.opacity = "0", e.style.transition = "opacity 0.4s ease-in", setTimeout(() => {
|
|
776
802
|
this.container && (ue(null, this.container), document.body.removeChild(this.container));
|
|
777
803
|
}, 500);
|
|
778
804
|
}
|
|
779
805
|
}
|
|
780
806
|
}
|
|
781
|
-
const
|
|
807
|
+
const Gt = ["xlink:href", "fill", "color"], Rn = /* @__PURE__ */ K({
|
|
782
808
|
__name: "SvgIcon",
|
|
783
809
|
props: {
|
|
784
810
|
name: null,
|
|
@@ -787,133 +813,133 @@ const qt = ["xlink:href", "fill", "color"], Ol = /* @__PURE__ */ Y({
|
|
|
787
813
|
width: null,
|
|
788
814
|
height: null
|
|
789
815
|
},
|
|
790
|
-
setup(
|
|
791
|
-
const
|
|
792
|
-
width: `${
|
|
793
|
-
height: `${
|
|
794
|
-
aspectRatio:
|
|
816
|
+
setup(t) {
|
|
817
|
+
const e = t, n = w(() => `#${e.prefix}-${e.name}`), l = w(() => ({
|
|
818
|
+
width: `${e.width ?? e.height}px`,
|
|
819
|
+
height: `${e.height ?? e.width}px`,
|
|
820
|
+
aspectRatio: e.width && e.height ? void 0 : "1/1"
|
|
795
821
|
}));
|
|
796
|
-
return (o, a) => (M(),
|
|
822
|
+
return (o, a) => (M(), A("svg", {
|
|
797
823
|
"aria-hidden": "",
|
|
798
|
-
style: W(B(
|
|
824
|
+
style: W(B(l))
|
|
799
825
|
}, [
|
|
800
|
-
|
|
801
|
-
"xlink:href": B(
|
|
802
|
-
fill:
|
|
803
|
-
color:
|
|
804
|
-
}, null, 8,
|
|
826
|
+
T("use", {
|
|
827
|
+
"xlink:href": B(n),
|
|
828
|
+
fill: t.color,
|
|
829
|
+
color: t.color
|
|
830
|
+
}, null, 8, Gt)
|
|
805
831
|
], 4));
|
|
806
832
|
}
|
|
807
833
|
});
|
|
808
|
-
function
|
|
834
|
+
function Xt(t) {
|
|
809
835
|
const {
|
|
810
|
-
containerEl:
|
|
811
|
-
sliderEl:
|
|
812
|
-
autoHeight:
|
|
836
|
+
containerEl: e,
|
|
837
|
+
sliderEl: n,
|
|
838
|
+
autoHeight: l,
|
|
813
839
|
performance: o = {},
|
|
814
840
|
maxHeightRatio: a = 0.9
|
|
815
|
-
} =
|
|
816
|
-
let f,
|
|
817
|
-
const
|
|
841
|
+
} = t, s = h(!0), i = Ne(G, 100);
|
|
842
|
+
let f, v = "";
|
|
843
|
+
const c = h(0), d = h(0), u = h(0), r = h({
|
|
818
844
|
top: 0,
|
|
819
845
|
scrollTop: 0,
|
|
820
846
|
scrollHeight: 0,
|
|
821
847
|
clientHeight: 0
|
|
822
|
-
}),
|
|
848
|
+
}), p = h({
|
|
823
849
|
clientHeight: 0
|
|
824
|
-
}),
|
|
850
|
+
}), S = w(() => !!d.value), E = w(() => r.value.scrollHeight > r.value.clientHeight), b = w(() => r.value.clientHeight - p.value.clientHeight), C = w(() => r.value.scrollHeight - r.value.clientHeight), P = w(() => Math.max(
|
|
825
851
|
r.value.clientHeight / r.value.scrollHeight,
|
|
826
852
|
0.05
|
|
827
|
-
)),
|
|
853
|
+
)), N = w(() => P.value > a ? 0 : P.value * r.value.clientHeight), U = w(() => ({
|
|
828
854
|
willChange: "transform",
|
|
829
855
|
transform: `translate3d(0,${u.value}px,0)`,
|
|
830
|
-
height:
|
|
856
|
+
height: l ? `${N.value}px` : void 0
|
|
831
857
|
}));
|
|
832
858
|
function $(R) {
|
|
833
|
-
O(),
|
|
859
|
+
O(), d.value = R.clientY - n.value.getBoundingClientRect().top || 1, v = getComputedStyle(e.value).scrollBehavior, v === "smooth" && (e.value.style.scrollBehavior = "unset");
|
|
834
860
|
}
|
|
835
|
-
function
|
|
836
|
-
|
|
861
|
+
function x() {
|
|
862
|
+
e.value.style.scrollBehavior = v, d.value = 0, i();
|
|
837
863
|
}
|
|
838
864
|
function O() {
|
|
839
865
|
s.value = !1;
|
|
840
866
|
}
|
|
841
867
|
function G() {
|
|
842
|
-
|
|
868
|
+
S.value || (s.value = !0);
|
|
843
869
|
}
|
|
844
870
|
function X(R) {
|
|
845
|
-
if (!
|
|
871
|
+
if (!S.value)
|
|
846
872
|
return;
|
|
847
|
-
let D = R.clientY - r.value.top -
|
|
848
|
-
D < 0 ? u.value = 0 : D >=
|
|
849
|
-
top: u.value /
|
|
873
|
+
let D = R.clientY - r.value.top - d.value;
|
|
874
|
+
D < 0 ? u.value = 0 : D >= b.value ? u.value = b.value : u.value = D, e.value.scrollTo({
|
|
875
|
+
top: u.value / b.value * C.value
|
|
850
876
|
});
|
|
851
877
|
}
|
|
852
878
|
function k() {
|
|
853
|
-
|
|
879
|
+
S.value || ee();
|
|
854
880
|
}
|
|
855
881
|
function ee() {
|
|
856
882
|
cancelAnimationFrame(f), f = requestAnimationFrame(se);
|
|
857
883
|
}
|
|
858
884
|
function se() {
|
|
859
|
-
|
|
885
|
+
e.value && (c.value = o.scrollTop?.value ?? e.value.scrollTop, u.value = c.value / C.value * b.value);
|
|
860
886
|
}
|
|
861
887
|
function Z(R) {
|
|
862
888
|
let D = "addEventListener";
|
|
863
|
-
R === "add" ? D = "addEventListener" : D = "removeEventListener",
|
|
889
|
+
R === "add" ? D = "addEventListener" : D = "removeEventListener", n.value?.[D]("pointerdown", $, {
|
|
864
890
|
passive: !0
|
|
865
|
-
}), window[D]("pointermove", X, { passive: !0 }), window[D]("pointerup",
|
|
891
|
+
}), window[D]("pointermove", X, { passive: !0 }), window[D]("pointerup", x, { passive: !0 });
|
|
866
892
|
}
|
|
867
893
|
const te = new MutationObserver((R) => {
|
|
868
|
-
R.map((
|
|
894
|
+
R.map((ne) => ne.oldValue).join().includes("height") && g();
|
|
869
895
|
});
|
|
870
896
|
function g() {
|
|
871
|
-
r.value.top =
|
|
897
|
+
r.value.top = e.value?.getBoundingClientRect().top ?? 0, r.value.scrollHeight = e.value?.scrollHeight ?? 0, r.value.clientHeight = e.value?.clientHeight ?? 0;
|
|
872
898
|
}
|
|
873
|
-
function
|
|
899
|
+
function y() {
|
|
874
900
|
O(), setTimeout(() => {
|
|
875
|
-
|
|
901
|
+
p.value.clientHeight = n.value?.clientHeight ?? 0, G();
|
|
876
902
|
}, 150);
|
|
877
903
|
}
|
|
878
|
-
function
|
|
879
|
-
let
|
|
880
|
-
|
|
881
|
-
const ae =
|
|
904
|
+
function F(R, D, ne = "dynamic-styles") {
|
|
905
|
+
let q = document.getElementById(ne);
|
|
906
|
+
q || (q = document.createElement("style"), q.id = ne, document.head.appendChild(q));
|
|
907
|
+
const ae = q.sheet.cssRules, re = ae.length, m = `${R} { ${D} }`;
|
|
882
908
|
for (let _ = 0; _ < re; _++) {
|
|
883
909
|
const I = ae[_];
|
|
884
910
|
if (I.selectorText === R && I.style.cssText === D)
|
|
885
911
|
return;
|
|
886
912
|
}
|
|
887
|
-
|
|
913
|
+
q.sheet.insertRule(m, re);
|
|
888
914
|
}
|
|
889
915
|
function H() {
|
|
890
|
-
|
|
916
|
+
e.value && n.value ? (F(
|
|
891
917
|
".hide-scrollbar",
|
|
892
918
|
"scrollbar-width: none; -ms-overflow-style: none;"
|
|
893
|
-
),
|
|
919
|
+
), F(".hide-scrollbar::-webkit-scrollbar", "display: none"), e.value.classList.add("hide-scrollbar"), e.value.addEventListener("scroll", k, {
|
|
894
920
|
passive: !0
|
|
895
|
-
}), Z("add"), te.observe(
|
|
921
|
+
}), Z("add"), te.observe(e.value, {
|
|
896
922
|
subtree: !0,
|
|
897
923
|
attributeOldValue: !0,
|
|
898
924
|
attributeFilter: ["style"]
|
|
899
925
|
}), setTimeout(() => {
|
|
900
926
|
g();
|
|
901
|
-
}, 100),
|
|
927
|
+
}, 100), y()) : console.error("useScrollBar:", "\u521D\u59CB\u5316\u5931\u8D25!", { containerEl: e, sliderEl: n });
|
|
902
928
|
}
|
|
903
|
-
return
|
|
929
|
+
return Y(c, () => {
|
|
904
930
|
O(), i();
|
|
905
931
|
}), {
|
|
906
932
|
isScrollEnd: s,
|
|
907
|
-
isDragSlider:
|
|
933
|
+
isDragSlider: S,
|
|
908
934
|
offsetTop: u,
|
|
909
|
-
scrollTop:
|
|
910
|
-
scrollable:
|
|
911
|
-
sliderPos:
|
|
935
|
+
scrollTop: c,
|
|
936
|
+
scrollable: E,
|
|
937
|
+
sliderPos: U,
|
|
912
938
|
init: H,
|
|
913
939
|
modifySliderEventListener: Z
|
|
914
940
|
};
|
|
915
941
|
}
|
|
916
|
-
const
|
|
942
|
+
const Zt = (t) => (ce("data-v-edec7292"), t = t(), de(), t), Jt = /* @__PURE__ */ Zt(() => /* @__PURE__ */ T("div", { class: "default-slider" }, null, -1)), en = /* @__PURE__ */ K({
|
|
917
943
|
__name: "ScrollBar",
|
|
918
944
|
props: {
|
|
919
945
|
containerEl: null,
|
|
@@ -921,13 +947,13 @@ const Gt = (e) => (ce("data-v-edec7292"), e = e(), de(), e), Xt = /* @__PURE__ *
|
|
|
921
947
|
autoHeight: { type: Boolean },
|
|
922
948
|
performance: null
|
|
923
949
|
},
|
|
924
|
-
setup(
|
|
925
|
-
const
|
|
950
|
+
setup(t, { expose: e }) {
|
|
951
|
+
const n = t, l = !!ct().default, o = h(null), a = w(() => n.containerEl), s = Xt({
|
|
926
952
|
containerEl: a,
|
|
927
953
|
sliderEl: o,
|
|
928
|
-
autoHeight:
|
|
929
|
-
performance:
|
|
930
|
-
}), { scrollable: i, isScrollEnd: f, sliderPos:
|
|
954
|
+
autoHeight: l ? n.autoHeight : !0,
|
|
955
|
+
performance: n.performance
|
|
956
|
+
}), { scrollable: i, isScrollEnd: f, sliderPos: v } = s, c = h(!1), d = n.autoHide ? w(() => c.value || !f.value) : w(() => i.value);
|
|
931
957
|
oe(() => {
|
|
932
958
|
_e(() => {
|
|
933
959
|
s.init();
|
|
@@ -936,39 +962,39 @@ const Gt = (e) => (ce("data-v-edec7292"), e = e(), de(), e), Xt = /* @__PURE__ *
|
|
|
936
962
|
s.modifySliderEventListener("remove");
|
|
937
963
|
});
|
|
938
964
|
function u() {
|
|
939
|
-
|
|
965
|
+
c.value = !0;
|
|
940
966
|
}
|
|
941
967
|
function r() {
|
|
942
|
-
|
|
968
|
+
c.value = !1;
|
|
943
969
|
}
|
|
944
|
-
return
|
|
945
|
-
default:
|
|
946
|
-
|
|
970
|
+
return e({ uScrollBarReturn: s }), (p, S) => (M(), Me(Pe, null, {
|
|
971
|
+
default: He(() => [
|
|
972
|
+
dt(T("div", {
|
|
947
973
|
ref_key: "sliderRef",
|
|
948
974
|
ref: o,
|
|
949
975
|
class: "slider-wrapper",
|
|
950
976
|
onMouseenter: u,
|
|
951
977
|
onMouseleave: r,
|
|
952
|
-
style: W(B(
|
|
978
|
+
style: W(B(v))
|
|
953
979
|
}, [
|
|
954
|
-
ye(
|
|
955
|
-
|
|
980
|
+
ye(p.$slots, "default", {}, () => [
|
|
981
|
+
Jt
|
|
956
982
|
], !0)
|
|
957
983
|
], 36), [
|
|
958
|
-
[
|
|
984
|
+
[vt, B(d)]
|
|
959
985
|
])
|
|
960
986
|
]),
|
|
961
987
|
_: 3
|
|
962
988
|
}));
|
|
963
989
|
}
|
|
964
990
|
});
|
|
965
|
-
const
|
|
991
|
+
const Bn = /* @__PURE__ */ J(en, [["__scopeId", "data-v-edec7292"]]), tn = (t) => (ce("data-v-3d9ba957"), t = t(), de(), t), nn = { class: "pull-refresh" }, ln = {
|
|
966
992
|
key: 0,
|
|
967
993
|
class: "pull-arrow-circle"
|
|
968
|
-
},
|
|
994
|
+
}, on = {
|
|
969
995
|
key: 0,
|
|
970
996
|
class: "box-load"
|
|
971
|
-
},
|
|
997
|
+
}, sn = { class: "left-load" }, an = { class: "right-load" }, rn = /* @__PURE__ */ tn(() => /* @__PURE__ */ T("div", { class: "among-load" }, null, -1)), un = { class: "pull-arrow" }, cn = { key: 1 }, dn = /* @__PURE__ */ K({
|
|
972
998
|
__name: "PullRefresh",
|
|
973
999
|
props: {
|
|
974
1000
|
refresh: null,
|
|
@@ -976,82 +1002,82 @@ const $l = /* @__PURE__ */ J(Zt, [["__scopeId", "data-v-edec7292"]]), Jt = (e) =
|
|
|
976
1002
|
scrollTop: null,
|
|
977
1003
|
pullRefreshContainer: null
|
|
978
1004
|
},
|
|
979
|
-
setup(
|
|
980
|
-
const
|
|
1005
|
+
setup(t) {
|
|
1006
|
+
const e = t, n = 0.7, l = "#2EC1CC", o = h(-999), a = h(1), s = h(0), i = h(0.3), f = h(!1), v = h(0), c = h(0), d = h(0), u = h(0), r = h(0), p = h(), S = w(() => e.scrollTop), E = w(() => ({
|
|
981
1007
|
transition: `${u.value}ms`,
|
|
982
1008
|
transform: `translate3d(0,${o.value}px, 0) scale(${a.value})`
|
|
983
|
-
})),
|
|
984
|
-
borderColor:
|
|
1009
|
+
})), b = w(() => ({
|
|
1010
|
+
borderColor: l,
|
|
985
1011
|
transition: u.value,
|
|
986
1012
|
transform: `rotate(${100 + s.value}deg)`,
|
|
987
1013
|
opacity: i.value
|
|
988
1014
|
}));
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
}),
|
|
1015
|
+
Y(r, (x) => {
|
|
1016
|
+
x === 0 && (o.value = -50, i.value = 0.3);
|
|
1017
|
+
}), Y(c, (x) => {
|
|
992
1018
|
if (r.value === 2)
|
|
993
1019
|
return;
|
|
994
|
-
const O = Math.pow(
|
|
1020
|
+
const O = Math.pow(x, n);
|
|
995
1021
|
O === 0 && (o.value = -50), O <= 50 && O > 0 && (o.value = O - 45, s.value = Math.pow(O, 1.5), O > 15 ? f.value = !0 : f.value = !1), O > 50 && (o.value = 5, i.value = 1, r.value);
|
|
996
1022
|
});
|
|
997
|
-
const
|
|
998
|
-
|
|
999
|
-
},
|
|
1000
|
-
const O =
|
|
1001
|
-
|
|
1002
|
-
},
|
|
1003
|
-
if (
|
|
1023
|
+
const C = h(0), P = (x) => {
|
|
1024
|
+
C.value = x.touches[0].pageY;
|
|
1025
|
+
}, N = (x) => {
|
|
1026
|
+
const O = x.touches[0].pageY - C.value;
|
|
1027
|
+
C.value = x.touches[0].pageY, !e.refreshOff && (!e?.refresh || r.value !== 2 && S.value === 0 && (v.value === 0 && (v.value = x.touches[0].pageY), d.value = 0, $.value.style.transition = `${d.value}ms`, u.value = 0, c.value = x.touches[0].pageY - v.value, $.value.style.transform = `translate3d(0, ${Math.pow(c.value, n)}px, 0)`, O > 0 && x.preventDefault()));
|
|
1028
|
+
}, U = () => {
|
|
1029
|
+
if (e.refreshOff || !e?.refresh || r.value === 2)
|
|
1004
1030
|
return;
|
|
1005
|
-
|
|
1006
|
-
const
|
|
1007
|
-
$.value.style.transition = `${
|
|
1008
|
-
|
|
1031
|
+
v.value = 0, d.value = 300;
|
|
1032
|
+
const x = Math.pow(c.value, n);
|
|
1033
|
+
$.value.style.transition = `${d.value}ms`, x > 50 ? (r.value = 2, c.value = Math.pow(50, 1 / n), $.value.style.transform = `translate3d(0, ${Math.pow(c.value, n)}px, 0)`, u.value = 300, e?.refresh && e?.refresh().then(() => {
|
|
1034
|
+
p.value = "\u5237\u65B0\u6210\u529F";
|
|
1009
1035
|
}).catch(() => {
|
|
1010
|
-
|
|
1036
|
+
p.value = "\u5237\u65B0\u5931\u8D25";
|
|
1011
1037
|
}).finally(() => {
|
|
1012
1038
|
setTimeout(() => {
|
|
1013
|
-
r.value = 0,
|
|
1014
|
-
|
|
1015
|
-
|
|
1039
|
+
r.value = 0, c.value = 0, $.value.style.transform = `translate3d(0, ${Math.pow(
|
|
1040
|
+
c.value,
|
|
1041
|
+
n
|
|
1016
1042
|
)}px, 0)`, setTimeout(() => {
|
|
1017
|
-
|
|
1043
|
+
p.value = void 0;
|
|
1018
1044
|
}, u.value);
|
|
1019
1045
|
}, 600);
|
|
1020
|
-
})) : (
|
|
1046
|
+
})) : (c.value = 0, $.value.style.transform = `translate3d(0, ${Math.pow(c.value, n)}px, 0)`);
|
|
1021
1047
|
}, $ = h(null);
|
|
1022
1048
|
return oe(() => {
|
|
1023
1049
|
$.value = document.querySelector(
|
|
1024
|
-
|
|
1025
|
-
), $.value.addEventListener("touchstart",
|
|
1026
|
-
}), (
|
|
1027
|
-
|
|
1050
|
+
e.pullRefreshContainer
|
|
1051
|
+
), $.value.addEventListener("touchstart", P), $.value.addEventListener("touchmove", N), $.value.addEventListener("touchend", U);
|
|
1052
|
+
}), (x, O) => (M(), A("div", nn, [
|
|
1053
|
+
T("div", {
|
|
1028
1054
|
class: "pull-refresh-box",
|
|
1029
|
-
style: W(B(
|
|
1055
|
+
style: W(B(E))
|
|
1030
1056
|
}, [
|
|
1031
|
-
|
|
1032
|
-
r.value == 2 ? (M(),
|
|
1033
|
-
|
|
1034
|
-
|
|
1057
|
+
p.value ? (M(), A("div", cn, ke(p.value), 1)) : (M(), A("div", ln, [
|
|
1058
|
+
r.value == 2 ? (M(), A("div", on, [
|
|
1059
|
+
T("div", sn, [
|
|
1060
|
+
T("div", {
|
|
1035
1061
|
class: "left-circle",
|
|
1036
|
-
style: W({ backgroundColor:
|
|
1062
|
+
style: W({ backgroundColor: l })
|
|
1037
1063
|
}, null, 4)
|
|
1038
1064
|
]),
|
|
1039
|
-
|
|
1040
|
-
|
|
1065
|
+
T("div", an, [
|
|
1066
|
+
T("div", {
|
|
1041
1067
|
class: "right-circle",
|
|
1042
|
-
style: W({ backgroundColor:
|
|
1068
|
+
style: W({ backgroundColor: l })
|
|
1043
1069
|
}, null, 4)
|
|
1044
1070
|
]),
|
|
1045
|
-
|
|
1046
|
-
])) : (M(),
|
|
1071
|
+
rn
|
|
1072
|
+
])) : (M(), A("div", {
|
|
1047
1073
|
key: 1,
|
|
1048
1074
|
class: "pull-circle-line",
|
|
1049
|
-
style: W(B(
|
|
1075
|
+
style: W(B(b))
|
|
1050
1076
|
}, [
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
class:
|
|
1054
|
-
style: W({ borderBottomColor:
|
|
1077
|
+
T("div", un, [
|
|
1078
|
+
T("div", {
|
|
1079
|
+
class: Fe(["arrows", { opacity: f.value }]),
|
|
1080
|
+
style: W({ borderBottomColor: l })
|
|
1055
1081
|
}, null, 6)
|
|
1056
1082
|
])
|
|
1057
1083
|
], 4))
|
|
@@ -1060,10 +1086,10 @@ const $l = /* @__PURE__ */ J(Zt, [["__scopeId", "data-v-edec7292"]]), Jt = (e) =
|
|
|
1060
1086
|
]));
|
|
1061
1087
|
}
|
|
1062
1088
|
});
|
|
1063
|
-
const
|
|
1089
|
+
const vn = /* @__PURE__ */ J(dn, [["__scopeId", "data-v-3d9ba957"]]), fn = {
|
|
1064
1090
|
inheritAttrs: !1
|
|
1065
|
-
},
|
|
1066
|
-
...
|
|
1091
|
+
}, hn = /* @__PURE__ */ K({
|
|
1092
|
+
...fn,
|
|
1067
1093
|
__name: "VirtualList",
|
|
1068
1094
|
props: {
|
|
1069
1095
|
data: null,
|
|
@@ -1073,53 +1099,53 @@ const il = /* @__PURE__ */ J(ul, [["__scopeId", "data-v-3d9ba957"]]), cl = {
|
|
|
1073
1099
|
refreshOff: { type: Boolean, default: !1 }
|
|
1074
1100
|
},
|
|
1075
1101
|
emits: ["scrollEnd"],
|
|
1076
|
-
setup(
|
|
1077
|
-
const
|
|
1078
|
-
itemHeight: (u) =>
|
|
1079
|
-
overscan:
|
|
1102
|
+
setup(t, { expose: e, emit: n }) {
|
|
1103
|
+
const l = t, o = At(ft(l, "data"), {
|
|
1104
|
+
itemHeight: (u) => l.itemHeight(l.data[u]),
|
|
1105
|
+
overscan: l.overscan,
|
|
1080
1106
|
scrollEndHook: () => {
|
|
1081
|
-
|
|
1107
|
+
n("scrollEnd");
|
|
1082
1108
|
}
|
|
1083
1109
|
}), {
|
|
1084
1110
|
list: a,
|
|
1085
1111
|
containerProps: s,
|
|
1086
1112
|
wrapperProps: i,
|
|
1087
1113
|
innerProps: f,
|
|
1088
|
-
getItemHeightData:
|
|
1089
|
-
scrollTop:
|
|
1114
|
+
getItemHeightData: v,
|
|
1115
|
+
scrollTop: c
|
|
1090
1116
|
} = o;
|
|
1091
|
-
|
|
1117
|
+
e({
|
|
1092
1118
|
vListReturn: o
|
|
1093
1119
|
});
|
|
1094
|
-
const
|
|
1095
|
-
return (u, r) => (M(),
|
|
1096
|
-
|
|
1097
|
-
refresh:
|
|
1098
|
-
refreshOff:
|
|
1099
|
-
scrollTop: B(
|
|
1100
|
-
pullRefreshContainer: "#" +
|
|
1120
|
+
const d = "virtualListWrapper" + new Date().getTime();
|
|
1121
|
+
return (u, r) => (M(), A(Ee, null, [
|
|
1122
|
+
ht(vn, {
|
|
1123
|
+
refresh: t.refresh,
|
|
1124
|
+
refreshOff: t.refreshOff,
|
|
1125
|
+
scrollTop: B(c),
|
|
1126
|
+
pullRefreshContainer: "#" + d
|
|
1101
1127
|
}, null, 8, ["refresh", "refreshOff", "scrollTop", "pullRefreshContainer"]),
|
|
1102
|
-
|
|
1128
|
+
T("div", {
|
|
1103
1129
|
class: "virtualListWrapper",
|
|
1104
|
-
id:
|
|
1130
|
+
id: d
|
|
1105
1131
|
}, [
|
|
1106
|
-
|
|
1107
|
-
onScrollPassive: r[0] || (r[0] = (...
|
|
1132
|
+
T("div", pt({
|
|
1133
|
+
onScrollPassive: r[0] || (r[0] = (...p) => B(s).onScroll && B(s).onScroll(...p)),
|
|
1108
1134
|
ref: B(s).ref,
|
|
1109
1135
|
class: "virtualList"
|
|
1110
1136
|
}, u.$attrs), [
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
(M(!0),
|
|
1114
|
-
key:
|
|
1137
|
+
T("div", he(pe(B(i))), [
|
|
1138
|
+
T("div", he(pe(B(f))), [
|
|
1139
|
+
(M(!0), A(Ee, null, mt(B(a), ({ index: p, data: S }) => (M(), A("div", {
|
|
1140
|
+
key: p,
|
|
1115
1141
|
style: W({
|
|
1116
|
-
height: `${B(
|
|
1142
|
+
height: `${B(v)(p).height}px`,
|
|
1117
1143
|
display: "flex"
|
|
1118
1144
|
})
|
|
1119
1145
|
}, [
|
|
1120
1146
|
ye(u.$slots, "default", {
|
|
1121
|
-
data:
|
|
1122
|
-
index:
|
|
1147
|
+
data: S,
|
|
1148
|
+
index: p
|
|
1123
1149
|
}, void 0, !0)
|
|
1124
1150
|
], 4))), 128))
|
|
1125
1151
|
], 16)
|
|
@@ -1129,72 +1155,73 @@ const il = /* @__PURE__ */ J(ul, [["__scopeId", "data-v-3d9ba957"]]), cl = {
|
|
|
1129
1155
|
], 64));
|
|
1130
1156
|
}
|
|
1131
1157
|
});
|
|
1132
|
-
const
|
|
1158
|
+
const In = /* @__PURE__ */ J(hn, [["__scopeId", "data-v-e0fb787f"]]), we = (t) => (ce("data-v-40e00f20"), t = t(), de(), t), pn = { style: { position: "absolute" } }, mn = /* @__PURE__ */ we(() => /* @__PURE__ */ T("div", { class: "wrapper" }, null, -1)), gn = ["width", "height"], _n = /* @__PURE__ */ we(() => /* @__PURE__ */ T("title", null, "logo", -1)), yn = /* @__PURE__ */ we(() => /* @__PURE__ */ T("g", {
|
|
1133
1159
|
id: "group-1",
|
|
1134
1160
|
stroke: "none",
|
|
1135
1161
|
"stroke-width": "1",
|
|
1136
1162
|
fill: "none",
|
|
1137
1163
|
"fill-rule": "evenodd"
|
|
1138
1164
|
}, [
|
|
1139
|
-
/* @__PURE__ */
|
|
1165
|
+
/* @__PURE__ */ T("path", {
|
|
1140
1166
|
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",
|
|
1141
1167
|
id: "path-1",
|
|
1142
1168
|
fill: "#FFF"
|
|
1143
1169
|
})
|
|
1144
|
-
], -1)),
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
],
|
|
1170
|
+
], -1)), bn = [
|
|
1171
|
+
_n,
|
|
1172
|
+
yn
|
|
1173
|
+
], wn = /* @__PURE__ */ K({
|
|
1148
1174
|
__name: "Loading",
|
|
1149
1175
|
props: {
|
|
1150
1176
|
width: { default: "90" },
|
|
1151
1177
|
height: { default: "90" },
|
|
1152
1178
|
duration: { default: 1300 }
|
|
1153
1179
|
},
|
|
1154
|
-
setup(
|
|
1155
|
-
const
|
|
1156
|
-
|
|
1157
|
-
"703ef503":
|
|
1180
|
+
setup(t) {
|
|
1181
|
+
const e = t;
|
|
1182
|
+
gt((l) => ({
|
|
1183
|
+
"703ef503": n
|
|
1158
1184
|
}));
|
|
1159
|
-
const
|
|
1160
|
-
return (
|
|
1161
|
-
|
|
1162
|
-
(M(),
|
|
1185
|
+
const n = `${e.duration}ms`;
|
|
1186
|
+
return (l, o) => (M(), A("div", pn, [
|
|
1187
|
+
mn,
|
|
1188
|
+
(M(), A("svg", {
|
|
1163
1189
|
style: { position: "relative" },
|
|
1164
|
-
width:
|
|
1165
|
-
height:
|
|
1190
|
+
width: t.width,
|
|
1191
|
+
height: t.height,
|
|
1166
1192
|
viewBox: "0 0 260 260",
|
|
1167
1193
|
version: "1.1",
|
|
1168
1194
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1169
|
-
},
|
|
1195
|
+
}, bn, 8, gn))
|
|
1170
1196
|
]));
|
|
1171
1197
|
}
|
|
1172
1198
|
});
|
|
1173
|
-
const
|
|
1199
|
+
const Mn = /* @__PURE__ */ J(wn, [["__scopeId", "data-v-40e00f20"]]);
|
|
1174
1200
|
export {
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1201
|
+
$n as DefaultLoading,
|
|
1202
|
+
Mn as Loading,
|
|
1203
|
+
vn as PullRefresh,
|
|
1204
|
+
Bn as ScrollBar,
|
|
1205
|
+
Rn as SvgIcon,
|
|
1206
|
+
Dn as ToastCreator,
|
|
1207
|
+
In as VirtualList,
|
|
1208
|
+
Qe as allSelectedKey,
|
|
1183
1209
|
Ft as closeDialogKey,
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1210
|
+
Ln as dialogController,
|
|
1211
|
+
Je as isAllSelectedKey,
|
|
1212
|
+
qe as isSelectedKey,
|
|
1213
|
+
Xe as selectAllKey,
|
|
1214
|
+
Ge as selectKey,
|
|
1215
|
+
Ke as toggleAllKey,
|
|
1216
|
+
Ue as toggleKey,
|
|
1217
|
+
et as unselectAllKey,
|
|
1218
|
+
Ze as unselectKey,
|
|
1219
|
+
On as useDelayLoad,
|
|
1220
|
+
Wt as useDelayLoadComp,
|
|
1221
|
+
tt as useDragSelect,
|
|
1222
|
+
Tn as useDragSelectByMobile,
|
|
1223
|
+
xn as useDragSelectByPc,
|
|
1224
|
+
Sn as useSelectable,
|
|
1225
|
+
En as useSelectableInjectors,
|
|
1199
1226
|
At as useVirtualList
|
|
1200
1227
|
};
|