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