@lazycatcloud/lzc-toolkit 0.0.52 → 0.0.53
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 +134 -133
- package/dist/index.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/dialog/Dialog.vue.d.ts +10 -10
- package/dist/types/dialog/index.d.ts +1 -1
- package/dist/types/scroll-bar/ScrollBar.vue.d.ts +10 -10
- package/dist/types/scroll-bar/use/type.d.ts +1 -1
- package/dist/types/svgIcon/SvgIcon.vue.d.ts +3 -3
- package/dist/types/toast/Toast.vue.d.ts +2 -2
- package/dist/types/useDragSelect/index.d.ts +1 -1
- package/dist/types/useVirtualList/VirtualList.vue.d.ts +10 -10
- package/dist/types/useVirtualList/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { unref as B, getCurrentScope as Ke, onScopeDispose as Qe, getCurrentInstance as Ue, onMounted as de, nextTick as fe, ref as w, watch as ne, shallowRef as qe, computed as S, onUnmounted as
|
|
2
|
-
var
|
|
3
|
-
const
|
|
4
|
-
|
|
1
|
+
import { unref as B, getCurrentScope as Ke, onScopeDispose as Qe, getCurrentInstance as Ue, onMounted as de, nextTick as fe, ref as w, watch as ne, shallowRef as qe, computed as S, onUnmounted as Oe, inject as F, provide as $, defineComponent as Z, h as Q, render as ae, openBlock as k, createBlock as De, Transition as Re, withCtx as Ce, createElementBlock as J, createElementVNode as M, withModifiers as Ye, normalizeClass as Ge, renderSlot as he, createCommentVNode as Xe, normalizeStyle as le, toDisplayString as Je, useSlots as Ze, withDirectives as et, vShow as tt, pushScopeId as nt, popScopeId as lt, toRef as ot, mergeProps as rt, normalizeProps as ge, guardReactiveProps as ye, Fragment as at, renderList as st } from "vue";
|
|
2
|
+
var be;
|
|
3
|
+
const Be = typeof window < "u";
|
|
4
|
+
Be && ((be = window?.navigator) == null ? void 0 : be.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
5
5
|
function se(t) {
|
|
6
6
|
return typeof t == "function" ? t() : B(t);
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function Ie(t, e) {
|
|
9
9
|
function n(...l) {
|
|
10
10
|
t(() => e.apply(this, l), { fn: e, thisArg: this, args: l });
|
|
11
11
|
}
|
|
@@ -35,7 +35,7 @@ function it(t, e = !0, n = !0) {
|
|
|
35
35
|
return l = Date.now(), m();
|
|
36
36
|
d > p && (n || !a) ? (l = Date.now(), m()) : e && (o = setTimeout(() => {
|
|
37
37
|
l = Date.now(), a = !0, r(), m();
|
|
38
|
-
}, p)), !n && !o && (o = setTimeout(() => a = !0, p)), a = !1;
|
|
38
|
+
}, p - d)), !n && !o && (o = setTimeout(() => a = !0, p)), a = !1;
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
41
|
function ct(t) {
|
|
@@ -44,21 +44,21 @@ function ct(t) {
|
|
|
44
44
|
function vt(t) {
|
|
45
45
|
return Ke() ? (Qe(t), !0) : !1;
|
|
46
46
|
}
|
|
47
|
-
function
|
|
48
|
-
return
|
|
47
|
+
function Le(t, e = 200, n = {}) {
|
|
48
|
+
return Ie(ut(e, n), t);
|
|
49
49
|
}
|
|
50
|
-
function
|
|
51
|
-
return
|
|
50
|
+
function Se(t, e = 200, n = !1, l = !0) {
|
|
51
|
+
return Ie(it(e, n, l), t);
|
|
52
52
|
}
|
|
53
53
|
function dt(t, e = !0) {
|
|
54
54
|
Ue() ? de(t) : e ? t() : fe(t);
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function He(t) {
|
|
57
57
|
var e;
|
|
58
58
|
const n = se(t);
|
|
59
59
|
return (e = n?.$el) != null ? e : n;
|
|
60
60
|
}
|
|
61
|
-
const ft =
|
|
61
|
+
const ft = Be ? window : void 0;
|
|
62
62
|
function ht(t, e = !1) {
|
|
63
63
|
const n = w(), l = () => n.value = Boolean(t());
|
|
64
64
|
return l(), dt(l, e), n;
|
|
@@ -66,12 +66,12 @@ function ht(t, e = !1) {
|
|
|
66
66
|
const ce = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, ve = "__vueuse_ssr_handlers__";
|
|
67
67
|
ce[ve] = ce[ve] || {};
|
|
68
68
|
ce[ve];
|
|
69
|
-
var
|
|
69
|
+
var Ee = Object.getOwnPropertySymbols, pt = Object.prototype.hasOwnProperty, mt = Object.prototype.propertyIsEnumerable, gt = (t, e) => {
|
|
70
70
|
var n = {};
|
|
71
71
|
for (var l in t)
|
|
72
72
|
pt.call(t, l) && e.indexOf(l) < 0 && (n[l] = t[l]);
|
|
73
|
-
if (t != null &&
|
|
74
|
-
for (var l of
|
|
73
|
+
if (t != null && Ee)
|
|
74
|
+
for (var l of Ee(t))
|
|
75
75
|
e.indexOf(l) < 0 && mt.call(t, l) && (n[l] = t[l]);
|
|
76
76
|
return n;
|
|
77
77
|
};
|
|
@@ -80,7 +80,7 @@ function yt(t, e, n = {}) {
|
|
|
80
80
|
let r;
|
|
81
81
|
const i = ht(() => o && "ResizeObserver" in o), m = () => {
|
|
82
82
|
r && (r.disconnect(), r = void 0);
|
|
83
|
-
}, p = ne(() =>
|
|
83
|
+
}, p = ne(() => He(t), (c) => {
|
|
84
84
|
m(), i.value && o && c && (r = new ResizeObserver(e), r.observe(c, a));
|
|
85
85
|
}, { immediate: !0, flush: "post" }), d = () => {
|
|
86
86
|
m(), p();
|
|
@@ -95,23 +95,23 @@ function bt(t, e = { width: 0, height: 0 }, n = {}) {
|
|
|
95
95
|
return yt(t, ([r]) => {
|
|
96
96
|
const i = l === "border-box" ? r.borderBoxSize : l === "content-box" ? r.contentBoxSize : r.devicePixelContentBoxSize;
|
|
97
97
|
i ? (o.value = i.reduce((m, { inlineSize: p }) => m + p, 0), a.value = i.reduce((m, { blockSize: p }) => m + p, 0)) : (o.value = r.contentRect.width, a.value = r.contentRect.height);
|
|
98
|
-
}, n), ne(() =>
|
|
98
|
+
}, n), ne(() => He(t), (r) => {
|
|
99
99
|
o.value = r ? e.width : 0, a.value = r ? e.height : 0;
|
|
100
100
|
}), {
|
|
101
101
|
width: o,
|
|
102
102
|
height: a
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
|
-
var
|
|
105
|
+
var we;
|
|
106
106
|
(function(t) {
|
|
107
107
|
t.UP = "UP", t.RIGHT = "RIGHT", t.DOWN = "DOWN", t.LEFT = "LEFT", t.NONE = "NONE";
|
|
108
|
-
})(
|
|
109
|
-
var St = Object.defineProperty,
|
|
108
|
+
})(we || (we = {}));
|
|
109
|
+
var St = Object.defineProperty, _e = Object.getOwnPropertySymbols, Et = Object.prototype.hasOwnProperty, wt = Object.prototype.propertyIsEnumerable, xe = (t, e, n) => e in t ? St(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, _t = (t, e) => {
|
|
110
110
|
for (var n in e || (e = {}))
|
|
111
|
-
Et.call(e, n) &&
|
|
112
|
-
if (
|
|
113
|
-
for (var n of
|
|
114
|
-
wt.call(e, n) &&
|
|
111
|
+
Et.call(e, n) && xe(t, n, e[n]);
|
|
112
|
+
if (_e)
|
|
113
|
+
for (var n of _e(e))
|
|
114
|
+
wt.call(e, n) && xe(t, n, e[n]);
|
|
115
115
|
return t;
|
|
116
116
|
};
|
|
117
117
|
const xt = {
|
|
@@ -144,19 +144,19 @@ _t({
|
|
|
144
144
|
linear: ct
|
|
145
145
|
}, xt);
|
|
146
146
|
function Tt(t, e) {
|
|
147
|
-
const { scrollEndHook: n, itemHeight: l, overscan: o = 5 } = e, a = w(null), r = bt(a), i = w(!0), m =
|
|
147
|
+
const { scrollEndHook: n, itemHeight: l, overscan: o = 5 } = e, a = w(null), r = bt(a), i = w(!0), m = Le(ee, 100);
|
|
148
148
|
let p;
|
|
149
149
|
const d = qe(t), c = w(0), s = w({ start: 0, end: 10 });
|
|
150
150
|
let u = 0;
|
|
151
151
|
const b = w([]), _ = S(() => {
|
|
152
152
|
let { sum: f, height: y } = { sum: 0, height: 0 };
|
|
153
153
|
return d.value.map((I, C) => (typeof l == "number" ? y = l : y = l(C), f += y, { height: y, sum: f }));
|
|
154
|
-
}), E = S(() => V(s.value.start)), g = S(() => typeof l == "number" ? _.value.length * l : _.value[_.value.length - 1]?.sum || 0),
|
|
154
|
+
}), E = S(() => V(s.value.start)), g = S(() => typeof l == "number" ? _.value.length * l : _.value[_.value.length - 1]?.sum || 0), D = S(() => {
|
|
155
155
|
let f = b.value.length - o, y = Math.max(f - u, 0);
|
|
156
156
|
return b.value.slice(y, f);
|
|
157
157
|
});
|
|
158
158
|
de(() => {
|
|
159
|
-
}),
|
|
159
|
+
}), Oe(() => cancelAnimationFrame(p)), ne(
|
|
160
160
|
[r.width, r.height, d],
|
|
161
161
|
([f, y]) => {
|
|
162
162
|
(f || y) && U();
|
|
@@ -176,7 +176,7 @@ function Tt(t, e) {
|
|
|
176
176
|
}
|
|
177
177
|
function N() {
|
|
178
178
|
if (a.value) {
|
|
179
|
-
c.value = a.value.scrollTop, u =
|
|
179
|
+
c.value = a.value.scrollTop, u = W();
|
|
180
180
|
let f = A(c.value), y = f + u + o;
|
|
181
181
|
f = f - o, f = f < 0 ? 0 : f, y = y > d.value.length ? d.value.length : y, s.value = { start: f, end: y }, b.value = d.value.slice(f, y).map((I, C) => ({
|
|
182
182
|
data: I,
|
|
@@ -192,7 +192,7 @@ function Tt(t, e) {
|
|
|
192
192
|
}
|
|
193
193
|
return Math.max(0, C);
|
|
194
194
|
}
|
|
195
|
-
function
|
|
195
|
+
function W() {
|
|
196
196
|
let f = 0, y = 0, I = H();
|
|
197
197
|
for (let C = I; C < _.value.length && (f++, y += _.value[C].height, !(y >= r.height.value)); C++)
|
|
198
198
|
;
|
|
@@ -233,7 +233,7 @@ function Tt(t, e) {
|
|
|
233
233
|
};
|
|
234
234
|
return {
|
|
235
235
|
list: b,
|
|
236
|
-
visiableList:
|
|
236
|
+
visiableList: D,
|
|
237
237
|
getItemHeightData: j,
|
|
238
238
|
getoffsetTopIndex: A,
|
|
239
239
|
totalHeight: g,
|
|
@@ -252,15 +252,15 @@ function Tt(t, e) {
|
|
|
252
252
|
innerProps: K
|
|
253
253
|
};
|
|
254
254
|
}
|
|
255
|
-
const
|
|
256
|
-
function
|
|
255
|
+
const $e = Symbol(), Ae = Symbol(), Pe = Symbol(), Fe = Symbol(), Me = Symbol(), We = Symbol(), ze = Symbol(), ke = Symbol(), Ne = Symbol();
|
|
256
|
+
function Wt() {
|
|
257
257
|
const { voidFn: t, boolFn: e, boolRef: n, arrayRef: l } = {
|
|
258
258
|
voidFn: (u) => {
|
|
259
259
|
},
|
|
260
260
|
boolFn: (u) => !1,
|
|
261
261
|
boolRef: S(() => !1),
|
|
262
262
|
arrayRef: S(() => [])
|
|
263
|
-
}, o = F(
|
|
263
|
+
}, o = F(Fe, l), a = F(Pe, e), r = F(ke, n), i = F(Ae, t), m = F($e, t), p = F(Me, t), d = F(We, t), c = F(ze, t), s = F(Ne, t);
|
|
264
264
|
return {
|
|
265
265
|
selected: o,
|
|
266
266
|
isSelected: a,
|
|
@@ -304,7 +304,7 @@ function zt(t, e) {
|
|
|
304
304
|
function c() {
|
|
305
305
|
o.value ? r() : a();
|
|
306
306
|
}
|
|
307
|
-
return $(
|
|
307
|
+
return $($e, c), $(Ae, d), $(Pe, p), $(Fe, l), $(Me, i), $(We, a), $(ze, m), $(ke, o), $(Ne, r), {
|
|
308
308
|
selected: l,
|
|
309
309
|
select: i,
|
|
310
310
|
selectAll: a,
|
|
@@ -321,7 +321,7 @@ function ie(t) {
|
|
|
321
321
|
console.debug(`\u9ED8\u8BA4${t}\u65B9\u6CD5,\u9700\u8981\u81EA\u5B9A\u4E49\u751F\u6548`);
|
|
322
322
|
};
|
|
323
323
|
}
|
|
324
|
-
function
|
|
324
|
+
function Ve({
|
|
325
325
|
attribute: t,
|
|
326
326
|
selectWay: e = "colum",
|
|
327
327
|
scrollOptions: n = {},
|
|
@@ -334,7 +334,7 @@ function Ne({
|
|
|
334
334
|
} = l();
|
|
335
335
|
let i = {};
|
|
336
336
|
const m = S(
|
|
337
|
-
() =>
|
|
337
|
+
() => Se(e === "colum" ? z : oe, 50)
|
|
338
338
|
), p = /* @__PURE__ */ new Set(), d = w(!0), c = w(), s = w(!1), u = w({ x: 0, y: 0 }), b = w({ x: 0, y: 0, scrollTop: 0 }), _ = new ResizeObserver(
|
|
339
339
|
(v) => E.value = v[0].target.getBoundingClientRect()
|
|
340
340
|
), E = w({}), g = w({
|
|
@@ -343,14 +343,14 @@ function Ne({
|
|
|
343
343
|
sync(v = !1) {
|
|
344
344
|
g.value.top = c.value?.scrollTop || 0, v && (g.value.height = c.value?.scrollHeight || 0);
|
|
345
345
|
}
|
|
346
|
-
}),
|
|
346
|
+
}), D = S(() => s.value ? {
|
|
347
347
|
left: Math.min(u.value.x, b.value.x) - E.value.left,
|
|
348
348
|
top: Math.min(u.value.y, b.value.y) - E.value.top,
|
|
349
349
|
width: Math.abs(u.value.x - b.value.x),
|
|
350
350
|
height: Math.abs(u.value.y - b.value.y)
|
|
351
351
|
} : { left: 0, top: 0, width: 0, height: 0 }), { margin: L = 50, startSpeed: ee = 30, maxSpeed: U = 30 } = n;
|
|
352
352
|
let N;
|
|
353
|
-
const A = L,
|
|
353
|
+
const A = L, W = ee, V = U, j = (v) => v ** 1;
|
|
354
354
|
let H = 0;
|
|
355
355
|
function q(v) {
|
|
356
356
|
if (cancelAnimationFrame(N), H = te(v), H = Math.max(
|
|
@@ -360,24 +360,24 @@ function Ne({
|
|
|
360
360
|
const h = c.value;
|
|
361
361
|
if (!h || !s.value)
|
|
362
362
|
return;
|
|
363
|
-
const
|
|
363
|
+
const R = g.value.height - E.value.height;
|
|
364
364
|
let x = g.value.top + Number(H);
|
|
365
|
-
x = Math.min(Math.max(0, x),
|
|
365
|
+
x = Math.min(Math.max(0, x), R), h.scrollTop = x, Y(), N = requestAnimationFrame(() => q(v));
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
368
|
function te(v) {
|
|
369
369
|
if (c.value) {
|
|
370
|
-
const
|
|
370
|
+
const R = E.value, x = R.bottom - v;
|
|
371
371
|
if (x < A)
|
|
372
|
-
return
|
|
373
|
-
const P = v -
|
|
372
|
+
return W * j(1 - x / A);
|
|
373
|
+
const P = v - R.top;
|
|
374
374
|
if (P < A)
|
|
375
|
-
return -
|
|
375
|
+
return -W * j(1 - P / A);
|
|
376
376
|
}
|
|
377
377
|
return 0;
|
|
378
378
|
}
|
|
379
379
|
function K(v) {
|
|
380
|
-
const h = { ...
|
|
380
|
+
const h = { ...D.value, right: 0, bottom: 0 };
|
|
381
381
|
return h.left += E.value.left, h.top += E.value.top - g.value.top, h.right = h.width + h.left, h.bottom = h.height + h.top, h.left < v.right && h.right > v.left && h.top < v.bottom && h.bottom > v.top;
|
|
382
382
|
}
|
|
383
383
|
function Y() {
|
|
@@ -388,13 +388,13 @@ function Ne({
|
|
|
388
388
|
b.value.y + v - b.value.scrollTop
|
|
389
389
|
), b.value.scrollTop = v;
|
|
390
390
|
}
|
|
391
|
-
function f(v, h,
|
|
392
|
-
let x = document.getElementById(
|
|
393
|
-
x || (x = document.createElement("style"), x.id =
|
|
391
|
+
function f(v, h, R = "dynamic-styles") {
|
|
392
|
+
let x = document.getElementById(R);
|
|
393
|
+
x || (x = document.createElement("style"), x.id = R, document.head.appendChild(x));
|
|
394
394
|
const P = x.sheet.cssRules, X = P.length, je = `${v} { ${h} }`;
|
|
395
395
|
for (let ue = 0; ue < X; ue++) {
|
|
396
|
-
const
|
|
397
|
-
if (
|
|
396
|
+
const me = P[ue];
|
|
397
|
+
if (me.selectorText === v && me.style.cssText === h)
|
|
398
398
|
return;
|
|
399
399
|
}
|
|
400
400
|
x.sheet.insertRule(je, X);
|
|
@@ -402,8 +402,8 @@ function Ne({
|
|
|
402
402
|
function y(v, h) {
|
|
403
403
|
d.value = !0, s.value = !0, g.value.height ? g.value.sync() : g.value.sync(!0), u.value.x = v, u.value.y = h + g.value.top, b.value.x = u.value.x, b.value.y = u.value.y, c.value?.classList.add("disable-scroll-behavior"), p.clear();
|
|
404
404
|
}
|
|
405
|
-
function I(v, h,
|
|
406
|
-
!s.value || (d.value && e === "colum" && !T() && (r(), d.value = !1),
|
|
405
|
+
function I(v, h, R) {
|
|
406
|
+
!s.value || (d.value && e === "colum" && !T() && (r(), d.value = !1), R?.(), q(h), b.value.x = Math.max(v, E.value.left), b.value.y = Math.min(
|
|
407
407
|
h + g.value.top,
|
|
408
408
|
g.value.height + E.value.top
|
|
409
409
|
), b.value.scrollTop = g.value.top, m.value());
|
|
@@ -417,25 +417,25 @@ function Ne({
|
|
|
417
417
|
function T() {
|
|
418
418
|
if (!s.value)
|
|
419
419
|
return !1;
|
|
420
|
-
const { width: v, height: h } =
|
|
420
|
+
const { width: v, height: h } = D.value;
|
|
421
421
|
return !(Math.max(v, h) > 5);
|
|
422
422
|
}
|
|
423
423
|
function G() {
|
|
424
424
|
T() && r();
|
|
425
425
|
}
|
|
426
|
-
function
|
|
426
|
+
function z() {
|
|
427
427
|
T() || c.value?.querySelectorAll(`[${t}]`).forEach((v) => {
|
|
428
428
|
i[`${t}`] = v.getAttribute(`${t}`), K(v.getBoundingClientRect()) ? o([i]) : a([i]);
|
|
429
429
|
});
|
|
430
430
|
}
|
|
431
431
|
function oe() {
|
|
432
432
|
const v = [];
|
|
433
|
-
let h = null,
|
|
433
|
+
let h = null, R = 0;
|
|
434
434
|
c.value?.querySelectorAll(`[${t}]`).forEach((x, P) => {
|
|
435
435
|
const X = x.getAttribute(`${t}`);
|
|
436
|
-
v.push(X), K(x.getBoundingClientRect()) ? (h === null && (h = P), h = Math.min(h, P),
|
|
436
|
+
v.push(X), K(x.getBoundingClientRect()) ? (h === null && (h = P), h = Math.min(h, P), R = Math.max(R, P)) : (i[`${t}`] = X, p.has(X) && a([i]));
|
|
437
437
|
});
|
|
438
|
-
for (let x = h; x <
|
|
438
|
+
for (let x = h; x < R + 1; x++)
|
|
439
439
|
i[`${t}`] = v[x], o([i]), p.add(v[x]);
|
|
440
440
|
}
|
|
441
441
|
function re(v) {
|
|
@@ -453,14 +453,14 @@ function Ne({
|
|
|
453
453
|
isSingleClick: T,
|
|
454
454
|
cancelSelectAllBySingleClick: G,
|
|
455
455
|
selectFn: m,
|
|
456
|
-
selectRange:
|
|
456
|
+
selectRange: D,
|
|
457
457
|
isPressing: s,
|
|
458
458
|
containerEl: c,
|
|
459
459
|
observer: _
|
|
460
460
|
};
|
|
461
461
|
}
|
|
462
|
-
function
|
|
463
|
-
const e =
|
|
462
|
+
function kt(t) {
|
|
463
|
+
const e = Ve(t), { observer: n, selectRange: l } = e, {
|
|
464
464
|
onScroll: o,
|
|
465
465
|
dragStart: a,
|
|
466
466
|
dragMove: r,
|
|
@@ -487,7 +487,7 @@ function Wt(t) {
|
|
|
487
487
|
r(E.x, E.y);
|
|
488
488
|
}
|
|
489
489
|
function u(E) {
|
|
490
|
-
E.composedPath().some((
|
|
490
|
+
E.composedPath().some((D) => D?.getAttribute?.(t.attribute)) || m(), i();
|
|
491
491
|
}
|
|
492
492
|
function b(E) {
|
|
493
493
|
try {
|
|
@@ -505,8 +505,8 @@ function Wt(t) {
|
|
|
505
505
|
}
|
|
506
506
|
return { init: b, unMount: _ };
|
|
507
507
|
}
|
|
508
|
-
function
|
|
509
|
-
const l =
|
|
508
|
+
function Nt(t, e, n = 600) {
|
|
509
|
+
const l = Ve({
|
|
510
510
|
...t,
|
|
511
511
|
selectWay: "row",
|
|
512
512
|
scrollOptions: {
|
|
@@ -520,14 +520,14 @@ function kt(t, e, n = 600) {
|
|
|
520
520
|
}
|
|
521
521
|
function s(g) {
|
|
522
522
|
c(), d = setTimeout(() => {
|
|
523
|
-
const { clientX:
|
|
524
|
-
r(
|
|
523
|
+
const { clientX: D, clientY: L } = g.targetTouches[0];
|
|
524
|
+
r(D, L), e?.(), p.value(), g.preventDefault();
|
|
525
525
|
}, n);
|
|
526
526
|
}
|
|
527
527
|
function u(g) {
|
|
528
528
|
c();
|
|
529
|
-
const { clientX:
|
|
530
|
-
i(
|
|
529
|
+
const { clientX: D, clientY: L } = g.targetTouches[0];
|
|
530
|
+
i(D, L, () => g.preventDefault());
|
|
531
531
|
}
|
|
532
532
|
function b() {
|
|
533
533
|
c(), m();
|
|
@@ -539,8 +539,8 @@ function kt(t, e, n = 600) {
|
|
|
539
539
|
if (!l.containerEl?.value)
|
|
540
540
|
return !1;
|
|
541
541
|
l.containerEl.value?.addEventListener("scroll", a), l.containerEl.value?.addEventListener("touchstart", s), l.containerEl.value?.addEventListener("touchmove", u), window.addEventListener("touchcancel", b), window.addEventListener("touchend", b);
|
|
542
|
-
} catch (
|
|
543
|
-
console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25",
|
|
542
|
+
} catch (D) {
|
|
543
|
+
console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25", D);
|
|
544
544
|
}
|
|
545
545
|
}
|
|
546
546
|
function E() {
|
|
@@ -548,7 +548,7 @@ function kt(t, e, n = 600) {
|
|
|
548
548
|
}
|
|
549
549
|
return { init: _, unMount: E };
|
|
550
550
|
}
|
|
551
|
-
const Ot = Symbol(),
|
|
551
|
+
const Ot = Symbol(), Dt = /* @__PURE__ */ Z({
|
|
552
552
|
__name: "Dialog",
|
|
553
553
|
props: {
|
|
554
554
|
visiable: { type: Boolean, default: !1 },
|
|
@@ -560,19 +560,19 @@ const Ot = Symbol(), Rt = /* @__PURE__ */ Z({
|
|
|
560
560
|
const n = t, l = () => {
|
|
561
561
|
n.closeOnClickOverlay && e("update:visiable", !1);
|
|
562
562
|
};
|
|
563
|
-
return $(Ot, () => e("update:visiable", !1)), (o, a) => (k(),
|
|
564
|
-
default:
|
|
563
|
+
return $(Ot, () => e("update:visiable", !1)), (o, a) => (k(), De(Re, { name: "modal" }, {
|
|
564
|
+
default: Ce(() => [
|
|
565
565
|
t.visiable ? (k(), J("div", {
|
|
566
566
|
key: 0,
|
|
567
567
|
onClick: l,
|
|
568
|
-
class: "modal
|
|
568
|
+
class: "modal"
|
|
569
569
|
}, [
|
|
570
570
|
M("div", {
|
|
571
571
|
onClick: a[0] || (a[0] = Ye(() => {
|
|
572
572
|
}, ["stop"])),
|
|
573
|
-
class: Ge(["dialog
|
|
573
|
+
class: Ge(["dialog", t.dialogClass])
|
|
574
574
|
}, [
|
|
575
|
-
he(o.$slots, "default")
|
|
575
|
+
he(o.$slots, "default", {}, void 0, !0)
|
|
576
576
|
], 2)
|
|
577
577
|
])) : Xe("", !0)
|
|
578
578
|
]),
|
|
@@ -580,7 +580,13 @@ const Ot = Symbol(), Rt = /* @__PURE__ */ Z({
|
|
|
580
580
|
}));
|
|
581
581
|
}
|
|
582
582
|
});
|
|
583
|
-
|
|
583
|
+
const pe = (t, e) => {
|
|
584
|
+
const n = t.__vccOpts || t;
|
|
585
|
+
for (const [l, o] of e)
|
|
586
|
+
n[l] = o;
|
|
587
|
+
return n;
|
|
588
|
+
}, Rt = /* @__PURE__ */ pe(Dt, [["__scopeId", "data-v-415900d3"]]);
|
|
589
|
+
function Vt(t) {
|
|
584
590
|
function e(n, l) {
|
|
585
591
|
const o = document.createElement("div"), a = {
|
|
586
592
|
setup() {
|
|
@@ -607,7 +613,7 @@ function Nt(t) {
|
|
|
607
613
|
create: e
|
|
608
614
|
};
|
|
609
615
|
}
|
|
610
|
-
const
|
|
616
|
+
const Ct = /* @__PURE__ */ Z({
|
|
611
617
|
__name: "Toast",
|
|
612
618
|
props: {
|
|
613
619
|
message: null,
|
|
@@ -654,21 +660,21 @@ const Dt = /* @__PURE__ */ Z({
|
|
|
654
660
|
], 4)
|
|
655
661
|
], 4));
|
|
656
662
|
}
|
|
657
|
-
}),
|
|
663
|
+
}), Te = {
|
|
658
664
|
message: "\u61D2\u732B\u4E91 Yes!!!",
|
|
659
665
|
position: "middle",
|
|
660
666
|
duration: 1500
|
|
661
667
|
};
|
|
662
|
-
class
|
|
668
|
+
class jt {
|
|
663
669
|
options;
|
|
664
670
|
container;
|
|
665
671
|
constructor(e) {
|
|
666
672
|
this.options = e, this.container = document.createElement("div");
|
|
667
673
|
}
|
|
668
674
|
present() {
|
|
669
|
-
const e = Q(Q(
|
|
675
|
+
const e = Q(Q(Ct), { ...Te, ...this.options });
|
|
670
676
|
ae(e, this.container), document.body.insertBefore(this.container, document.body.firstChild);
|
|
671
|
-
const n = this.options.duration ||
|
|
677
|
+
const n = this.options.duration || Te.duration;
|
|
672
678
|
setTimeout(() => {
|
|
673
679
|
this.dismiss();
|
|
674
680
|
}, n);
|
|
@@ -679,7 +685,7 @@ class Vt {
|
|
|
679
685
|
}, 500));
|
|
680
686
|
}
|
|
681
687
|
}
|
|
682
|
-
const
|
|
688
|
+
const Bt = ["xlink:href", "fill", "color"], Kt = /* @__PURE__ */ Z({
|
|
683
689
|
__name: "SvgIcon",
|
|
684
690
|
props: {
|
|
685
691
|
name: null,
|
|
@@ -702,18 +708,18 @@ const Ct = ["xlink:href", "fill", "color"], jt = /* @__PURE__ */ Z({
|
|
|
702
708
|
"xlink:href": B(n),
|
|
703
709
|
fill: t.color,
|
|
704
710
|
color: t.color
|
|
705
|
-
}, null, 8,
|
|
711
|
+
}, null, 8, Bt)
|
|
706
712
|
], 4));
|
|
707
713
|
}
|
|
708
714
|
});
|
|
709
|
-
function
|
|
715
|
+
function It(t) {
|
|
710
716
|
const {
|
|
711
717
|
containerEl: e,
|
|
712
718
|
sliderEl: n,
|
|
713
719
|
autoHeight: l,
|
|
714
720
|
performance: o = {},
|
|
715
721
|
maxHeightRatio: a = 0.9
|
|
716
|
-
} = t, r = w(!0), i =
|
|
722
|
+
} = t, r = w(!0), i = Le(V, 100);
|
|
717
723
|
let m, p = "";
|
|
718
724
|
const d = w(0), c = w(0), s = w(0), u = w({
|
|
719
725
|
top: 0,
|
|
@@ -722,7 +728,7 @@ function Bt(t) {
|
|
|
722
728
|
clientHeight: 0
|
|
723
729
|
}), b = w({
|
|
724
730
|
clientHeight: 0
|
|
725
|
-
}), _ = S(() => !!c.value), E = S(() => u.value.scrollHeight > u.value.clientHeight), g = S(() => u.value.clientHeight - b.value.clientHeight),
|
|
731
|
+
}), _ = S(() => !!c.value), E = S(() => u.value.scrollHeight > u.value.clientHeight), g = S(() => u.value.clientHeight - b.value.clientHeight), D = S(() => u.value.scrollHeight - u.value.clientHeight), L = S(() => Math.max(
|
|
726
732
|
u.value.clientHeight / u.value.scrollHeight,
|
|
727
733
|
0.05
|
|
728
734
|
)), ee = S(() => L.value > a ? 0 : L.value * u.value.clientHeight), U = S(() => ({
|
|
@@ -731,12 +737,12 @@ function Bt(t) {
|
|
|
731
737
|
height: l ? `${ee.value}px` : void 0
|
|
732
738
|
}));
|
|
733
739
|
function N(O) {
|
|
734
|
-
|
|
740
|
+
W(), c.value = O.clientY - n.value.getBoundingClientRect().top || 1, p = getComputedStyle(e.value).scrollBehavior, p === "smooth" && (e.value.style.scrollBehavior = "unset");
|
|
735
741
|
}
|
|
736
742
|
function A() {
|
|
737
743
|
e.value.style.scrollBehavior = p, c.value = 0, i();
|
|
738
744
|
}
|
|
739
|
-
function
|
|
745
|
+
function W() {
|
|
740
746
|
r.value = !1;
|
|
741
747
|
}
|
|
742
748
|
function V() {
|
|
@@ -747,7 +753,7 @@ function Bt(t) {
|
|
|
747
753
|
return;
|
|
748
754
|
let T = O.clientY - u.value.top - c.value;
|
|
749
755
|
T < 0 ? s.value = 0 : T >= g.value ? s.value = g.value : s.value = T, e.value.scrollTo({
|
|
750
|
-
top: s.value / g.value *
|
|
756
|
+
top: s.value / g.value * D.value
|
|
751
757
|
});
|
|
752
758
|
}
|
|
753
759
|
function H() {
|
|
@@ -757,7 +763,7 @@ function Bt(t) {
|
|
|
757
763
|
cancelAnimationFrame(m), m = requestAnimationFrame(te);
|
|
758
764
|
}
|
|
759
765
|
function te() {
|
|
760
|
-
e.value && (d.value = o.scrollTop?.value ?? e.value.scrollTop, s.value = d.value /
|
|
766
|
+
e.value && (d.value = o.scrollTop?.value ?? e.value.scrollTop, s.value = d.value / D.value * g.value);
|
|
761
767
|
}
|
|
762
768
|
function K(O) {
|
|
763
769
|
let T = "addEventListener";
|
|
@@ -772,20 +778,20 @@ function Bt(t) {
|
|
|
772
778
|
u.value.top = e.value?.getBoundingClientRect().top ?? 0, u.value.scrollHeight = e.value?.scrollHeight ?? 0, u.value.clientHeight = e.value?.clientHeight ?? 0;
|
|
773
779
|
}
|
|
774
780
|
function y() {
|
|
775
|
-
|
|
781
|
+
W(), setTimeout(() => {
|
|
776
782
|
b.value.clientHeight = n.value?.clientHeight ?? 0, V();
|
|
777
783
|
}, 150);
|
|
778
784
|
}
|
|
779
785
|
function I(O, T, G = "dynamic-styles") {
|
|
780
|
-
let
|
|
781
|
-
|
|
782
|
-
const oe =
|
|
786
|
+
let z = document.getElementById(G);
|
|
787
|
+
z || (z = document.createElement("style"), z.id = G, document.head.appendChild(z));
|
|
788
|
+
const oe = z.sheet.cssRules, re = oe.length, v = `${O} { ${T} }`;
|
|
783
789
|
for (let h = 0; h < re; h++) {
|
|
784
|
-
const
|
|
785
|
-
if (
|
|
790
|
+
const R = oe[h];
|
|
791
|
+
if (R.selectorText === O && R.style.cssText === T)
|
|
786
792
|
return;
|
|
787
793
|
}
|
|
788
|
-
|
|
794
|
+
z.sheet.insertRule(v, re);
|
|
789
795
|
}
|
|
790
796
|
function C() {
|
|
791
797
|
e.value && n.value ? (I(
|
|
@@ -802,7 +808,7 @@ function Bt(t) {
|
|
|
802
808
|
}, 100), y()) : console.error("useScrollBar:", "\u521D\u59CB\u5316\u5931\u8D25!", { containerEl: e, sliderEl: n });
|
|
803
809
|
}
|
|
804
810
|
return ne(d, () => {
|
|
805
|
-
|
|
811
|
+
W(), i();
|
|
806
812
|
}), {
|
|
807
813
|
isScrollEnd: r,
|
|
808
814
|
isDragSlider: _,
|
|
@@ -814,7 +820,7 @@ function Bt(t) {
|
|
|
814
820
|
modifySliderEventListener: K
|
|
815
821
|
};
|
|
816
822
|
}
|
|
817
|
-
const
|
|
823
|
+
const Lt = (t) => (nt("data-v-edec7292"), t = t(), lt(), t), Ht = /* @__PURE__ */ Lt(() => /* @__PURE__ */ M("div", { class: "default-slider" }, null, -1)), $t = /* @__PURE__ */ Z({
|
|
818
824
|
__name: "ScrollBar",
|
|
819
825
|
props: {
|
|
820
826
|
containerEl: null,
|
|
@@ -823,7 +829,7 @@ const It = (t) => (nt("data-v-edec7292"), t = t(), lt(), t), Lt = /* @__PURE__ *
|
|
|
823
829
|
performance: null
|
|
824
830
|
},
|
|
825
831
|
setup(t, { expose: e }) {
|
|
826
|
-
const n = t, l = !!Ze().default, o = w(null), a = S(() => n.containerEl), r =
|
|
832
|
+
const n = t, l = !!Ze().default, o = w(null), a = S(() => n.containerEl), r = It({
|
|
827
833
|
containerEl: a,
|
|
828
834
|
sliderEl: o,
|
|
829
835
|
autoHeight: l ? n.autoHeight : !0,
|
|
@@ -833,7 +839,7 @@ const It = (t) => (nt("data-v-edec7292"), t = t(), lt(), t), Lt = /* @__PURE__ *
|
|
|
833
839
|
fe(() => {
|
|
834
840
|
r.init();
|
|
835
841
|
});
|
|
836
|
-
}),
|
|
842
|
+
}), Oe(() => {
|
|
837
843
|
r.modifySliderEventListener("remove");
|
|
838
844
|
});
|
|
839
845
|
function s() {
|
|
@@ -842,8 +848,8 @@ const It = (t) => (nt("data-v-edec7292"), t = t(), lt(), t), Lt = /* @__PURE__ *
|
|
|
842
848
|
function u() {
|
|
843
849
|
d.value = !1;
|
|
844
850
|
}
|
|
845
|
-
return e({ uScrollBarReturn: r }), (b, _) => (k(),
|
|
846
|
-
default:
|
|
851
|
+
return e({ uScrollBarReturn: r }), (b, _) => (k(), De(Re, null, {
|
|
852
|
+
default: Ce(() => [
|
|
847
853
|
et(M("div", {
|
|
848
854
|
ref_key: "sliderRef",
|
|
849
855
|
ref: o,
|
|
@@ -853,7 +859,7 @@ const It = (t) => (nt("data-v-edec7292"), t = t(), lt(), t), Lt = /* @__PURE__ *
|
|
|
853
859
|
style: le(B(p))
|
|
854
860
|
}, [
|
|
855
861
|
he(b.$slots, "default", {}, () => [
|
|
856
|
-
|
|
862
|
+
Ht
|
|
857
863
|
], !0)
|
|
858
864
|
], 36), [
|
|
859
865
|
[tt, B(c)]
|
|
@@ -863,15 +869,10 @@ const It = (t) => (nt("data-v-edec7292"), t = t(), lt(), t), Lt = /* @__PURE__ *
|
|
|
863
869
|
}));
|
|
864
870
|
}
|
|
865
871
|
});
|
|
866
|
-
const
|
|
867
|
-
const n = t.__vccOpts || t;
|
|
868
|
-
for (const [l, o] of e)
|
|
869
|
-
n[l] = o;
|
|
870
|
-
return n;
|
|
871
|
-
}, Kt = /* @__PURE__ */ Ve(Ht, [["__scopeId", "data-v-edec7292"]]), $t = { class: "virtualListWrapper" }, At = {
|
|
872
|
+
const Qt = /* @__PURE__ */ pe($t, [["__scopeId", "data-v-edec7292"]]), At = { class: "virtualListWrapper" }, Pt = {
|
|
872
873
|
inheritAttrs: !1
|
|
873
|
-
},
|
|
874
|
-
...
|
|
874
|
+
}, Ft = /* @__PURE__ */ Z({
|
|
875
|
+
...Pt,
|
|
875
876
|
__name: "VirtualList",
|
|
876
877
|
props: {
|
|
877
878
|
data: null,
|
|
@@ -889,14 +890,14 @@ const Ve = (t, e) => {
|
|
|
889
890
|
}), { list: a, containerProps: r, wrapperProps: i, innerProps: m, getItemHeightData: p } = o;
|
|
890
891
|
return e({
|
|
891
892
|
vListReturn: o
|
|
892
|
-
}), (d, c) => (k(), J("div",
|
|
893
|
+
}), (d, c) => (k(), J("div", At, [
|
|
893
894
|
M("div", rt({
|
|
894
895
|
onScrollPassive: c[0] || (c[0] = (...s) => B(r).onScroll && B(r).onScroll(...s)),
|
|
895
896
|
ref: B(r).ref,
|
|
896
897
|
class: "virtualList"
|
|
897
898
|
}, d.$attrs), [
|
|
898
|
-
M("div",
|
|
899
|
-
M("div",
|
|
899
|
+
M("div", ge(ye(B(i))), [
|
|
900
|
+
M("div", ge(ye(B(m))), [
|
|
900
901
|
(k(!0), J(at, null, st(B(a), ({ index: s, data: u }) => (k(), J("div", {
|
|
901
902
|
key: s,
|
|
902
903
|
style: le({
|
|
@@ -915,27 +916,27 @@ const Ve = (t, e) => {
|
|
|
915
916
|
]));
|
|
916
917
|
}
|
|
917
918
|
});
|
|
918
|
-
const
|
|
919
|
+
const Ut = /* @__PURE__ */ pe(Ft, [["__scopeId", "data-v-4ba97cce"]]);
|
|
919
920
|
export {
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
921
|
+
Qt as ScrollBar,
|
|
922
|
+
Kt as SvgIcon,
|
|
923
|
+
jt as ToastCreator,
|
|
924
|
+
Ut as VirtualList,
|
|
925
|
+
Fe as allSelectedKey,
|
|
925
926
|
Ot as closeDialogKey,
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
927
|
+
Vt as dialogController,
|
|
928
|
+
ke as isAllSelectedKey,
|
|
929
|
+
Pe as isSelectedKey,
|
|
930
|
+
We as selectAllKey,
|
|
931
|
+
Me as selectKey,
|
|
932
|
+
$e as toggleAllKey,
|
|
933
|
+
Ae as toggleKey,
|
|
934
|
+
Ne as unselectAllKey,
|
|
934
935
|
ze as unselectKey,
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
936
|
+
Ve as useDragSelect,
|
|
937
|
+
Nt as useDragSelectByMobile,
|
|
938
|
+
kt as useDragSelectByPc,
|
|
938
939
|
zt as useSelectable,
|
|
939
|
-
|
|
940
|
+
Wt as useSelectableInjectors,
|
|
940
941
|
Tt as useVirtualList
|
|
941
942
|
};
|
package/dist/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(E,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(E=typeof globalThis<"u"?globalThis:E||self,e(E.ui={},E.Vue))})(this,function(E,e){"use strict";var de;const fe=typeof window<"u";fe&&((de=window?.navigator)==null?void 0:de.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Q(n){return typeof n=="function"?n():e.unref(n)}function pe(n,t){function o(...l){n(()=>t.apply(this,l),{fn:t,thisArg:this,args:l})}return o}function Be(n,t={}){let o,l;return i=>{const a=Q(n),u=Q(t.maxWait);if(o&&clearTimeout(o),a<=0||u!==void 0&&u<=0)return l&&(clearTimeout(l),l=null),i();u&&!l&&(l=setTimeout(()=>{o&&clearTimeout(o),l=null,i()},u)),o=setTimeout(()=>{l&&clearTimeout(l),l=null,i()},a)}}function Oe(n,t=!0,o=!0){let l=0,r,i=!0;const a=()=>{r&&(clearTimeout(r),r=void 0)};return v=>{const g=Q(n),p=Date.now()-l;if(a(),g<=0)return l=Date.now(),v();p>g&&(o||!i)?(l=Date.now(),v()):t&&(r=setTimeout(()=>{l=Date.now(),i=!0,a(),v()},g)),!o&&!r&&(r=setTimeout(()=>i=!0,g)),i=!1}}function Ce(n){return n}function De(n){return e.getCurrentScope()?(e.onScopeDispose(n),!0):!1}function he(n,t=200,o={}){return pe(Be(t,o),n)}function me(n,t=200,o=!1,l=!0){return pe(Oe(t,o,l),n)}function Re(n,t=!0){e.getCurrentInstance()?e.onMounted(n):t?n():e.nextTick(n)}function ge(n){var t;const o=Q(n);return(t=o?.$el)!=null?t:o}const Ie=fe?window:void 0;function Le(n,t=!1){const o=e.ref(),l=()=>o.value=Boolean(n());return l(),Re(l,t),o}const X=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},J="__vueuse_ssr_handlers__";X[J]=X[J]||{},X[J];var ve=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable,Pe=(n,t)=>{var o={};for(var l in n)Ae.call(n,l)&&t.indexOf(l)<0&&(o[l]=n[l]);if(n!=null&&ve)for(var l of ve(n))t.indexOf(l)<0&&He.call(n,l)&&(o[l]=n[l]);return o};function Me(n,t,o={}){const l=o,{window:r=Ie}=l,i=Pe(l,["window"]);let a;const u=Le(()=>r&&"ResizeObserver"in r),v=()=>{a&&(a.disconnect(),a=void 0)},g=e.watch(()=>ge(n),d=>{v(),u.value&&r&&d&&(a=new ResizeObserver(t),a.observe(d,i))},{immediate:!0,flush:"post"}),p=()=>{v(),g()};return De(p),{isSupported:u,stop:p}}function $e(n,t={width:0,height:0},o={}){const{box:l="content-box"}=o,r=e.ref(t.width),i=e.ref(t.height);return Me(n,([a])=>{const u=l==="border-box"?a.borderBoxSize:l==="content-box"?a.contentBoxSize:a.devicePixelContentBoxSize;u?(r.value=u.reduce((v,{inlineSize:g})=>v+g,0),i.value=u.reduce((v,{blockSize:g})=>v+g,0)):(r.value=a.contentRect.width,i.value=a.contentRect.height)},o),e.watch(()=>ge(n),a=>{r.value=a?t.width:0,i.value=a?t.height:0}),{width:r,height:i}}var ye;(function(n){n.UP="UP",n.RIGHT="RIGHT",n.DOWN="DOWN",n.LEFT="LEFT",n.NONE="NONE"})(ye||(ye={}));var Fe=Object.defineProperty,Se=Object.getOwnPropertySymbols,ke=Object.prototype.hasOwnProperty,Ve=Object.prototype.propertyIsEnumerable,be=(n,t,o)=>t in n?Fe(n,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[t]=o,je=(n,t)=>{for(var o in t||(t={}))ke.call(t,o)&&be(n,o,t[o]);if(Se)for(var o of Se(t))Ve.call(t,o)&&be(n,o,t[o]);return n};je({linear:Ce},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});function Ee(n,t){const{scrollEndHook:o,itemHeight:l,overscan:r=5}=t,i=e.ref(null),a=$e(i),u=e.ref(!0),v=he(U,100);let g;const p=e.shallowRef(n),d=e.ref(0),s=e.ref({start:0,end:10});let c=0;const b=e.ref([]),_=e.computed(()=>{let{sum:h,height:S}={sum:0,height:0};return p.value.map((R,D)=>(typeof l=="number"?S=l:S=l(D),h+=S,{height:S,sum:h}))}),w=e.computed(()=>F(s.value.start)),y=e.computed(()=>typeof l=="number"?_.value.length*l:_.value[_.value.length-1]?.sum||0),O=e.computed(()=>{let h=b.value.length-r,S=Math.max(h-c,0);return b.value.slice(S,h)});e.onMounted(()=>{}),e.onUnmounted(()=>cancelAnimationFrame(g)),e.watch([a.width,a.height,p],([h,S])=>{(h||S)&&j()},{deep:!0}),e.watch(d,()=>{I(),v()});function I(){u.value=!1}function U(){u.value=!0,o?.()}function j(){cancelAnimationFrame(g),g=requestAnimationFrame($)}function $(){if(i.value){d.value=i.value.scrollTop,c=P();let h=A(d.value),S=h+c+r;h=h-r,h=h<0?0:h,S=S>p.value.length?p.value.length:S,s.value={start:h,end:S},b.value=p.value.slice(h,S).map((R,D)=>({data:R,index:D+h}))}}function A(h){let S=0,R=_.value.length-1,D=-1;for(;S<=R;){const B=Math.floor((S+R)/2);_.value[B].sum>=h?(D=B,R=B-1):S=B+1}return Math.max(0,D)}function P(){let h=0,S=0,R=L();for(let D=R;D<_.value.length&&(h++,S+=_.value[D].height,!(S>=a.height.value));D++);return h}function F(h){if(typeof l=="number")return h*l;let S=_.value[h];return S?S.sum-S.height:0}function k(h){return _.value[h]||{sum:0,height:0}}function L(){let h=s.value.start;return h>=r&&(h+=r),h}function z(h){if(i.value){const S=k(h);i.value.scrollTop=S.sum-S.height,$()}}const q=e.computed(()=>({style:{width:"100%",height:`${y.value}px`,pointerEvents:u.value?void 0:"none"}})),V=e.computed(()=>({style:{transform:`translate3d(0, ${w.value}px, 0)`,"will-change":"transform"}})),K={overflowY:"auto"};return{list:b,visiableList:O,getItemHeightData:k,getoffsetTopIndex:A,totalHeight:y,clientHeight:a.height,scrollTo:z,scrollTop:d,isScrollEnd:u,containerProps:{ref:i,onScroll:()=>{j()},style:K},wrapperProps:q,innerProps:V}}const Z=Symbol(),ee=Symbol(),te=Symbol(),ne=Symbol(),oe=Symbol(),le=Symbol(),re=Symbol(),ae=Symbol(),ie=Symbol();function ze(){const{voidFn:n,boolFn:t,boolRef:o,arrayRef:l}={voidFn:c=>{},boolFn:c=>!1,boolRef:e.computed(()=>!1),arrayRef:e.computed(()=>[])},r=e.inject(ne,l),i=e.inject(te,t),a=e.inject(ae,o),u=e.inject(ee,n),v=e.inject(Z,n),g=e.inject(oe,n),p=e.inject(le,n),d=e.inject(re,n),s=e.inject(ie,n);return{selected:r,isSelected:i,isAllSelected:a,toggle:u,toggleAll:v,select:g,selectAll:p,unselect:d,unselectAll:s}}function Ke(n,t){const o=e.ref({}),l=e.computed(()=>n.value.filter(s=>o.value[s[t]])),r=e.computed(()=>l.value.length!=0&&Object.keys(o.value).length==n.value.length);function i(){n.value.forEach(s=>{o.value[s[t]]=!0})}function a(){o.value={}}function u(s){s.forEach(c=>{o.value[c[t]]||(o.value[c[t]]=!0)})}function v(s){s.forEach(c=>{o.value[c[t]]&&delete o.value[c[t]]})}function g(s){return!!o.value[s[t]]}function p(s){s.forEach(c=>{g(c)?delete o.value[c[t]]:o.value[c[t]]=!0})}function d(){r.value?a():i()}return e.provide(Z,d),e.provide(ee,p),e.provide(te,g),e.provide(ne,l),e.provide(oe,u),e.provide(le,i),e.provide(re,v),e.provide(ae,r),e.provide(ie,a),{selected:l,select:u,selectAll:i,unselect:v,unselectAll:a,toggle:p,toggleAll:d,isSelected:g,isAllSelected:r}}function se(n){return()=>{console.debug(`\u9ED8\u8BA4${n}\u65B9\u6CD5,\u9700\u8981\u81EA\u5B9A\u4E49\u751F\u6548`)}}function ce({attribute:n,selectWay:t="colum",scrollOptions:o={},getSelectMap:l=()=>({})}){const{select:r=se("\u9009\u62E9"),unselect:i=se("\u53D6\u6D88\u9009\u62E9"),unselectAll:a=se("\u53D6\u6D88\u5168\u9009")}=l();let u={};const v=e.computed(()=>me(t==="colum"?M:Y,50)),g=new Set,p=e.ref(!0),d=e.ref(),s=e.ref(!1),c=e.ref({x:0,y:0}),b=e.ref({x:0,y:0,scrollTop:0}),_=new ResizeObserver(f=>w.value=f[0].target.getBoundingClientRect()),w=e.ref({}),y=e.ref({top:0,height:0,sync(f=!1){y.value.top=d.value?.scrollTop||0,f&&(y.value.height=d.value?.scrollHeight||0)}}),O=e.computed(()=>s.value?{left:Math.min(c.value.x,b.value.x)-w.value.left,top:Math.min(c.value.y,b.value.y)-w.value.top,width:Math.abs(c.value.x-b.value.x),height:Math.abs(c.value.y-b.value.y)}:{left:0,top:0,width:0,height:0}),{margin:I=50,startSpeed:U=30,maxSpeed:j=30}=o;let $;const A=I,P=U,F=j,k=f=>f**1;let L=0;function z(f){if(cancelAnimationFrame($),L=q(f),L=Math.max(Math.min(L,F),-F),L!==0){const m=d.value;if(!m||!s.value)return;const C=y.value.height-w.value.height;let T=y.value.top+Number(L);T=Math.min(Math.max(0,T),C),m.scrollTop=T,K(),$=requestAnimationFrame(()=>z(f))}}function q(f){if(d.value){const C=w.value,T=C.bottom-f;if(T<A)return P*k(1-T/A);const H=f-C.top;if(H<A)return-P*k(1-H/A)}return 0}function V(f){const m={...O.value,right:0,bottom:0};return m.left+=w.value.left,m.top+=w.value.top-y.value.top,m.right=m.width+m.left,m.bottom=m.height+m.top,m.left<f.right&&m.right>f.left&&m.top<f.bottom&&m.bottom>f.top}function K(){y.value.sync();const{top:f,height:m}=y.value;b.value.y=Math.min(m+w.value.top,b.value.y+f-b.value.scrollTop),b.value.scrollTop=f}function h(f,m,C="dynamic-styles"){let T=document.getElementById(C);T||(T=document.createElement("style"),T.id=C,document.head.appendChild(T));const H=T.sheet.cssRules,W=H.length,at=`${f} { ${m} }`;for(let ue=0;ue<W;ue++){const xe=H[ue];if(xe.selectorText===f&&xe.style.cssText===m)return}T.sheet.insertRule(at,W)}function S(f,m){p.value=!0,s.value=!0,y.value.height?y.value.sync():y.value.sync(!0),c.value.x=f,c.value.y=m+y.value.top,b.value.x=c.value.x,b.value.y=c.value.y,d.value?.classList.add("disable-scroll-behavior"),g.clear()}function R(f,m,C){!s.value||(p.value&&t==="colum"&&!x()&&(a(),p.value=!1),C?.(),z(m),b.value.x=Math.max(f,w.value.left),b.value.y=Math.min(m+y.value.top,y.value.height+w.value.top),b.value.scrollTop=y.value.top,v.value())}function D(){s.value=!1,d.value?.classList.remove("disable-scroll-behavior")}function B(){!s.value||(L||K(),v.value())}function x(){if(!s.value)return!1;const{width:f,height:m}=O.value;return!(Math.max(f,m)>5)}function N(){x()&&a()}function M(){x()||d.value?.querySelectorAll(`[${n}]`).forEach(f=>{u[`${n}`]=f.getAttribute(`${n}`),V(f.getBoundingClientRect())?r([u]):i([u])})}function Y(){const f=[];let m=null,C=0;d.value?.querySelectorAll(`[${n}]`).forEach((T,H)=>{const W=T.getAttribute(`${n}`);f.push(W),V(T.getBoundingClientRect())?(m===null&&(m=H),m=Math.min(m,H),C=Math.max(C,H)):(u[`${n}`]=W,g.has(W)&&i([u]))});for(let T=m;T<C+1;T++)u[`${n}`]=f[T],r([u]),g.add(f[T])}function G(f){return!f?.value||(d.value=f.value,!d?.value)?!1:(_.observe(d.value),h(".disable-scroll-behavior","scroll-behavior: unset !important;"),!0)}return{init:G,dragStart:S,dragMove:R,dragEnd:D,onScroll:B,isSingleClick:x,cancelSelectAllBySingleClick:N,selectFn:v,selectRange:O,isPressing:s,containerEl:d,observer:_}}function Ne(n){const t=ce(n),{observer:o,selectRange:l}=t,{onScroll:r,dragStart:i,dragMove:a,dragEnd:u,cancelSelectAllBySingleClick:v}=t,g=e.computed(()=>({left:`${l.value.left}px`,top:`${l.value.top}px`,width:`${l.value.width}px`,height:`${l.value.height}px`})),p=e.defineComponent({render(){return e.h("div",{id:"selectBoxEl",class:"absolute z-50 bg-blue-200 opacity-50",style:g.value})}});function d(w){w.button===0&&i(w.x,w.y)}function s(w){a(w.x,w.y)}function c(w){w.composedPath().some(O=>O?.getAttribute?.(n.attribute))||v(),u()}function b(w){try{if(!t.init(w))throw"\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";if(!t.containerEl?.value)return!1;e.render(e.h(p),t.containerEl.value),t.containerEl.value?.addEventListener("scroll",r),t.containerEl.value?.addEventListener("mousedown",d),window.addEventListener("mousemove",s),window.addEventListener("mouseup",c)}catch(y){console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25",y)}}function _(){o.disconnect(),t.containerEl.value?.removeEventListener("scroll",r),t.containerEl.value?.removeEventListener("mousedown",d),window.removeEventListener("mousemove",s),window.removeEventListener("mouseup",c)}return{init:b,unMount:_}}function We(n,t,o=600){const l=ce({...n,selectWay:"row",scrollOptions:{startSpeed:5,maxSpeed:5}}),{observer:r}=l,{onScroll:i,dragStart:a,dragMove:u,dragEnd:v,selectFn:g}=l;let p;function d(){clearTimeout(p)}function s(y){d(),p=setTimeout(()=>{const{clientX:O,clientY:I}=y.targetTouches[0];a(O,I),t?.(),g.value(),y.preventDefault()},o)}function c(y){d();const{clientX:O,clientY:I}=y.targetTouches[0];u(O,I,()=>y.preventDefault())}function b(){d(),v()}function _(y){try{if(!l.init(y))throw"\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";if(!l.containerEl?.value)return!1;l.containerEl.value?.addEventListener("scroll",i),l.containerEl.value?.addEventListener("touchstart",s),l.containerEl.value?.addEventListener("touchmove",c),window.addEventListener("touchcancel",b),window.addEventListener("touchend",b)}catch(O){console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25",O)}}function w(){r.disconnect(),l.containerEl.value?.removeEventListener("scroll",i),l.containerEl.value?.removeEventListener("touchstart",s),l.containerEl.value?.removeEventListener("touchmove",c),window.removeEventListener("touchcancel",b),window.removeEventListener("touchEnd",b)}return{init:_,unMount:w}}const we=Symbol(),Ue=e.defineComponent({__name:"Dialog",props:{visiable:{type:Boolean,default:!1},closeOnClickOverlay:{type:Boolean,default:!0},dialogClass:{default:""}},emits:["update:visiable"],setup(n,{emit:t}){const o=n,l=()=>{o.closeOnClickOverlay&&t("update:visiable",!1)};return e.provide(we,()=>t("update:visiable",!1)),(r,i)=>(e.openBlock(),e.createBlock(e.Transition,{name:"modal"},{default:e.withCtx(()=>[n.visiable?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:l,class:"modal absolute left-0 right-0 top-0 bottom-0 flex bg-stone-900 bg-opacity-50 z-[999]"},[e.createElementVNode("div",{onClick:i[0]||(i[0]=e.withModifiers(()=>{},["stop"])),class:e.normalizeClass(["dialog m-auto flex flex-col",n.dialogClass])},[e.renderSlot(r.$slots,"default")],2)])):e.createCommentVNode("",!0)]),_:3}))}});function qe(n){function t(o,l){const r=document.createElement("div"),i={setup(){return()=>e.h(Ue,{visiable:!0,"onUpdate:visiable":()=>{r?.remove()},...n},{default:()=>e.h(o,l)})}};return document.body.appendChild(r),e.render(e.h(i),r),{close:()=>r?.remove()}}return{create:t}}const Qe=e.defineComponent({__name:"Toast",props:{message:null,position:null},setup(n){const t=n,o=e.ref(),l=e.ref(),r=e.ref(),i=e.computed(()=>{switch(t.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(${i.value}% - ${r.value}px)`,left:`calc(50% - ${l.value}px)`})),u=e.computed(()=>({width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",color:"white",fontSize:"14px"}));return e.nextTick(()=>{l.value=o.value.offsetWidth/2,r.value=o.value.offsetHeight/2}),(v,g)=>(e.openBlock(),e.createElementBlock("div",{id:"toastWrapper",ref_key:"toastWrapper",ref:o,class:"toastWrapper",style:e.normalizeStyle([e.unref(a),{zIndex:9999}])},[e.createElementVNode("div",{style:e.normalizeStyle(e.unref(u))},[e.createElementVNode("span",null,e.toDisplayString(n.message),1)],4)],4))}}),_e={message:"\u61D2\u732B\u4E91 Yes!!!",position:"middle",duration:1500};class Ye{options;container;constructor(t){this.options=t,this.container=document.createElement("div")}present(){const t=e.h(e.h(Qe),{..._e,...this.options});e.render(t,this.container),document.body.insertBefore(this.container,document.body.firstChild);const o=this.options.duration||_e.duration;setTimeout(()=>{this.dismiss()},o)}dismiss(){this.container&&(this.container.querySelector("#toastWrapper")?.classList.add("animate-toastAnimation"),setTimeout(()=>{this.container&&(e.render(null,this.container),document.body.removeChild(this.container))},500))}}const Ge=["xlink:href","fill","color"],Xe=e.defineComponent({__name:"SvgIcon",props:{name:null,prefix:{default:"icon"},color:{default:"#FFF"},width:null,height:null},setup(n){const t=n,o=e.computed(()=>`#${t.prefix}-${t.name}`),l=e.computed(()=>({width:`${t.width??t.height}px`,height:`${t.height??t.width}px`,aspectRatio:t.width&&t.height?void 0:"1/1"}));return(r,i)=>(e.openBlock(),e.createElementBlock("svg",{"aria-hidden":"",style:e.normalizeStyle(e.unref(l))},[e.createElementVNode("use",{"xlink:href":e.unref(o),fill:n.color,color:n.color},null,8,Ge)],4))}});function Je(n){const{containerEl:t,sliderEl:o,autoHeight:l,performance:r={},maxHeightRatio:i=.9}=n,a=e.ref(!0),u=he(F,100);let v,g="";const p=e.ref(0),d=e.ref(0),s=e.ref(0),c=e.ref({top:0,scrollTop:0,scrollHeight:0,clientHeight:0}),b=e.ref({clientHeight:0}),_=e.computed(()=>!!d.value),w=e.computed(()=>c.value.scrollHeight>c.value.clientHeight),y=e.computed(()=>c.value.clientHeight-b.value.clientHeight),O=e.computed(()=>c.value.scrollHeight-c.value.clientHeight),I=e.computed(()=>Math.max(c.value.clientHeight/c.value.scrollHeight,.05)),U=e.computed(()=>I.value>i?0:I.value*c.value.clientHeight),j=e.computed(()=>({willChange:"transform",transform:`translate3d(0,${s.value}px,0)`,height:l?`${U.value}px`:void 0}));function $(B){P(),d.value=B.clientY-o.value.getBoundingClientRect().top||1,g=getComputedStyle(t.value).scrollBehavior,g==="smooth"&&(t.value.style.scrollBehavior="unset")}function A(){t.value.style.scrollBehavior=g,d.value=0,u()}function P(){a.value=!1}function F(){_.value||(a.value=!0)}function k(B){if(!_.value)return;let x=B.clientY-c.value.top-d.value;x<0?s.value=0:x>=y.value?s.value=y.value:s.value=x,t.value.scrollTo({top:s.value/y.value*O.value})}function L(){_.value||z()}function z(){cancelAnimationFrame(v),v=requestAnimationFrame(q)}function q(){t.value&&(p.value=r.scrollTop?.value??t.value.scrollTop,s.value=p.value/O.value*y.value)}function V(B){let x="addEventListener";B==="add"?x="addEventListener":x="removeEventListener",o.value?.[x]("pointerdown",$,{passive:!0}),window[x]("pointermove",k,{passive:!0}),window[x]("pointerup",A,{passive:!0})}const K=new MutationObserver(B=>{B.map(N=>N.oldValue).join().includes("height")&&h()});function h(){c.value.top=t.value?.getBoundingClientRect().top??0,c.value.scrollHeight=t.value?.scrollHeight??0,c.value.clientHeight=t.value?.clientHeight??0}function S(){P(),setTimeout(()=>{b.value.clientHeight=o.value?.clientHeight??0,F()},150)}function R(B,x,N="dynamic-styles"){let M=document.getElementById(N);M||(M=document.createElement("style"),M.id=N,document.head.appendChild(M));const Y=M.sheet.cssRules,G=Y.length,f=`${B} { ${x} }`;for(let m=0;m<G;m++){const C=Y[m];if(C.selectorText===B&&C.style.cssText===x)return}M.sheet.insertRule(f,G)}function D(){t.value&&o.value?(R(".hide-scrollbar","scrollbar-width: none; -ms-overflow-style: none;"),R(".hide-scrollbar::-webkit-scrollbar","display: none"),t.value.addEventListener("scroll",L,{passive:!0}),V("add"),K.observe(t.value,{subtree:!0,attributeOldValue:!0,attributeFilter:["style"]}),setTimeout(()=>{h()},100),S()):console.error("useScrollBar:","\u521D\u59CB\u5316\u5931\u8D25!",{containerEl:t,sliderEl:o})}return e.watch(p,()=>{P(),u()}),{isScrollEnd:a,isDragSlider:_,offsetTop:s,scrollTop:p,scrollable:w,sliderPos:j,init:D,modifySliderEventListener:V}}const Ze=(n=>(e.pushScopeId("data-v-edec7292"),n=n(),e.popScopeId(),n))(()=>e.createElementVNode("div",{class:"default-slider"},null,-1)),et=e.defineComponent({__name:"ScrollBar",props:{containerEl:null,autoHide:{type:Boolean},autoHeight:{type:Boolean},performance:null},setup(n,{expose:t}){const o=n,l=!!e.useSlots().default,r=e.ref(null),i=e.computed(()=>o.containerEl),a=Je({containerEl:i,sliderEl:r,autoHeight:l?o.autoHeight:!0,performance:o.performance}),{scrollable:u,isScrollEnd:v,sliderPos:g}=a,p=e.ref(!1),d=o.autoHide?e.computed(()=>p.value||!v.value):e.computed(()=>u.value);e.onMounted(()=>{e.nextTick(()=>{a.init()})}),e.onUnmounted(()=>{a.modifySliderEventListener("remove")});function s(){p.value=!0}function c(){p.value=!1}return t({uScrollBarReturn:a}),(b,_)=>(e.openBlock(),e.createBlock(e.Transition,null,{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"sliderRef",ref:r,class:"slider-wrapper",onMouseenter:s,onMouseleave:c,style:e.normalizeStyle(e.unref(g))},[e.renderSlot(b.$slots,"default",{},()=>[Ze],!0)],36),[[e.vShow,e.unref(d)]])]),_:3}))}}),ct="",Te=(n,t)=>{const o=n.__vccOpts||n;for(const[l,r]of t)o[l]=r;return o},tt=Te(et,[["__scopeId","data-v-edec7292"]]),nt={class:"virtualListWrapper"},ot={inheritAttrs:!1},lt=e.defineComponent({...ot,__name:"VirtualList",props:{data:null,itemHeight:null,overscan:{default:10}},emits:["scrollEnd"],setup(n,{expose:t,emit:o}){const l=n,r=Ee(e.toRef(l,"data"),{itemHeight:p=>l.itemHeight(l.data[p]),overscan:l.overscan,scrollEndHook:()=>{o("scrollEnd")}}),{list:i,containerProps:a,wrapperProps:u,innerProps:v,getItemHeightData:g}=r;return t({vListReturn:r}),(p,d)=>(e.openBlock(),e.createElementBlock("div",nt,[e.createElementVNode("div",e.mergeProps({onScrollPassive:d[0]||(d[0]=(...s)=>e.unref(a).onScroll&&e.unref(a).onScroll(...s)),ref:e.unref(a).ref,class:"virtualList"},p.$attrs),[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(u))),[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(v))),[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),({index:s,data:c})=>(e.openBlock(),e.createElementBlock("div",{key:s,style:e.normalizeStyle({height:`${e.unref(g)(s).height}px`,display:"flex"})},[e.renderSlot(p.$slots,"default",{data:c,index:s},void 0,!0)],4))),128))],16)],16)],16)]))}}),ut="",rt=Te(lt,[["__scopeId","data-v-4ba97cce"]]);E.ScrollBar=tt,E.SvgIcon=Xe,E.ToastCreator=Ye,E.VirtualList=rt,E.allSelectedKey=ne,E.closeDialogKey=we,E.dialogController=qe,E.isAllSelectedKey=ae,E.isSelectedKey=te,E.selectAllKey=le,E.selectKey=oe,E.toggleAllKey=Z,E.toggleKey=ee,E.unselectAllKey=ie,E.unselectKey=re,E.useDragSelect=ce,E.useDragSelectByMobile=We,E.useDragSelectByPc=Ne,E.useSelectable=Ke,E.useSelectableInjectors=ze,E.useVirtualList=Ee,Object.defineProperties(E,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
1
|
+
(function(b,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(b=typeof globalThis<"u"?globalThis:b||self,e(b.ui={},b.Vue))})(this,function(b,e){"use strict";var fe;const pe=typeof window<"u";pe&&((fe=window?.navigator)==null?void 0:fe.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Q(n){return typeof n=="function"?n():e.unref(n)}function he(n,t){function o(...l){n(()=>t.apply(this,l),{fn:t,thisArg:this,args:l})}return o}function Be(n,t={}){let o,l;return i=>{const a=Q(n),u=Q(t.maxWait);if(o&&clearTimeout(o),a<=0||u!==void 0&&u<=0)return l&&(clearTimeout(l),l=null),i();u&&!l&&(l=setTimeout(()=>{o&&clearTimeout(o),l=null,i()},u)),o=setTimeout(()=>{l&&clearTimeout(l),l=null,i()},a)}}function Oe(n,t=!0,o=!0){let l=0,r,i=!0;const a=()=>{r&&(clearTimeout(r),r=void 0)};return g=>{const v=Q(n),p=Date.now()-l;if(a(),v<=0)return l=Date.now(),g();p>v&&(o||!i)?(l=Date.now(),g()):t&&(r=setTimeout(()=>{l=Date.now(),i=!0,a(),g()},v-p)),!o&&!r&&(r=setTimeout(()=>i=!0,v)),i=!1}}function Ce(n){return n}function De(n){return e.getCurrentScope()?(e.onScopeDispose(n),!0):!1}function me(n,t=200,o={}){return he(Be(t,o),n)}function ve(n,t=200,o=!1,l=!0){return he(Oe(t,o,l),n)}function Re(n,t=!0){e.getCurrentInstance()?e.onMounted(n):t?n():e.nextTick(n)}function ge(n){var t;const o=Q(n);return(t=o?.$el)!=null?t:o}const Ie=pe?window:void 0;function Le(n,t=!1){const o=e.ref(),l=()=>o.value=Boolean(n());return l(),Re(l,t),o}const X=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},J="__vueuse_ssr_handlers__";X[J]=X[J]||{},X[J];var ye=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable,Pe=(n,t)=>{var o={};for(var l in n)Ae.call(n,l)&&t.indexOf(l)<0&&(o[l]=n[l]);if(n!=null&&ye)for(var l of ye(n))t.indexOf(l)<0&&He.call(n,l)&&(o[l]=n[l]);return o};function Me(n,t,o={}){const l=o,{window:r=Ie}=l,i=Pe(l,["window"]);let a;const u=Le(()=>r&&"ResizeObserver"in r),g=()=>{a&&(a.disconnect(),a=void 0)},v=e.watch(()=>ge(n),d=>{g(),u.value&&r&&d&&(a=new ResizeObserver(t),a.observe(d,i))},{immediate:!0,flush:"post"}),p=()=>{g(),v()};return De(p),{isSupported:u,stop:p}}function $e(n,t={width:0,height:0},o={}){const{box:l="content-box"}=o,r=e.ref(t.width),i=e.ref(t.height);return Me(n,([a])=>{const u=l==="border-box"?a.borderBoxSize:l==="content-box"?a.contentBoxSize:a.devicePixelContentBoxSize;u?(r.value=u.reduce((g,{inlineSize:v})=>g+v,0),i.value=u.reduce((g,{blockSize:v})=>g+v,0)):(r.value=a.contentRect.width,i.value=a.contentRect.height)},o),e.watch(()=>ge(n),a=>{r.value=a?t.width:0,i.value=a?t.height:0}),{width:r,height:i}}var Se;(function(n){n.UP="UP",n.RIGHT="RIGHT",n.DOWN="DOWN",n.LEFT="LEFT",n.NONE="NONE"})(Se||(Se={}));var Fe=Object.defineProperty,Ee=Object.getOwnPropertySymbols,ke=Object.prototype.hasOwnProperty,Ve=Object.prototype.propertyIsEnumerable,be=(n,t,o)=>t in n?Fe(n,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[t]=o,je=(n,t)=>{for(var o in t||(t={}))ke.call(t,o)&&be(n,o,t[o]);if(Ee)for(var o of Ee(t))Ve.call(t,o)&&be(n,o,t[o]);return n};je({linear:Ce},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});function we(n,t){const{scrollEndHook:o,itemHeight:l,overscan:r=5}=t,i=e.ref(null),a=$e(i),u=e.ref(!0),g=me(U,100);let v;const p=e.shallowRef(n),d=e.ref(0),s=e.ref({start:0,end:10});let c=0;const E=e.ref([]),_=e.computed(()=>{let{sum:h,height:S}={sum:0,height:0};return p.value.map((R,D)=>(typeof l=="number"?S=l:S=l(D),h+=S,{height:S,sum:h}))}),w=e.computed(()=>F(s.value.start)),y=e.computed(()=>typeof l=="number"?_.value.length*l:_.value[_.value.length-1]?.sum||0),O=e.computed(()=>{let h=E.value.length-r,S=Math.max(h-c,0);return E.value.slice(S,h)});e.onMounted(()=>{}),e.onUnmounted(()=>cancelAnimationFrame(v)),e.watch([a.width,a.height,p],([h,S])=>{(h||S)&&j()},{deep:!0}),e.watch(d,()=>{I(),g()});function I(){u.value=!1}function U(){u.value=!0,o?.()}function j(){cancelAnimationFrame(v),v=requestAnimationFrame($)}function $(){if(i.value){d.value=i.value.scrollTop,c=P();let h=A(d.value),S=h+c+r;h=h-r,h=h<0?0:h,S=S>p.value.length?p.value.length:S,s.value={start:h,end:S},E.value=p.value.slice(h,S).map((R,D)=>({data:R,index:D+h}))}}function A(h){let S=0,R=_.value.length-1,D=-1;for(;S<=R;){const B=Math.floor((S+R)/2);_.value[B].sum>=h?(D=B,R=B-1):S=B+1}return Math.max(0,D)}function P(){let h=0,S=0,R=L();for(let D=R;D<_.value.length&&(h++,S+=_.value[D].height,!(S>=a.height.value));D++);return h}function F(h){if(typeof l=="number")return h*l;let S=_.value[h];return S?S.sum-S.height:0}function k(h){return _.value[h]||{sum:0,height:0}}function L(){let h=s.value.start;return h>=r&&(h+=r),h}function K(h){if(i.value){const S=k(h);i.value.scrollTop=S.sum-S.height,$()}}const q=e.computed(()=>({style:{width:"100%",height:`${y.value}px`,pointerEvents:u.value?void 0:"none"}})),V=e.computed(()=>({style:{transform:`translate3d(0, ${w.value}px, 0)`,"will-change":"transform"}})),N={overflowY:"auto"};return{list:E,visiableList:O,getItemHeightData:k,getoffsetTopIndex:A,totalHeight:y,clientHeight:a.height,scrollTo:K,scrollTop:d,isScrollEnd:u,containerProps:{ref:i,onScroll:()=>{j()},style:N},wrapperProps:q,innerProps:V}}const Z=Symbol(),ee=Symbol(),te=Symbol(),ne=Symbol(),oe=Symbol(),le=Symbol(),re=Symbol(),ae=Symbol(),ie=Symbol();function Ke(){const{voidFn:n,boolFn:t,boolRef:o,arrayRef:l}={voidFn:c=>{},boolFn:c=>!1,boolRef:e.computed(()=>!1),arrayRef:e.computed(()=>[])},r=e.inject(ne,l),i=e.inject(te,t),a=e.inject(ae,o),u=e.inject(ee,n),g=e.inject(Z,n),v=e.inject(oe,n),p=e.inject(le,n),d=e.inject(re,n),s=e.inject(ie,n);return{selected:r,isSelected:i,isAllSelected:a,toggle:u,toggleAll:g,select:v,selectAll:p,unselect:d,unselectAll:s}}function Ne(n,t){const o=e.ref({}),l=e.computed(()=>n.value.filter(s=>o.value[s[t]])),r=e.computed(()=>l.value.length!=0&&Object.keys(o.value).length==n.value.length);function i(){n.value.forEach(s=>{o.value[s[t]]=!0})}function a(){o.value={}}function u(s){s.forEach(c=>{o.value[c[t]]||(o.value[c[t]]=!0)})}function g(s){s.forEach(c=>{o.value[c[t]]&&delete o.value[c[t]]})}function v(s){return!!o.value[s[t]]}function p(s){s.forEach(c=>{v(c)?delete o.value[c[t]]:o.value[c[t]]=!0})}function d(){r.value?a():i()}return e.provide(Z,d),e.provide(ee,p),e.provide(te,v),e.provide(ne,l),e.provide(oe,u),e.provide(le,i),e.provide(re,g),e.provide(ae,r),e.provide(ie,a),{selected:l,select:u,selectAll:i,unselect:g,unselectAll:a,toggle:p,toggleAll:d,isSelected:v,isAllSelected:r}}function se(n){return()=>{console.debug(`\u9ED8\u8BA4${n}\u65B9\u6CD5,\u9700\u8981\u81EA\u5B9A\u4E49\u751F\u6548`)}}function ce({attribute:n,selectWay:t="colum",scrollOptions:o={},getSelectMap:l=()=>({})}){const{select:r=se("\u9009\u62E9"),unselect:i=se("\u53D6\u6D88\u9009\u62E9"),unselectAll:a=se("\u53D6\u6D88\u5168\u9009")}=l();let u={};const g=e.computed(()=>ve(t==="colum"?M:Y,50)),v=new Set,p=e.ref(!0),d=e.ref(),s=e.ref(!1),c=e.ref({x:0,y:0}),E=e.ref({x:0,y:0,scrollTop:0}),_=new ResizeObserver(f=>w.value=f[0].target.getBoundingClientRect()),w=e.ref({}),y=e.ref({top:0,height:0,sync(f=!1){y.value.top=d.value?.scrollTop||0,f&&(y.value.height=d.value?.scrollHeight||0)}}),O=e.computed(()=>s.value?{left:Math.min(c.value.x,E.value.x)-w.value.left,top:Math.min(c.value.y,E.value.y)-w.value.top,width:Math.abs(c.value.x-E.value.x),height:Math.abs(c.value.y-E.value.y)}:{left:0,top:0,width:0,height:0}),{margin:I=50,startSpeed:U=30,maxSpeed:j=30}=o;let $;const A=I,P=U,F=j,k=f=>f**1;let L=0;function K(f){if(cancelAnimationFrame($),L=q(f),L=Math.max(Math.min(L,F),-F),L!==0){const m=d.value;if(!m||!s.value)return;const C=y.value.height-w.value.height;let T=y.value.top+Number(L);T=Math.min(Math.max(0,T),C),m.scrollTop=T,N(),$=requestAnimationFrame(()=>K(f))}}function q(f){if(d.value){const C=w.value,T=C.bottom-f;if(T<A)return P*k(1-T/A);const H=f-C.top;if(H<A)return-P*k(1-H/A)}return 0}function V(f){const m={...O.value,right:0,bottom:0};return m.left+=w.value.left,m.top+=w.value.top-y.value.top,m.right=m.width+m.left,m.bottom=m.height+m.top,m.left<f.right&&m.right>f.left&&m.top<f.bottom&&m.bottom>f.top}function N(){y.value.sync();const{top:f,height:m}=y.value;E.value.y=Math.min(m+w.value.top,E.value.y+f-E.value.scrollTop),E.value.scrollTop=f}function h(f,m,C="dynamic-styles"){let T=document.getElementById(C);T||(T=document.createElement("style"),T.id=C,document.head.appendChild(T));const H=T.sheet.cssRules,W=H.length,it=`${f} { ${m} }`;for(let de=0;de<W;de++){const xe=H[de];if(xe.selectorText===f&&xe.style.cssText===m)return}T.sheet.insertRule(it,W)}function S(f,m){p.value=!0,s.value=!0,y.value.height?y.value.sync():y.value.sync(!0),c.value.x=f,c.value.y=m+y.value.top,E.value.x=c.value.x,E.value.y=c.value.y,d.value?.classList.add("disable-scroll-behavior"),v.clear()}function R(f,m,C){!s.value||(p.value&&t==="colum"&&!x()&&(a(),p.value=!1),C?.(),K(m),E.value.x=Math.max(f,w.value.left),E.value.y=Math.min(m+y.value.top,y.value.height+w.value.top),E.value.scrollTop=y.value.top,g.value())}function D(){s.value=!1,d.value?.classList.remove("disable-scroll-behavior")}function B(){!s.value||(L||N(),g.value())}function x(){if(!s.value)return!1;const{width:f,height:m}=O.value;return!(Math.max(f,m)>5)}function z(){x()&&a()}function M(){x()||d.value?.querySelectorAll(`[${n}]`).forEach(f=>{u[`${n}`]=f.getAttribute(`${n}`),V(f.getBoundingClientRect())?r([u]):i([u])})}function Y(){const f=[];let m=null,C=0;d.value?.querySelectorAll(`[${n}]`).forEach((T,H)=>{const W=T.getAttribute(`${n}`);f.push(W),V(T.getBoundingClientRect())?(m===null&&(m=H),m=Math.min(m,H),C=Math.max(C,H)):(u[`${n}`]=W,v.has(W)&&i([u]))});for(let T=m;T<C+1;T++)u[`${n}`]=f[T],r([u]),v.add(f[T])}function G(f){return!f?.value||(d.value=f.value,!d?.value)?!1:(_.observe(d.value),h(".disable-scroll-behavior","scroll-behavior: unset !important;"),!0)}return{init:G,dragStart:S,dragMove:R,dragEnd:D,onScroll:B,isSingleClick:x,cancelSelectAllBySingleClick:z,selectFn:g,selectRange:O,isPressing:s,containerEl:d,observer:_}}function ze(n){const t=ce(n),{observer:o,selectRange:l}=t,{onScroll:r,dragStart:i,dragMove:a,dragEnd:u,cancelSelectAllBySingleClick:g}=t,v=e.computed(()=>({left:`${l.value.left}px`,top:`${l.value.top}px`,width:`${l.value.width}px`,height:`${l.value.height}px`})),p=e.defineComponent({render(){return e.h("div",{id:"selectBoxEl",class:"absolute z-50 bg-blue-200 opacity-50",style:v.value})}});function d(w){w.button===0&&i(w.x,w.y)}function s(w){a(w.x,w.y)}function c(w){w.composedPath().some(O=>O?.getAttribute?.(n.attribute))||g(),u()}function E(w){try{if(!t.init(w))throw"\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";if(!t.containerEl?.value)return!1;e.render(e.h(p),t.containerEl.value),t.containerEl.value?.addEventListener("scroll",r),t.containerEl.value?.addEventListener("mousedown",d),window.addEventListener("mousemove",s),window.addEventListener("mouseup",c)}catch(y){console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25",y)}}function _(){o.disconnect(),t.containerEl.value?.removeEventListener("scroll",r),t.containerEl.value?.removeEventListener("mousedown",d),window.removeEventListener("mousemove",s),window.removeEventListener("mouseup",c)}return{init:E,unMount:_}}function We(n,t,o=600){const l=ce({...n,selectWay:"row",scrollOptions:{startSpeed:5,maxSpeed:5}}),{observer:r}=l,{onScroll:i,dragStart:a,dragMove:u,dragEnd:g,selectFn:v}=l;let p;function d(){clearTimeout(p)}function s(y){d(),p=setTimeout(()=>{const{clientX:O,clientY:I}=y.targetTouches[0];a(O,I),t?.(),v.value(),y.preventDefault()},o)}function c(y){d();const{clientX:O,clientY:I}=y.targetTouches[0];u(O,I,()=>y.preventDefault())}function E(){d(),g()}function _(y){try{if(!l.init(y))throw"\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";if(!l.containerEl?.value)return!1;l.containerEl.value?.addEventListener("scroll",i),l.containerEl.value?.addEventListener("touchstart",s),l.containerEl.value?.addEventListener("touchmove",c),window.addEventListener("touchcancel",E),window.addEventListener("touchend",E)}catch(O){console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25",O)}}function w(){r.disconnect(),l.containerEl.value?.removeEventListener("scroll",i),l.containerEl.value?.removeEventListener("touchstart",s),l.containerEl.value?.removeEventListener("touchmove",c),window.removeEventListener("touchcancel",E),window.removeEventListener("touchEnd",E)}return{init:_,unMount:w}}const _e=Symbol(),Ue=e.defineComponent({__name:"Dialog",props:{visiable:{type:Boolean,default:!1},closeOnClickOverlay:{type:Boolean,default:!0},dialogClass:{default:""}},emits:["update:visiable"],setup(n,{emit:t}){const o=n,l=()=>{o.closeOnClickOverlay&&t("update:visiable",!1)};return e.provide(_e,()=>t("update:visiable",!1)),(r,i)=>(e.openBlock(),e.createBlock(e.Transition,{name:"modal"},{default:e.withCtx(()=>[n.visiable?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:l,class:"modal"},[e.createElementVNode("div",{onClick:i[0]||(i[0]=e.withModifiers(()=>{},["stop"])),class:e.normalizeClass(["dialog",n.dialogClass])},[e.renderSlot(r.$slots,"default",{},void 0,!0)],2)])):e.createCommentVNode("",!0)]),_:3}))}}),ct="",ue=(n,t)=>{const o=n.__vccOpts||n;for(const[l,r]of t)o[l]=r;return o},qe=ue(Ue,[["__scopeId","data-v-415900d3"]]);function Qe(n){function t(o,l){const r=document.createElement("div"),i={setup(){return()=>e.h(qe,{visiable:!0,"onUpdate:visiable":()=>{r?.remove()},...n},{default:()=>e.h(o,l)})}};return document.body.appendChild(r),e.render(e.h(i),r),{close:()=>r?.remove()}}return{create:t}}const Ye=e.defineComponent({__name:"Toast",props:{message:null,position:null},setup(n){const t=n,o=e.ref(),l=e.ref(),r=e.ref(),i=e.computed(()=>{switch(t.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(${i.value}% - ${r.value}px)`,left:`calc(50% - ${l.value}px)`})),u=e.computed(()=>({width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",color:"white",fontSize:"14px"}));return e.nextTick(()=>{l.value=o.value.offsetWidth/2,r.value=o.value.offsetHeight/2}),(g,v)=>(e.openBlock(),e.createElementBlock("div",{id:"toastWrapper",ref_key:"toastWrapper",ref:o,class:"toastWrapper",style:e.normalizeStyle([e.unref(a),{zIndex:9999}])},[e.createElementVNode("div",{style:e.normalizeStyle(e.unref(u))},[e.createElementVNode("span",null,e.toDisplayString(n.message),1)],4)],4))}}),Te={message:"\u61D2\u732B\u4E91 Yes!!!",position:"middle",duration:1500};class Ge{options;container;constructor(t){this.options=t,this.container=document.createElement("div")}present(){const t=e.h(e.h(Ye),{...Te,...this.options});e.render(t,this.container),document.body.insertBefore(this.container,document.body.firstChild);const o=this.options.duration||Te.duration;setTimeout(()=>{this.dismiss()},o)}dismiss(){this.container&&(this.container.querySelector("#toastWrapper")?.classList.add("animate-toastAnimation"),setTimeout(()=>{this.container&&(e.render(null,this.container),document.body.removeChild(this.container))},500))}}const Xe=["xlink:href","fill","color"],Je=e.defineComponent({__name:"SvgIcon",props:{name:null,prefix:{default:"icon"},color:{default:"#FFF"},width:null,height:null},setup(n){const t=n,o=e.computed(()=>`#${t.prefix}-${t.name}`),l=e.computed(()=>({width:`${t.width??t.height}px`,height:`${t.height??t.width}px`,aspectRatio:t.width&&t.height?void 0:"1/1"}));return(r,i)=>(e.openBlock(),e.createElementBlock("svg",{"aria-hidden":"",style:e.normalizeStyle(e.unref(l))},[e.createElementVNode("use",{"xlink:href":e.unref(o),fill:n.color,color:n.color},null,8,Xe)],4))}});function Ze(n){const{containerEl:t,sliderEl:o,autoHeight:l,performance:r={},maxHeightRatio:i=.9}=n,a=e.ref(!0),u=me(F,100);let g,v="";const p=e.ref(0),d=e.ref(0),s=e.ref(0),c=e.ref({top:0,scrollTop:0,scrollHeight:0,clientHeight:0}),E=e.ref({clientHeight:0}),_=e.computed(()=>!!d.value),w=e.computed(()=>c.value.scrollHeight>c.value.clientHeight),y=e.computed(()=>c.value.clientHeight-E.value.clientHeight),O=e.computed(()=>c.value.scrollHeight-c.value.clientHeight),I=e.computed(()=>Math.max(c.value.clientHeight/c.value.scrollHeight,.05)),U=e.computed(()=>I.value>i?0:I.value*c.value.clientHeight),j=e.computed(()=>({willChange:"transform",transform:`translate3d(0,${s.value}px,0)`,height:l?`${U.value}px`:void 0}));function $(B){P(),d.value=B.clientY-o.value.getBoundingClientRect().top||1,v=getComputedStyle(t.value).scrollBehavior,v==="smooth"&&(t.value.style.scrollBehavior="unset")}function A(){t.value.style.scrollBehavior=v,d.value=0,u()}function P(){a.value=!1}function F(){_.value||(a.value=!0)}function k(B){if(!_.value)return;let x=B.clientY-c.value.top-d.value;x<0?s.value=0:x>=y.value?s.value=y.value:s.value=x,t.value.scrollTo({top:s.value/y.value*O.value})}function L(){_.value||K()}function K(){cancelAnimationFrame(g),g=requestAnimationFrame(q)}function q(){t.value&&(p.value=r.scrollTop?.value??t.value.scrollTop,s.value=p.value/O.value*y.value)}function V(B){let x="addEventListener";B==="add"?x="addEventListener":x="removeEventListener",o.value?.[x]("pointerdown",$,{passive:!0}),window[x]("pointermove",k,{passive:!0}),window[x]("pointerup",A,{passive:!0})}const N=new MutationObserver(B=>{B.map(z=>z.oldValue).join().includes("height")&&h()});function h(){c.value.top=t.value?.getBoundingClientRect().top??0,c.value.scrollHeight=t.value?.scrollHeight??0,c.value.clientHeight=t.value?.clientHeight??0}function S(){P(),setTimeout(()=>{E.value.clientHeight=o.value?.clientHeight??0,F()},150)}function R(B,x,z="dynamic-styles"){let M=document.getElementById(z);M||(M=document.createElement("style"),M.id=z,document.head.appendChild(M));const Y=M.sheet.cssRules,G=Y.length,f=`${B} { ${x} }`;for(let m=0;m<G;m++){const C=Y[m];if(C.selectorText===B&&C.style.cssText===x)return}M.sheet.insertRule(f,G)}function D(){t.value&&o.value?(R(".hide-scrollbar","scrollbar-width: none; -ms-overflow-style: none;"),R(".hide-scrollbar::-webkit-scrollbar","display: none"),t.value.addEventListener("scroll",L,{passive:!0}),V("add"),N.observe(t.value,{subtree:!0,attributeOldValue:!0,attributeFilter:["style"]}),setTimeout(()=>{h()},100),S()):console.error("useScrollBar:","\u521D\u59CB\u5316\u5931\u8D25!",{containerEl:t,sliderEl:o})}return e.watch(p,()=>{P(),u()}),{isScrollEnd:a,isDragSlider:_,offsetTop:s,scrollTop:p,scrollable:w,sliderPos:j,init:D,modifySliderEventListener:V}}const et=(n=>(e.pushScopeId("data-v-edec7292"),n=n(),e.popScopeId(),n))(()=>e.createElementVNode("div",{class:"default-slider"},null,-1)),tt=e.defineComponent({__name:"ScrollBar",props:{containerEl:null,autoHide:{type:Boolean},autoHeight:{type:Boolean},performance:null},setup(n,{expose:t}){const o=n,l=!!e.useSlots().default,r=e.ref(null),i=e.computed(()=>o.containerEl),a=Ze({containerEl:i,sliderEl:r,autoHeight:l?o.autoHeight:!0,performance:o.performance}),{scrollable:u,isScrollEnd:g,sliderPos:v}=a,p=e.ref(!1),d=o.autoHide?e.computed(()=>p.value||!g.value):e.computed(()=>u.value);e.onMounted(()=>{e.nextTick(()=>{a.init()})}),e.onUnmounted(()=>{a.modifySliderEventListener("remove")});function s(){p.value=!0}function c(){p.value=!1}return t({uScrollBarReturn:a}),(E,_)=>(e.openBlock(),e.createBlock(e.Transition,null,{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"sliderRef",ref:r,class:"slider-wrapper",onMouseenter:s,onMouseleave:c,style:e.normalizeStyle(e.unref(v))},[e.renderSlot(E.$slots,"default",{},()=>[et],!0)],36),[[e.vShow,e.unref(d)]])]),_:3}))}}),dt="",nt=ue(tt,[["__scopeId","data-v-edec7292"]]),ot={class:"virtualListWrapper"},lt={inheritAttrs:!1},rt=e.defineComponent({...lt,__name:"VirtualList",props:{data:null,itemHeight:null,overscan:{default:10}},emits:["scrollEnd"],setup(n,{expose:t,emit:o}){const l=n,r=we(e.toRef(l,"data"),{itemHeight:p=>l.itemHeight(l.data[p]),overscan:l.overscan,scrollEndHook:()=>{o("scrollEnd")}}),{list:i,containerProps:a,wrapperProps:u,innerProps:g,getItemHeightData:v}=r;return t({vListReturn:r}),(p,d)=>(e.openBlock(),e.createElementBlock("div",ot,[e.createElementVNode("div",e.mergeProps({onScrollPassive:d[0]||(d[0]=(...s)=>e.unref(a).onScroll&&e.unref(a).onScroll(...s)),ref:e.unref(a).ref,class:"virtualList"},p.$attrs),[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(u))),[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(g))),[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),({index:s,data:c})=>(e.openBlock(),e.createElementBlock("div",{key:s,style:e.normalizeStyle({height:`${e.unref(v)(s).height}px`,display:"flex"})},[e.renderSlot(p.$slots,"default",{data:c,index:s},void 0,!0)],4))),128))],16)],16)],16)]))}}),ft="",at=ue(rt,[["__scopeId","data-v-4ba97cce"]]);b.ScrollBar=nt,b.SvgIcon=Je,b.ToastCreator=Ge,b.VirtualList=at,b.allSelectedKey=ne,b.closeDialogKey=_e,b.dialogController=Qe,b.isAllSelectedKey=ae,b.isSelectedKey=te,b.selectAllKey=le,b.selectKey=oe,b.toggleAllKey=Z,b.toggleKey=ee,b.unselectAllKey=ie,b.unselectKey=re,b.useDragSelect=ce,b.useDragSelectByMobile=We,b.useDragSelectByPc=ze,b.useSelectable=Ne,b.useSelectableInjectors=Ke,b.useVirtualList=we,Object.defineProperties(b,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.v-leave-active[data-v-edec7292]{transition:all .15s ease-out;transition-delay:.9s}.v-leave-to[data-v-edec7292]{opacity:0}.slider-wrapper[data-v-edec7292]{z-index:100;position:absolute;right:0;touch-action:none}.default-slider[data-v-edec7292]{width:6px;height:100%;background-color:#0003;border-radius:3px;margin-right:3px}.virtualList[data-v-4ba97cce]{width:100%;height:100%;position:absolute;overflow-y:auto;scroll-behavior:smooth;user-select:none}.virtualListWrapper[data-v-4ba97cce]{width:100%;height:100%;position:relative}
|
|
1
|
+
.modal[data-v-415900d3]{position:absolute;inset:0;display:flex;z-index:999;background-color:#1c191780}.dialog[data-v-415900d3]{margin:auto;display:flex;flex-direction:column}.v-leave-active[data-v-edec7292]{transition:all .15s ease-out;transition-delay:.9s}.v-leave-to[data-v-edec7292]{opacity:0}.slider-wrapper[data-v-edec7292]{z-index:100;position:absolute;right:0;touch-action:none}.default-slider[data-v-edec7292]{width:6px;height:100%;background-color:#0003;border-radius:3px;margin-right:3px}.virtualList[data-v-4ba97cce]{width:100%;height:100%;position:absolute;overflow-y:auto;scroll-behavior:smooth;user-select:none}.virtualListWrapper[data-v-4ba97cce]{width:100%;height:100%;position:relative}
|
|
@@ -27,8 +27,8 @@ declare const _default: {
|
|
|
27
27
|
$slots: Readonly<{
|
|
28
28
|
[name: string]: import("vue").Slot | undefined;
|
|
29
29
|
}>;
|
|
30
|
-
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}
|
|
31
|
-
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}
|
|
30
|
+
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
31
|
+
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
32
32
|
$emit: (event: "update:visiable", ...args: any[]) => void;
|
|
33
33
|
$el: any;
|
|
34
34
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<DialogProps>, {
|
|
@@ -41,7 +41,7 @@ declare const _default: {
|
|
|
41
41
|
visiable: boolean;
|
|
42
42
|
closeOnClickOverlay: boolean;
|
|
43
43
|
dialogClass: string | object | string[];
|
|
44
|
-
}> & {
|
|
44
|
+
}, {}, string> & {
|
|
45
45
|
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
46
46
|
created?: ((() => void) | (() => void)[]) | undefined;
|
|
47
47
|
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
@@ -56,18 +56,18 @@ declare const _default: {
|
|
|
56
56
|
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
57
57
|
renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
58
58
|
renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
59
|
-
errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}
|
|
59
|
+
errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void)[]) | undefined;
|
|
60
60
|
};
|
|
61
61
|
$forceUpdate: () => void;
|
|
62
62
|
$nextTick: typeof import("vue").nextTick;
|
|
63
|
-
$watch
|
|
63
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
64
64
|
} & Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<DialogProps>, {
|
|
65
65
|
visiable: boolean;
|
|
66
66
|
closeOnClickOverlay: boolean;
|
|
67
67
|
dialogClass: string;
|
|
68
68
|
}>>> & {
|
|
69
69
|
"onUpdate:visiable"?: ((...args: any[]) => any) | undefined;
|
|
70
|
-
} & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties;
|
|
70
|
+
} & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {};
|
|
71
71
|
__isFragment?: undefined;
|
|
72
72
|
__isTeleport?: undefined;
|
|
73
73
|
__isSuspense?: undefined;
|
|
@@ -81,14 +81,14 @@ declare const _default: {
|
|
|
81
81
|
visiable: boolean;
|
|
82
82
|
closeOnClickOverlay: boolean;
|
|
83
83
|
dialogClass: string | object | string[];
|
|
84
|
-
}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
84
|
+
}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
85
85
|
$slots: {
|
|
86
86
|
default: (_: {}) => any;
|
|
87
87
|
};
|
|
88
88
|
});
|
|
89
89
|
export default _default;
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
91
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
92
92
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
93
93
|
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
94
94
|
} : {
|
|
@@ -96,7 +96,7 @@ declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
|
96
96
|
required: true;
|
|
97
97
|
};
|
|
98
98
|
};
|
|
99
|
-
|
|
99
|
+
type __VLS_WithDefaults<P, D> = {
|
|
100
100
|
[K in keyof Pick<P, keyof P>]: K extends keyof D ? P[K] & {
|
|
101
101
|
default: D[K];
|
|
102
102
|
} : P[K];
|
|
@@ -9,7 +9,7 @@ interface Constructor<P = any> {
|
|
|
9
9
|
$props: P;
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
type DialogControllerOptions = Omit<DialogProps, "visiable">;
|
|
13
13
|
export declare function dialogController(dialogProps?: DialogControllerOptions): {
|
|
14
14
|
create: <P>(component: Constructor<P>, componentProps?: (VNodeProps & P) | undefined) => {
|
|
15
15
|
close: () => void;
|
|
@@ -21,8 +21,8 @@ declare const _default: {
|
|
|
21
21
|
$slots: Readonly<{
|
|
22
22
|
[name: string]: import("vue").Slot | undefined;
|
|
23
23
|
}>;
|
|
24
|
-
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}
|
|
25
|
-
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}
|
|
24
|
+
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
25
|
+
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
26
26
|
$emit: (event: string, ...args: any[]) => void;
|
|
27
27
|
$el: any;
|
|
28
28
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {}>>>, {
|
|
@@ -36,7 +36,7 @@ declare const _default: {
|
|
|
36
36
|
init: () => void;
|
|
37
37
|
modifySliderEventListener: (action: "add" | "remove") => void;
|
|
38
38
|
};
|
|
39
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}> & {
|
|
39
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string> & {
|
|
40
40
|
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
41
41
|
created?: ((() => void) | (() => void)[]) | undefined;
|
|
42
42
|
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
@@ -51,11 +51,11 @@ declare const _default: {
|
|
|
51
51
|
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
52
52
|
renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
53
53
|
renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
54
|
-
errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}
|
|
54
|
+
errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void)[]) | undefined;
|
|
55
55
|
};
|
|
56
56
|
$forceUpdate: () => void;
|
|
57
57
|
$nextTick: typeof nextTick;
|
|
58
|
-
$watch
|
|
58
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
59
59
|
} & Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {}>>> & import("vue").ShallowUnwrapRef<{
|
|
60
60
|
uScrollBarReturn: {
|
|
61
61
|
isScrollEnd: Ref<boolean>;
|
|
@@ -67,7 +67,7 @@ declare const _default: {
|
|
|
67
67
|
init: () => void;
|
|
68
68
|
modifySliderEventListener: (action: "add" | "remove") => void;
|
|
69
69
|
};
|
|
70
|
-
}> & {} & import("vue").ComponentCustomProperties;
|
|
70
|
+
}> & {} & import("vue").ComponentCustomProperties & {};
|
|
71
71
|
__isFragment?: undefined;
|
|
72
72
|
__isTeleport?: undefined;
|
|
73
73
|
__isSuspense?: undefined;
|
|
@@ -82,14 +82,14 @@ declare const _default: {
|
|
|
82
82
|
init: () => void;
|
|
83
83
|
modifySliderEventListener: (action: "add" | "remove") => void;
|
|
84
84
|
};
|
|
85
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
85
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
86
86
|
$slots: {
|
|
87
87
|
default: (_: {}) => any;
|
|
88
88
|
};
|
|
89
89
|
});
|
|
90
90
|
export default _default;
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
92
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
93
93
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
94
94
|
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
95
95
|
} : {
|
|
@@ -97,7 +97,7 @@ declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
|
97
97
|
required: true;
|
|
98
98
|
};
|
|
99
99
|
};
|
|
100
|
-
|
|
100
|
+
type __VLS_WithDefaults<P, D> = {
|
|
101
101
|
[K in keyof Pick<P, keyof P>]: K extends keyof D ? P[K] & {
|
|
102
102
|
default: D[K];
|
|
103
103
|
} : P[K];
|
|
@@ -21,8 +21,8 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
21
21
|
color: string;
|
|
22
22
|
}>;
|
|
23
23
|
export default _default;
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
25
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
26
26
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
27
27
|
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
28
28
|
} : {
|
|
@@ -30,7 +30,7 @@ declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
|
30
30
|
required: true;
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
|
-
|
|
33
|
+
type __VLS_WithDefaults<P, D> = {
|
|
34
34
|
[K in keyof Pick<P, keyof P>]: K extends keyof D ? P[K] & {
|
|
35
35
|
default: D[K];
|
|
36
36
|
} : P[K];
|
|
@@ -6,8 +6,8 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
|
|
|
6
6
|
position: "top" | "middle" | "bottom";
|
|
7
7
|
}>>>, {}>;
|
|
8
8
|
export default _default;
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
10
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
11
11
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
12
12
|
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
13
13
|
} : {
|
|
@@ -13,7 +13,7 @@ interface DragOptions {
|
|
|
13
13
|
unselectAll?: () => void;
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
type ContainsRefType = Ref<HTMLElement | null | undefined>;
|
|
17
17
|
export declare function useDragSelect({ attribute, selectWay, scrollOptions, getSelectMap, }: DragOptions): {
|
|
18
18
|
init: (_containerEl: ContainsRefType) => boolean;
|
|
19
19
|
dragStart: (x: number, y: number) => void;
|
|
@@ -22,8 +22,8 @@ declare const _default: {
|
|
|
22
22
|
$slots: Readonly<{
|
|
23
23
|
[name: string]: import("vue").Slot | undefined;
|
|
24
24
|
}>;
|
|
25
|
-
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}
|
|
26
|
-
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}
|
|
25
|
+
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
26
|
+
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
27
27
|
$emit: (event: "scrollEnd") => void;
|
|
28
28
|
$el: any;
|
|
29
29
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
@@ -67,7 +67,7 @@ declare const _default: {
|
|
|
67
67
|
scrollEnd: () => void;
|
|
68
68
|
}, string, {
|
|
69
69
|
overscan: number;
|
|
70
|
-
}> & {
|
|
70
|
+
}, {}, string> & {
|
|
71
71
|
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
72
72
|
created?: ((() => void) | (() => void)[]) | undefined;
|
|
73
73
|
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
@@ -82,11 +82,11 @@ declare const _default: {
|
|
|
82
82
|
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
83
83
|
renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
84
84
|
renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
85
|
-
errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}
|
|
85
|
+
errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void)[]) | undefined;
|
|
86
86
|
};
|
|
87
87
|
$forceUpdate: () => void;
|
|
88
88
|
$nextTick: typeof import("vue").nextTick;
|
|
89
|
-
$watch
|
|
89
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
90
90
|
} & Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
91
91
|
data: any[];
|
|
92
92
|
itemHeight: (d: any) => number;
|
|
@@ -124,7 +124,7 @@ declare const _default: {
|
|
|
124
124
|
};
|
|
125
125
|
}>;
|
|
126
126
|
};
|
|
127
|
-
}> & {} & import("vue").ComponentCustomProperties;
|
|
127
|
+
}> & {} & import("vue").ComponentCustomProperties & {};
|
|
128
128
|
__isFragment?: undefined;
|
|
129
129
|
__isTeleport?: undefined;
|
|
130
130
|
__isSuspense?: undefined;
|
|
@@ -169,7 +169,7 @@ declare const _default: {
|
|
|
169
169
|
scrollEnd: () => void;
|
|
170
170
|
}, string, {
|
|
171
171
|
overscan: number;
|
|
172
|
-
}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
172
|
+
}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
173
173
|
$slots: {
|
|
174
174
|
default: (_: {
|
|
175
175
|
data: any;
|
|
@@ -178,8 +178,8 @@ declare const _default: {
|
|
|
178
178
|
};
|
|
179
179
|
});
|
|
180
180
|
export default _default;
|
|
181
|
-
|
|
182
|
-
|
|
181
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
182
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
183
183
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
184
184
|
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
185
185
|
} : {
|
|
@@ -187,7 +187,7 @@ declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
|
187
187
|
required: true;
|
|
188
188
|
};
|
|
189
189
|
};
|
|
190
|
-
|
|
190
|
+
type __VLS_WithDefaults<P, D> = {
|
|
191
191
|
[K in keyof Pick<P, keyof P>]: K extends keyof D ? P[K] & {
|
|
192
192
|
default: D[K];
|
|
193
193
|
} : P[K];
|