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