@lazycatcloud/lzc-toolkit 0.0.94 → 0.0.96
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 +129 -125
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getCurrentScope as st, onScopeDispose as at, getCurrentInstance as
|
|
1
|
+
import { getCurrentScope as st, onScopeDispose as at, getCurrentInstance as De, onMounted as ne, nextTick as me, ref as p, watch as Y, customRef as rt, unref as R, readonly as ut, onUpdated as it, shallowRef as ct, computed as w, onUnmounted as Re, inject as V, provide as z, defineComponent as j, h as Q, render as se, openBlock as I, createBlock as Ie, Transition as Be, withCtx as Me, withDirectives as Pe, createElementBlock as H, createElementVNode as x, withModifiers as He, normalizeClass as Ae, renderSlot as ge, createCommentVNode as dt, useCssVars as Fe, normalizeProps as ve, guardReactiveProps as fe, pushScopeId as re, popScopeId as ue, normalizeStyle as W, toDisplayString as ke, useSlots as vt, vShow as ft, toRef as ht, Fragment as we, createVNode as pt, mergeProps as mt, renderList as gt } from "vue";
|
|
2
2
|
const _t = {
|
|
3
3
|
created(e, t) {
|
|
4
4
|
let n, o;
|
|
@@ -53,7 +53,7 @@ function yt(e, t = {}) {
|
|
|
53
53
|
}, s);
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function bt(e, t = !0, n = !0) {
|
|
57
57
|
let o = 0, l, a = !0;
|
|
58
58
|
const s = () => {
|
|
59
59
|
l && (clearTimeout(l), l = void 0);
|
|
@@ -67,7 +67,7 @@ function wt(e, t = !0, n = !0) {
|
|
|
67
67
|
}, v)), !n && !l && (l = setTimeout(() => a = !0, v)), a = !1;
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function wt(e) {
|
|
71
71
|
return e;
|
|
72
72
|
}
|
|
73
73
|
function Et(e, t) {
|
|
@@ -93,12 +93,12 @@ function Ye(e, t = 200, n = {}) {
|
|
|
93
93
|
return ze(yt(t, n), e);
|
|
94
94
|
}
|
|
95
95
|
function Se(e, t = 200, n = !1, o = !0) {
|
|
96
|
-
return ze(
|
|
96
|
+
return ze(bt(t, n, o), e);
|
|
97
97
|
}
|
|
98
|
-
function
|
|
99
|
-
|
|
98
|
+
function je(e, t = !0) {
|
|
99
|
+
De() ? ne(e) : t ? e() : me(e);
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function Ne(e) {
|
|
102
102
|
var t;
|
|
103
103
|
const n = ae(e);
|
|
104
104
|
return (t = n?.$el) != null ? t : n;
|
|
@@ -108,16 +108,16 @@ le && window.navigator;
|
|
|
108
108
|
le && window.location;
|
|
109
109
|
function xt(e, t = !1) {
|
|
110
110
|
const n = p(), o = () => n.value = Boolean(e());
|
|
111
|
-
return o(),
|
|
111
|
+
return o(), je(o, t), n;
|
|
112
112
|
}
|
|
113
113
|
const he = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, pe = "__vueuse_ssr_handlers__";
|
|
114
114
|
he[pe] = he[pe] || {};
|
|
115
115
|
he[pe];
|
|
116
116
|
function Lt() {
|
|
117
|
-
const e =
|
|
117
|
+
const e = De(), t = Et(() => null, () => e.proxy.$el);
|
|
118
118
|
return it(t.trigger), ne(t.trigger), t;
|
|
119
119
|
}
|
|
120
|
-
var xe = Object.getOwnPropertySymbols, Tt = Object.prototype.hasOwnProperty, Ot = Object.prototype.propertyIsEnumerable,
|
|
120
|
+
var xe = Object.getOwnPropertySymbols, Tt = Object.prototype.hasOwnProperty, Ot = Object.prototype.propertyIsEnumerable, $t = (e, t) => {
|
|
121
121
|
var n = {};
|
|
122
122
|
for (var o in e)
|
|
123
123
|
Tt.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
|
|
@@ -126,12 +126,12 @@ var xe = Object.getOwnPropertySymbols, Tt = Object.prototype.hasOwnProperty, Ot
|
|
|
126
126
|
t.indexOf(o) < 0 && Ot.call(e, o) && (n[o] = e[o]);
|
|
127
127
|
return n;
|
|
128
128
|
};
|
|
129
|
-
function
|
|
130
|
-
const o = n, { window: l = Ct } = o, a =
|
|
129
|
+
function Dt(e, t, n = {}) {
|
|
130
|
+
const o = n, { window: l = Ct } = o, a = $t(o, ["window"]);
|
|
131
131
|
let s;
|
|
132
132
|
const r = xt(() => l && "ResizeObserver" in l), h = () => {
|
|
133
133
|
s && (s.disconnect(), s = void 0);
|
|
134
|
-
}, v = Y(() =>
|
|
134
|
+
}, v = Y(() => Ne(e), (c) => {
|
|
135
135
|
h(), r.value && l && c && (s = new ResizeObserver(t), s.observe(c, a));
|
|
136
136
|
}, { immediate: !0, flush: "post" }), i = () => {
|
|
137
137
|
h(), v();
|
|
@@ -143,10 +143,10 @@ function $t(e, t, n = {}) {
|
|
|
143
143
|
}
|
|
144
144
|
function Rt(e, t = { width: 0, height: 0 }, n = {}) {
|
|
145
145
|
const { box: o = "content-box" } = n, l = p(t.width), a = p(t.height);
|
|
146
|
-
return
|
|
146
|
+
return Dt(e, ([s]) => {
|
|
147
147
|
const r = o === "border-box" ? s.borderBoxSize : o === "content-box" ? s.contentBoxSize : s.devicePixelContentBoxSize;
|
|
148
148
|
r ? (l.value = r.reduce((h, { inlineSize: v }) => h + v, 0), a.value = r.reduce((h, { blockSize: v }) => h + v, 0)) : (l.value = s.contentRect.width, a.value = s.contentRect.height);
|
|
149
|
-
}, n), Y(() =>
|
|
149
|
+
}, n), Y(() => Ne(e), (s) => {
|
|
150
150
|
l.value = s ? t.width : 0, a.value = s ? t.height : 0;
|
|
151
151
|
}), {
|
|
152
152
|
width: l,
|
|
@@ -177,7 +177,7 @@ function _e(e, t = {}) {
|
|
|
177
177
|
}, i = () => {
|
|
178
178
|
!o || !n.value || (h(), o.head.removeChild(o.getElementById(s)), n.value = !1);
|
|
179
179
|
};
|
|
180
|
-
return l && !a &&
|
|
180
|
+
return l && !a && je(v), a || We(i), {
|
|
181
181
|
id: s,
|
|
182
182
|
css: r,
|
|
183
183
|
unload: i,
|
|
@@ -220,31 +220,31 @@ const At = {
|
|
|
220
220
|
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
|
|
221
221
|
};
|
|
222
222
|
Ht({
|
|
223
|
-
linear:
|
|
223
|
+
linear: wt
|
|
224
224
|
}, At);
|
|
225
225
|
function Ft(e, t) {
|
|
226
226
|
const { scrollEndHook: n, itemHeight: o, overscan: l = 5 } = t, a = p(null), s = Rt(a), r = p(!0), h = Ye(U, 100);
|
|
227
227
|
let v;
|
|
228
228
|
const i = ct(e), c = p(0), d = p({ start: 0, end: 10 }), u = p({ start: 0, end: l });
|
|
229
229
|
let f = 0;
|
|
230
|
-
const O = p([]), m =
|
|
231
|
-
let { sum: E, height:
|
|
232
|
-
return i.value.map((M, P) => (typeof o == "number" ?
|
|
233
|
-
}), _ =
|
|
234
|
-
const { start: E, end:
|
|
235
|
-
return O.value.slice(E,
|
|
230
|
+
const O = p([]), m = w(() => {
|
|
231
|
+
let { sum: E, height: b } = { sum: 0, height: 0 };
|
|
232
|
+
return i.value.map((M, P) => (typeof o == "number" ? b = o : b = o(P), E += b, { height: b, sum: E }));
|
|
233
|
+
}), _ = w(() => X(d.value.start)), C = w(() => typeof o == "number" ? m.value.length * o : m.value[m.value.length - 1]?.sum || 0), A = w(() => {
|
|
234
|
+
const { start: E, end: b } = u.value;
|
|
235
|
+
return O.value.slice(E, b);
|
|
236
236
|
});
|
|
237
237
|
ne(() => {
|
|
238
238
|
}), Re(() => cancelAnimationFrame(v)), Y(
|
|
239
239
|
i,
|
|
240
240
|
() => {
|
|
241
|
-
(s.width.value || s.height.value) &&
|
|
241
|
+
(s.width.value || s.height.value) && $();
|
|
242
242
|
},
|
|
243
243
|
{ deep: !0 }
|
|
244
244
|
), Y(
|
|
245
245
|
[s.width, s.height],
|
|
246
|
-
([E,
|
|
247
|
-
(E ||
|
|
246
|
+
([E, b]) => {
|
|
247
|
+
(E || b) && $();
|
|
248
248
|
},
|
|
249
249
|
{ deep: !0 }
|
|
250
250
|
), Y(c, () => {
|
|
@@ -256,60 +256,60 @@ function Ft(e, t) {
|
|
|
256
256
|
function U() {
|
|
257
257
|
r.value = !0, n?.();
|
|
258
258
|
}
|
|
259
|
-
function
|
|
259
|
+
function $() {
|
|
260
260
|
cancelAnimationFrame(v), v = requestAnimationFrame(S);
|
|
261
261
|
}
|
|
262
262
|
function S() {
|
|
263
263
|
if (a.value) {
|
|
264
264
|
c.value = a.value.scrollTop;
|
|
265
|
-
let E =
|
|
265
|
+
let E = D(c.value);
|
|
266
266
|
f = q(E);
|
|
267
|
-
let
|
|
267
|
+
let b = Math.max(0, E - l), M = Math.min(
|
|
268
268
|
E + f + l,
|
|
269
269
|
i.value.length
|
|
270
270
|
);
|
|
271
|
-
d.value = { start:
|
|
271
|
+
d.value = { start: b, end: M }, O.value = i.value.slice(b, M).map((P, T) => ({
|
|
272
272
|
data: P,
|
|
273
|
-
index: T +
|
|
274
|
-
})), u.value.start = E -
|
|
273
|
+
index: T + b
|
|
274
|
+
})), u.value.start = E - b, u.value.end = u.value.start + f;
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
|
-
function
|
|
278
|
-
let
|
|
279
|
-
for (;
|
|
280
|
-
const T = Math.floor((
|
|
281
|
-
m.value[T].sum >= E ? (P = T, M = T - 1) :
|
|
277
|
+
function D(E) {
|
|
278
|
+
let b = 0, M = m.value.length - 1, P = -1;
|
|
279
|
+
for (; b <= M; ) {
|
|
280
|
+
const T = Math.floor((b + M) / 2);
|
|
281
|
+
m.value[T].sum >= E ? (P = T, M = T - 1) : b = T + 1;
|
|
282
282
|
}
|
|
283
283
|
return Math.max(0, P);
|
|
284
284
|
}
|
|
285
285
|
function q(E) {
|
|
286
|
-
let
|
|
287
|
-
for (let P = E; P < m.value.length && (
|
|
286
|
+
let b = 0, M = 0;
|
|
287
|
+
for (let P = E; P < m.value.length && (b++, M += m.value[P].height, !(M >= s.height.value)); P++)
|
|
288
288
|
;
|
|
289
|
-
return
|
|
289
|
+
return b;
|
|
290
290
|
}
|
|
291
291
|
function X(E) {
|
|
292
292
|
if (typeof o == "number")
|
|
293
293
|
return E * o;
|
|
294
|
-
let
|
|
295
|
-
return
|
|
294
|
+
let b = m.value[E];
|
|
295
|
+
return b ? b.sum - b.height : 0;
|
|
296
296
|
}
|
|
297
297
|
function k(E) {
|
|
298
298
|
return m.value[E] || { sum: 0, height: 0 };
|
|
299
299
|
}
|
|
300
300
|
function J(E) {
|
|
301
301
|
if (a.value) {
|
|
302
|
-
const
|
|
303
|
-
a.value.scrollTop =
|
|
302
|
+
const b = k(E);
|
|
303
|
+
a.value.scrollTop = b.sum - b.height, S();
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
|
-
const oe =
|
|
306
|
+
const oe = w(() => ({
|
|
307
307
|
style: {
|
|
308
308
|
width: "100%",
|
|
309
309
|
height: `${C.value}px`,
|
|
310
310
|
pointerEvents: r.value ? void 0 : "none"
|
|
311
311
|
}
|
|
312
|
-
})), ee =
|
|
312
|
+
})), ee = w(() => ({
|
|
313
313
|
style: {
|
|
314
314
|
transform: `translate3d(0, ${_.value}px, 0)`,
|
|
315
315
|
"will-change": "transform"
|
|
@@ -321,7 +321,7 @@ function Ft(e, t) {
|
|
|
321
321
|
list: O,
|
|
322
322
|
visiableList: A,
|
|
323
323
|
getItemHeightData: k,
|
|
324
|
-
getoffsetTopIndex:
|
|
324
|
+
getoffsetTopIndex: D,
|
|
325
325
|
totalHeight: C,
|
|
326
326
|
clientHeight: s.height,
|
|
327
327
|
scrollTo: J,
|
|
@@ -330,7 +330,7 @@ function Ft(e, t) {
|
|
|
330
330
|
containerProps: {
|
|
331
331
|
ref: a,
|
|
332
332
|
onScroll: () => {
|
|
333
|
-
|
|
333
|
+
$();
|
|
334
334
|
},
|
|
335
335
|
style: G
|
|
336
336
|
},
|
|
@@ -344,8 +344,8 @@ function xn() {
|
|
|
344
344
|
voidFn: (u) => {
|
|
345
345
|
},
|
|
346
346
|
boolFn: (u) => !1,
|
|
347
|
-
boolRef:
|
|
348
|
-
arrayRef:
|
|
347
|
+
boolRef: w(() => !1),
|
|
348
|
+
arrayRef: w(() => [])
|
|
349
349
|
}, l = V(qe, o), a = V(Ue, t), s = V(Ze, n), r = V(Ke, e), h = V(Ve, e), v = V(Qe, e), i = V(Xe, e), c = V(Ge, e), d = V(Je, e);
|
|
350
350
|
return {
|
|
351
351
|
selected: l,
|
|
@@ -360,7 +360,7 @@ function xn() {
|
|
|
360
360
|
};
|
|
361
361
|
}
|
|
362
362
|
function Ln(e, t) {
|
|
363
|
-
const n = p({}), o =
|
|
363
|
+
const n = p({}), o = w(() => e.value.filter((d) => n.value[d[t]])), l = w(() => o.value.length != 0 && Object.keys(n.value).length == e.value.length);
|
|
364
364
|
function a() {
|
|
365
365
|
e.value.forEach((d) => {
|
|
366
366
|
n.value[d[t]] = !0;
|
|
@@ -419,7 +419,7 @@ function et({
|
|
|
419
419
|
unselectAll: s = de("\u53D6\u6D88\u5168\u9009")
|
|
420
420
|
} = o();
|
|
421
421
|
let r = {};
|
|
422
|
-
const h =
|
|
422
|
+
const h = w(
|
|
423
423
|
() => Se(t === "colum" ? tt : nt, 50)
|
|
424
424
|
), v = /* @__PURE__ */ new Set(), i = p(!0), c = p(), d = p(!1), u = p({ x: 0, y: 0 }), f = p({ x: 0, y: 0, scrollTop: 0 }), O = new ResizeObserver(
|
|
425
425
|
(g) => m.value = g[0].target.getBoundingClientRect()
|
|
@@ -429,17 +429,17 @@ function et({
|
|
|
429
429
|
sync(g = !1) {
|
|
430
430
|
_.value.top = c.value?.scrollTop || 0, g && (_.value.height = c.value?.scrollHeight || 0);
|
|
431
431
|
}
|
|
432
|
-
}), C =
|
|
432
|
+
}), C = w(() => d.value ? {
|
|
433
433
|
left: Math.min(u.value.x, f.value.x) - m.value.left,
|
|
434
434
|
top: Math.min(u.value.y, f.value.y) - m.value.top,
|
|
435
435
|
width: Math.abs(u.value.x - f.value.x),
|
|
436
436
|
height: Math.abs(u.value.y - f.value.y)
|
|
437
437
|
} : { left: 0, top: 0, width: 0, height: 0 }), { margin: A = 50, startSpeed: K = 30, maxSpeed: U = 30 } = n;
|
|
438
|
-
let
|
|
439
|
-
const S = A,
|
|
438
|
+
let $;
|
|
439
|
+
const S = A, D = K, q = U, X = (g) => g ** 1;
|
|
440
440
|
let k = 0;
|
|
441
441
|
function J(g) {
|
|
442
|
-
if (cancelAnimationFrame(
|
|
442
|
+
if (cancelAnimationFrame($), k = oe(g), k = Math.max(
|
|
443
443
|
Math.min(k, q),
|
|
444
444
|
-q
|
|
445
445
|
), k !== 0) {
|
|
@@ -448,17 +448,17 @@ function et({
|
|
|
448
448
|
return;
|
|
449
449
|
const F = _.value.height - m.value.height;
|
|
450
450
|
let L = _.value.top + Number(k);
|
|
451
|
-
L = Math.min(Math.max(0, L), F), y.scrollTop = L, G(),
|
|
451
|
+
L = Math.min(Math.max(0, L), F), y.scrollTop = L, G(), $ = requestAnimationFrame(() => J(g));
|
|
452
452
|
}
|
|
453
453
|
}
|
|
454
454
|
function oe(g) {
|
|
455
455
|
if (c.value) {
|
|
456
456
|
const F = m.value, L = F.bottom - g;
|
|
457
457
|
if (L < S)
|
|
458
|
-
return
|
|
459
|
-
const
|
|
460
|
-
if (
|
|
461
|
-
return
|
|
458
|
+
return D * X(1 - L / S);
|
|
459
|
+
const N = g - F.top;
|
|
460
|
+
if (N < S)
|
|
461
|
+
return -D * X(1 - N / S);
|
|
462
462
|
}
|
|
463
463
|
return 0;
|
|
464
464
|
}
|
|
@@ -477,15 +477,15 @@ function et({
|
|
|
477
477
|
function E(g, y, F = "dynamic-styles") {
|
|
478
478
|
let L = document.getElementById(F);
|
|
479
479
|
L || (L = document.createElement("style"), L.id = F, document.head.appendChild(L));
|
|
480
|
-
const
|
|
480
|
+
const N = L.sheet.cssRules, te = N.length, lt = `${g} { ${y} }`;
|
|
481
481
|
for (let ce = 0; ce < te; ce++) {
|
|
482
|
-
const
|
|
483
|
-
if (
|
|
482
|
+
const be = N[ce];
|
|
483
|
+
if (be.selectorText === g && be.style.cssText === y)
|
|
484
484
|
return;
|
|
485
485
|
}
|
|
486
486
|
L.sheet.insertRule(lt, te);
|
|
487
487
|
}
|
|
488
|
-
function
|
|
488
|
+
function b(g, y) {
|
|
489
489
|
i.value = !0, d.value = !0, _.value.height ? _.value.sync() : _.value.sync(!0), u.value.x = g, u.value.y = y + _.value.top, f.value.x = u.value.x, f.value.y = u.value.y, c.value?.classList.add("disable-scroll-behavior"), v.clear();
|
|
490
490
|
}
|
|
491
491
|
function M(g, y, F) {
|
|
@@ -517,9 +517,9 @@ function et({
|
|
|
517
517
|
function nt() {
|
|
518
518
|
const g = [];
|
|
519
519
|
let y = null, F = 0;
|
|
520
|
-
c.value?.querySelectorAll(`[${e}]`).forEach((L,
|
|
520
|
+
c.value?.querySelectorAll(`[${e}]`).forEach((L, N) => {
|
|
521
521
|
const te = L.getAttribute(`${e}`);
|
|
522
|
-
g.push(te), ee(L.getBoundingClientRect()) ? (y === null && (y =
|
|
522
|
+
g.push(te), ee(L.getBoundingClientRect()) ? (y === null && (y = N), y = Math.min(y, N), F = Math.max(F, N)) : (r[`${e}`] = te, v.has(te) && a([r]));
|
|
523
523
|
});
|
|
524
524
|
for (let L = y; L < F + 1; L++)
|
|
525
525
|
r[`${e}`] = g[L], l([r]), v.add(g[L]);
|
|
@@ -532,7 +532,7 @@ function et({
|
|
|
532
532
|
}
|
|
533
533
|
return {
|
|
534
534
|
init: ot,
|
|
535
|
-
dragStart:
|
|
535
|
+
dragStart: b,
|
|
536
536
|
dragMove: M,
|
|
537
537
|
dragEnd: P,
|
|
538
538
|
onScroll: T,
|
|
@@ -552,7 +552,7 @@ function Tn(e) {
|
|
|
552
552
|
dragMove: s,
|
|
553
553
|
dragEnd: r,
|
|
554
554
|
cancelSelectAllBySingleClick: h
|
|
555
|
-
} = t, v =
|
|
555
|
+
} = t, v = w(() => ({
|
|
556
556
|
left: `${o.value.left}px`,
|
|
557
557
|
top: `${o.value.top}px`,
|
|
558
558
|
width: `${o.value.width}px`,
|
|
@@ -565,7 +565,7 @@ function Tn(e) {
|
|
|
565
565
|
opacity: 0.5;
|
|
566
566
|
}`,
|
|
567
567
|
{ id: "styletag_lzc_dragselect", manual: !0 }
|
|
568
|
-
), c =
|
|
568
|
+
), c = j({
|
|
569
569
|
render() {
|
|
570
570
|
return Q("div", {
|
|
571
571
|
id: "selectBoxEl",
|
|
@@ -645,7 +645,7 @@ function On(e, t, n = 600) {
|
|
|
645
645
|
const kt = Symbol(), zt = {
|
|
646
646
|
key: 0,
|
|
647
647
|
class: "lzc-modal"
|
|
648
|
-
}, Wt = /* @__PURE__ */
|
|
648
|
+
}, Wt = /* @__PURE__ */ j({
|
|
649
649
|
__name: "Dialog",
|
|
650
650
|
props: {
|
|
651
651
|
visiable: { type: Boolean, default: !1 },
|
|
@@ -681,7 +681,7 @@ const Z = (e, t) => {
|
|
|
681
681
|
n[o] = l;
|
|
682
682
|
return n;
|
|
683
683
|
}, Yt = /* @__PURE__ */ Z(Wt, [["__scopeId", "data-v-4ff684af"]]);
|
|
684
|
-
function
|
|
684
|
+
function $n(e) {
|
|
685
685
|
function t(n, o) {
|
|
686
686
|
const l = document.createElement("div"), a = {
|
|
687
687
|
setup() {
|
|
@@ -708,7 +708,7 @@ function Dn(e) {
|
|
|
708
708
|
create: t
|
|
709
709
|
};
|
|
710
710
|
}
|
|
711
|
-
function
|
|
711
|
+
function jt({
|
|
712
712
|
component: e,
|
|
713
713
|
componentProps: t,
|
|
714
714
|
delay: n = 300
|
|
@@ -724,7 +724,7 @@ function Nt({
|
|
|
724
724
|
opacity: 0;
|
|
725
725
|
animation: lzcDelayLoad 0s ${a} forwards;
|
|
726
726
|
}`
|
|
727
|
-
), { LoadingComp:
|
|
727
|
+
), { LoadingComp: j({
|
|
728
728
|
setup() {
|
|
729
729
|
const r = Lt();
|
|
730
730
|
return ne(() => {
|
|
@@ -733,12 +733,12 @@ function Nt({
|
|
|
733
733
|
}
|
|
734
734
|
}) };
|
|
735
735
|
}
|
|
736
|
-
function
|
|
736
|
+
function Dn({
|
|
737
737
|
component: e,
|
|
738
738
|
componentProps: t,
|
|
739
739
|
delay: n = 300
|
|
740
740
|
}) {
|
|
741
|
-
const { LoadingComp: o } =
|
|
741
|
+
const { LoadingComp: o } = jt({
|
|
742
742
|
component: e,
|
|
743
743
|
componentProps: t,
|
|
744
744
|
delay: n
|
|
@@ -751,11 +751,11 @@ function $n({
|
|
|
751
751
|
}
|
|
752
752
|
return { LoadingComp: o, loading: l, load: a, unload: s };
|
|
753
753
|
}
|
|
754
|
-
const
|
|
754
|
+
const Nt = (e) => (re("data-v-d0ad7597"), e = e(), ue(), e), Vt = /* @__PURE__ */ Nt(() => /* @__PURE__ */ x("div", { class: "ldio-mm5gwljcryb" }, [
|
|
755
755
|
/* @__PURE__ */ x("div")
|
|
756
756
|
], -1)), Kt = [
|
|
757
757
|
Vt
|
|
758
|
-
], Ut = /* @__PURE__ */
|
|
758
|
+
], Ut = /* @__PURE__ */ j({
|
|
759
759
|
__name: "DefaultLoading",
|
|
760
760
|
props: {
|
|
761
761
|
width: { default: 24 },
|
|
@@ -768,7 +768,7 @@ const jt = (e) => (re("data-v-d0ad7597"), e = e(), ue(), e), Vt = /* @__PURE__ *
|
|
|
768
768
|
})), (t, n) => (I(), H("div", ve(fe(t.$attrs)), Kt, 16));
|
|
769
769
|
}
|
|
770
770
|
});
|
|
771
|
-
const Rn = /* @__PURE__ */ Z(Ut, [["__scopeId", "data-v-d0ad7597"]]), qt = ["onClick"], Qt = /* @__PURE__ */
|
|
771
|
+
const Rn = /* @__PURE__ */ Z(Ut, [["__scopeId", "data-v-d0ad7597"]]), qt = ["onClick"], Qt = /* @__PURE__ */ j({
|
|
772
772
|
__name: "Toast",
|
|
773
773
|
props: {
|
|
774
774
|
message: null,
|
|
@@ -776,7 +776,7 @@ const Rn = /* @__PURE__ */ Z(Ut, [["__scopeId", "data-v-d0ad7597"]]), qt = ["onC
|
|
|
776
776
|
buttonClickEvent: null
|
|
777
777
|
},
|
|
778
778
|
setup(e) {
|
|
779
|
-
const t = e, n = p(), o = p(), l = p(), a =
|
|
779
|
+
const t = e, n = p(), o = p(), l = p(), a = w(() => {
|
|
780
780
|
switch (t.position) {
|
|
781
781
|
case "top":
|
|
782
782
|
return 10;
|
|
@@ -785,14 +785,14 @@ const Rn = /* @__PURE__ */ Z(Ut, [["__scopeId", "data-v-d0ad7597"]]), qt = ["onC
|
|
|
785
785
|
case "bottom":
|
|
786
786
|
return 85;
|
|
787
787
|
}
|
|
788
|
-
}), s =
|
|
788
|
+
}), s = w(() => ({
|
|
789
789
|
position: "absolute",
|
|
790
790
|
borderRadius: "10px",
|
|
791
791
|
backgroundColor: "rgba(0, 0, 0, 0.8)",
|
|
792
792
|
padding: "14px 19px",
|
|
793
793
|
top: `calc(${a.value}% - ${l.value}px)`,
|
|
794
794
|
left: `calc(50% - ${o.value}px)`
|
|
795
|
-
})), r =
|
|
795
|
+
})), r = w(() => ({
|
|
796
796
|
width: "fit-content",
|
|
797
797
|
display: "flex",
|
|
798
798
|
justifyContent: "center",
|
|
@@ -821,7 +821,7 @@ const Rn = /* @__PURE__ */ Z(Ut, [["__scopeId", "data-v-d0ad7597"]]), qt = ["onC
|
|
|
821
821
|
], 12, qt));
|
|
822
822
|
}
|
|
823
823
|
});
|
|
824
|
-
const Xt = /* @__PURE__ */ Z(Qt, [["__scopeId", "data-v-533e986b"]]),
|
|
824
|
+
const Xt = /* @__PURE__ */ Z(Qt, [["__scopeId", "data-v-533e986b"]]), $e = {
|
|
825
825
|
message: "\u61D2\u732B\u4E91 Yes!!!",
|
|
826
826
|
position: "middle",
|
|
827
827
|
duration: 1500,
|
|
@@ -835,9 +835,9 @@ class In {
|
|
|
835
835
|
this.options = t, this.container = document.createElement("div");
|
|
836
836
|
}
|
|
837
837
|
present() {
|
|
838
|
-
const t = Q(Q(Xt), {
|
|
838
|
+
const t = Q(Q(Xt), { ...$e, ...this.options });
|
|
839
839
|
se(t, this.container), document.body.insertBefore(this.container, document.body.firstChild);
|
|
840
|
-
const n = this.options.duration ||
|
|
840
|
+
const n = this.options.duration || $e.duration;
|
|
841
841
|
setTimeout(() => {
|
|
842
842
|
this.dismiss();
|
|
843
843
|
}, n);
|
|
@@ -853,7 +853,7 @@ class In {
|
|
|
853
853
|
}
|
|
854
854
|
}
|
|
855
855
|
}
|
|
856
|
-
const Gt = ["xlink:href", "fill", "color"], Bn = /* @__PURE__ */
|
|
856
|
+
const Gt = ["xlink:href", "fill", "color"], Bn = /* @__PURE__ */ j({
|
|
857
857
|
__name: "SvgIcon",
|
|
858
858
|
props: {
|
|
859
859
|
name: null,
|
|
@@ -863,14 +863,18 @@ const Gt = ["xlink:href", "fill", "color"], Bn = /* @__PURE__ */ N({
|
|
|
863
863
|
height: null
|
|
864
864
|
},
|
|
865
865
|
setup(e) {
|
|
866
|
-
const t = e, n =
|
|
866
|
+
const t = e, n = w(() => `#${t.prefix}-${t.name}`), o = w(() => ({
|
|
867
867
|
width: `${t.width ?? t.height}px`,
|
|
868
868
|
height: `${t.height ?? t.width}px`,
|
|
869
869
|
aspectRatio: t.width && t.height ? void 0 : "1/1"
|
|
870
870
|
}));
|
|
871
|
-
|
|
871
|
+
function l(a) {
|
|
872
|
+
const { style: s } = a;
|
|
873
|
+
return typeof s == "object" ? s : {};
|
|
874
|
+
}
|
|
875
|
+
return (a, s) => (I(), H("svg", {
|
|
872
876
|
"aria-hidden": "",
|
|
873
|
-
style: W(R(o))
|
|
877
|
+
style: W({ ...R(o), ...l(a.$attrs) })
|
|
874
878
|
}, [
|
|
875
879
|
x("use", {
|
|
876
880
|
"xlink:href": R(n),
|
|
@@ -897,10 +901,10 @@ function Zt(e) {
|
|
|
897
901
|
clientHeight: 0
|
|
898
902
|
}), O = p({
|
|
899
903
|
clientHeight: 0
|
|
900
|
-
}), m =
|
|
904
|
+
}), m = w(() => !!d.value), _ = w(() => f.value.scrollHeight > f.value.clientHeight), C = w(() => o ? f.value.clientHeight - U.value : f.value.clientHeight - O.value.clientHeight), A = w(() => f.value.scrollHeight - f.value.clientHeight), K = w(() => Math.max(
|
|
901
905
|
f.value.clientHeight / f.value.scrollHeight,
|
|
902
906
|
0.05
|
|
903
|
-
)), U =
|
|
907
|
+
)), U = w(() => K.value > a ? 0 : K.value * f.value.clientHeight), $ = w(() => ({
|
|
904
908
|
willChange: "transform",
|
|
905
909
|
transform: `translate3d(0,${u.value}px,0)`,
|
|
906
910
|
height: o ? `${U.value}px` : void 0
|
|
@@ -908,7 +912,7 @@ function Zt(e) {
|
|
|
908
912
|
function S(T) {
|
|
909
913
|
q(), d.value = T.clientY - n.value.getBoundingClientRect().top || 1, i = getComputedStyle(t.value).scrollBehavior, i === "smooth" && (t.value.style.scrollBehavior = "unset");
|
|
910
914
|
}
|
|
911
|
-
function
|
|
915
|
+
function D() {
|
|
912
916
|
t.value.style.scrollBehavior = i, d.value = 0, h();
|
|
913
917
|
}
|
|
914
918
|
function q() {
|
|
@@ -938,12 +942,12 @@ function Zt(e) {
|
|
|
938
942
|
let B = "addEventListener";
|
|
939
943
|
T === "add" ? B = "addEventListener" : B = "removeEventListener", n.value?.[B]("pointerdown", S, {
|
|
940
944
|
passive: !0
|
|
941
|
-
}), window[B]("pointermove", k, { passive: !0 }), window[B]("pointerup",
|
|
945
|
+
}), window[B]("pointermove", k, { passive: !0 }), window[B]("pointerup", D, { passive: !0 });
|
|
942
946
|
}
|
|
943
947
|
const E = new MutationObserver((T) => {
|
|
944
|
-
(s == "classList" || T.map((ie) => ie.oldValue).join().includes("height")) &&
|
|
948
|
+
(s == "classList" || T.map((ie) => ie.oldValue).join().includes("height")) && b();
|
|
945
949
|
});
|
|
946
|
-
function
|
|
950
|
+
function b() {
|
|
947
951
|
f.value.top = t.value?.getBoundingClientRect().top ?? 0, f.value.scrollHeight = t.value?.scrollHeight ?? 0, f.value.clientHeight = t.value?.clientHeight ?? 0;
|
|
948
952
|
}
|
|
949
953
|
function M() {
|
|
@@ -962,7 +966,7 @@ function Zt(e) {
|
|
|
962
966
|
attributeOldValue: !0,
|
|
963
967
|
attributeFilter: ["style"]
|
|
964
968
|
}), E.observe(t.value, T), setTimeout(() => {
|
|
965
|
-
|
|
969
|
+
b();
|
|
966
970
|
}, 100), M();
|
|
967
971
|
} else
|
|
968
972
|
console.error("useScrollBar:", "\u521D\u59CB\u5316\u5931\u8D25!", { containerEl: t, sliderEl: n });
|
|
@@ -975,12 +979,12 @@ function Zt(e) {
|
|
|
975
979
|
offsetTop: u,
|
|
976
980
|
scrollTop: c,
|
|
977
981
|
scrollable: _,
|
|
978
|
-
sliderPos:
|
|
982
|
+
sliderPos: $,
|
|
979
983
|
init: P,
|
|
980
984
|
modifySliderEventListener: G
|
|
981
985
|
};
|
|
982
986
|
}
|
|
983
|
-
const Jt = (e) => (re("data-v-efefe52c"), e = e(), ue(), e), en = /* @__PURE__ */ Jt(() => /* @__PURE__ */ x("div", { class: "default-slider" }, null, -1)), tn = /* @__PURE__ */
|
|
987
|
+
const Jt = (e) => (re("data-v-efefe52c"), e = e(), ue(), e), en = /* @__PURE__ */ Jt(() => /* @__PURE__ */ x("div", { class: "default-slider" }, null, -1)), tn = /* @__PURE__ */ j({
|
|
984
988
|
__name: "ScrollBar",
|
|
985
989
|
props: {
|
|
986
990
|
containerEl: null,
|
|
@@ -990,13 +994,13 @@ const Jt = (e) => (re("data-v-efefe52c"), e = e(), ue(), e), en = /* @__PURE__ *
|
|
|
990
994
|
performance: null
|
|
991
995
|
},
|
|
992
996
|
setup(e, { expose: t }) {
|
|
993
|
-
const n = e, o = !!vt().default, l = p(null), a =
|
|
997
|
+
const n = e, o = !!vt().default, l = p(null), a = w(() => n.containerEl), s = Zt({
|
|
994
998
|
containerEl: a,
|
|
995
999
|
sliderEl: l,
|
|
996
1000
|
autoHeight: o ? n.autoHeight : !0,
|
|
997
1001
|
performance: n.performance,
|
|
998
1002
|
observeMethod: n.observeMethod
|
|
999
|
-
}), { scrollable: r, isScrollEnd: h, sliderPos: v } = s, i = p(!1), c = n.autoHide ?
|
|
1003
|
+
}), { scrollable: r, isScrollEnd: h, sliderPos: v } = s, i = p(!1), c = n.autoHide ? w(() => i.value || !h.value) : w(() => r.value), { load: d } = _e(
|
|
1000
1004
|
`.hide-scrollbar {
|
|
1001
1005
|
scrollbar-width: none;
|
|
1002
1006
|
-ms-overflow-style: none;
|
|
@@ -1046,7 +1050,7 @@ const Mn = /* @__PURE__ */ Z(tn, [["__scopeId", "data-v-efefe52c"]]), nn = (e) =
|
|
|
1046
1050
|
}, sn = {
|
|
1047
1051
|
key: 0,
|
|
1048
1052
|
class: "box-load"
|
|
1049
|
-
}, an = { class: "left-load" }, rn = { class: "right-load" }, un = /* @__PURE__ */ nn(() => /* @__PURE__ */ x("div", { class: "among-load" }, null, -1)), cn = { class: "pull-arrow" }, dn = { key: 1 }, vn = /* @__PURE__ */
|
|
1053
|
+
}, an = { class: "left-load" }, rn = { class: "right-load" }, un = /* @__PURE__ */ nn(() => /* @__PURE__ */ x("div", { class: "among-load" }, null, -1)), cn = { class: "pull-arrow" }, dn = { key: 1 }, vn = /* @__PURE__ */ j({
|
|
1050
1054
|
__name: "PullRefresh",
|
|
1051
1055
|
props: {
|
|
1052
1056
|
refresh: null,
|
|
@@ -1055,10 +1059,10 @@ const Mn = /* @__PURE__ */ Z(tn, [["__scopeId", "data-v-efefe52c"]]), nn = (e) =
|
|
|
1055
1059
|
pullRefreshContainer: null
|
|
1056
1060
|
},
|
|
1057
1061
|
setup(e) {
|
|
1058
|
-
const t = e, n = 0.7, o = "#2EC1CC", l = p(-999), a = p(1), s = p(0), r = p(0.3), h = p(!1), v = p(0), i = p(0), c = p(0), d = p(0), u = p(0), f = p(), O =
|
|
1062
|
+
const t = e, n = 0.7, o = "#2EC1CC", l = p(-999), a = p(1), s = p(0), r = p(0.3), h = p(!1), v = p(0), i = p(0), c = p(0), d = p(0), u = p(0), f = p(), O = w(() => t.scrollTop), m = w(() => ({
|
|
1059
1063
|
transition: `${d.value}ms`,
|
|
1060
1064
|
transform: `translate3d(0,${l.value}px, 0) scale(${a.value})`
|
|
1061
|
-
})), _ =
|
|
1065
|
+
})), _ = w(() => ({
|
|
1062
1066
|
borderColor: o,
|
|
1063
1067
|
transition: d.value,
|
|
1064
1068
|
transform: `rotate(${100 + s.value}deg)`,
|
|
@@ -1069,39 +1073,39 @@ const Mn = /* @__PURE__ */ Z(tn, [["__scopeId", "data-v-efefe52c"]]), nn = (e) =
|
|
|
1069
1073
|
}), Y(i, (S) => {
|
|
1070
1074
|
if (u.value === 2)
|
|
1071
1075
|
return;
|
|
1072
|
-
const
|
|
1073
|
-
|
|
1076
|
+
const D = Math.pow(S, n);
|
|
1077
|
+
D === 0 && (l.value = -50), D <= 50 && D > 0 && (l.value = D - 45, s.value = Math.pow(D, 1.5), D > 15 ? h.value = !0 : h.value = !1), D > 50 && (l.value = 5, r.value = 1, u.value);
|
|
1074
1078
|
});
|
|
1075
1079
|
const C = p(0), A = (S) => {
|
|
1076
1080
|
C.value = S.touches[0].pageY;
|
|
1077
1081
|
}, K = (S) => {
|
|
1078
|
-
const
|
|
1079
|
-
C.value = S.touches[0].pageY, !t.refreshOff && (!t?.refresh || u.value !== 2 && O.value === 0 && (v.value === 0 && (v.value = S.touches[0].pageY), c.value = 0,
|
|
1082
|
+
const D = S.touches[0].pageY - C.value;
|
|
1083
|
+
C.value = S.touches[0].pageY, !t.refreshOff && (!t?.refresh || u.value !== 2 && O.value === 0 && (v.value === 0 && (v.value = S.touches[0].pageY), c.value = 0, $.value.style.transition = `${c.value}ms`, d.value = 0, i.value = S.touches[0].pageY - v.value, $.value.style.transform = `translate3d(0, ${Math.pow(i.value, n)}px, 0)`, D > 0 && S.preventDefault()));
|
|
1080
1084
|
}, U = () => {
|
|
1081
1085
|
if (t.refreshOff || !t?.refresh || u.value === 2)
|
|
1082
1086
|
return;
|
|
1083
1087
|
v.value = 0, c.value = 300;
|
|
1084
1088
|
const S = Math.pow(i.value, n);
|
|
1085
|
-
|
|
1089
|
+
$.value.style.transition = `${c.value}ms`, S > 50 ? (u.value = 2, i.value = Math.pow(50, 1 / n), $.value.style.transform = `translate3d(0, ${Math.pow(i.value, n)}px, 0)`, d.value = 300, t?.refresh && t?.refresh().then(() => {
|
|
1086
1090
|
f.value = "\u5237\u65B0\u6210\u529F";
|
|
1087
1091
|
}).catch(() => {
|
|
1088
1092
|
f.value = "\u5237\u65B0\u5931\u8D25";
|
|
1089
1093
|
}).finally(() => {
|
|
1090
1094
|
setTimeout(() => {
|
|
1091
|
-
u.value = 0, i.value = 0,
|
|
1095
|
+
u.value = 0, i.value = 0, $.value.style.transform = `translate3d(0, ${Math.pow(
|
|
1092
1096
|
i.value,
|
|
1093
1097
|
n
|
|
1094
1098
|
)}px, 0)`, setTimeout(() => {
|
|
1095
1099
|
f.value = void 0;
|
|
1096
1100
|
}, d.value);
|
|
1097
1101
|
}, 600);
|
|
1098
|
-
})) : (i.value = 0,
|
|
1099
|
-
},
|
|
1102
|
+
})) : (i.value = 0, $.value.style.transform = `translate3d(0, ${Math.pow(i.value, n)}px, 0)`);
|
|
1103
|
+
}, $ = p(null);
|
|
1100
1104
|
return ne(() => {
|
|
1101
|
-
t?.refreshOff || (
|
|
1105
|
+
t?.refreshOff || ($.value = document.querySelector(
|
|
1102
1106
|
t.pullRefreshContainer
|
|
1103
|
-
),
|
|
1104
|
-
}), (S,
|
|
1107
|
+
), $.value?.addEventListener("touchstart", A), $.value?.addEventListener("touchmove", K), $.value?.addEventListener("touchend", U));
|
|
1108
|
+
}), (S, D) => (I(), H("div", on, [
|
|
1105
1109
|
x("div", {
|
|
1106
1110
|
class: "pull-refresh-box",
|
|
1107
1111
|
style: W(R(m))
|
|
@@ -1140,7 +1144,7 @@ const Mn = /* @__PURE__ */ Z(tn, [["__scopeId", "data-v-efefe52c"]]), nn = (e) =
|
|
|
1140
1144
|
});
|
|
1141
1145
|
const fn = /* @__PURE__ */ Z(vn, [["__scopeId", "data-v-18377f18"]]), hn = {
|
|
1142
1146
|
inheritAttrs: !1
|
|
1143
|
-
}, pn = /* @__PURE__ */
|
|
1147
|
+
}, pn = /* @__PURE__ */ j({
|
|
1144
1148
|
...hn,
|
|
1145
1149
|
__name: "VirtualList",
|
|
1146
1150
|
props: {
|
|
@@ -1170,7 +1174,7 @@ const fn = /* @__PURE__ */ Z(vn, [["__scopeId", "data-v-18377f18"]]), hn = {
|
|
|
1170
1174
|
vListReturn: l
|
|
1171
1175
|
});
|
|
1172
1176
|
const c = "virtualListWrapper" + new Date().getTime();
|
|
1173
|
-
return (d, u) => (I(), H(
|
|
1177
|
+
return (d, u) => (I(), H(we, null, [
|
|
1174
1178
|
pt(fn, {
|
|
1175
1179
|
refresh: e.refresh,
|
|
1176
1180
|
refreshOff: e.refreshOff,
|
|
@@ -1188,7 +1192,7 @@ const fn = /* @__PURE__ */ Z(vn, [["__scopeId", "data-v-18377f18"]]), hn = {
|
|
|
1188
1192
|
}, d.$attrs), [
|
|
1189
1193
|
x("div", ve(fe(R(r))), [
|
|
1190
1194
|
x("div", ve(fe(R(h))), [
|
|
1191
|
-
(I(!0), H(
|
|
1195
|
+
(I(!0), H(we, null, gt(R(a), ({ index: f, data: O }) => (I(), H("div", {
|
|
1192
1196
|
key: f,
|
|
1193
1197
|
style: W({
|
|
1194
1198
|
height: `${R(v)(f).height}px`,
|
|
@@ -1207,7 +1211,7 @@ const fn = /* @__PURE__ */ Z(vn, [["__scopeId", "data-v-18377f18"]]), hn = {
|
|
|
1207
1211
|
], 64));
|
|
1208
1212
|
}
|
|
1209
1213
|
});
|
|
1210
|
-
const Pn = /* @__PURE__ */ Z(pn, [["__scopeId", "data-v-e0fb787f"]]), ye = (e) => (re("data-v-c986249d"), e = e(), ue(), e), mn = { style: { position: "absolute" } }, gn = /* @__PURE__ */ ye(() => /* @__PURE__ */ x("div", { class: "wrapper" }, null, -1)), _n = ["width", "height"], yn = /* @__PURE__ */ ye(() => /* @__PURE__ */ x("title", null, "logo", -1)),
|
|
1214
|
+
const Pn = /* @__PURE__ */ Z(pn, [["__scopeId", "data-v-e0fb787f"]]), ye = (e) => (re("data-v-c986249d"), e = e(), ue(), e), mn = { style: { position: "absolute" } }, gn = /* @__PURE__ */ ye(() => /* @__PURE__ */ x("div", { class: "wrapper" }, null, -1)), _n = ["width", "height"], yn = /* @__PURE__ */ ye(() => /* @__PURE__ */ x("title", null, "logo", -1)), bn = /* @__PURE__ */ ye(() => /* @__PURE__ */ x("g", {
|
|
1211
1215
|
id: "group-1",
|
|
1212
1216
|
stroke: "none",
|
|
1213
1217
|
"stroke-width": "1",
|
|
@@ -1219,10 +1223,10 @@ const Pn = /* @__PURE__ */ Z(pn, [["__scopeId", "data-v-e0fb787f"]]), ye = (e) =
|
|
|
1219
1223
|
id: "path-1",
|
|
1220
1224
|
fill: "#FFF"
|
|
1221
1225
|
})
|
|
1222
|
-
], -1)),
|
|
1226
|
+
], -1)), wn = [
|
|
1223
1227
|
yn,
|
|
1224
|
-
|
|
1225
|
-
], En = /* @__PURE__ */
|
|
1228
|
+
bn
|
|
1229
|
+
], En = /* @__PURE__ */ j({
|
|
1226
1230
|
__name: "Loading",
|
|
1227
1231
|
props: {
|
|
1228
1232
|
width: { default: "90" },
|
|
@@ -1244,7 +1248,7 @@ const Pn = /* @__PURE__ */ Z(pn, [["__scopeId", "data-v-e0fb787f"]]), ye = (e) =
|
|
|
1244
1248
|
viewBox: "0 0 260 260",
|
|
1245
1249
|
version: "1.1",
|
|
1246
1250
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1247
|
-
},
|
|
1251
|
+
}, wn, 8, _n))
|
|
1248
1252
|
]));
|
|
1249
1253
|
}
|
|
1250
1254
|
});
|
|
@@ -1259,7 +1263,7 @@ export {
|
|
|
1259
1263
|
Pn as VirtualList,
|
|
1260
1264
|
qe as allSelectedKey,
|
|
1261
1265
|
kt as closeDialogKey,
|
|
1262
|
-
|
|
1266
|
+
$n as dialogController,
|
|
1263
1267
|
Ze as isAllSelectedKey,
|
|
1264
1268
|
Ue as isSelectedKey,
|
|
1265
1269
|
Xe as selectAllKey,
|
|
@@ -1268,8 +1272,8 @@ export {
|
|
|
1268
1272
|
Ke as toggleKey,
|
|
1269
1273
|
Je as unselectAllKey,
|
|
1270
1274
|
Ge as unselectKey,
|
|
1271
|
-
|
|
1272
|
-
|
|
1275
|
+
Dn as useDelayLoad,
|
|
1276
|
+
jt as useDelayLoadComp,
|
|
1273
1277
|
et as useDragSelect,
|
|
1274
1278
|
On as useDragSelectByMobile,
|
|
1275
1279
|
Tn as useDragSelectByPc,
|
package/dist/index.umd.js
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
.${r} {
|
|
12
12
|
opacity: 0;
|
|
13
13
|
animation: lzcDelayLoad 0s ${s} forwards;
|
|
14
|
-
}`),{LoadingComp:e.defineComponent({setup(){const i=Fe();return e.onMounted(()=>{i.value.classList.add(r)}),()=>e.h(t,o)}})}}function lt({component:t,componentProps:o,delay:n=300}){const{LoadingComp:l}=Be({component:t,componentProps:o,delay:n}),r=e.ref(!1);function s(){r.value=!0}function a(){r.value=!1}return{LoadingComp:l,loading:r,load:s,unload:a}}const rt=[(t=>(e.pushScopeId("data-v-d0ad7597"),t=t(),e.popScopeId(),t))(()=>e.createElementVNode("div",{class:"ldio-mm5gwljcryb"},[e.createElementVNode("div")],-1))],at=e.defineComponent({__name:"DefaultLoading",props:{width:{default:24},height:{default:24}},setup(t){return e.useCssVars(o=>({d8dfa9f0:t.width+"px","2941c2e5":t.height+"px"})),(o,n)=>(e.openBlock(),e.createElementBlock("div",e.normalizeProps(e.guardReactiveProps(o.$attrs)),rt,16))}}),Wt="",st=V(at,[["__scopeId","data-v-d0ad7597"]]),it=["onClick"],ct=e.defineComponent({__name:"Toast",props:{message:null,position:null,buttonClickEvent:null},setup(t){const o=t,n=e.ref(),l=e.ref(),r=e.ref(),s=e.computed(()=>{switch(o.position){case"top":return 10;case"middle":return 50;case"bottom":return 85}}),a=e.computed(()=>({position:"absolute",borderRadius:"10px",backgroundColor:"rgba(0, 0, 0, 0.8)",padding:"14px 19px",top:`calc(${s.value}% - ${r.value}px)`,left:`calc(50% - ${l.value}px)`})),i=e.computed(()=>({width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",color:"white",fontSize:"14px"}));function m(){!o.buttonClickEvent||o.buttonClickEvent()}return e.nextTick(()=>{l.value=n.value.offsetWidth/2,r.value=n.value.offsetHeight/2}),(p,u)=>(e.openBlock(),e.createElementBlock("div",{onClick:e.withModifiers(m,["stop"]),id:"toastWrapper",ref_key:"toastWrapper",ref:n,class:"toastWrapper",style:e.normalizeStyle([e.unref(a),{zIndex:9999999}])},[e.createElementVNode("div",{style:e.normalizeStyle(e.unref(i))},[e.createElementVNode("span",null,e.toDisplayString(t.message),1)],4)],12,it))}}),Yt="",ut=V(ct,[["__scopeId","data-v-533e986b"]]),xe={message:"\u61D2\u732B\u4E91 Yes!!!",position:"middle",duration:1500,buttonClickEvent:()=>{}};class dt{options;container;constructor(o){this.options=o,this.container=document.createElement("div")}present(){const o=e.h(e.h(ut),{...xe,...this.options});e.render(o,this.container),document.body.insertBefore(this.container,document.body.firstChild);const n=this.options.duration||xe.duration;setTimeout(()=>{this.dismiss()},n)}dismiss(){if(this.container){const o=this.container.querySelector("#toastWrapper");o.style.opacity="0",o.style.transition="opacity 0.4s ease-in",setTimeout(()=>{this.container&&(e.render(null,this.container),document.body.removeChild(this.container))},500)}}}const ft=["xlink:href","fill","color"],pt=e.defineComponent({__name:"SvgIcon",props:{name:null,prefix:{default:"icon"},color:{default:"#FFF"},width:null,height:null},setup(t){const o=t,n=e.computed(()=>`#${o.prefix}-${o.name}`),l=e.computed(()=>({width:`${o.width??o.height}px`,height:`${o.height??o.width}px`,aspectRatio:o.width&&o.height?void 0:"1/1"}));return(
|
|
14
|
+
}`),{LoadingComp:e.defineComponent({setup(){const i=Fe();return e.onMounted(()=>{i.value.classList.add(r)}),()=>e.h(t,o)}})}}function lt({component:t,componentProps:o,delay:n=300}){const{LoadingComp:l}=Be({component:t,componentProps:o,delay:n}),r=e.ref(!1);function s(){r.value=!0}function a(){r.value=!1}return{LoadingComp:l,loading:r,load:s,unload:a}}const rt=[(t=>(e.pushScopeId("data-v-d0ad7597"),t=t(),e.popScopeId(),t))(()=>e.createElementVNode("div",{class:"ldio-mm5gwljcryb"},[e.createElementVNode("div")],-1))],at=e.defineComponent({__name:"DefaultLoading",props:{width:{default:24},height:{default:24}},setup(t){return e.useCssVars(o=>({d8dfa9f0:t.width+"px","2941c2e5":t.height+"px"})),(o,n)=>(e.openBlock(),e.createElementBlock("div",e.normalizeProps(e.guardReactiveProps(o.$attrs)),rt,16))}}),Wt="",st=V(at,[["__scopeId","data-v-d0ad7597"]]),it=["onClick"],ct=e.defineComponent({__name:"Toast",props:{message:null,position:null,buttonClickEvent:null},setup(t){const o=t,n=e.ref(),l=e.ref(),r=e.ref(),s=e.computed(()=>{switch(o.position){case"top":return 10;case"middle":return 50;case"bottom":return 85}}),a=e.computed(()=>({position:"absolute",borderRadius:"10px",backgroundColor:"rgba(0, 0, 0, 0.8)",padding:"14px 19px",top:`calc(${s.value}% - ${r.value}px)`,left:`calc(50% - ${l.value}px)`})),i=e.computed(()=>({width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",color:"white",fontSize:"14px"}));function m(){!o.buttonClickEvent||o.buttonClickEvent()}return e.nextTick(()=>{l.value=n.value.offsetWidth/2,r.value=n.value.offsetHeight/2}),(p,u)=>(e.openBlock(),e.createElementBlock("div",{onClick:e.withModifiers(m,["stop"]),id:"toastWrapper",ref_key:"toastWrapper",ref:n,class:"toastWrapper",style:e.normalizeStyle([e.unref(a),{zIndex:9999999}])},[e.createElementVNode("div",{style:e.normalizeStyle(e.unref(i))},[e.createElementVNode("span",null,e.toDisplayString(t.message),1)],4)],12,it))}}),Yt="",ut=V(ct,[["__scopeId","data-v-533e986b"]]),xe={message:"\u61D2\u732B\u4E91 Yes!!!",position:"middle",duration:1500,buttonClickEvent:()=>{}};class dt{options;container;constructor(o){this.options=o,this.container=document.createElement("div")}present(){const o=e.h(e.h(ut),{...xe,...this.options});e.render(o,this.container),document.body.insertBefore(this.container,document.body.firstChild);const n=this.options.duration||xe.duration;setTimeout(()=>{this.dismiss()},n)}dismiss(){if(this.container){const o=this.container.querySelector("#toastWrapper");o.style.opacity="0",o.style.transition="opacity 0.4s ease-in",setTimeout(()=>{this.container&&(e.render(null,this.container),document.body.removeChild(this.container))},500)}}}const ft=["xlink:href","fill","color"],pt=e.defineComponent({__name:"SvgIcon",props:{name:null,prefix:{default:"icon"},color:{default:"#FFF"},width:null,height:null},setup(t){const o=t,n=e.computed(()=>`#${o.prefix}-${o.name}`),l=e.computed(()=>({width:`${o.width??o.height}px`,height:`${o.height??o.width}px`,aspectRatio:o.width&&o.height?void 0:"1/1"}));function r(s){const{style:a}=s;return typeof a=="object"?a:{}}return(s,a)=>(e.openBlock(),e.createElementBlock("svg",{"aria-hidden":"",style:e.normalizeStyle({...e.unref(l),...r(s.$attrs)})},[e.createElementVNode("use",{"xlink:href":e.unref(n),fill:t.color,color:t.color},null,8,ft)],4))}});function ht(t){const{containerEl:o,sliderEl:n,autoHeight:l,performance:r={},maxHeightRatio:s=.9,observeMethod:a="classList"}=t,i=e.ref(!0),m=ge(N,100);let p,u="";const d=e.ref(0),f=e.ref(0),c=e.ref(0),h=e.ref({top:0,scrollTop:0,scrollHeight:0,clientHeight:0}),B=e.ref({clientHeight:0}),v=e.computed(()=>!!f.value),_=e.computed(()=>h.value.scrollHeight>h.value.clientHeight),S=e.computed(()=>l?h.value.clientHeight-H.value:h.value.clientHeight-B.value.clientHeight),M=e.computed(()=>h.value.scrollHeight-h.value.clientHeight),A=e.computed(()=>Math.max(h.value.clientHeight/h.value.scrollHeight,.05)),H=e.computed(()=>A.value>s?0:A.value*h.value.clientHeight),x=e.computed(()=>({willChange:"transform",transform:`translate3d(0,${c.value}px,0)`,height:l?`${H.value}px`:void 0}));function C(T){F(),f.value=T.clientY-n.value.getBoundingClientRect().top||1,u=getComputedStyle(o.value).scrollBehavior,u==="smooth"&&(o.value.style.scrollBehavior="unset")}function D(){o.value.style.scrollBehavior=u,f.value=0,m()}function F(){i.value=!1}function N(){v.value||(i.value=!0)}function R(T){if(!v.value)return;let O=T.clientY-h.value.top-f.value;O<0?c.value=0:O>=S.value?c.value=S.value:c.value=O,o.value.scrollTo({top:c.value/S.value*M.value})}function j(){v.value||U()}function U(){cancelAnimationFrame(p),p=requestAnimationFrame(K)}function K(){o.value&&(d.value=r.scrollTop?.value??o.value.scrollTop,c.value=d.value/M.value*S.value)}function z(T){let O="addEventListener";T==="add"?O="addEventListener":O="removeEventListener",n.value?.[O]("pointerdown",C,{passive:!0}),window[O]("pointermove",R,{passive:!0}),window[O]("pointerup",D,{passive:!0})}const b=new MutationObserver(T=>{(a=="classList"||T.map(ue=>ue.oldValue).join().includes("height"))&&E()});function E(){h.value.top=o.value?.getBoundingClientRect().top??0,h.value.scrollHeight=o.value?.scrollHeight??0,h.value.clientHeight=o.value?.clientHeight??0}function $(){F(),setTimeout(()=>{B.value.clientHeight=n.value?.clientHeight??0,N()},150)}function I(){if(o.value&&n.value){o.value.classList.add("hide-scrollbar"),o.value.addEventListener("scroll",j,{passive:!0}),z("add");const T={};a==="classList"?Object.assign(T,{subtree:!0,childList:!0}):Object.assign(T,{subtree:!0,attributeOldValue:!0,attributeFilter:["style"]}),b.observe(o.value,T),setTimeout(()=>{E()},100),$()}else console.error("useScrollBar:","\u521D\u59CB\u5316\u5931\u8D25!",{containerEl:o,sliderEl:n})}return e.watch(d,()=>{F(),m()}),{isScrollEnd:i,isDragSlider:v,offsetTop:c,scrollTop:d,scrollable:_,sliderPos:x,init:I,modifySliderEventListener:z}}const mt=(t=>(e.pushScopeId("data-v-efefe52c"),t=t(),e.popScopeId(),t))(()=>e.createElementVNode("div",{class:"default-slider"},null,-1)),vt=e.defineComponent({__name:"ScrollBar",props:{containerEl:null,autoHide:{type:Boolean},autoHeight:{type:Boolean},observeMethod:null,performance:null},setup(t,{expose:o}){const n=t,l=!!e.useSlots().default,r=e.ref(null),s=e.computed(()=>n.containerEl),a=ht({containerEl:s,sliderEl:r,autoHeight:l?n.autoHeight:!0,performance:n.performance,observeMethod:n.observeMethod}),{scrollable:i,isScrollEnd:m,sliderPos:p}=a,u=e.ref(!1),d=n.autoHide?e.computed(()=>u.value||!m.value):e.computed(()=>i.value),{load:f}=G(`.hide-scrollbar {
|
|
15
15
|
scrollbar-width: none;
|
|
16
16
|
-ms-overflow-style: none;
|
|
17
17
|
}
|