@lazycatcloud/lzc-toolkit 0.0.64 → 0.0.66
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 +749 -610
- package/dist/index.umd.js +9 -9
- package/dist/style.css +1 -1
- package/dist/types/Loading/BackgroundLoading.vue.d.ts +2 -0
- package/dist/types/Loading/DefaultLoading.vue.d.ts +2 -0
- package/dist/types/Loading/index.d.ts +2 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/useVirtualList/PullRefresh.vue.d.ts +32 -0
- package/dist/types/useVirtualList/VirtualList.vue.d.ts +16 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,148 +1,168 @@
|
|
|
1
|
-
import { getCurrentScope as
|
|
2
|
-
var
|
|
3
|
-
const
|
|
4
|
-
|
|
1
|
+
import { ref as h, watch as V, customRef as tt, getCurrentScope as lt, onScopeDispose as nt, getCurrentInstance as Be, onMounted as oe, nextTick as _e, unref as D, onUpdated as ot, readonly as st, shallowRef as rt, computed as S, onUnmounted as Ie, inject as N, provide as M, defineComponent as j, h as q, render as ue, openBlock as B, createBlock as He, Transition as Pe, withCtx as Ae, createElementBlock as H, createElementVNode as E, withModifiers as at, normalizeClass as Fe, renderSlot as ye, createCommentVNode as ut, normalizeProps as he, guardReactiveProps as pe, pushScopeId as ce, popScopeId as de, normalizeStyle as k, toDisplayString as Me, useSlots as it, withDirectives as ct, vShow as dt, toRef as vt, Fragment as Ee, createVNode as ft, mergeProps as ht, renderList as pt, useCssVars as mt } from "vue";
|
|
2
|
+
var Ce;
|
|
3
|
+
const be = typeof window < "u", xe = (e) => typeof e == "function";
|
|
4
|
+
be && ((Ce = window?.navigator) == null ? void 0 : Ce.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
5
5
|
function ie(e) {
|
|
6
|
-
return typeof e == "function" ? e() :
|
|
6
|
+
return typeof e == "function" ? e() : D(e);
|
|
7
7
|
}
|
|
8
|
-
function
|
|
9
|
-
function
|
|
10
|
-
e(() => t.apply(this,
|
|
8
|
+
function ke(e, t) {
|
|
9
|
+
function n(...l) {
|
|
10
|
+
e(() => t.apply(this, l), { fn: t, thisArg: this, args: l });
|
|
11
11
|
}
|
|
12
|
-
return
|
|
12
|
+
return n;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
let
|
|
16
|
-
return (
|
|
17
|
-
const s = ie(e),
|
|
18
|
-
if (
|
|
19
|
-
return
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
|
|
14
|
+
function gt(e, t = {}) {
|
|
15
|
+
let n, l;
|
|
16
|
+
return (r) => {
|
|
17
|
+
const s = ie(e), d = ie(t.maxWait);
|
|
18
|
+
if (n && clearTimeout(n), s <= 0 || d !== void 0 && d <= 0)
|
|
19
|
+
return l && (clearTimeout(l), l = null), r();
|
|
20
|
+
d && !l && (l = setTimeout(() => {
|
|
21
|
+
n && clearTimeout(n), l = null, r();
|
|
22
|
+
}, d)), n = setTimeout(() => {
|
|
23
|
+
l && clearTimeout(l), l = null, r();
|
|
24
24
|
}, s);
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
let
|
|
27
|
+
function _t(e, t = !0, n = !0) {
|
|
28
|
+
let l = 0, o, r = !0;
|
|
29
29
|
const s = () => {
|
|
30
|
-
|
|
30
|
+
o && (clearTimeout(o), o = void 0);
|
|
31
31
|
};
|
|
32
|
-
return (
|
|
33
|
-
const
|
|
34
|
-
if (s(),
|
|
35
|
-
return
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
},
|
|
32
|
+
return (v) => {
|
|
33
|
+
const u = ie(e), f = Date.now() - l;
|
|
34
|
+
if (s(), u <= 0)
|
|
35
|
+
return l = Date.now(), v();
|
|
36
|
+
f > u && (n || !r) ? (l = Date.now(), v()) : t && (o = setTimeout(() => {
|
|
37
|
+
l = Date.now(), r = !0, s(), v();
|
|
38
|
+
}, u)), !n && !o && (o = setTimeout(() => r = !0, u)), r = !1;
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function yt(e) {
|
|
42
42
|
return e;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
45
|
-
|
|
44
|
+
function bt(e, t) {
|
|
45
|
+
let n, l, o;
|
|
46
|
+
const r = h(!0), s = () => {
|
|
47
|
+
r.value = !0, o();
|
|
48
|
+
};
|
|
49
|
+
V(e, s, { flush: "sync" });
|
|
50
|
+
const d = xe(t) ? t : t.get, v = xe(t) ? void 0 : t.set, u = tt((f, c) => (l = f, o = c, {
|
|
51
|
+
get() {
|
|
52
|
+
return r.value && (n = d(), r.value = !1), l(), n;
|
|
53
|
+
},
|
|
54
|
+
set(i) {
|
|
55
|
+
v?.(i);
|
|
56
|
+
}
|
|
57
|
+
}));
|
|
58
|
+
return Object.isExtensible(u) && (u.trigger = s), u;
|
|
59
|
+
}
|
|
60
|
+
function ze(e) {
|
|
61
|
+
return lt() ? (nt(e), !0) : !1;
|
|
46
62
|
}
|
|
47
|
-
function
|
|
48
|
-
return
|
|
63
|
+
function We(e, t = 200, n = {}) {
|
|
64
|
+
return ke(gt(t, n), e);
|
|
49
65
|
}
|
|
50
|
-
function
|
|
51
|
-
return
|
|
66
|
+
function Te(e, t = 200, n = !1, l = !0) {
|
|
67
|
+
return ke(_t(t, n, l), e);
|
|
52
68
|
}
|
|
53
|
-
function
|
|
54
|
-
|
|
69
|
+
function Ne(e, t = !0) {
|
|
70
|
+
Be() ? oe(e) : t ? e() : _e(e);
|
|
55
71
|
}
|
|
56
|
-
function
|
|
72
|
+
function Ve(e) {
|
|
57
73
|
var t;
|
|
58
|
-
const
|
|
59
|
-
return (t =
|
|
74
|
+
const n = ie(e);
|
|
75
|
+
return (t = n?.$el) != null ? t : n;
|
|
60
76
|
}
|
|
61
|
-
const
|
|
62
|
-
function
|
|
63
|
-
const
|
|
64
|
-
return
|
|
77
|
+
const wt = be ? window : void 0, St = be ? window.document : void 0;
|
|
78
|
+
function Et(e, t = !1) {
|
|
79
|
+
const n = h(), l = () => n.value = Boolean(e());
|
|
80
|
+
return l(), Ne(l, t), n;
|
|
65
81
|
}
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
82
|
+
const me = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, ge = "__vueuse_ssr_handlers__";
|
|
83
|
+
me[ge] = me[ge] || {};
|
|
84
|
+
me[ge];
|
|
85
|
+
function Ct() {
|
|
86
|
+
const e = Be(), t = bt(() => null, () => e.proxy.$el);
|
|
87
|
+
return ot(t.trigger), oe(t.trigger), t;
|
|
88
|
+
}
|
|
89
|
+
var Le = Object.getOwnPropertySymbols, xt = Object.prototype.hasOwnProperty, Tt = Object.prototype.propertyIsEnumerable, Lt = (e, t) => {
|
|
90
|
+
var n = {};
|
|
91
|
+
for (var l in e)
|
|
92
|
+
xt.call(e, l) && t.indexOf(l) < 0 && (n[l] = e[l]);
|
|
93
|
+
if (e != null && Le)
|
|
94
|
+
for (var l of Le(e))
|
|
95
|
+
t.indexOf(l) < 0 && Tt.call(e, l) && (n[l] = e[l]);
|
|
96
|
+
return n;
|
|
77
97
|
};
|
|
78
|
-
function
|
|
79
|
-
const
|
|
98
|
+
function $t(e, t, n = {}) {
|
|
99
|
+
const l = n, { window: o = wt } = l, r = Lt(l, ["window"]);
|
|
80
100
|
let s;
|
|
81
|
-
const
|
|
101
|
+
const d = Et(() => o && "ResizeObserver" in o), v = () => {
|
|
82
102
|
s && (s.disconnect(), s = void 0);
|
|
83
|
-
},
|
|
84
|
-
|
|
85
|
-
}, { immediate: !0, flush: "post" }),
|
|
86
|
-
|
|
103
|
+
}, u = V(() => Ve(e), (c) => {
|
|
104
|
+
v(), d.value && o && c && (s = new ResizeObserver(t), s.observe(c, r));
|
|
105
|
+
}, { immediate: !0, flush: "post" }), f = () => {
|
|
106
|
+
v(), u();
|
|
87
107
|
};
|
|
88
|
-
return
|
|
89
|
-
isSupported:
|
|
90
|
-
stop:
|
|
108
|
+
return ze(f), {
|
|
109
|
+
isSupported: d,
|
|
110
|
+
stop: f
|
|
91
111
|
};
|
|
92
112
|
}
|
|
93
|
-
function
|
|
94
|
-
const { box:
|
|
95
|
-
return
|
|
96
|
-
const
|
|
97
|
-
|
|
98
|
-
},
|
|
99
|
-
|
|
113
|
+
function Ot(e, t = { width: 0, height: 0 }, n = {}) {
|
|
114
|
+
const { box: l = "content-box" } = n, o = h(t.width), r = h(t.height);
|
|
115
|
+
return $t(e, ([s]) => {
|
|
116
|
+
const d = l === "border-box" ? s.borderBoxSize : l === "content-box" ? s.contentBoxSize : s.devicePixelContentBoxSize;
|
|
117
|
+
d ? (o.value = d.reduce((v, { inlineSize: u }) => v + u, 0), r.value = d.reduce((v, { blockSize: u }) => v + u, 0)) : (o.value = s.contentRect.width, r.value = s.contentRect.height);
|
|
118
|
+
}, n), V(() => Ve(e), (s) => {
|
|
119
|
+
o.value = s ? t.width : 0, r.value = s ? t.height : 0;
|
|
100
120
|
}), {
|
|
101
|
-
width:
|
|
102
|
-
height:
|
|
121
|
+
width: o,
|
|
122
|
+
height: r
|
|
103
123
|
};
|
|
104
124
|
}
|
|
105
|
-
var
|
|
125
|
+
var $e;
|
|
106
126
|
(function(e) {
|
|
107
127
|
e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
|
|
108
|
-
})(
|
|
109
|
-
let
|
|
110
|
-
function
|
|
111
|
-
const
|
|
112
|
-
document:
|
|
113
|
-
immediate:
|
|
114
|
-
manual:
|
|
115
|
-
id: s = `vueuse_styletag_${++
|
|
116
|
-
} = t,
|
|
117
|
-
let
|
|
128
|
+
})($e || ($e = {}));
|
|
129
|
+
let Rt = 0;
|
|
130
|
+
function Dt(e, t = {}) {
|
|
131
|
+
const n = h(!1), {
|
|
132
|
+
document: l = St,
|
|
133
|
+
immediate: o = !0,
|
|
134
|
+
manual: r = !1,
|
|
135
|
+
id: s = `vueuse_styletag_${++Rt}`
|
|
136
|
+
} = t, d = h(e);
|
|
137
|
+
let v = () => {
|
|
118
138
|
};
|
|
119
|
-
const
|
|
120
|
-
if (!
|
|
139
|
+
const u = () => {
|
|
140
|
+
if (!l)
|
|
121
141
|
return;
|
|
122
|
-
const c =
|
|
123
|
-
c.type = "text/css", c.id = s, t.media && (c.media = t.media),
|
|
124
|
-
c.innerText =
|
|
125
|
-
}, { immediate: !0 }),
|
|
126
|
-
},
|
|
127
|
-
!
|
|
142
|
+
const c = l.getElementById(s) || l.createElement("style");
|
|
143
|
+
c.type = "text/css", c.id = s, t.media && (c.media = t.media), l.head.appendChild(c), !n.value && (v = V(d, (i) => {
|
|
144
|
+
c.innerText = i;
|
|
145
|
+
}, { immediate: !0 }), n.value = !0);
|
|
146
|
+
}, f = () => {
|
|
147
|
+
!l || !n.value || (v(), l.head.removeChild(l.getElementById(s)), n.value = !1);
|
|
128
148
|
};
|
|
129
|
-
return
|
|
149
|
+
return o && !r && Ne(u), r || ze(f), {
|
|
130
150
|
id: s,
|
|
131
|
-
css:
|
|
132
|
-
unload:
|
|
133
|
-
load:
|
|
134
|
-
isLoaded:
|
|
151
|
+
css: d,
|
|
152
|
+
unload: f,
|
|
153
|
+
load: u,
|
|
154
|
+
isLoaded: st(n)
|
|
135
155
|
};
|
|
136
156
|
}
|
|
137
|
-
var
|
|
138
|
-
for (var
|
|
139
|
-
|
|
140
|
-
if (
|
|
141
|
-
for (var
|
|
142
|
-
|
|
157
|
+
var Bt = Object.defineProperty, Oe = Object.getOwnPropertySymbols, It = Object.prototype.hasOwnProperty, Ht = Object.prototype.propertyIsEnumerable, Re = (e, t, n) => t in e ? Bt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Pt = (e, t) => {
|
|
158
|
+
for (var n in t || (t = {}))
|
|
159
|
+
It.call(t, n) && Re(e, n, t[n]);
|
|
160
|
+
if (Oe)
|
|
161
|
+
for (var n of Oe(t))
|
|
162
|
+
Ht.call(t, n) && Re(e, n, t[n]);
|
|
143
163
|
return e;
|
|
144
164
|
};
|
|
145
|
-
const
|
|
165
|
+
const At = {
|
|
146
166
|
easeInSine: [0.12, 0, 0.39, 0],
|
|
147
167
|
easeOutSine: [0.61, 1, 0.88, 1],
|
|
148
168
|
easeInOutSine: [0.37, 0, 0.63, 1],
|
|
@@ -168,415 +188,415 @@ const Rt = {
|
|
|
168
188
|
easeOutBack: [0.34, 1.56, 0.64, 1],
|
|
169
189
|
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
|
|
170
190
|
};
|
|
171
|
-
|
|
172
|
-
linear:
|
|
173
|
-
},
|
|
174
|
-
function
|
|
175
|
-
const { scrollEndHook:
|
|
176
|
-
let
|
|
177
|
-
const
|
|
178
|
-
let
|
|
179
|
-
const
|
|
180
|
-
let { sum:
|
|
181
|
-
return
|
|
182
|
-
}),
|
|
183
|
-
let
|
|
184
|
-
return
|
|
191
|
+
Pt({
|
|
192
|
+
linear: yt
|
|
193
|
+
}, At);
|
|
194
|
+
function Ft(e, t) {
|
|
195
|
+
const { scrollEndHook: n, itemHeight: l, overscan: o = 5 } = t, r = h(null), s = Ot(r), d = h(!0), v = We($, 100);
|
|
196
|
+
let u;
|
|
197
|
+
const f = rt(e), c = h(0), i = h({ start: 0, end: 10 });
|
|
198
|
+
let a = 0;
|
|
199
|
+
const w = h([]), C = S(() => {
|
|
200
|
+
let { sum: m, height: b } = { sum: 0, height: 0 };
|
|
201
|
+
return f.value.map((A, P) => (typeof l == "number" ? b = l : b = l(P), m += b, { height: b, sum: m }));
|
|
202
|
+
}), _ = S(() => X(i.value.start)), y = S(() => typeof l == "number" ? C.value.length * l : C.value[C.value.length - 1]?.sum || 0), T = S(() => {
|
|
203
|
+
let m = w.value.length - o, b = Math.max(m - a, 0);
|
|
204
|
+
return w.value.slice(b, m);
|
|
185
205
|
});
|
|
186
|
-
|
|
187
|
-
}),
|
|
188
|
-
[s.width, s.height,
|
|
189
|
-
([
|
|
190
|
-
(
|
|
206
|
+
oe(() => {
|
|
207
|
+
}), Ie(() => cancelAnimationFrame(u)), V(
|
|
208
|
+
[s.width, s.height, f],
|
|
209
|
+
([m, b]) => {
|
|
210
|
+
(m || b) && Y();
|
|
191
211
|
},
|
|
192
212
|
{ deep: !0 }
|
|
193
|
-
),
|
|
194
|
-
|
|
213
|
+
), V(c, () => {
|
|
214
|
+
L(), v();
|
|
195
215
|
});
|
|
196
|
-
function
|
|
197
|
-
|
|
216
|
+
function L() {
|
|
217
|
+
d.value = !1;
|
|
198
218
|
}
|
|
199
|
-
function
|
|
200
|
-
|
|
219
|
+
function $() {
|
|
220
|
+
d.value = !0, n?.();
|
|
201
221
|
}
|
|
202
222
|
function Y() {
|
|
203
|
-
cancelAnimationFrame(
|
|
223
|
+
cancelAnimationFrame(u), u = requestAnimationFrame(G);
|
|
204
224
|
}
|
|
205
|
-
function
|
|
206
|
-
if (
|
|
207
|
-
c.value =
|
|
208
|
-
let
|
|
209
|
-
|
|
210
|
-
data:
|
|
211
|
-
index:
|
|
225
|
+
function G() {
|
|
226
|
+
if (r.value) {
|
|
227
|
+
c.value = r.value.scrollTop, a = K();
|
|
228
|
+
let m = z(c.value), b = m + a + o;
|
|
229
|
+
m = m - o, m = m < 0 ? 0 : m, b = b > f.value.length ? f.value.length : b, i.value = { start: m, end: b }, w.value = f.value.slice(m, b).map((A, P) => ({
|
|
230
|
+
data: A,
|
|
231
|
+
index: P + m
|
|
212
232
|
}));
|
|
213
233
|
}
|
|
214
234
|
}
|
|
215
|
-
function
|
|
216
|
-
let
|
|
217
|
-
for (;
|
|
218
|
-
const
|
|
219
|
-
|
|
235
|
+
function z(m) {
|
|
236
|
+
let b = 0, A = C.value.length - 1, P = -1;
|
|
237
|
+
for (; b <= A; ) {
|
|
238
|
+
const R = Math.floor((b + A) / 2);
|
|
239
|
+
C.value[R].sum >= m ? (P = R, A = R - 1) : b = R + 1;
|
|
220
240
|
}
|
|
221
|
-
return Math.max(0,
|
|
241
|
+
return Math.max(0, P);
|
|
222
242
|
}
|
|
223
|
-
function
|
|
224
|
-
let
|
|
225
|
-
for (let
|
|
243
|
+
function K() {
|
|
244
|
+
let m = 0, b = 0, A = F();
|
|
245
|
+
for (let P = A; P < C.value.length && (m++, b += C.value[P].height, !(b >= s.height.value)); P++)
|
|
226
246
|
;
|
|
227
|
-
return
|
|
247
|
+
return m;
|
|
228
248
|
}
|
|
229
|
-
function
|
|
230
|
-
if (typeof
|
|
231
|
-
return
|
|
232
|
-
let
|
|
233
|
-
return
|
|
249
|
+
function X(m) {
|
|
250
|
+
if (typeof l == "number")
|
|
251
|
+
return m * l;
|
|
252
|
+
let b = C.value[m];
|
|
253
|
+
return b ? b.sum - b.height : 0;
|
|
234
254
|
}
|
|
235
|
-
function
|
|
236
|
-
return
|
|
255
|
+
function Z(m) {
|
|
256
|
+
return C.value[m] || { sum: 0, height: 0 };
|
|
237
257
|
}
|
|
238
|
-
function
|
|
239
|
-
let
|
|
240
|
-
return
|
|
258
|
+
function F() {
|
|
259
|
+
let m = i.value.start;
|
|
260
|
+
return m >= o && (m += o), m;
|
|
241
261
|
}
|
|
242
|
-
function
|
|
243
|
-
if (
|
|
244
|
-
const
|
|
245
|
-
|
|
262
|
+
function ee(m) {
|
|
263
|
+
if (r.value) {
|
|
264
|
+
const b = Z(m);
|
|
265
|
+
r.value.scrollTop = b.sum - b.height, G();
|
|
246
266
|
}
|
|
247
267
|
}
|
|
248
|
-
const
|
|
268
|
+
const se = S(() => ({
|
|
249
269
|
style: {
|
|
250
270
|
width: "100%",
|
|
251
|
-
height: `${
|
|
252
|
-
pointerEvents:
|
|
271
|
+
height: `${y.value}px`,
|
|
272
|
+
pointerEvents: d.value ? void 0 : "none"
|
|
253
273
|
}
|
|
254
|
-
})),
|
|
274
|
+
})), J = S(() => ({
|
|
255
275
|
style: {
|
|
256
|
-
transform: `translate3d(0, ${
|
|
276
|
+
transform: `translate3d(0, ${_.value}px, 0)`,
|
|
257
277
|
"will-change": "transform"
|
|
258
278
|
}
|
|
259
|
-
})),
|
|
279
|
+
})), te = {
|
|
260
280
|
overflowY: "auto"
|
|
261
281
|
};
|
|
262
282
|
return {
|
|
263
|
-
list:
|
|
283
|
+
list: w,
|
|
264
284
|
visiableList: T,
|
|
265
|
-
getItemHeightData:
|
|
266
|
-
getoffsetTopIndex:
|
|
267
|
-
totalHeight:
|
|
285
|
+
getItemHeightData: Z,
|
|
286
|
+
getoffsetTopIndex: z,
|
|
287
|
+
totalHeight: y,
|
|
268
288
|
clientHeight: s.height,
|
|
269
|
-
scrollTo:
|
|
289
|
+
scrollTo: ee,
|
|
270
290
|
scrollTop: c,
|
|
271
|
-
isScrollEnd:
|
|
291
|
+
isScrollEnd: d,
|
|
272
292
|
containerProps: {
|
|
273
|
-
ref:
|
|
293
|
+
ref: r,
|
|
274
294
|
onScroll: () => {
|
|
275
295
|
Y();
|
|
276
296
|
},
|
|
277
|
-
style:
|
|
297
|
+
style: te
|
|
278
298
|
},
|
|
279
|
-
wrapperProps:
|
|
280
|
-
innerProps:
|
|
299
|
+
wrapperProps: se,
|
|
300
|
+
innerProps: J
|
|
281
301
|
};
|
|
282
302
|
}
|
|
283
|
-
const
|
|
284
|
-
function
|
|
285
|
-
const { voidFn: e, boolFn: t, boolRef:
|
|
286
|
-
voidFn: (
|
|
303
|
+
const je = Symbol(), Ke = Symbol(), Ue = Symbol(), qe = Symbol(), Qe = Symbol(), Ye = Symbol(), Ge = Symbol(), Xe = Symbol(), Ze = Symbol();
|
|
304
|
+
function Tl() {
|
|
305
|
+
const { voidFn: e, boolFn: t, boolRef: n, arrayRef: l } = {
|
|
306
|
+
voidFn: (a) => {
|
|
287
307
|
},
|
|
288
|
-
boolFn: (
|
|
289
|
-
boolRef:
|
|
290
|
-
arrayRef:
|
|
291
|
-
},
|
|
308
|
+
boolFn: (a) => !1,
|
|
309
|
+
boolRef: S(() => !1),
|
|
310
|
+
arrayRef: S(() => [])
|
|
311
|
+
}, o = N(qe, l), r = N(Ue, t), s = N(Xe, n), d = N(Ke, e), v = N(je, e), u = N(Qe, e), f = N(Ye, e), c = N(Ge, e), i = N(Ze, e);
|
|
292
312
|
return {
|
|
293
|
-
selected:
|
|
294
|
-
isSelected:
|
|
313
|
+
selected: o,
|
|
314
|
+
isSelected: r,
|
|
295
315
|
isAllSelected: s,
|
|
296
|
-
toggle:
|
|
297
|
-
toggleAll:
|
|
298
|
-
select:
|
|
299
|
-
selectAll:
|
|
316
|
+
toggle: d,
|
|
317
|
+
toggleAll: v,
|
|
318
|
+
select: u,
|
|
319
|
+
selectAll: f,
|
|
300
320
|
unselect: c,
|
|
301
|
-
unselectAll:
|
|
321
|
+
unselectAll: i
|
|
302
322
|
};
|
|
303
323
|
}
|
|
304
|
-
function
|
|
305
|
-
const
|
|
306
|
-
function
|
|
307
|
-
e.value.forEach((
|
|
308
|
-
|
|
324
|
+
function Ll(e, t) {
|
|
325
|
+
const n = h({}), l = S(() => e.value.filter((i) => n.value[i[t]])), o = S(() => l.value.length != 0 && Object.keys(n.value).length == e.value.length);
|
|
326
|
+
function r() {
|
|
327
|
+
e.value.forEach((i) => {
|
|
328
|
+
n.value[i[t]] = !0;
|
|
309
329
|
});
|
|
310
330
|
}
|
|
311
331
|
function s() {
|
|
312
|
-
|
|
332
|
+
n.value = {};
|
|
313
333
|
}
|
|
314
|
-
function i
|
|
315
|
-
|
|
316
|
-
|
|
334
|
+
function d(i) {
|
|
335
|
+
i.forEach((a) => {
|
|
336
|
+
n.value[a[t]] || (n.value[a[t]] = !0);
|
|
317
337
|
});
|
|
318
338
|
}
|
|
319
|
-
function
|
|
320
|
-
|
|
321
|
-
|
|
339
|
+
function v(i) {
|
|
340
|
+
i.forEach((a) => {
|
|
341
|
+
n.value[a[t]] && delete n.value[a[t]];
|
|
322
342
|
});
|
|
323
343
|
}
|
|
324
|
-
function
|
|
325
|
-
return !!
|
|
344
|
+
function u(i) {
|
|
345
|
+
return !!n.value[i[t]];
|
|
326
346
|
}
|
|
327
|
-
function
|
|
328
|
-
|
|
329
|
-
|
|
347
|
+
function f(i) {
|
|
348
|
+
i.forEach((a) => {
|
|
349
|
+
u(a) ? delete n.value[a[t]] : n.value[a[t]] = !0;
|
|
330
350
|
});
|
|
331
351
|
}
|
|
332
352
|
function c() {
|
|
333
|
-
|
|
353
|
+
o.value ? s() : r();
|
|
334
354
|
}
|
|
335
|
-
return
|
|
336
|
-
selected:
|
|
337
|
-
select:
|
|
338
|
-
selectAll:
|
|
339
|
-
unselect:
|
|
355
|
+
return M(je, c), M(Ke, f), M(Ue, u), M(qe, l), M(Qe, d), M(Ye, r), M(Ge, v), M(Xe, o), M(Ze, s), {
|
|
356
|
+
selected: l,
|
|
357
|
+
select: d,
|
|
358
|
+
selectAll: r,
|
|
359
|
+
unselect: v,
|
|
340
360
|
unselectAll: s,
|
|
341
|
-
toggle:
|
|
361
|
+
toggle: f,
|
|
342
362
|
toggleAll: c,
|
|
343
|
-
isSelected:
|
|
344
|
-
isAllSelected:
|
|
363
|
+
isSelected: u,
|
|
364
|
+
isAllSelected: o
|
|
345
365
|
};
|
|
346
366
|
}
|
|
347
|
-
function
|
|
367
|
+
function fe(e) {
|
|
348
368
|
return () => {
|
|
349
369
|
console.debug(`\u9ED8\u8BA4${e}\u65B9\u6CD5,\u9700\u8981\u81EA\u5B9A\u4E49\u751F\u6548`);
|
|
350
370
|
};
|
|
351
371
|
}
|
|
352
|
-
function
|
|
372
|
+
function Je({
|
|
353
373
|
attribute: e,
|
|
354
374
|
selectWay: t = "colum",
|
|
355
|
-
scrollOptions:
|
|
356
|
-
getSelectMap:
|
|
375
|
+
scrollOptions: n = {},
|
|
376
|
+
getSelectMap: l = () => ({})
|
|
357
377
|
}) {
|
|
358
378
|
const {
|
|
359
|
-
select:
|
|
360
|
-
unselect:
|
|
361
|
-
unselectAll: s =
|
|
362
|
-
} =
|
|
363
|
-
let
|
|
364
|
-
const
|
|
365
|
-
() =>
|
|
366
|
-
),
|
|
367
|
-
(
|
|
368
|
-
),
|
|
379
|
+
select: o = fe("\u9009\u62E9"),
|
|
380
|
+
unselect: r = fe("\u53D6\u6D88\u9009\u62E9"),
|
|
381
|
+
unselectAll: s = fe("\u53D6\u6D88\u5168\u9009")
|
|
382
|
+
} = l();
|
|
383
|
+
let d = {};
|
|
384
|
+
const v = S(
|
|
385
|
+
() => Te(t === "colum" ? U : re, 50)
|
|
386
|
+
), u = /* @__PURE__ */ new Set(), f = h(!0), c = h(), i = h(!1), a = h({ x: 0, y: 0 }), w = h({ x: 0, y: 0, scrollTop: 0 }), C = new ResizeObserver(
|
|
387
|
+
(p) => _.value = p[0].target.getBoundingClientRect()
|
|
388
|
+
), _ = h({}), y = h({
|
|
369
389
|
top: 0,
|
|
370
390
|
height: 0,
|
|
371
|
-
sync(
|
|
372
|
-
|
|
391
|
+
sync(p = !1) {
|
|
392
|
+
y.value.top = c.value?.scrollTop || 0, p && (y.value.height = c.value?.scrollHeight || 0);
|
|
373
393
|
}
|
|
374
|
-
}), T =
|
|
375
|
-
left: Math.min(
|
|
376
|
-
top: Math.min(
|
|
377
|
-
width: Math.abs(
|
|
378
|
-
height: Math.abs(
|
|
379
|
-
} : { left: 0, top: 0, width: 0, height: 0 }), { margin:
|
|
380
|
-
let
|
|
381
|
-
const
|
|
382
|
-
let
|
|
383
|
-
function
|
|
384
|
-
if (cancelAnimationFrame(
|
|
385
|
-
Math.min(
|
|
386
|
-
-
|
|
387
|
-
),
|
|
388
|
-
const
|
|
389
|
-
if (!
|
|
394
|
+
}), T = S(() => i.value ? {
|
|
395
|
+
left: Math.min(a.value.x, w.value.x) - _.value.left,
|
|
396
|
+
top: Math.min(a.value.y, w.value.y) - _.value.top,
|
|
397
|
+
width: Math.abs(a.value.x - w.value.x),
|
|
398
|
+
height: Math.abs(a.value.y - w.value.y)
|
|
399
|
+
} : { left: 0, top: 0, width: 0, height: 0 }), { margin: L = 50, startSpeed: $ = 30, maxSpeed: Y = 30 } = n;
|
|
400
|
+
let G;
|
|
401
|
+
const z = L, K = $, X = Y, Z = (p) => p ** 1;
|
|
402
|
+
let F = 0;
|
|
403
|
+
function ee(p) {
|
|
404
|
+
if (cancelAnimationFrame(G), F = se(p), F = Math.max(
|
|
405
|
+
Math.min(F, X),
|
|
406
|
+
-X
|
|
407
|
+
), F !== 0) {
|
|
408
|
+
const g = c.value;
|
|
409
|
+
if (!g || !i.value)
|
|
390
410
|
return;
|
|
391
|
-
const
|
|
392
|
-
let
|
|
393
|
-
|
|
411
|
+
const I = y.value.height - _.value.height;
|
|
412
|
+
let x = y.value.top + Number(F);
|
|
413
|
+
x = Math.min(Math.max(0, x), I), g.scrollTop = x, te(), G = requestAnimationFrame(() => ee(p));
|
|
394
414
|
}
|
|
395
415
|
}
|
|
396
|
-
function
|
|
416
|
+
function se(p) {
|
|
397
417
|
if (c.value) {
|
|
398
|
-
const
|
|
399
|
-
if (
|
|
400
|
-
return
|
|
401
|
-
const
|
|
402
|
-
if (
|
|
403
|
-
return -
|
|
418
|
+
const I = _.value, x = I.bottom - p;
|
|
419
|
+
if (x < z)
|
|
420
|
+
return K * Z(1 - x / z);
|
|
421
|
+
const W = p - I.top;
|
|
422
|
+
if (W < z)
|
|
423
|
+
return -K * Z(1 - W / z);
|
|
404
424
|
}
|
|
405
425
|
return 0;
|
|
406
426
|
}
|
|
407
|
-
function
|
|
408
|
-
const
|
|
409
|
-
return
|
|
427
|
+
function J(p) {
|
|
428
|
+
const g = { ...T.value, right: 0, bottom: 0 };
|
|
429
|
+
return g.left += _.value.left, g.top += _.value.top - y.value.top, g.right = g.width + g.left, g.bottom = g.height + g.top, g.left < p.right && g.right > p.left && g.top < p.bottom && g.bottom > p.top;
|
|
410
430
|
}
|
|
411
|
-
function
|
|
412
|
-
|
|
413
|
-
const { top:
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
),
|
|
418
|
-
}
|
|
419
|
-
function p
|
|
420
|
-
let
|
|
421
|
-
|
|
422
|
-
const
|
|
423
|
-
for (let
|
|
424
|
-
const
|
|
425
|
-
if (
|
|
431
|
+
function te() {
|
|
432
|
+
y.value.sync();
|
|
433
|
+
const { top: p, height: g } = y.value;
|
|
434
|
+
w.value.y = Math.min(
|
|
435
|
+
g + _.value.top,
|
|
436
|
+
w.value.y + p - w.value.scrollTop
|
|
437
|
+
), w.value.scrollTop = p;
|
|
438
|
+
}
|
|
439
|
+
function m(p, g, I = "dynamic-styles") {
|
|
440
|
+
let x = document.getElementById(I);
|
|
441
|
+
x || (x = document.createElement("style"), x.id = I, document.head.appendChild(x));
|
|
442
|
+
const W = x.sheet.cssRules, ne = W.length, et = `${p} { ${g} }`;
|
|
443
|
+
for (let ve = 0; ve < ne; ve++) {
|
|
444
|
+
const Se = W[ve];
|
|
445
|
+
if (Se.selectorText === p && Se.style.cssText === g)
|
|
426
446
|
return;
|
|
427
447
|
}
|
|
428
|
-
|
|
448
|
+
x.sheet.insertRule(et, ne);
|
|
429
449
|
}
|
|
430
|
-
function
|
|
431
|
-
|
|
450
|
+
function b(p, g) {
|
|
451
|
+
f.value = !0, i.value = !0, y.value.height ? y.value.sync() : y.value.sync(!0), a.value.x = p, a.value.y = g + y.value.top, w.value.x = a.value.x, w.value.y = a.value.y, c.value?.classList.add("disable-scroll-behavior"), u.clear();
|
|
432
452
|
}
|
|
433
|
-
function
|
|
434
|
-
!
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
),
|
|
453
|
+
function A(p, g, I) {
|
|
454
|
+
!i.value || (f.value && t === "colum" && !O() && (s(), f.value = !1), I?.(), ee(g), w.value.x = Math.max(p, _.value.left), w.value.y = Math.min(
|
|
455
|
+
g + y.value.top,
|
|
456
|
+
y.value.height + _.value.top
|
|
457
|
+
), w.value.scrollTop = y.value.top, v.value());
|
|
438
458
|
}
|
|
439
|
-
function
|
|
440
|
-
|
|
459
|
+
function P() {
|
|
460
|
+
i.value = !1, c.value?.classList.remove("disable-scroll-behavior");
|
|
441
461
|
}
|
|
442
|
-
function
|
|
443
|
-
!
|
|
462
|
+
function R() {
|
|
463
|
+
!i.value || (F || te(), v.value());
|
|
444
464
|
}
|
|
445
|
-
function
|
|
446
|
-
if (!
|
|
465
|
+
function O() {
|
|
466
|
+
if (!i.value)
|
|
447
467
|
return !1;
|
|
448
|
-
const { width:
|
|
449
|
-
return !(Math.max(
|
|
468
|
+
const { width: p, height: g } = T.value;
|
|
469
|
+
return !(Math.max(p, g) > 5);
|
|
450
470
|
}
|
|
451
|
-
function
|
|
452
|
-
|
|
471
|
+
function le() {
|
|
472
|
+
O() && s();
|
|
453
473
|
}
|
|
454
|
-
function
|
|
455
|
-
|
|
456
|
-
|
|
474
|
+
function U() {
|
|
475
|
+
O() || c.value?.querySelectorAll(`[${e}]`).forEach((p) => {
|
|
476
|
+
d[`${e}`] = p.getAttribute(`${e}`), J(p.getBoundingClientRect()) ? o([d]) : r([d]);
|
|
457
477
|
});
|
|
458
478
|
}
|
|
459
|
-
function
|
|
460
|
-
const
|
|
461
|
-
let
|
|
462
|
-
c.value?.querySelectorAll(`[${e}]`).forEach((
|
|
463
|
-
const
|
|
464
|
-
|
|
479
|
+
function re() {
|
|
480
|
+
const p = [];
|
|
481
|
+
let g = null, I = 0;
|
|
482
|
+
c.value?.querySelectorAll(`[${e}]`).forEach((x, W) => {
|
|
483
|
+
const ne = x.getAttribute(`${e}`);
|
|
484
|
+
p.push(ne), J(x.getBoundingClientRect()) ? (g === null && (g = W), g = Math.min(g, W), I = Math.max(I, W)) : (d[`${e}`] = ne, u.has(ne) && r([d]));
|
|
465
485
|
});
|
|
466
|
-
for (let
|
|
467
|
-
|
|
486
|
+
for (let x = g; x < I + 1; x++)
|
|
487
|
+
d[`${e}`] = p[x], o([d]), u.add(p[x]);
|
|
468
488
|
}
|
|
469
|
-
function ae(
|
|
470
|
-
return !
|
|
489
|
+
function ae(p) {
|
|
490
|
+
return !p?.value || (c.value = p.value, !c?.value) ? !1 : (C.observe(c.value), m(
|
|
471
491
|
".disable-scroll-behavior",
|
|
472
492
|
"scroll-behavior: unset !important;"
|
|
473
493
|
), !0);
|
|
474
494
|
}
|
|
475
495
|
return {
|
|
476
496
|
init: ae,
|
|
477
|
-
dragStart:
|
|
478
|
-
dragMove:
|
|
479
|
-
dragEnd:
|
|
480
|
-
onScroll:
|
|
481
|
-
isSingleClick:
|
|
482
|
-
cancelSelectAllBySingleClick:
|
|
483
|
-
selectFn:
|
|
497
|
+
dragStart: b,
|
|
498
|
+
dragMove: A,
|
|
499
|
+
dragEnd: P,
|
|
500
|
+
onScroll: R,
|
|
501
|
+
isSingleClick: O,
|
|
502
|
+
cancelSelectAllBySingleClick: le,
|
|
503
|
+
selectFn: v,
|
|
484
504
|
selectRange: T,
|
|
485
|
-
isPressing:
|
|
505
|
+
isPressing: i,
|
|
486
506
|
containerEl: c,
|
|
487
|
-
observer:
|
|
507
|
+
observer: C
|
|
488
508
|
};
|
|
489
509
|
}
|
|
490
|
-
function
|
|
491
|
-
const t =
|
|
492
|
-
onScroll:
|
|
493
|
-
dragStart:
|
|
510
|
+
function $l(e) {
|
|
511
|
+
const t = Je(e), { observer: n, selectRange: l } = t, {
|
|
512
|
+
onScroll: o,
|
|
513
|
+
dragStart: r,
|
|
494
514
|
dragMove: s,
|
|
495
|
-
dragEnd:
|
|
496
|
-
cancelSelectAllBySingleClick:
|
|
497
|
-
} = t,
|
|
498
|
-
left: `${
|
|
499
|
-
top: `${
|
|
500
|
-
width: `${
|
|
501
|
-
height: `${
|
|
502
|
-
})),
|
|
515
|
+
dragEnd: d,
|
|
516
|
+
cancelSelectAllBySingleClick: v
|
|
517
|
+
} = t, u = S(() => ({
|
|
518
|
+
left: `${l.value.left}px`,
|
|
519
|
+
top: `${l.value.top}px`,
|
|
520
|
+
width: `${l.value.width}px`,
|
|
521
|
+
height: `${l.value.height}px`
|
|
522
|
+
})), f = j({
|
|
503
523
|
render() {
|
|
504
|
-
return
|
|
524
|
+
return q("div", {
|
|
505
525
|
id: "selectBoxEl",
|
|
506
526
|
class: "absolute z-50 bg-blue-200 opacity-50",
|
|
507
|
-
style:
|
|
527
|
+
style: u.value
|
|
508
528
|
});
|
|
509
529
|
}
|
|
510
530
|
});
|
|
511
|
-
function c(
|
|
512
|
-
|
|
531
|
+
function c(_) {
|
|
532
|
+
_.button === 0 && r(_.x, _.y);
|
|
513
533
|
}
|
|
514
|
-
function
|
|
515
|
-
s(
|
|
534
|
+
function i(_) {
|
|
535
|
+
s(_.x, _.y);
|
|
516
536
|
}
|
|
517
|
-
function
|
|
518
|
-
|
|
537
|
+
function a(_) {
|
|
538
|
+
_.composedPath().some((T) => T?.getAttribute?.(e.attribute)) || v(), d();
|
|
519
539
|
}
|
|
520
|
-
function
|
|
540
|
+
function w(_) {
|
|
521
541
|
try {
|
|
522
|
-
if (!t.init(
|
|
542
|
+
if (!t.init(_))
|
|
523
543
|
throw "\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";
|
|
524
544
|
if (!t.containerEl?.value)
|
|
525
545
|
return !1;
|
|
526
|
-
|
|
527
|
-
} catch (
|
|
528
|
-
console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25",
|
|
546
|
+
ue(q(f), t.containerEl.value), t.containerEl.value?.addEventListener("scroll", o), t.containerEl.value?.addEventListener("mousedown", c), window.addEventListener("mousemove", i), window.addEventListener("mouseup", a);
|
|
547
|
+
} catch (y) {
|
|
548
|
+
console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25", y);
|
|
529
549
|
}
|
|
530
550
|
}
|
|
531
|
-
function
|
|
532
|
-
|
|
551
|
+
function C() {
|
|
552
|
+
n.disconnect(), t.containerEl.value?.removeEventListener("scroll", o), t.containerEl.value?.removeEventListener("mousedown", c), window.removeEventListener("mousemove", i), window.removeEventListener("mouseup", a);
|
|
533
553
|
}
|
|
534
|
-
return { init:
|
|
554
|
+
return { init: w, unMount: C };
|
|
535
555
|
}
|
|
536
|
-
function
|
|
537
|
-
const
|
|
556
|
+
function Ol(e, t, n = 600) {
|
|
557
|
+
const l = Je({
|
|
538
558
|
...e,
|
|
539
559
|
selectWay: "row",
|
|
540
560
|
scrollOptions: {
|
|
541
561
|
startSpeed: 5,
|
|
542
562
|
maxSpeed: 5
|
|
543
563
|
}
|
|
544
|
-
}), { observer:
|
|
545
|
-
let
|
|
546
|
-
function
|
|
547
|
-
clearTimeout(
|
|
548
|
-
}
|
|
549
|
-
function c(
|
|
550
|
-
|
|
551
|
-
const { clientX: T, clientY:
|
|
552
|
-
s(T,
|
|
553
|
-
},
|
|
554
|
-
}
|
|
555
|
-
function
|
|
556
|
-
|
|
557
|
-
const { clientX:
|
|
558
|
-
|
|
564
|
+
}), { observer: o } = l, { onScroll: r, dragStart: s, dragMove: d, dragEnd: v } = l;
|
|
565
|
+
let u;
|
|
566
|
+
function f() {
|
|
567
|
+
clearTimeout(u);
|
|
568
|
+
}
|
|
569
|
+
function c(_) {
|
|
570
|
+
f(), _.composedPath().some((T) => !!T?.getAttribute?.(e.attribute)) && (u = setTimeout(() => {
|
|
571
|
+
const { clientX: T, clientY: L } = _.targetTouches[0];
|
|
572
|
+
s(T, L), t?.(), d(T, L, () => _.preventDefault()), _.preventDefault();
|
|
573
|
+
}, n));
|
|
574
|
+
}
|
|
575
|
+
function i(_) {
|
|
576
|
+
f();
|
|
577
|
+
const { clientX: y, clientY: T } = _.targetTouches[0];
|
|
578
|
+
d(y, T, () => _.preventDefault());
|
|
559
579
|
}
|
|
560
|
-
function
|
|
561
|
-
|
|
580
|
+
function a() {
|
|
581
|
+
f(), v();
|
|
562
582
|
}
|
|
563
|
-
function
|
|
583
|
+
function w(_) {
|
|
564
584
|
try {
|
|
565
|
-
if (!
|
|
585
|
+
if (!l.init(_))
|
|
566
586
|
throw "\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";
|
|
567
|
-
if (!
|
|
587
|
+
if (!l.containerEl?.value)
|
|
568
588
|
return !1;
|
|
569
|
-
|
|
570
|
-
} catch (
|
|
571
|
-
console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25",
|
|
589
|
+
l.containerEl.value?.addEventListener("scroll", r), l.containerEl.value?.addEventListener("touchstart", c), l.containerEl.value?.addEventListener("touchmove", i), window.addEventListener("touchcancel", a), window.addEventListener("touchend", a);
|
|
590
|
+
} catch (y) {
|
|
591
|
+
console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25", y);
|
|
572
592
|
}
|
|
573
593
|
}
|
|
574
|
-
function
|
|
575
|
-
|
|
594
|
+
function C() {
|
|
595
|
+
o.disconnect(), l.containerEl.value?.removeEventListener("scroll", r), l.containerEl.value?.removeEventListener("touchstart", c), l.containerEl.value?.removeEventListener("touchmove", i), window.removeEventListener("touchcancel", a), window.removeEventListener("touchEnd", a);
|
|
576
596
|
}
|
|
577
|
-
return { init:
|
|
597
|
+
return { init: w, unMount: C };
|
|
578
598
|
}
|
|
579
|
-
const
|
|
599
|
+
const Mt = Symbol(), kt = /* @__PURE__ */ j({
|
|
580
600
|
__name: "Dialog",
|
|
581
601
|
props: {
|
|
582
602
|
visiable: { type: Boolean, default: !1 },
|
|
@@ -585,101 +605,116 @@ const It = Symbol(), $t = /* @__PURE__ */ j({
|
|
|
585
605
|
},
|
|
586
606
|
emits: ["update:visiable"],
|
|
587
607
|
setup(e, { emit: t }) {
|
|
588
|
-
const
|
|
589
|
-
|
|
608
|
+
const n = e, l = () => {
|
|
609
|
+
n.closeOnClickOverlay && t("update:visiable", !1);
|
|
590
610
|
};
|
|
591
|
-
return
|
|
592
|
-
default:
|
|
593
|
-
e.visiable ? (
|
|
611
|
+
return M(Mt, () => t("update:visiable", !1)), (o, r) => (B(), He(Pe, { name: "modal" }, {
|
|
612
|
+
default: Ae(() => [
|
|
613
|
+
e.visiable ? (B(), H("div", {
|
|
594
614
|
key: 0,
|
|
595
|
-
onClick:
|
|
615
|
+
onClick: l,
|
|
596
616
|
class: "lzc-modal"
|
|
597
617
|
}, [
|
|
598
|
-
|
|
599
|
-
onClick:
|
|
618
|
+
E("div", {
|
|
619
|
+
onClick: r[0] || (r[0] = at(() => {
|
|
600
620
|
}, ["stop"])),
|
|
601
|
-
class:
|
|
621
|
+
class: Fe(["lzc-dialog", e.dialogClass])
|
|
602
622
|
}, [
|
|
603
|
-
|
|
623
|
+
ye(o.$slots, "default", {}, void 0, !0)
|
|
604
624
|
], 2)
|
|
605
|
-
])) :
|
|
625
|
+
])) : ut("", !0)
|
|
606
626
|
]),
|
|
607
627
|
_: 3
|
|
608
628
|
}));
|
|
609
629
|
}
|
|
610
630
|
});
|
|
611
|
-
const
|
|
612
|
-
const
|
|
613
|
-
for (const [
|
|
614
|
-
|
|
615
|
-
return
|
|
616
|
-
},
|
|
617
|
-
function
|
|
618
|
-
function t(
|
|
619
|
-
const
|
|
631
|
+
const Q = (e, t) => {
|
|
632
|
+
const n = e.__vccOpts || e;
|
|
633
|
+
for (const [l, o] of t)
|
|
634
|
+
n[l] = o;
|
|
635
|
+
return n;
|
|
636
|
+
}, zt = /* @__PURE__ */ Q(kt, [["__scopeId", "data-v-e171c24d"]]);
|
|
637
|
+
function Rl(e) {
|
|
638
|
+
function t(n, l) {
|
|
639
|
+
const o = document.createElement("div"), r = {
|
|
620
640
|
setup() {
|
|
621
|
-
return () =>
|
|
622
|
-
|
|
641
|
+
return () => q(
|
|
642
|
+
zt,
|
|
623
643
|
{
|
|
624
644
|
visiable: !0,
|
|
625
645
|
"onUpdate:visiable": () => {
|
|
626
|
-
|
|
646
|
+
o?.remove();
|
|
627
647
|
},
|
|
628
648
|
...e
|
|
629
649
|
},
|
|
630
650
|
{
|
|
631
|
-
default: () =>
|
|
651
|
+
default: () => q(n, l)
|
|
632
652
|
}
|
|
633
653
|
);
|
|
634
654
|
}
|
|
635
655
|
};
|
|
636
|
-
return document.body.appendChild(
|
|
637
|
-
close: () =>
|
|
656
|
+
return document.body.appendChild(o), ue(q(r), o), {
|
|
657
|
+
close: () => o?.remove()
|
|
638
658
|
};
|
|
639
659
|
}
|
|
640
660
|
return {
|
|
641
661
|
create: t
|
|
642
662
|
};
|
|
643
663
|
}
|
|
644
|
-
function
|
|
664
|
+
function Dl({
|
|
645
665
|
component: e,
|
|
646
666
|
componentProps: t,
|
|
647
|
-
delay:
|
|
667
|
+
delay: n = 300
|
|
648
668
|
}) {
|
|
649
|
-
const
|
|
669
|
+
const l = `${n}ms`, o = h(!1), { load: r } = Dt(
|
|
650
670
|
`@keyframes delayLoad {
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
}
|
|
655
|
-
.delay-load {
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
}`
|
|
671
|
+
to {
|
|
672
|
+
opacity: 1;
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
.delay-load {
|
|
676
|
+
opacity: 0;
|
|
677
|
+
animation: delayLoad 0s ${l} forwards;
|
|
678
|
+
}`
|
|
659
679
|
), s = j({
|
|
660
680
|
setup() {
|
|
661
|
-
const
|
|
662
|
-
return
|
|
663
|
-
|
|
664
|
-
}), () =>
|
|
681
|
+
const u = Ct();
|
|
682
|
+
return oe(() => {
|
|
683
|
+
r(), u.value.classList.add("delay-load");
|
|
684
|
+
}), () => o.value && q(e, t);
|
|
665
685
|
}
|
|
666
686
|
});
|
|
667
|
-
function
|
|
668
|
-
|
|
687
|
+
function d() {
|
|
688
|
+
o.value = !0;
|
|
669
689
|
}
|
|
670
|
-
function
|
|
671
|
-
|
|
690
|
+
function v() {
|
|
691
|
+
o.value = !1;
|
|
672
692
|
}
|
|
673
|
-
return { LoadingComp: s, loading:
|
|
693
|
+
return { LoadingComp: s, loading: o, load: d, unload: v };
|
|
694
|
+
}
|
|
695
|
+
const Wt = {}, Nt = { class: "wrapper" }, Vt = /* @__PURE__ */ E("div", { class: "loading" }, null, -1), jt = [
|
|
696
|
+
Vt
|
|
697
|
+
];
|
|
698
|
+
function Kt(e, t) {
|
|
699
|
+
return B(), H("div", Nt, jt);
|
|
700
|
+
}
|
|
701
|
+
const Bl = /* @__PURE__ */ Q(Wt, [["render", Kt]]);
|
|
702
|
+
const Ut = {}, qt = (e) => (ce("data-v-9d3ce674"), e = e(), de(), e), Qt = /* @__PURE__ */ qt(() => /* @__PURE__ */ E("div", { class: "ldio-mm5gwljcryb" }, [
|
|
703
|
+
/* @__PURE__ */ E("div")
|
|
704
|
+
], -1)), Yt = [
|
|
705
|
+
Qt
|
|
706
|
+
];
|
|
707
|
+
function Gt(e, t) {
|
|
708
|
+
return B(), H("div", he(pe(e.$attrs)), Yt, 16);
|
|
674
709
|
}
|
|
675
|
-
const
|
|
710
|
+
const Il = /* @__PURE__ */ Q(Ut, [["render", Gt], ["__scopeId", "data-v-9d3ce674"]]), Xt = /* @__PURE__ */ j({
|
|
676
711
|
__name: "Toast",
|
|
677
712
|
props: {
|
|
678
713
|
message: null,
|
|
679
714
|
position: null
|
|
680
715
|
},
|
|
681
716
|
setup(e) {
|
|
682
|
-
const t = e,
|
|
717
|
+
const t = e, n = h(), l = h(), o = h(), r = S(() => {
|
|
683
718
|
switch (t.position) {
|
|
684
719
|
case "top":
|
|
685
720
|
return 10;
|
|
@@ -688,14 +723,14 @@ const At = /* @__PURE__ */ j({
|
|
|
688
723
|
case "bottom":
|
|
689
724
|
return 85;
|
|
690
725
|
}
|
|
691
|
-
}), s =
|
|
726
|
+
}), s = S(() => ({
|
|
692
727
|
position: "absolute",
|
|
693
728
|
borderRadius: "10px",
|
|
694
729
|
backgroundColor: "rgba(0, 0, 0, 0.8)",
|
|
695
730
|
padding: "14px 19px",
|
|
696
|
-
top: `calc(${
|
|
697
|
-
left: `calc(50% - ${
|
|
698
|
-
})),
|
|
731
|
+
top: `calc(${r.value}% - ${o.value}px)`,
|
|
732
|
+
left: `calc(50% - ${l.value}px)`
|
|
733
|
+
})), d = S(() => ({
|
|
699
734
|
width: "fit-content",
|
|
700
735
|
display: "flex",
|
|
701
736
|
justifyContent: "center",
|
|
@@ -703,41 +738,41 @@ const At = /* @__PURE__ */ j({
|
|
|
703
738
|
color: "white",
|
|
704
739
|
fontSize: "14px"
|
|
705
740
|
}));
|
|
706
|
-
return
|
|
707
|
-
|
|
708
|
-
}), (
|
|
741
|
+
return _e(() => {
|
|
742
|
+
l.value = n.value.offsetWidth / 2, o.value = n.value.offsetHeight / 2;
|
|
743
|
+
}), (v, u) => (B(), H("div", {
|
|
709
744
|
id: "toastWrapper",
|
|
710
745
|
ref_key: "toastWrapper",
|
|
711
|
-
ref:
|
|
746
|
+
ref: n,
|
|
712
747
|
class: "toastWrapper",
|
|
713
|
-
style:
|
|
748
|
+
style: k([D(s), { zIndex: 9999 }])
|
|
714
749
|
}, [
|
|
715
|
-
|
|
716
|
-
style:
|
|
750
|
+
E("div", {
|
|
751
|
+
style: k(D(d))
|
|
717
752
|
}, [
|
|
718
|
-
|
|
753
|
+
E("span", null, Me(e.message), 1)
|
|
719
754
|
], 4)
|
|
720
755
|
], 4));
|
|
721
756
|
}
|
|
722
757
|
});
|
|
723
|
-
const
|
|
758
|
+
const Zt = /* @__PURE__ */ Q(Xt, [["__scopeId", "data-v-15ab4094"]]), De = {
|
|
724
759
|
message: "\u61D2\u732B\u4E91 Yes!!!",
|
|
725
760
|
position: "middle",
|
|
726
761
|
duration: 1500
|
|
727
762
|
};
|
|
728
|
-
class
|
|
763
|
+
class Hl {
|
|
729
764
|
options;
|
|
730
765
|
container;
|
|
731
766
|
constructor(t) {
|
|
732
767
|
this.options = t, this.container = document.createElement("div");
|
|
733
768
|
}
|
|
734
769
|
present() {
|
|
735
|
-
const t =
|
|
736
|
-
|
|
737
|
-
const
|
|
770
|
+
const t = q(q(Zt), { ...De, ...this.options });
|
|
771
|
+
ue(t, this.container), document.body.insertBefore(this.container, document.body.firstChild);
|
|
772
|
+
const n = this.options.duration || De.duration;
|
|
738
773
|
setTimeout(() => {
|
|
739
774
|
this.dismiss();
|
|
740
|
-
},
|
|
775
|
+
}, n);
|
|
741
776
|
}
|
|
742
777
|
dismiss() {
|
|
743
778
|
if (this.container) {
|
|
@@ -745,12 +780,12 @@ class sn {
|
|
|
745
780
|
"#toastWrapper"
|
|
746
781
|
);
|
|
747
782
|
t.style.opacity = "0", t.style.transition = "opacity 0.4s ease-in", setTimeout(() => {
|
|
748
|
-
this.container && (
|
|
783
|
+
this.container && (ue(null, this.container), document.body.removeChild(this.container));
|
|
749
784
|
}, 500);
|
|
750
785
|
}
|
|
751
786
|
}
|
|
752
787
|
}
|
|
753
|
-
const
|
|
788
|
+
const Jt = ["xlink:href", "fill", "color"], Pl = /* @__PURE__ */ j({
|
|
754
789
|
__name: "SvgIcon",
|
|
755
790
|
props: {
|
|
756
791
|
name: null,
|
|
@@ -760,132 +795,132 @@ const Ft = ["xlink:href", "fill", "color"], an = /* @__PURE__ */ j({
|
|
|
760
795
|
height: null
|
|
761
796
|
},
|
|
762
797
|
setup(e) {
|
|
763
|
-
const t = e,
|
|
798
|
+
const t = e, n = S(() => `#${t.prefix}-${t.name}`), l = S(() => ({
|
|
764
799
|
width: `${t.width ?? t.height}px`,
|
|
765
800
|
height: `${t.height ?? t.width}px`,
|
|
766
801
|
aspectRatio: t.width && t.height ? void 0 : "1/1"
|
|
767
802
|
}));
|
|
768
|
-
return (
|
|
803
|
+
return (o, r) => (B(), H("svg", {
|
|
769
804
|
"aria-hidden": "",
|
|
770
|
-
style:
|
|
805
|
+
style: k(D(l))
|
|
771
806
|
}, [
|
|
772
|
-
|
|
773
|
-
"xlink:href":
|
|
807
|
+
E("use", {
|
|
808
|
+
"xlink:href": D(n),
|
|
774
809
|
fill: e.color,
|
|
775
810
|
color: e.color
|
|
776
|
-
}, null, 8,
|
|
811
|
+
}, null, 8, Jt)
|
|
777
812
|
], 4));
|
|
778
813
|
}
|
|
779
814
|
});
|
|
780
|
-
function
|
|
815
|
+
function el(e) {
|
|
781
816
|
const {
|
|
782
817
|
containerEl: t,
|
|
783
|
-
sliderEl:
|
|
784
|
-
autoHeight:
|
|
785
|
-
performance:
|
|
786
|
-
maxHeightRatio:
|
|
787
|
-
} = e, s =
|
|
788
|
-
let
|
|
789
|
-
const
|
|
818
|
+
sliderEl: n,
|
|
819
|
+
autoHeight: l,
|
|
820
|
+
performance: o = {},
|
|
821
|
+
maxHeightRatio: r = 0.9
|
|
822
|
+
} = e, s = h(!0), d = We(X, 100);
|
|
823
|
+
let v, u = "";
|
|
824
|
+
const f = h(0), c = h(0), i = h(0), a = h({
|
|
790
825
|
top: 0,
|
|
791
826
|
scrollTop: 0,
|
|
792
827
|
scrollHeight: 0,
|
|
793
828
|
clientHeight: 0
|
|
794
|
-
}),
|
|
829
|
+
}), w = h({
|
|
795
830
|
clientHeight: 0
|
|
796
|
-
}),
|
|
797
|
-
|
|
831
|
+
}), C = S(() => !!c.value), _ = S(() => a.value.scrollHeight > a.value.clientHeight), y = S(() => a.value.clientHeight - w.value.clientHeight), T = S(() => a.value.scrollHeight - a.value.clientHeight), L = S(() => Math.max(
|
|
832
|
+
a.value.clientHeight / a.value.scrollHeight,
|
|
798
833
|
0.05
|
|
799
|
-
)),
|
|
834
|
+
)), $ = S(() => L.value > r ? 0 : L.value * a.value.clientHeight), Y = S(() => ({
|
|
800
835
|
willChange: "transform",
|
|
801
|
-
transform: `translate3d(0,${
|
|
802
|
-
height:
|
|
836
|
+
transform: `translate3d(0,${i.value}px,0)`,
|
|
837
|
+
height: l ? `${$.value}px` : void 0
|
|
803
838
|
}));
|
|
804
|
-
function
|
|
805
|
-
|
|
806
|
-
}
|
|
807
|
-
function F() {
|
|
808
|
-
t.value.style.scrollBehavior = d, c.value = 0, i();
|
|
839
|
+
function G(R) {
|
|
840
|
+
K(), c.value = R.clientY - n.value.getBoundingClientRect().top || 1, u = getComputedStyle(t.value).scrollBehavior, u === "smooth" && (t.value.style.scrollBehavior = "unset");
|
|
809
841
|
}
|
|
810
842
|
function z() {
|
|
843
|
+
t.value.style.scrollBehavior = u, c.value = 0, d();
|
|
844
|
+
}
|
|
845
|
+
function K() {
|
|
811
846
|
s.value = !1;
|
|
812
847
|
}
|
|
813
|
-
function
|
|
814
|
-
|
|
848
|
+
function X() {
|
|
849
|
+
C.value || (s.value = !0);
|
|
815
850
|
}
|
|
816
|
-
function
|
|
817
|
-
if (!
|
|
851
|
+
function Z(R) {
|
|
852
|
+
if (!C.value)
|
|
818
853
|
return;
|
|
819
|
-
let
|
|
820
|
-
|
|
821
|
-
top:
|
|
854
|
+
let O = R.clientY - a.value.top - c.value;
|
|
855
|
+
O < 0 ? i.value = 0 : O >= y.value ? i.value = y.value : i.value = O, t.value.scrollTo({
|
|
856
|
+
top: i.value / y.value * T.value
|
|
822
857
|
});
|
|
823
858
|
}
|
|
824
|
-
function
|
|
825
|
-
|
|
859
|
+
function F() {
|
|
860
|
+
C.value || ee();
|
|
826
861
|
}
|
|
827
|
-
function
|
|
828
|
-
cancelAnimationFrame(
|
|
862
|
+
function ee() {
|
|
863
|
+
cancelAnimationFrame(v), v = requestAnimationFrame(se);
|
|
829
864
|
}
|
|
830
|
-
function
|
|
831
|
-
t.value && (
|
|
865
|
+
function se() {
|
|
866
|
+
t.value && (f.value = o.scrollTop?.value ?? t.value.scrollTop, i.value = f.value / T.value * y.value);
|
|
832
867
|
}
|
|
833
|
-
function
|
|
834
|
-
let
|
|
835
|
-
|
|
868
|
+
function J(R) {
|
|
869
|
+
let O = "addEventListener";
|
|
870
|
+
R === "add" ? O = "addEventListener" : O = "removeEventListener", n.value?.[O]("pointerdown", G, {
|
|
836
871
|
passive: !0
|
|
837
|
-
}), window[
|
|
872
|
+
}), window[O]("pointermove", Z, { passive: !0 }), window[O]("pointerup", z, { passive: !0 });
|
|
838
873
|
}
|
|
839
|
-
const
|
|
840
|
-
|
|
874
|
+
const te = new MutationObserver((R) => {
|
|
875
|
+
R.map((le) => le.oldValue).join().includes("height") && m();
|
|
841
876
|
});
|
|
842
|
-
function
|
|
843
|
-
|
|
877
|
+
function m() {
|
|
878
|
+
a.value.top = t.value?.getBoundingClientRect().top ?? 0, a.value.scrollHeight = t.value?.scrollHeight ?? 0, a.value.clientHeight = t.value?.clientHeight ?? 0;
|
|
844
879
|
}
|
|
845
|
-
function
|
|
846
|
-
|
|
847
|
-
|
|
880
|
+
function b() {
|
|
881
|
+
K(), setTimeout(() => {
|
|
882
|
+
w.value.clientHeight = n.value?.clientHeight ?? 0, X();
|
|
848
883
|
}, 150);
|
|
849
884
|
}
|
|
850
|
-
function
|
|
851
|
-
let
|
|
852
|
-
|
|
853
|
-
const
|
|
854
|
-
for (let
|
|
855
|
-
const
|
|
856
|
-
if (
|
|
885
|
+
function A(R, O, le = "dynamic-styles") {
|
|
886
|
+
let U = document.getElementById(le);
|
|
887
|
+
U || (U = document.createElement("style"), U.id = le, document.head.appendChild(U));
|
|
888
|
+
const re = U.sheet.cssRules, ae = re.length, p = `${R} { ${O} }`;
|
|
889
|
+
for (let g = 0; g < ae; g++) {
|
|
890
|
+
const I = re[g];
|
|
891
|
+
if (I.selectorText === R && I.style.cssText === O)
|
|
857
892
|
return;
|
|
858
893
|
}
|
|
859
|
-
|
|
894
|
+
U.sheet.insertRule(p, ae);
|
|
860
895
|
}
|
|
861
|
-
function
|
|
862
|
-
t.value &&
|
|
896
|
+
function P() {
|
|
897
|
+
t.value && n.value ? (A(
|
|
863
898
|
".hide-scrollbar",
|
|
864
899
|
"scrollbar-width: none; -ms-overflow-style: none;"
|
|
865
|
-
),
|
|
900
|
+
), A(".hide-scrollbar::-webkit-scrollbar", "display: none"), t.value.classList.add("hide-scrollbar"), t.value.addEventListener("scroll", F, {
|
|
866
901
|
passive: !0
|
|
867
|
-
}),
|
|
902
|
+
}), J("add"), te.observe(t.value, {
|
|
868
903
|
subtree: !0,
|
|
869
904
|
attributeOldValue: !0,
|
|
870
905
|
attributeFilter: ["style"]
|
|
871
906
|
}), setTimeout(() => {
|
|
872
|
-
|
|
873
|
-
}, 100),
|
|
907
|
+
m();
|
|
908
|
+
}, 100), b()) : console.error("useScrollBar:", "\u521D\u59CB\u5316\u5931\u8D25!", { containerEl: t, sliderEl: n });
|
|
874
909
|
}
|
|
875
|
-
return
|
|
876
|
-
|
|
910
|
+
return V(f, () => {
|
|
911
|
+
K(), d();
|
|
877
912
|
}), {
|
|
878
913
|
isScrollEnd: s,
|
|
879
|
-
isDragSlider:
|
|
880
|
-
offsetTop:
|
|
881
|
-
scrollTop:
|
|
882
|
-
scrollable:
|
|
914
|
+
isDragSlider: C,
|
|
915
|
+
offsetTop: i,
|
|
916
|
+
scrollTop: f,
|
|
917
|
+
scrollable: _,
|
|
883
918
|
sliderPos: Y,
|
|
884
|
-
init:
|
|
885
|
-
modifySliderEventListener:
|
|
919
|
+
init: P,
|
|
920
|
+
modifySliderEventListener: J
|
|
886
921
|
};
|
|
887
922
|
}
|
|
888
|
-
const
|
|
923
|
+
const tl = (e) => (ce("data-v-edec7292"), e = e(), de(), e), ll = /* @__PURE__ */ tl(() => /* @__PURE__ */ E("div", { class: "default-slider" }, null, -1)), nl = /* @__PURE__ */ j({
|
|
889
924
|
__name: "ScrollBar",
|
|
890
925
|
props: {
|
|
891
926
|
containerEl: null,
|
|
@@ -894,109 +929,211 @@ const kt = (e) => (Ie("data-v-edec7292"), e = e(), $e(), e), zt = /* @__PURE__ *
|
|
|
894
929
|
performance: null
|
|
895
930
|
},
|
|
896
931
|
setup(e, { expose: t }) {
|
|
897
|
-
const
|
|
898
|
-
containerEl:
|
|
899
|
-
sliderEl:
|
|
900
|
-
autoHeight:
|
|
901
|
-
performance:
|
|
902
|
-
}), { scrollable:
|
|
903
|
-
|
|
904
|
-
|
|
932
|
+
const n = e, l = !!it().default, o = h(null), r = S(() => n.containerEl), s = el({
|
|
933
|
+
containerEl: r,
|
|
934
|
+
sliderEl: o,
|
|
935
|
+
autoHeight: l ? n.autoHeight : !0,
|
|
936
|
+
performance: n.performance
|
|
937
|
+
}), { scrollable: d, isScrollEnd: v, sliderPos: u } = s, f = h(!1), c = n.autoHide ? S(() => f.value || !v.value) : S(() => d.value);
|
|
938
|
+
oe(() => {
|
|
939
|
+
_e(() => {
|
|
905
940
|
s.init();
|
|
906
941
|
});
|
|
907
|
-
}),
|
|
942
|
+
}), Ie(() => {
|
|
908
943
|
s.modifySliderEventListener("remove");
|
|
909
944
|
});
|
|
910
|
-
function
|
|
911
|
-
|
|
945
|
+
function i() {
|
|
946
|
+
f.value = !0;
|
|
912
947
|
}
|
|
913
|
-
function
|
|
914
|
-
|
|
948
|
+
function a() {
|
|
949
|
+
f.value = !1;
|
|
915
950
|
}
|
|
916
|
-
return t({ uScrollBarReturn: s }), (
|
|
917
|
-
default:
|
|
918
|
-
|
|
951
|
+
return t({ uScrollBarReturn: s }), (w, C) => (B(), He(Pe, null, {
|
|
952
|
+
default: Ae(() => [
|
|
953
|
+
ct(E("div", {
|
|
919
954
|
ref_key: "sliderRef",
|
|
920
|
-
ref:
|
|
955
|
+
ref: o,
|
|
921
956
|
class: "slider-wrapper",
|
|
922
|
-
onMouseenter:
|
|
923
|
-
onMouseleave:
|
|
924
|
-
style:
|
|
957
|
+
onMouseenter: i,
|
|
958
|
+
onMouseleave: a,
|
|
959
|
+
style: k(D(u))
|
|
925
960
|
}, [
|
|
926
|
-
|
|
927
|
-
|
|
961
|
+
ye(w.$slots, "default", {}, () => [
|
|
962
|
+
ll
|
|
928
963
|
], !0)
|
|
929
964
|
], 36), [
|
|
930
|
-
[
|
|
965
|
+
[dt, D(c)]
|
|
931
966
|
])
|
|
932
967
|
]),
|
|
933
968
|
_: 3
|
|
934
969
|
}));
|
|
935
970
|
}
|
|
936
971
|
});
|
|
937
|
-
const
|
|
972
|
+
const Al = /* @__PURE__ */ Q(nl, [["__scopeId", "data-v-edec7292"]]), ol = (e) => (ce("data-v-09f2db7d"), e = e(), de(), e), sl = { class: "pull-refresh" }, rl = {
|
|
973
|
+
key: 0,
|
|
974
|
+
class: "pull-arrow-circle"
|
|
975
|
+
}, al = {
|
|
976
|
+
key: 0,
|
|
977
|
+
class: "box-load"
|
|
978
|
+
}, ul = { class: "left-load" }, il = { class: "right-load" }, cl = /* @__PURE__ */ ol(() => /* @__PURE__ */ E("div", { class: "among-load" }, null, -1)), dl = { class: "pull-arrow" }, vl = { key: 1 }, fl = /* @__PURE__ */ j({
|
|
979
|
+
__name: "PullRefresh",
|
|
980
|
+
props: {
|
|
981
|
+
refresh: null,
|
|
982
|
+
refreshOff: { type: Boolean, default: !1 },
|
|
983
|
+
scrollTop: null,
|
|
984
|
+
pullRefreshContainer: null
|
|
985
|
+
},
|
|
986
|
+
setup(e) {
|
|
987
|
+
const t = e, n = "#2EC1CC", l = h(-999), o = h(1), r = h(0), s = h(0.3), d = h(!1), v = h(0), u = h(0), f = h(0), c = h(0), i = h(0), a = h(), w = S(() => t.scrollTop), C = S(() => ({
|
|
988
|
+
transition: `${c.value}ms`,
|
|
989
|
+
transform: `translate3d(0,${l.value}px, 0) scale(${o.value})`
|
|
990
|
+
})), _ = S(() => ({
|
|
991
|
+
borderColor: n,
|
|
992
|
+
transition: c.value,
|
|
993
|
+
transform: `rotate(${100 + r.value}deg)`,
|
|
994
|
+
opacity: s.value
|
|
995
|
+
}));
|
|
996
|
+
V(i, ($) => {
|
|
997
|
+
$ === 0 && (l.value = -50, s.value = 0.3);
|
|
998
|
+
}), V(u, ($) => {
|
|
999
|
+
i.value !== 2 && ($ === 0 && (l.value = -50), $ <= 50 && $ > 0 && (l.value = $ - 45, r.value = Math.pow($, 1.5), $ > 15 ? d.value = !0 : d.value = !1), $ > 50 && (l.value = 5, s.value = 1, i.value));
|
|
1000
|
+
});
|
|
1001
|
+
const y = ($) => {
|
|
1002
|
+
t.refreshOff || !t?.refresh || i.value !== 2 && w.value === 0 && (v.value === 0 && (v.value = $.touches[0].pageY), f.value = 0, L.value.style.transition = `${f.value}ms`, c.value = 0, u.value = $.touches[0].pageY - v.value, L.value.style.transform = `translate3d(0, ${u.value}px, 0)`);
|
|
1003
|
+
}, T = () => {
|
|
1004
|
+
t.refreshOff || !t?.refresh || i.value !== 2 && (v.value = 0, f.value = 300, L.value.style.transition = `${f.value}ms`, u.value > 50 ? (i.value = 2, u.value = 36, L.value.style.transform = `translate3d(0, ${u.value}px, 0)`, c.value = 300, t?.refresh && t?.refresh().then(() => {
|
|
1005
|
+
a.value = "\u5237\u65B0\u6210\u529F";
|
|
1006
|
+
}).catch(() => {
|
|
1007
|
+
a.value = "\u5237\u65B0\u5931\u8D25";
|
|
1008
|
+
}).finally(() => {
|
|
1009
|
+
setTimeout(() => {
|
|
1010
|
+
i.value = 0, u.value = 0, L.value.style.transform = `translate3d(0, ${u.value}px, 0)`, setTimeout(() => {
|
|
1011
|
+
a.value = void 0;
|
|
1012
|
+
}, c.value);
|
|
1013
|
+
}, 600);
|
|
1014
|
+
})) : (u.value = 0, L.value.style.transform = `translate3d(0, ${u.value}px, 0)`));
|
|
1015
|
+
}, L = h(null);
|
|
1016
|
+
return oe(() => {
|
|
1017
|
+
L.value = document.querySelector(
|
|
1018
|
+
t.pullRefreshContainer
|
|
1019
|
+
), L.value.addEventListener("touchmove", y), L.value.addEventListener("touchend", T);
|
|
1020
|
+
}), ($, Y) => (B(), H("div", sl, [
|
|
1021
|
+
E("div", {
|
|
1022
|
+
class: "pull-refresh-box",
|
|
1023
|
+
style: k(D(C))
|
|
1024
|
+
}, [
|
|
1025
|
+
a.value ? (B(), H("div", vl, Me(a.value), 1)) : (B(), H("div", rl, [
|
|
1026
|
+
i.value == 2 ? (B(), H("div", al, [
|
|
1027
|
+
E("div", ul, [
|
|
1028
|
+
E("div", {
|
|
1029
|
+
class: "left-circle",
|
|
1030
|
+
style: k({ backgroundColor: n })
|
|
1031
|
+
}, null, 4)
|
|
1032
|
+
]),
|
|
1033
|
+
E("div", il, [
|
|
1034
|
+
E("div", {
|
|
1035
|
+
class: "right-circle",
|
|
1036
|
+
style: k({ backgroundColor: n })
|
|
1037
|
+
}, null, 4)
|
|
1038
|
+
]),
|
|
1039
|
+
cl
|
|
1040
|
+
])) : (B(), H("div", {
|
|
1041
|
+
key: 1,
|
|
1042
|
+
class: "pull-circle-line",
|
|
1043
|
+
style: k(D(_))
|
|
1044
|
+
}, [
|
|
1045
|
+
E("div", dl, [
|
|
1046
|
+
E("div", {
|
|
1047
|
+
class: Fe(["arrows", { opacity: d.value }]),
|
|
1048
|
+
style: k({ borderBottomColor: n })
|
|
1049
|
+
}, null, 6)
|
|
1050
|
+
])
|
|
1051
|
+
], 4))
|
|
1052
|
+
]))
|
|
1053
|
+
], 4)
|
|
1054
|
+
]));
|
|
1055
|
+
}
|
|
1056
|
+
});
|
|
1057
|
+
const hl = /* @__PURE__ */ Q(fl, [["__scopeId", "data-v-09f2db7d"]]), pl = { class: "virtualListWrapper" }, ml = {
|
|
938
1058
|
inheritAttrs: !1
|
|
939
|
-
},
|
|
940
|
-
...
|
|
1059
|
+
}, gl = /* @__PURE__ */ j({
|
|
1060
|
+
...ml,
|
|
941
1061
|
__name: "VirtualList",
|
|
942
1062
|
props: {
|
|
943
1063
|
data: null,
|
|
944
1064
|
itemHeight: null,
|
|
945
|
-
overscan: { default: 10 }
|
|
1065
|
+
overscan: { default: 10 },
|
|
1066
|
+
refresh: null,
|
|
1067
|
+
refreshOff: { type: Boolean, default: !1 }
|
|
946
1068
|
},
|
|
947
1069
|
emits: ["scrollEnd"],
|
|
948
|
-
setup(e, { expose: t, emit:
|
|
949
|
-
const
|
|
950
|
-
itemHeight: (
|
|
951
|
-
overscan:
|
|
1070
|
+
setup(e, { expose: t, emit: n }) {
|
|
1071
|
+
const l = e, o = Ft(vt(l, "data"), {
|
|
1072
|
+
itemHeight: (c) => l.itemHeight(l.data[c]),
|
|
1073
|
+
overscan: l.overscan,
|
|
952
1074
|
scrollEndHook: () => {
|
|
953
|
-
|
|
1075
|
+
n("scrollEnd");
|
|
954
1076
|
}
|
|
955
|
-
}), {
|
|
1077
|
+
}), {
|
|
1078
|
+
list: r,
|
|
1079
|
+
containerProps: s,
|
|
1080
|
+
wrapperProps: d,
|
|
1081
|
+
innerProps: v,
|
|
1082
|
+
getItemHeightData: u,
|
|
1083
|
+
scrollTop: f
|
|
1084
|
+
} = o;
|
|
956
1085
|
return t({
|
|
957
|
-
vListReturn:
|
|
958
|
-
}), (
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
1086
|
+
vListReturn: o
|
|
1087
|
+
}), (c, i) => (B(), H(Ee, null, [
|
|
1088
|
+
ft(hl, {
|
|
1089
|
+
refresh: e.refresh,
|
|
1090
|
+
refreshOff: e.refreshOff,
|
|
1091
|
+
scrollTop: D(f),
|
|
1092
|
+
pullRefreshContainer: ".virtualListWrapper"
|
|
1093
|
+
}, null, 8, ["refresh", "refreshOff", "scrollTop"]),
|
|
1094
|
+
E("div", pl, [
|
|
1095
|
+
E("div", ht({
|
|
1096
|
+
onScrollPassive: i[0] || (i[0] = (...a) => D(s).onScroll && D(s).onScroll(...a)),
|
|
1097
|
+
ref: D(s).ref,
|
|
1098
|
+
class: "virtualList"
|
|
1099
|
+
}, c.$attrs), [
|
|
1100
|
+
E("div", he(pe(D(d))), [
|
|
1101
|
+
E("div", he(pe(D(v))), [
|
|
1102
|
+
(B(!0), H(Ee, null, pt(D(r), ({ index: a, data: w }) => (B(), H("div", {
|
|
1103
|
+
key: a,
|
|
1104
|
+
style: k({
|
|
1105
|
+
height: `${D(u)(a).height}px`,
|
|
1106
|
+
display: "flex"
|
|
1107
|
+
})
|
|
1108
|
+
}, [
|
|
1109
|
+
ye(c.$slots, "default", {
|
|
1110
|
+
data: w,
|
|
1111
|
+
index: a
|
|
1112
|
+
}, void 0, !0)
|
|
1113
|
+
], 4))), 128))
|
|
1114
|
+
], 16)
|
|
978
1115
|
], 16)
|
|
979
1116
|
], 16)
|
|
980
|
-
]
|
|
981
|
-
]));
|
|
1117
|
+
])
|
|
1118
|
+
], 64));
|
|
982
1119
|
}
|
|
983
1120
|
});
|
|
984
|
-
const
|
|
1121
|
+
const Fl = /* @__PURE__ */ Q(gl, [["__scopeId", "data-v-259e2930"]]), we = (e) => (ce("data-v-40e00f20"), e = e(), de(), e), _l = { style: { position: "absolute" } }, yl = /* @__PURE__ */ we(() => /* @__PURE__ */ E("div", { class: "wrapper" }, null, -1)), bl = ["width", "height"], wl = /* @__PURE__ */ we(() => /* @__PURE__ */ E("title", null, "logo", -1)), Sl = /* @__PURE__ */ we(() => /* @__PURE__ */ E("g", {
|
|
985
1122
|
id: "group-1",
|
|
986
1123
|
stroke: "none",
|
|
987
1124
|
"stroke-width": "1",
|
|
988
1125
|
fill: "none",
|
|
989
1126
|
"fill-rule": "evenodd"
|
|
990
1127
|
}, [
|
|
991
|
-
/* @__PURE__ */
|
|
1128
|
+
/* @__PURE__ */ E("path", {
|
|
992
1129
|
d: "M260,0 L260,260 L0,260 L0,0 L260,0 Z M173.523673,59.478426 L168.543315,62.4752911 C160.9116,67.0675753 153.089651,71.6349169 145.95806,75.5800674 C142.130471,77.697465 141.695584,77.8197038 137.842227,77.8197038 L123.620155,77.8194132 C120.16747,77.8127705 119.807362,77.673506 116.200006,75.5626777 L115.86045,75.3641139 C113.295911,73.8653877 110.281688,72.1255413 103.60737,68.2932221 C100.032855,66.2486474 96.3694634,64.1645054 92.8123362,62.1486494 L88.1098826,59.4837265 L86.4238232,64.6191026 C83.7525911,72.7551036 81.4062856,80.7653112 79.9222326,87.4417622 C78.9474243,91.8460343 78.2380884,93.2327734 74.2195073,98.9752733 C73.3694777,100.207223 72.630007,101.343155 72.0710109,102.283257 C67.5201215,110.313953 65.2975905,119.339776 65.6004928,128.457001 C66.1750084,143.318086 73.5375842,157.955758 85.6992798,168.473706 C96.9509724,178.204645 111.5737,183.826593 127.858154,184.209647 L130.088901,184.229303 C130.3376,186.684365 130.531293,189.982467 130.67329,193.770543 L130.951876,201.202421 L137.351863,197.414204 C154.766094,187.106546 169.345402,176.172255 180.160428,163.526119 C190.679421,151.226139 196.179795,138.745301 195.345608,125.762609 C194.727393,116.39373 192.289395,107.848059 187.082918,99.046007 C186.275378,97.7498121 185.738167,97.0056347 184.495395,95.37077 C181.975467,92.0558065 181.159964,90.5424149 180.493634,87.4039653 C178.713605,78.9218624 176.863265,71.4211865 175.088993,65.0761883 L173.523673,59.478426 Z M93.177,72.537 L93.8226224,72.9040486 C95.6240552,73.9292933 97.4266638,74.9575498 99.2051531,75.9748184 C106.15023,79.9626119 109.111289,81.6727026 111.728598,83.2042091 C116.752992,86.1442112 118.538634,86.6733184 123.964152,86.6733184 L137.842227,86.6733184 C143.264867,86.6733184 145.156143,86.1417146 150.243765,83.3272749 L153.915953,81.276117 C157.635687,79.179445 161.486156,76.9543599 165.360239,74.6740288 L168.062636,73.0710869 L168.527808,74.8705095 C169.630114,79.2468106 170.742831,84.0476913 171.830914,89.2325336 C172.820403,93.8931438 174.207097,96.4665356 177.447051,100.728693 C178.530829,102.154402 178.952253,102.738183 179.517404,103.643654 C183.925243,111.098001 185.980436,118.301862 186.51071,126.337939 C187.173867,136.658947 182.587388,147.066077 173.431821,157.771787 L171.503004,159.959402 C163.609627,168.649028 153.591728,176.617571 141.90907,184.187495 L139.123121,185.960576 L139.113767,185.819152 C139.047016,184.932364 138.975009,184.102769 138.897435,183.336992 C138.769034,182.069465 138.589718,180.629122 138.367155,179.053334 L137.795381,175.005053 L133.714496,175.253822 C132.500079,175.327852 131.274186,175.368647 130.037423,175.375838 C114.999567,175.463276 101.629066,170.545082 91.4908024,161.777083 C81.1421175,152.827103 74.9249947,140.466728 74.4483613,128.138982 C74.2004611,120.675327 76.0261036,113.26129 79.7275986,106.727863 C80.126032,106.059698 80.7615655,105.083428 81.4902403,104.02721 C86.0997527,97.4404488 87.2937074,95.1062887 88.5657754,89.358959 C89.6596645,84.4377825 91.2792852,78.6447463 93.1627518,72.6043699 L93.177,72.537 Z",
|
|
993
1130
|
id: "path-1",
|
|
994
1131
|
fill: "#FFF"
|
|
995
1132
|
})
|
|
996
|
-
], -1)),
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
],
|
|
1133
|
+
], -1)), El = [
|
|
1134
|
+
wl,
|
|
1135
|
+
Sl
|
|
1136
|
+
], Cl = /* @__PURE__ */ j({
|
|
1000
1137
|
__name: "Loading",
|
|
1001
1138
|
props: {
|
|
1002
1139
|
width: { default: "90" },
|
|
@@ -1005,46 +1142,48 @@ const un = /* @__PURE__ */ le(jt, [["__scopeId", "data-v-4ba97cce"]]), ge = (e)
|
|
|
1005
1142
|
},
|
|
1006
1143
|
setup(e) {
|
|
1007
1144
|
const t = e;
|
|
1008
|
-
|
|
1009
|
-
"703ef503":
|
|
1145
|
+
mt((l) => ({
|
|
1146
|
+
"703ef503": n
|
|
1010
1147
|
}));
|
|
1011
|
-
const
|
|
1012
|
-
return (
|
|
1013
|
-
|
|
1014
|
-
(
|
|
1148
|
+
const n = `${t.duration}ms`;
|
|
1149
|
+
return (l, o) => (B(), H("div", _l, [
|
|
1150
|
+
yl,
|
|
1151
|
+
(B(), H("svg", {
|
|
1015
1152
|
style: { position: "relative" },
|
|
1016
1153
|
width: e.width,
|
|
1017
1154
|
height: e.height,
|
|
1018
1155
|
viewBox: "0 0 260 260",
|
|
1019
1156
|
version: "1.1",
|
|
1020
1157
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1021
|
-
},
|
|
1158
|
+
}, El, 8, bl))
|
|
1022
1159
|
]));
|
|
1023
1160
|
}
|
|
1024
1161
|
});
|
|
1025
|
-
const
|
|
1162
|
+
const Ml = /* @__PURE__ */ Q(Cl, [["__scopeId", "data-v-40e00f20"]]);
|
|
1026
1163
|
export {
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
Ke as
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1164
|
+
Bl as BackgroundLoading,
|
|
1165
|
+
Il as DefaultLoading,
|
|
1166
|
+
Ml as Loading,
|
|
1167
|
+
Al as ScrollBar,
|
|
1168
|
+
Pl as SvgIcon,
|
|
1169
|
+
Hl as ToastCreator,
|
|
1170
|
+
Fl as VirtualList,
|
|
1171
|
+
qe as allSelectedKey,
|
|
1172
|
+
Mt as closeDialogKey,
|
|
1173
|
+
Rl as dialogController,
|
|
1174
|
+
Xe as isAllSelectedKey,
|
|
1175
|
+
Ue as isSelectedKey,
|
|
1176
|
+
Ye as selectAllKey,
|
|
1177
|
+
Qe as selectKey,
|
|
1178
|
+
je as toggleAllKey,
|
|
1179
|
+
Ke as toggleKey,
|
|
1180
|
+
Ze as unselectAllKey,
|
|
1181
|
+
Ge as unselectKey,
|
|
1182
|
+
Dl as useDelayLoad,
|
|
1183
|
+
Je as useDragSelect,
|
|
1184
|
+
Ol as useDragSelectByMobile,
|
|
1185
|
+
$l as useDragSelectByPc,
|
|
1186
|
+
Ll as useSelectable,
|
|
1187
|
+
Tl as useSelectableInjectors,
|
|
1188
|
+
Ft as useVirtualList
|
|
1050
1189
|
};
|