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