@lazycatcloud/lzc-toolkit 0.0.88 → 0.0.90
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 +533 -527
- package/dist/index.umd.js +11 -5
- package/dist/style.css +1 -1
- package/dist/types/scroll-bar/ScrollBar.vue.d.ts +1 -0
- package/dist/types/scroll-bar/use/type.d.ts +1 -0
- package/package.json +1 -1
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 N, 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 Ne(e, t = !0) {
|
|
99
|
+
$e() ? ne(e) : t ? e() : me(e);
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function je(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(), Ne(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(() => je(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(() => je(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 && Ne(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,420 +220,421 @@ 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 j =
|
|
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 j = g - F.top;
|
|
452
454
|
if (j < S)
|
|
453
|
-
return
|
|
455
|
+
return -$ * X(1 - j / 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 j =
|
|
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 j = L.sheet.cssRules, te = j.length, lt = `${g} { ${_} }`;
|
|
475
|
+
for (let ce = 0; ce < te; ce++) {
|
|
476
|
+
const be = j[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, j) => {
|
|
515
|
+
const te = L.getAttribute(`${e}`);
|
|
516
|
+
g.push(te), ee(L.getBoundingClientRect()) ? (_ === null && (_ = j), _ = Math.min(_, j), F = Math.max(F, j)) : (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
|
-
}
|
|
559
|
-
|
|
560
|
+
}`,
|
|
561
|
+
{ id: "styletag_lzc_dragselect" }
|
|
562
|
+
), d = N({
|
|
560
563
|
render() {
|
|
561
|
-
return
|
|
564
|
+
return Q("div", {
|
|
562
565
|
id: "selectBoxEl",
|
|
563
566
|
class: "drag-select-box",
|
|
564
567
|
style: v.value
|
|
565
568
|
});
|
|
566
569
|
}
|
|
567
570
|
});
|
|
568
|
-
function
|
|
571
|
+
function u(y) {
|
|
569
572
|
y.button === 0 && a(y.x, y.y);
|
|
570
573
|
}
|
|
571
|
-
function
|
|
574
|
+
function f(y) {
|
|
572
575
|
s(y.x, y.y);
|
|
573
576
|
}
|
|
574
|
-
function
|
|
575
|
-
y.composedPath().some((z) => z?.getAttribute?.(e.attribute)) ||
|
|
577
|
+
function T(y) {
|
|
578
|
+
y.composedPath().some((z) => z?.getAttribute?.(e.attribute)) || h(), r();
|
|
576
579
|
}
|
|
577
|
-
function
|
|
580
|
+
function m(y) {
|
|
578
581
|
try {
|
|
579
582
|
if (!t.init(y))
|
|
580
583
|
throw "\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";
|
|
581
584
|
if (!t.containerEl?.value)
|
|
582
585
|
return !1;
|
|
583
|
-
|
|
584
|
-
} catch (
|
|
585
|
-
console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25",
|
|
586
|
+
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);
|
|
587
|
+
} catch (M) {
|
|
588
|
+
console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25", M);
|
|
586
589
|
}
|
|
587
590
|
}
|
|
588
|
-
function
|
|
589
|
-
|
|
591
|
+
function C() {
|
|
592
|
+
c(), n.disconnect(), t.containerEl.value?.removeEventListener("scroll", l), t.containerEl.value?.removeEventListener("mousedown", u), window.removeEventListener("mousemove", f), window.removeEventListener("mouseup", T);
|
|
590
593
|
}
|
|
591
|
-
return { init:
|
|
594
|
+
return { init: m, unMount: C };
|
|
592
595
|
}
|
|
593
596
|
function On(e, t, n = 600) {
|
|
594
|
-
const o =
|
|
597
|
+
const o = et({
|
|
595
598
|
...e,
|
|
596
599
|
selectWay: "row",
|
|
597
600
|
scrollOptions: {
|
|
598
601
|
startSpeed: 5,
|
|
599
602
|
maxSpeed: 5
|
|
600
603
|
}
|
|
601
|
-
}), { observer: l } = o, { onScroll: a, dragStart: s, dragMove:
|
|
604
|
+
}), { observer: l } = o, { onScroll: a, dragStart: s, dragMove: r, dragEnd: h } = o;
|
|
602
605
|
let v;
|
|
603
|
-
function
|
|
606
|
+
function i() {
|
|
604
607
|
clearTimeout(v);
|
|
605
608
|
}
|
|
606
|
-
function
|
|
607
|
-
|
|
608
|
-
const { clientX: y, clientY:
|
|
609
|
-
s(y,
|
|
609
|
+
function c(m) {
|
|
610
|
+
i(), m.composedPath().some((y) => !!y?.getAttribute?.(e.attribute)) && (v = setTimeout(() => {
|
|
611
|
+
const { clientX: y, clientY: M } = m.targetTouches[0];
|
|
612
|
+
s(y, M), t?.(), r(y, M, () => m.preventDefault()), m.preventDefault();
|
|
610
613
|
}, n));
|
|
611
614
|
}
|
|
612
|
-
function
|
|
613
|
-
|
|
614
|
-
const { clientX:
|
|
615
|
-
|
|
615
|
+
function d(m) {
|
|
616
|
+
i();
|
|
617
|
+
const { clientX: C, clientY: y } = m.targetTouches[0];
|
|
618
|
+
r(C, y, () => m.preventDefault());
|
|
616
619
|
}
|
|
617
|
-
function
|
|
618
|
-
|
|
620
|
+
function u() {
|
|
621
|
+
i(), h();
|
|
619
622
|
}
|
|
620
|
-
function m
|
|
623
|
+
function f(m) {
|
|
621
624
|
try {
|
|
622
|
-
if (!o.init(
|
|
625
|
+
if (!o.init(m))
|
|
623
626
|
throw "\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";
|
|
624
627
|
if (!o.containerEl?.value)
|
|
625
628
|
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",
|
|
629
|
+
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);
|
|
630
|
+
} catch (C) {
|
|
631
|
+
console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25", C);
|
|
629
632
|
}
|
|
630
633
|
}
|
|
631
|
-
function
|
|
632
|
-
l.disconnect(), o.containerEl.value?.removeEventListener("scroll", a), o.containerEl.value?.removeEventListener("touchstart",
|
|
634
|
+
function T() {
|
|
635
|
+
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
636
|
}
|
|
634
|
-
return { init:
|
|
637
|
+
return { init: f, unMount: T };
|
|
635
638
|
}
|
|
636
639
|
const kt = Symbol(), zt = {
|
|
637
640
|
key: 0,
|
|
@@ -648,18 +651,18 @@ const kt = Symbol(), zt = {
|
|
|
648
651
|
const n = e, o = () => {
|
|
649
652
|
n.closeOnClickOverlay && t("update:visiable", !1);
|
|
650
653
|
};
|
|
651
|
-
return W(kt, () => t("update:visiable", !1)), (l, a) => (
|
|
652
|
-
default:
|
|
653
|
-
e.visiable ?
|
|
654
|
+
return W(kt, () => t("update:visiable", !1)), (l, a) => (I(), Ie(Be, { name: "modal" }, {
|
|
655
|
+
default: Me(() => [
|
|
656
|
+
e.visiable ? Pe((I(), A("div", zt, [
|
|
654
657
|
x("div", {
|
|
655
|
-
onMousedown: a[0] || (a[0] =
|
|
658
|
+
onMousedown: a[0] || (a[0] = He(() => {
|
|
656
659
|
}, ["stop"])),
|
|
657
|
-
class:
|
|
660
|
+
class: Ae(["lzc-dialog", e.dialogClass])
|
|
658
661
|
}, [
|
|
659
|
-
|
|
662
|
+
ge(l.$slots, "default", {}, void 0, !0)
|
|
660
663
|
], 34)
|
|
661
664
|
])), [
|
|
662
|
-
[
|
|
665
|
+
[R(_t), () => o()]
|
|
663
666
|
]) : dt("", !0)
|
|
664
667
|
]),
|
|
665
668
|
_: 3
|
|
@@ -676,7 +679,7 @@ function Dn(e) {
|
|
|
676
679
|
function t(n, o) {
|
|
677
680
|
const l = document.createElement("div"), a = {
|
|
678
681
|
setup() {
|
|
679
|
-
return () =>
|
|
682
|
+
return () => Q(
|
|
680
683
|
Yt,
|
|
681
684
|
{
|
|
682
685
|
visiable: !0,
|
|
@@ -686,12 +689,12 @@ function Dn(e) {
|
|
|
686
689
|
...e
|
|
687
690
|
},
|
|
688
691
|
{
|
|
689
|
-
default: () =>
|
|
692
|
+
default: () => Q(n, o)
|
|
690
693
|
}
|
|
691
694
|
);
|
|
692
695
|
}
|
|
693
696
|
};
|
|
694
|
-
return document.body.appendChild(l),
|
|
697
|
+
return document.body.appendChild(l), se(Q(a), l), {
|
|
695
698
|
close: () => l?.remove()
|
|
696
699
|
};
|
|
697
700
|
}
|
|
@@ -704,23 +707,23 @@ function Nt({
|
|
|
704
707
|
componentProps: t,
|
|
705
708
|
delay: n = 300
|
|
706
709
|
}) {
|
|
707
|
-
const
|
|
710
|
+
const l = `lzc-delay-loading-${`${new Date().getTime()}`}`, a = `${n}ms`, { load: s } = _e(
|
|
708
711
|
`@keyframes lzcDelayLoad {
|
|
709
712
|
to {
|
|
710
713
|
opacity: 1;
|
|
711
714
|
}
|
|
712
715
|
}
|
|
713
|
-
|
|
716
|
+
.${l} {
|
|
714
717
|
opacity: 0;
|
|
715
|
-
animation: lzcDelayLoad 0s ${
|
|
718
|
+
animation: lzcDelayLoad 0s ${a} forwards;
|
|
716
719
|
}`
|
|
717
720
|
);
|
|
718
721
|
return { LoadingComp: N({
|
|
719
722
|
setup() {
|
|
720
|
-
const
|
|
721
|
-
return
|
|
722
|
-
|
|
723
|
-
}), () =>
|
|
723
|
+
const h = Lt();
|
|
724
|
+
return ne(() => {
|
|
725
|
+
s(), h.value.classList.add(l);
|
|
726
|
+
}), () => Q(e, t);
|
|
724
727
|
}
|
|
725
728
|
}) };
|
|
726
729
|
}
|
|
@@ -733,7 +736,7 @@ function $n({
|
|
|
733
736
|
component: e,
|
|
734
737
|
componentProps: t,
|
|
735
738
|
delay: n
|
|
736
|
-
}), l =
|
|
739
|
+
}), l = p(!1);
|
|
737
740
|
function a() {
|
|
738
741
|
l.value = !0;
|
|
739
742
|
}
|
|
@@ -742,7 +745,7 @@ function $n({
|
|
|
742
745
|
}
|
|
743
746
|
return { LoadingComp: o, loading: l, load: a, unload: s };
|
|
744
747
|
}
|
|
745
|
-
const jt = (e) => (
|
|
748
|
+
const jt = (e) => (re("data-v-d0ad7597"), e = e(), ue(), e), Vt = /* @__PURE__ */ jt(() => /* @__PURE__ */ x("div", { class: "ldio-mm5gwljcryb" }, [
|
|
746
749
|
/* @__PURE__ */ x("div")
|
|
747
750
|
], -1)), Kt = [
|
|
748
751
|
Vt
|
|
@@ -753,10 +756,10 @@ const jt = (e) => (ce("data-v-d0ad7597"), e = e(), de(), e), Vt = /* @__PURE__ *
|
|
|
753
756
|
height: { default: 24 }
|
|
754
757
|
},
|
|
755
758
|
setup(e) {
|
|
756
|
-
return
|
|
759
|
+
return Fe((t) => ({
|
|
757
760
|
d8dfa9f0: e.width + "px",
|
|
758
761
|
"2941c2e5": e.height + "px"
|
|
759
|
-
})), (t, n) => (
|
|
762
|
+
})), (t, n) => (I(), A("div", ve(fe(t.$attrs)), Kt, 16));
|
|
760
763
|
}
|
|
761
764
|
});
|
|
762
765
|
const Rn = /* @__PURE__ */ Z(Ut, [["__scopeId", "data-v-d0ad7597"]]), qt = ["onClick"], Qt = /* @__PURE__ */ N({
|
|
@@ -767,7 +770,7 @@ const Rn = /* @__PURE__ */ Z(Ut, [["__scopeId", "data-v-d0ad7597"]]), qt = ["onC
|
|
|
767
770
|
buttonClickEvent: null
|
|
768
771
|
},
|
|
769
772
|
setup(e) {
|
|
770
|
-
const t = e, n =
|
|
773
|
+
const t = e, n = p(), o = p(), l = p(), a = w(() => {
|
|
771
774
|
switch (t.position) {
|
|
772
775
|
case "top":
|
|
773
776
|
return 10;
|
|
@@ -776,14 +779,14 @@ const Rn = /* @__PURE__ */ Z(Ut, [["__scopeId", "data-v-d0ad7597"]]), qt = ["onC
|
|
|
776
779
|
case "bottom":
|
|
777
780
|
return 85;
|
|
778
781
|
}
|
|
779
|
-
}), s =
|
|
782
|
+
}), s = w(() => ({
|
|
780
783
|
position: "absolute",
|
|
781
784
|
borderRadius: "10px",
|
|
782
785
|
backgroundColor: "rgba(0, 0, 0, 0.8)",
|
|
783
786
|
padding: "14px 19px",
|
|
784
787
|
top: `calc(${a.value}% - ${l.value}px)`,
|
|
785
788
|
left: `calc(50% - ${o.value}px)`
|
|
786
|
-
})),
|
|
789
|
+
})), r = w(() => ({
|
|
787
790
|
width: "fit-content",
|
|
788
791
|
display: "flex",
|
|
789
792
|
justifyContent: "center",
|
|
@@ -791,44 +794,44 @@ const Rn = /* @__PURE__ */ Z(Ut, [["__scopeId", "data-v-d0ad7597"]]), qt = ["onC
|
|
|
791
794
|
color: "white",
|
|
792
795
|
fontSize: "14px"
|
|
793
796
|
}));
|
|
794
|
-
function
|
|
797
|
+
function h() {
|
|
795
798
|
!t.buttonClickEvent || t.buttonClickEvent();
|
|
796
799
|
}
|
|
797
|
-
return
|
|
800
|
+
return me(() => {
|
|
798
801
|
o.value = n.value.offsetWidth / 2, l.value = n.value.offsetHeight / 2;
|
|
799
|
-
}), (v,
|
|
800
|
-
onClick:
|
|
802
|
+
}), (v, i) => (I(), A("div", {
|
|
803
|
+
onClick: He(h, ["stop"]),
|
|
801
804
|
id: "toastWrapper",
|
|
802
805
|
ref_key: "toastWrapper",
|
|
803
806
|
ref: n,
|
|
804
807
|
class: "toastWrapper",
|
|
805
|
-
style: Y([
|
|
808
|
+
style: Y([R(s), { zIndex: 9999999 }])
|
|
806
809
|
}, [
|
|
807
810
|
x("div", {
|
|
808
|
-
style: Y(
|
|
811
|
+
style: Y(R(r))
|
|
809
812
|
}, [
|
|
810
|
-
x("span", null,
|
|
813
|
+
x("span", null, ke(e.message), 1)
|
|
811
814
|
], 4)
|
|
812
815
|
], 12, qt));
|
|
813
816
|
}
|
|
814
817
|
});
|
|
815
|
-
const Xt = /* @__PURE__ */ Z(Qt, [["__scopeId", "data-v-533e986b"]]),
|
|
818
|
+
const Xt = /* @__PURE__ */ Z(Qt, [["__scopeId", "data-v-533e986b"]]), De = {
|
|
816
819
|
message: "\u61D2\u732B\u4E91 Yes!!!",
|
|
817
820
|
position: "middle",
|
|
818
821
|
duration: 1500,
|
|
819
822
|
buttonClickEvent: () => {
|
|
820
823
|
}
|
|
821
824
|
};
|
|
822
|
-
class
|
|
825
|
+
class In {
|
|
823
826
|
options;
|
|
824
827
|
container;
|
|
825
828
|
constructor(t) {
|
|
826
829
|
this.options = t, this.container = document.createElement("div");
|
|
827
830
|
}
|
|
828
831
|
present() {
|
|
829
|
-
const t =
|
|
830
|
-
|
|
831
|
-
const n = this.options.duration ||
|
|
832
|
+
const t = Q(Q(Xt), { ...De, ...this.options });
|
|
833
|
+
se(t, this.container), document.body.insertBefore(this.container, document.body.firstChild);
|
|
834
|
+
const n = this.options.duration || De.duration;
|
|
832
835
|
setTimeout(() => {
|
|
833
836
|
this.dismiss();
|
|
834
837
|
}, n);
|
|
@@ -839,12 +842,12 @@ class Bn {
|
|
|
839
842
|
"#toastWrapper"
|
|
840
843
|
);
|
|
841
844
|
t.style.opacity = "0", t.style.transition = "opacity 0.4s ease-in", setTimeout(() => {
|
|
842
|
-
this.container && (
|
|
845
|
+
this.container && (se(null, this.container), document.body.removeChild(this.container));
|
|
843
846
|
}, 500);
|
|
844
847
|
}
|
|
845
848
|
}
|
|
846
849
|
}
|
|
847
|
-
const Gt = ["xlink:href", "fill", "color"],
|
|
850
|
+
const Gt = ["xlink:href", "fill", "color"], Bn = /* @__PURE__ */ N({
|
|
848
851
|
__name: "SvgIcon",
|
|
849
852
|
props: {
|
|
850
853
|
name: null,
|
|
@@ -854,17 +857,17 @@ const Gt = ["xlink:href", "fill", "color"], In = /* @__PURE__ */ N({
|
|
|
854
857
|
height: null
|
|
855
858
|
},
|
|
856
859
|
setup(e) {
|
|
857
|
-
const t = e, n =
|
|
860
|
+
const t = e, n = w(() => `#${t.prefix}-${t.name}`), o = w(() => ({
|
|
858
861
|
width: `${t.width ?? t.height}px`,
|
|
859
862
|
height: `${t.height ?? t.width}px`,
|
|
860
863
|
aspectRatio: t.width && t.height ? void 0 : "1/1"
|
|
861
864
|
}));
|
|
862
|
-
return (l, a) => (
|
|
865
|
+
return (l, a) => (I(), A("svg", {
|
|
863
866
|
"aria-hidden": "",
|
|
864
|
-
style: Y(
|
|
867
|
+
style: Y(R(o))
|
|
865
868
|
}, [
|
|
866
869
|
x("use", {
|
|
867
|
-
"xlink:href":
|
|
870
|
+
"xlink:href": R(n),
|
|
868
871
|
fill: e.color,
|
|
869
872
|
color: e.color
|
|
870
873
|
}, null, 8, Gt)
|
|
@@ -877,158 +880,161 @@ function Zt(e) {
|
|
|
877
880
|
sliderEl: n,
|
|
878
881
|
autoHeight: o,
|
|
879
882
|
performance: l = {},
|
|
880
|
-
maxHeightRatio: a = 0.9
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
883
|
+
maxHeightRatio: a = 0.9,
|
|
884
|
+
observeMethod: s = "classList"
|
|
885
|
+
} = e, r = p(!0), h = Ye(X, 100);
|
|
886
|
+
let v, i = "";
|
|
887
|
+
const c = p(0), d = p(0), u = p(0), f = p({
|
|
884
888
|
top: 0,
|
|
885
889
|
scrollTop: 0,
|
|
886
890
|
scrollHeight: 0,
|
|
887
891
|
clientHeight: 0
|
|
888
|
-
}),
|
|
892
|
+
}), T = p({
|
|
889
893
|
clientHeight: 0
|
|
890
|
-
}),
|
|
891
|
-
|
|
894
|
+
}), 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(
|
|
895
|
+
f.value.clientHeight / f.value.scrollHeight,
|
|
892
896
|
0.05
|
|
893
|
-
)),
|
|
897
|
+
)), U = w(() => z.value > a ? 0 : z.value * f.value.clientHeight), D = w(() => ({
|
|
894
898
|
willChange: "transform",
|
|
895
|
-
transform: `translate3d(0,${
|
|
896
|
-
height: o ? `${
|
|
899
|
+
transform: `translate3d(0,${u.value}px,0)`,
|
|
900
|
+
height: o ? `${U.value}px` : void 0
|
|
897
901
|
}));
|
|
898
|
-
function
|
|
899
|
-
|
|
902
|
+
function S(O) {
|
|
903
|
+
q(), d.value = O.clientY - n.value.getBoundingClientRect().top || 1, i = getComputedStyle(t.value).scrollBehavior, i === "smooth" && (t.value.style.scrollBehavior = "unset");
|
|
900
904
|
}
|
|
901
|
-
function
|
|
902
|
-
t.value.style.scrollBehavior =
|
|
905
|
+
function $() {
|
|
906
|
+
t.value.style.scrollBehavior = i, d.value = 0, h();
|
|
903
907
|
}
|
|
904
|
-
function
|
|
905
|
-
|
|
908
|
+
function q() {
|
|
909
|
+
r.value = !1;
|
|
906
910
|
}
|
|
907
911
|
function X() {
|
|
908
|
-
|
|
912
|
+
m.value || (r.value = !0);
|
|
909
913
|
}
|
|
910
|
-
function
|
|
911
|
-
if (!
|
|
914
|
+
function k(O) {
|
|
915
|
+
if (!m.value)
|
|
912
916
|
return;
|
|
913
|
-
let
|
|
914
|
-
|
|
915
|
-
top:
|
|
917
|
+
let B = O.clientY - f.value.top - d.value;
|
|
918
|
+
B < 0 ? u.value = 0 : B >= y.value ? u.value = y.value : u.value = B, t.value.scrollTo({
|
|
919
|
+
top: u.value / y.value * M.value
|
|
916
920
|
});
|
|
917
921
|
}
|
|
918
|
-
function
|
|
919
|
-
|
|
922
|
+
function J() {
|
|
923
|
+
m.value || oe();
|
|
920
924
|
}
|
|
921
|
-
function
|
|
922
|
-
cancelAnimationFrame(
|
|
925
|
+
function oe() {
|
|
926
|
+
cancelAnimationFrame(v), v = requestAnimationFrame(ee);
|
|
923
927
|
}
|
|
924
|
-
function
|
|
925
|
-
t.value && (c.value = l.scrollTop?.value ?? t.value.scrollTop,
|
|
928
|
+
function ee() {
|
|
929
|
+
t.value && (c.value = l.scrollTop?.value ?? t.value.scrollTop, u.value = c.value / M.value * y.value);
|
|
926
930
|
}
|
|
927
|
-
function G(
|
|
928
|
-
let
|
|
929
|
-
|
|
931
|
+
function G(O) {
|
|
932
|
+
let B = "addEventListener";
|
|
933
|
+
O === "add" ? B = "addEventListener" : B = "removeEventListener", n.value?.[B]("pointerdown", S, {
|
|
930
934
|
passive: !0
|
|
931
|
-
}), window[
|
|
935
|
+
}), window[B]("pointermove", k, { passive: !0 }), window[B]("pointerup", $, { passive: !0 });
|
|
932
936
|
}
|
|
933
|
-
const
|
|
934
|
-
|
|
937
|
+
const E = new MutationObserver((O) => {
|
|
938
|
+
(s == "classList" || O.map((ie) => ie.oldValue).join().includes("height")) && b();
|
|
935
939
|
});
|
|
936
|
-
function
|
|
937
|
-
|
|
940
|
+
function b() {
|
|
941
|
+
f.value.top = t.value?.getBoundingClientRect().top ?? 0, f.value.scrollHeight = t.value?.scrollHeight ?? 0, f.value.clientHeight = t.value?.clientHeight ?? 0;
|
|
938
942
|
}
|
|
939
|
-
function
|
|
940
|
-
|
|
941
|
-
|
|
943
|
+
function P() {
|
|
944
|
+
q(), setTimeout(() => {
|
|
945
|
+
T.value.clientHeight = n.value?.clientHeight ?? 0, X();
|
|
942
946
|
}, 150);
|
|
943
947
|
}
|
|
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 });
|
|
948
|
+
function H() {
|
|
949
|
+
if (t.value && n.value) {
|
|
950
|
+
t.value.classList.add("hide-scrollbar"), t.value.addEventListener("scroll", J, {
|
|
951
|
+
passive: !0
|
|
952
|
+
}), G("add");
|
|
953
|
+
const O = {};
|
|
954
|
+
s === "classList" ? Object.assign(O, { subtree: !0, childList: !0 }) : Object.assign(O, {
|
|
955
|
+
subtree: !0,
|
|
956
|
+
attributeOldValue: !0,
|
|
957
|
+
attributeFilter: ["style"]
|
|
958
|
+
}), E.observe(t.value, O), setTimeout(() => {
|
|
959
|
+
b();
|
|
960
|
+
}, 100), P();
|
|
961
|
+
} else
|
|
962
|
+
console.error("useScrollBar:", "\u521D\u59CB\u5316\u5931\u8D25!", { containerEl: t, sliderEl: n });
|
|
968
963
|
}
|
|
969
964
|
return K(c, () => {
|
|
970
|
-
|
|
965
|
+
q(), h();
|
|
971
966
|
}), {
|
|
972
|
-
isScrollEnd:
|
|
973
|
-
isDragSlider:
|
|
974
|
-
offsetTop:
|
|
967
|
+
isScrollEnd: r,
|
|
968
|
+
isDragSlider: m,
|
|
969
|
+
offsetTop: u,
|
|
975
970
|
scrollTop: c,
|
|
976
|
-
scrollable:
|
|
977
|
-
sliderPos:
|
|
978
|
-
init:
|
|
971
|
+
scrollable: C,
|
|
972
|
+
sliderPos: D,
|
|
973
|
+
init: H,
|
|
979
974
|
modifySliderEventListener: G
|
|
980
975
|
};
|
|
981
976
|
}
|
|
982
|
-
const Jt = (e) => (
|
|
977
|
+
const Jt = (e) => (re("data-v-0abfb56c"), e = e(), ue(), e), en = /* @__PURE__ */ Jt(() => /* @__PURE__ */ x("div", { class: "default-slider" }, null, -1)), tn = /* @__PURE__ */ N({
|
|
983
978
|
__name: "ScrollBar",
|
|
984
979
|
props: {
|
|
985
980
|
containerEl: null,
|
|
986
981
|
autoHide: { type: Boolean },
|
|
987
982
|
autoHeight: { type: Boolean },
|
|
983
|
+
observeMethod: null,
|
|
988
984
|
performance: null
|
|
989
985
|
},
|
|
990
986
|
setup(e, { expose: t }) {
|
|
991
|
-
const n = e, o = !!vt().default, l =
|
|
987
|
+
const n = e, o = !!vt().default, l = p(null), a = w(() => n.containerEl), s = Zt({
|
|
992
988
|
containerEl: a,
|
|
993
989
|
sliderEl: l,
|
|
994
990
|
autoHeight: o ? n.autoHeight : !0,
|
|
995
|
-
performance: n.performance
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
991
|
+
performance: n.performance,
|
|
992
|
+
observeMethod: n.observeMethod
|
|
993
|
+
}), { 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(
|
|
994
|
+
`.hide-scrollbar {
|
|
995
|
+
scrollbar-width: none;
|
|
996
|
+
-ms-overflow-style: none;
|
|
997
|
+
}
|
|
998
|
+
.hide-scrollbar::-webkit-scrollbar {
|
|
999
|
+
display: none;
|
|
1000
|
+
}`,
|
|
1001
|
+
{ id: "styletag_lzc_scrollbar" }
|
|
1002
|
+
);
|
|
1003
|
+
ne(() => {
|
|
1004
|
+
d(), me(() => {
|
|
999
1005
|
s.init();
|
|
1000
1006
|
});
|
|
1001
|
-
}),
|
|
1002
|
-
s.modifySliderEventListener("remove");
|
|
1007
|
+
}), Re(() => {
|
|
1008
|
+
u(), s.modifySliderEventListener("remove");
|
|
1003
1009
|
});
|
|
1004
|
-
function
|
|
1005
|
-
|
|
1010
|
+
function f() {
|
|
1011
|
+
i.value = !0;
|
|
1006
1012
|
}
|
|
1007
|
-
function
|
|
1008
|
-
|
|
1013
|
+
function T() {
|
|
1014
|
+
i.value = !1;
|
|
1009
1015
|
}
|
|
1010
|
-
return t({ uScrollBarReturn: s }), (m,
|
|
1011
|
-
default:
|
|
1012
|
-
|
|
1016
|
+
return t({ uScrollBarReturn: s }), (m, C) => (I(), Ie(Be, null, {
|
|
1017
|
+
default: Me(() => [
|
|
1018
|
+
Pe(x("div", {
|
|
1013
1019
|
ref_key: "sliderRef",
|
|
1014
1020
|
ref: l,
|
|
1015
1021
|
class: "slider-wrapper",
|
|
1016
|
-
onMouseenter:
|
|
1017
|
-
onMouseleave:
|
|
1018
|
-
style: Y(
|
|
1022
|
+
onMouseenter: f,
|
|
1023
|
+
onMouseleave: T,
|
|
1024
|
+
style: Y(R(v))
|
|
1019
1025
|
}, [
|
|
1020
|
-
|
|
1026
|
+
ge(m.$slots, "default", {}, () => [
|
|
1021
1027
|
en
|
|
1022
1028
|
], !0)
|
|
1023
1029
|
], 36), [
|
|
1024
|
-
[ft,
|
|
1030
|
+
[ft, R(c)]
|
|
1025
1031
|
])
|
|
1026
1032
|
]),
|
|
1027
1033
|
_: 3
|
|
1028
1034
|
}));
|
|
1029
1035
|
}
|
|
1030
1036
|
});
|
|
1031
|
-
const Mn = /* @__PURE__ */ Z(tn, [["__scopeId", "data-v-
|
|
1037
|
+
const Mn = /* @__PURE__ */ Z(tn, [["__scopeId", "data-v-0abfb56c"]]), nn = (e) => (re("data-v-18377f18"), e = e(), ue(), e), on = { class: "pull-refresh" }, ln = {
|
|
1032
1038
|
key: 0,
|
|
1033
1039
|
class: "pull-arrow-circle"
|
|
1034
1040
|
}, sn = {
|
|
@@ -1043,59 +1049,59 @@ const Mn = /* @__PURE__ */ Z(tn, [["__scopeId", "data-v-edec7292"]]), nn = (e) =
|
|
|
1043
1049
|
pullRefreshContainer: null
|
|
1044
1050
|
},
|
|
1045
1051
|
setup(e) {
|
|
1046
|
-
const t = e, n = 0.7, o = "#2EC1CC", l =
|
|
1047
|
-
transition: `${
|
|
1052
|
+
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(() => ({
|
|
1053
|
+
transition: `${d.value}ms`,
|
|
1048
1054
|
transform: `translate3d(0,${l.value}px, 0) scale(${a.value})`
|
|
1049
|
-
})),
|
|
1055
|
+
})), C = w(() => ({
|
|
1050
1056
|
borderColor: o,
|
|
1051
|
-
transition:
|
|
1057
|
+
transition: d.value,
|
|
1052
1058
|
transform: `rotate(${100 + s.value}deg)`,
|
|
1053
|
-
opacity:
|
|
1059
|
+
opacity: r.value
|
|
1054
1060
|
}));
|
|
1055
|
-
K(
|
|
1056
|
-
S === 0 && (l.value = -50,
|
|
1057
|
-
}), K(
|
|
1058
|
-
if (
|
|
1061
|
+
K(u, (S) => {
|
|
1062
|
+
S === 0 && (l.value = -50, r.value = 0.3);
|
|
1063
|
+
}), K(i, (S) => {
|
|
1064
|
+
if (u.value === 2)
|
|
1059
1065
|
return;
|
|
1060
|
-
const
|
|
1061
|
-
|
|
1066
|
+
const $ = Math.pow(S, n);
|
|
1067
|
+
$ === 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
1068
|
});
|
|
1063
|
-
const y =
|
|
1069
|
+
const y = p(0), M = (S) => {
|
|
1064
1070
|
y.value = S.touches[0].pageY;
|
|
1065
1071
|
}, z = (S) => {
|
|
1066
|
-
const
|
|
1067
|
-
y.value = S.touches[0].pageY, !t.refreshOff && (!t?.refresh ||
|
|
1068
|
-
},
|
|
1069
|
-
if (t.refreshOff || !t?.refresh ||
|
|
1072
|
+
const $ = S.touches[0].pageY - y.value;
|
|
1073
|
+
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()));
|
|
1074
|
+
}, U = () => {
|
|
1075
|
+
if (t.refreshOff || !t?.refresh || u.value === 2)
|
|
1070
1076
|
return;
|
|
1071
|
-
v.value = 0,
|
|
1072
|
-
const S = Math.pow(
|
|
1073
|
-
|
|
1074
|
-
|
|
1077
|
+
v.value = 0, c.value = 300;
|
|
1078
|
+
const S = Math.pow(i.value, n);
|
|
1079
|
+
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(() => {
|
|
1080
|
+
f.value = "\u5237\u65B0\u6210\u529F";
|
|
1075
1081
|
}).catch(() => {
|
|
1076
|
-
|
|
1082
|
+
f.value = "\u5237\u65B0\u5931\u8D25";
|
|
1077
1083
|
}).finally(() => {
|
|
1078
1084
|
setTimeout(() => {
|
|
1079
|
-
|
|
1080
|
-
|
|
1085
|
+
u.value = 0, i.value = 0, D.value.style.transform = `translate3d(0, ${Math.pow(
|
|
1086
|
+
i.value,
|
|
1081
1087
|
n
|
|
1082
1088
|
)}px, 0)`, setTimeout(() => {
|
|
1083
|
-
|
|
1084
|
-
},
|
|
1089
|
+
f.value = void 0;
|
|
1090
|
+
}, d.value);
|
|
1085
1091
|
}, 600);
|
|
1086
|
-
})) : (
|
|
1087
|
-
},
|
|
1088
|
-
return
|
|
1089
|
-
t?.refreshOff || (
|
|
1092
|
+
})) : (i.value = 0, D.value.style.transform = `translate3d(0, ${Math.pow(i.value, n)}px, 0)`);
|
|
1093
|
+
}, D = p(null);
|
|
1094
|
+
return ne(() => {
|
|
1095
|
+
t?.refreshOff || (D.value = document.querySelector(
|
|
1090
1096
|
t.pullRefreshContainer
|
|
1091
|
-
),
|
|
1092
|
-
}), (S,
|
|
1097
|
+
), D.value?.addEventListener("touchstart", M), D.value?.addEventListener("touchmove", z), D.value?.addEventListener("touchend", U));
|
|
1098
|
+
}), (S, $) => (I(), A("div", on, [
|
|
1093
1099
|
x("div", {
|
|
1094
1100
|
class: "pull-refresh-box",
|
|
1095
|
-
style: Y(
|
|
1101
|
+
style: Y(R(m))
|
|
1096
1102
|
}, [
|
|
1097
|
-
|
|
1098
|
-
|
|
1103
|
+
f.value ? (I(), A("div", dn, ke(f.value), 1)) : (I(), A("div", ln, [
|
|
1104
|
+
u.value == 2 ? (I(), A("div", sn, [
|
|
1099
1105
|
x("div", an, [
|
|
1100
1106
|
x("div", {
|
|
1101
1107
|
class: "left-circle",
|
|
@@ -1109,14 +1115,14 @@ const Mn = /* @__PURE__ */ Z(tn, [["__scopeId", "data-v-edec7292"]]), nn = (e) =
|
|
|
1109
1115
|
}, null, 4)
|
|
1110
1116
|
]),
|
|
1111
1117
|
un
|
|
1112
|
-
])) : (
|
|
1118
|
+
])) : (I(), A("div", {
|
|
1113
1119
|
key: 1,
|
|
1114
1120
|
class: "pull-circle-line",
|
|
1115
|
-
style: Y(
|
|
1121
|
+
style: Y(R(C))
|
|
1116
1122
|
}, [
|
|
1117
1123
|
x("div", cn, [
|
|
1118
1124
|
x("div", {
|
|
1119
|
-
class:
|
|
1125
|
+
class: Ae(["arrows", { opacity: h.value }]),
|
|
1120
1126
|
style: Y({ borderBottomColor: o })
|
|
1121
1127
|
}, null, 6)
|
|
1122
1128
|
])
|
|
@@ -1141,7 +1147,7 @@ const fn = /* @__PURE__ */ Z(vn, [["__scopeId", "data-v-18377f18"]]), hn = {
|
|
|
1141
1147
|
emits: ["scrollEnd"],
|
|
1142
1148
|
setup(e, { expose: t, emit: n }) {
|
|
1143
1149
|
const o = e, l = Ft(ht(o, "data"), {
|
|
1144
|
-
itemHeight: (
|
|
1150
|
+
itemHeight: (d) => o.itemHeight(o.data[d]),
|
|
1145
1151
|
overscan: o.overscan,
|
|
1146
1152
|
scrollEndHook: () => {
|
|
1147
1153
|
n("scrollEnd");
|
|
@@ -1149,43 +1155,43 @@ const fn = /* @__PURE__ */ Z(vn, [["__scopeId", "data-v-18377f18"]]), hn = {
|
|
|
1149
1155
|
}), {
|
|
1150
1156
|
list: a,
|
|
1151
1157
|
containerProps: s,
|
|
1152
|
-
wrapperProps:
|
|
1153
|
-
innerProps:
|
|
1158
|
+
wrapperProps: r,
|
|
1159
|
+
innerProps: h,
|
|
1154
1160
|
getItemHeightData: v,
|
|
1155
|
-
scrollTop:
|
|
1161
|
+
scrollTop: i
|
|
1156
1162
|
} = l;
|
|
1157
1163
|
t({
|
|
1158
1164
|
vListReturn: l
|
|
1159
1165
|
});
|
|
1160
|
-
const
|
|
1161
|
-
return (
|
|
1166
|
+
const c = "virtualListWrapper" + new Date().getTime();
|
|
1167
|
+
return (d, u) => (I(), A(we, null, [
|
|
1162
1168
|
pt(fn, {
|
|
1163
1169
|
refresh: e.refresh,
|
|
1164
1170
|
refreshOff: e.refreshOff,
|
|
1165
|
-
scrollTop:
|
|
1166
|
-
pullRefreshContainer: "#" +
|
|
1171
|
+
scrollTop: R(i),
|
|
1172
|
+
pullRefreshContainer: "#" + c
|
|
1167
1173
|
}, null, 8, ["refresh", "refreshOff", "scrollTop", "pullRefreshContainer"]),
|
|
1168
1174
|
x("div", {
|
|
1169
1175
|
class: "virtualListWrapper",
|
|
1170
|
-
id:
|
|
1176
|
+
id: c
|
|
1171
1177
|
}, [
|
|
1172
1178
|
x("div", mt({
|
|
1173
|
-
onScrollPassive:
|
|
1174
|
-
ref:
|
|
1179
|
+
onScrollPassive: u[0] || (u[0] = (...f) => R(s).onScroll && R(s).onScroll(...f)),
|
|
1180
|
+
ref: R(s).ref,
|
|
1175
1181
|
class: "virtualList"
|
|
1176
|
-
},
|
|
1177
|
-
x("div",
|
|
1178
|
-
x("div",
|
|
1179
|
-
(
|
|
1180
|
-
key:
|
|
1182
|
+
}, d.$attrs), [
|
|
1183
|
+
x("div", ve(fe(R(r))), [
|
|
1184
|
+
x("div", ve(fe(R(h))), [
|
|
1185
|
+
(I(!0), A(we, null, gt(R(a), ({ index: f, data: T }) => (I(), A("div", {
|
|
1186
|
+
key: f,
|
|
1181
1187
|
style: Y({
|
|
1182
|
-
height: `${
|
|
1188
|
+
height: `${R(v)(f).height}px`,
|
|
1183
1189
|
display: "flex"
|
|
1184
1190
|
})
|
|
1185
1191
|
}, [
|
|
1186
|
-
|
|
1187
|
-
data:
|
|
1188
|
-
index:
|
|
1192
|
+
ge(d.$slots, "default", {
|
|
1193
|
+
data: T,
|
|
1194
|
+
index: f
|
|
1189
1195
|
}, void 0, !0)
|
|
1190
1196
|
], 4))), 128))
|
|
1191
1197
|
], 16)
|
|
@@ -1195,7 +1201,7 @@ const fn = /* @__PURE__ */ Z(vn, [["__scopeId", "data-v-18377f18"]]), hn = {
|
|
|
1195
1201
|
], 64));
|
|
1196
1202
|
}
|
|
1197
1203
|
});
|
|
1198
|
-
const Pn = /* @__PURE__ */ Z(pn, [["__scopeId", "data-v-e0fb787f"]]),
|
|
1204
|
+
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
1205
|
id: "group-1",
|
|
1200
1206
|
stroke: "none",
|
|
1201
1207
|
"stroke-width": "1",
|
|
@@ -1207,10 +1213,10 @@ const Pn = /* @__PURE__ */ Z(pn, [["__scopeId", "data-v-e0fb787f"]]), be = (e) =
|
|
|
1207
1213
|
id: "path-1",
|
|
1208
1214
|
fill: "#FFF"
|
|
1209
1215
|
})
|
|
1210
|
-
], -1)),
|
|
1216
|
+
], -1)), wn = [
|
|
1211
1217
|
yn,
|
|
1212
|
-
|
|
1213
|
-
],
|
|
1218
|
+
bn
|
|
1219
|
+
], Cn = /* @__PURE__ */ N({
|
|
1214
1220
|
__name: "Loading",
|
|
1215
1221
|
props: {
|
|
1216
1222
|
width: { default: "90" },
|
|
@@ -1219,46 +1225,46 @@ const Pn = /* @__PURE__ */ Z(pn, [["__scopeId", "data-v-e0fb787f"]]), be = (e) =
|
|
|
1219
1225
|
},
|
|
1220
1226
|
setup(e) {
|
|
1221
1227
|
const t = e;
|
|
1222
|
-
|
|
1223
|
-
"
|
|
1228
|
+
Fe((o) => ({
|
|
1229
|
+
"5e400569": n
|
|
1224
1230
|
}));
|
|
1225
1231
|
const n = `${t.duration}ms`;
|
|
1226
|
-
return (o, l) => (
|
|
1232
|
+
return (o, l) => (I(), A("div", mn, [
|
|
1227
1233
|
gn,
|
|
1228
|
-
(
|
|
1234
|
+
(I(), A("svg", {
|
|
1229
1235
|
style: { position: "relative" },
|
|
1230
1236
|
width: e.width,
|
|
1231
1237
|
height: e.height,
|
|
1232
1238
|
viewBox: "0 0 260 260",
|
|
1233
1239
|
version: "1.1",
|
|
1234
1240
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1235
|
-
},
|
|
1241
|
+
}, wn, 8, _n))
|
|
1236
1242
|
]));
|
|
1237
1243
|
}
|
|
1238
1244
|
});
|
|
1239
|
-
const Hn = /* @__PURE__ */ Z(
|
|
1245
|
+
const Hn = /* @__PURE__ */ Z(Cn, [["__scopeId", "data-v-c986249d"]]);
|
|
1240
1246
|
export {
|
|
1241
1247
|
Rn as DefaultLoading,
|
|
1242
1248
|
Hn as Loading,
|
|
1243
1249
|
fn as PullRefresh,
|
|
1244
1250
|
Mn as ScrollBar,
|
|
1245
|
-
|
|
1246
|
-
|
|
1251
|
+
Bn as SvgIcon,
|
|
1252
|
+
In as ToastCreator,
|
|
1247
1253
|
Pn as VirtualList,
|
|
1248
|
-
|
|
1254
|
+
qe as allSelectedKey,
|
|
1249
1255
|
kt as closeDialogKey,
|
|
1250
1256
|
Dn as dialogController,
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1257
|
+
Ze as isAllSelectedKey,
|
|
1258
|
+
Ue as isSelectedKey,
|
|
1259
|
+
Xe as selectAllKey,
|
|
1260
|
+
Qe as selectKey,
|
|
1261
|
+
Ve as toggleAllKey,
|
|
1262
|
+
Ke as toggleKey,
|
|
1263
|
+
Je as unselectAllKey,
|
|
1264
|
+
Ge as unselectKey,
|
|
1259
1265
|
$n as useDelayLoad,
|
|
1260
1266
|
Nt as useDelayLoadComp,
|
|
1261
|
-
|
|
1267
|
+
et as useDragSelect,
|
|
1262
1268
|
On as useDragSelectByMobile,
|
|
1263
1269
|
Tn as useDragSelectByPc,
|
|
1264
1270
|
Ln as useSelectable,
|