@lazycatcloud/lzc-toolkit 0.0.21 → 0.0.23
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 +415 -253
- package/dist/index.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,84 +1,123 @@
|
|
|
1
|
-
import { unref as
|
|
2
|
-
var
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
function
|
|
6
|
-
return typeof e == "function" ? e() :
|
|
1
|
+
import { unref as y, getCurrentScope as He, onScopeDispose as Ie, getCurrentInstance as Te, onMounted as G, nextTick as ae, ref as m, watch as V, shallowRef as Ee, computed as g, onUnmounted as ie, inject as x, provide as O, defineComponent as K, openBlock as E, createBlock as se, Transition as ue, withCtx as ce, createElementBlock as P, createElementVNode as C, withModifiers as Ce, normalizeClass as Be, renderSlot as J, createCommentVNode as Pe, render as Re, h as U, normalizeStyle as X, useSlots as Fe, withDirectives as Ae, vShow as De, pushScopeId as $e, popScopeId as Le, toRef as Ve, mergeProps as Ke, normalizeProps as Z, guardReactiveProps as ee, Fragment as je, renderList as ze } from "vue";
|
|
2
|
+
var te;
|
|
3
|
+
const R = typeof window < "u";
|
|
4
|
+
R && ((te = window?.navigator) == null ? void 0 : te.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
5
|
+
function L(e) {
|
|
6
|
+
return typeof e == "function" ? e() : y(e);
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function fe(e, l) {
|
|
9
|
+
function t(...n) {
|
|
10
|
+
e(() => l.apply(this, n), { fn: l, thisArg: this, args: n });
|
|
11
|
+
}
|
|
12
|
+
return t;
|
|
13
|
+
}
|
|
14
|
+
function Me(e, l = {}) {
|
|
15
|
+
let t, n;
|
|
16
|
+
return (r) => {
|
|
17
|
+
const a = L(e), c = L(l.maxWait);
|
|
18
|
+
if (t && clearTimeout(t), a <= 0 || c !== void 0 && c <= 0)
|
|
19
|
+
return n && (clearTimeout(n), n = null), r();
|
|
20
|
+
c && !n && (n = setTimeout(() => {
|
|
21
|
+
t && clearTimeout(t), n = null, r();
|
|
22
|
+
}, c)), t = setTimeout(() => {
|
|
23
|
+
n && clearTimeout(n), n = null, r();
|
|
24
|
+
}, a);
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
function Ne(e, l = !0, t = !0) {
|
|
28
|
+
let n = 0, o, r = !0;
|
|
29
|
+
const a = () => {
|
|
30
|
+
o && (clearTimeout(o), o = void 0);
|
|
31
|
+
};
|
|
32
|
+
return (d) => {
|
|
33
|
+
const u = L(e), h = Date.now() - n;
|
|
34
|
+
if (a(), u <= 0)
|
|
35
|
+
return n = Date.now(), d();
|
|
36
|
+
h > u && (t || !r) ? (n = Date.now(), d()) : l && (o = setTimeout(() => {
|
|
37
|
+
n = Date.now(), r = !0, a(), d();
|
|
38
|
+
}, u)), !t && !o && (o = setTimeout(() => r = !0, u)), r = !1;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function Qe(e) {
|
|
9
42
|
return e;
|
|
10
43
|
}
|
|
11
|
-
function
|
|
12
|
-
return
|
|
44
|
+
function ke(e) {
|
|
45
|
+
return He() ? (Ie(e), !0) : !1;
|
|
46
|
+
}
|
|
47
|
+
function We(e, l = 200, t = {}) {
|
|
48
|
+
return fe(Me(l, t), e);
|
|
49
|
+
}
|
|
50
|
+
function Ue(e, l = 200, t = !1, n = !0) {
|
|
51
|
+
return fe(Ne(l, t, n), e);
|
|
13
52
|
}
|
|
14
|
-
function
|
|
15
|
-
|
|
53
|
+
function qe(e, l = !0) {
|
|
54
|
+
Te() ? G(e) : l ? e() : ae(e);
|
|
16
55
|
}
|
|
17
|
-
function
|
|
18
|
-
var
|
|
19
|
-
const t =
|
|
20
|
-
return (
|
|
56
|
+
function de(e) {
|
|
57
|
+
var l;
|
|
58
|
+
const t = L(e);
|
|
59
|
+
return (l = t?.$el) != null ? l : t;
|
|
21
60
|
}
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
function
|
|
27
|
-
const t =
|
|
28
|
-
return
|
|
61
|
+
const Ye = R ? window : void 0;
|
|
62
|
+
R && window.document;
|
|
63
|
+
R && window.navigator;
|
|
64
|
+
R && window.location;
|
|
65
|
+
function Ge(e, l = !1) {
|
|
66
|
+
const t = m(), n = () => t.value = Boolean(e());
|
|
67
|
+
return n(), qe(n, l), t;
|
|
29
68
|
}
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
var
|
|
69
|
+
const q = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Y = "__vueuse_ssr_handlers__";
|
|
70
|
+
q[Y] = q[Y] || {};
|
|
71
|
+
q[Y];
|
|
72
|
+
var le = Object.getOwnPropertySymbols, Je = Object.prototype.hasOwnProperty, Xe = Object.prototype.propertyIsEnumerable, Ze = (e, l) => {
|
|
34
73
|
var t = {};
|
|
35
|
-
for (var
|
|
36
|
-
|
|
37
|
-
if (e != null &&
|
|
38
|
-
for (var
|
|
39
|
-
|
|
74
|
+
for (var n in e)
|
|
75
|
+
Je.call(e, n) && l.indexOf(n) < 0 && (t[n] = e[n]);
|
|
76
|
+
if (e != null && le)
|
|
77
|
+
for (var n of le(e))
|
|
78
|
+
l.indexOf(n) < 0 && Xe.call(e, n) && (t[n] = e[n]);
|
|
40
79
|
return t;
|
|
41
80
|
};
|
|
42
|
-
function
|
|
43
|
-
const
|
|
44
|
-
let
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
}, { immediate: !0, flush: "post" }),
|
|
50
|
-
|
|
81
|
+
function et(e, l, t = {}) {
|
|
82
|
+
const n = t, { window: o = Ye } = n, r = Ze(n, ["window"]);
|
|
83
|
+
let a;
|
|
84
|
+
const c = Ge(() => o && "ResizeObserver" in o), d = () => {
|
|
85
|
+
a && (a.disconnect(), a = void 0);
|
|
86
|
+
}, u = V(() => de(e), (p) => {
|
|
87
|
+
d(), c.value && o && p && (a = new ResizeObserver(l), a.observe(p, r));
|
|
88
|
+
}, { immediate: !0, flush: "post" }), h = () => {
|
|
89
|
+
d(), u();
|
|
51
90
|
};
|
|
52
|
-
return
|
|
53
|
-
isSupported:
|
|
54
|
-
stop:
|
|
91
|
+
return ke(h), {
|
|
92
|
+
isSupported: c,
|
|
93
|
+
stop: h
|
|
55
94
|
};
|
|
56
95
|
}
|
|
57
|
-
function
|
|
58
|
-
const { box:
|
|
59
|
-
return
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
}, t),
|
|
63
|
-
|
|
96
|
+
function tt(e, l = { width: 0, height: 0 }, t = {}) {
|
|
97
|
+
const { box: n = "content-box" } = t, o = m(l.width), r = m(l.height);
|
|
98
|
+
return et(e, ([a]) => {
|
|
99
|
+
const c = n === "border-box" ? a.borderBoxSize : n === "content-box" ? a.contentBoxSize : a.devicePixelContentBoxSize;
|
|
100
|
+
c ? (o.value = c.reduce((d, { inlineSize: u }) => d + u, 0), r.value = c.reduce((d, { blockSize: u }) => d + u, 0)) : (o.value = a.contentRect.width, r.value = a.contentRect.height);
|
|
101
|
+
}, t), V(() => de(e), (a) => {
|
|
102
|
+
o.value = a ? l.width : 0, r.value = a ? l.height : 0;
|
|
64
103
|
}), {
|
|
65
|
-
width:
|
|
66
|
-
height:
|
|
104
|
+
width: o,
|
|
105
|
+
height: r
|
|
67
106
|
};
|
|
68
107
|
}
|
|
69
|
-
var
|
|
108
|
+
var ne;
|
|
70
109
|
(function(e) {
|
|
71
110
|
e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
|
|
72
|
-
})(
|
|
73
|
-
var
|
|
74
|
-
for (var t in
|
|
75
|
-
|
|
76
|
-
if (
|
|
77
|
-
for (var t of
|
|
78
|
-
|
|
111
|
+
})(ne || (ne = {}));
|
|
112
|
+
var lt = Object.defineProperty, oe = Object.getOwnPropertySymbols, nt = Object.prototype.hasOwnProperty, ot = Object.prototype.propertyIsEnumerable, re = (e, l, t) => l in e ? lt(e, l, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[l] = t, rt = (e, l) => {
|
|
113
|
+
for (var t in l || (l = {}))
|
|
114
|
+
nt.call(l, t) && re(e, t, l[t]);
|
|
115
|
+
if (oe)
|
|
116
|
+
for (var t of oe(l))
|
|
117
|
+
ot.call(l, t) && re(e, t, l[t]);
|
|
79
118
|
return e;
|
|
80
119
|
};
|
|
81
|
-
const
|
|
120
|
+
const at = {
|
|
82
121
|
easeInSine: [0.12, 0, 0.39, 0],
|
|
83
122
|
easeOutSine: [0.61, 1, 0.88, 1],
|
|
84
123
|
easeInOutSine: [0.37, 0, 0.63, 1],
|
|
@@ -104,181 +143,181 @@ const De = {
|
|
|
104
143
|
easeOutBack: [0.34, 1.56, 0.64, 1],
|
|
105
144
|
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
|
|
106
145
|
};
|
|
107
|
-
|
|
108
|
-
linear:
|
|
109
|
-
},
|
|
110
|
-
function
|
|
111
|
-
const { itemHeight: t, overscan:
|
|
112
|
-
let
|
|
113
|
-
const
|
|
114
|
-
let
|
|
115
|
-
const
|
|
116
|
-
let { sum:
|
|
117
|
-
return
|
|
118
|
-
}),
|
|
119
|
-
let
|
|
120
|
-
return
|
|
146
|
+
rt({
|
|
147
|
+
linear: Qe
|
|
148
|
+
}, at);
|
|
149
|
+
function it(e, l) {
|
|
150
|
+
const { itemHeight: t, overscan: n = 5 } = l, o = m(), r = tt(o);
|
|
151
|
+
let a;
|
|
152
|
+
const c = Ee(e), d = m(0), u = m({ start: 0, end: 10 });
|
|
153
|
+
let h = 0;
|
|
154
|
+
const p = m([]), s = g(() => {
|
|
155
|
+
let { sum: i, height: f } = { sum: 0, height: 0 };
|
|
156
|
+
return c.value.map((w, b) => (typeof t == "number" ? f = t : f = t(b), i += f, { height: f, sum: i }));
|
|
157
|
+
}), v = g(() => D(u.value.start)), H = g(() => typeof t == "number" ? s.value.length * t : s.value.at(-1)?.sum || 0), B = g(() => {
|
|
158
|
+
let i = p.value.length - n, f = Math.max(i - h, 0);
|
|
159
|
+
return p.value.slice(f, i);
|
|
121
160
|
});
|
|
122
|
-
|
|
123
|
-
}),
|
|
124
|
-
[
|
|
125
|
-
([
|
|
126
|
-
(
|
|
161
|
+
G(() => {
|
|
162
|
+
}), ie(() => cancelAnimationFrame(a)), V(
|
|
163
|
+
[r.width, r.height, c],
|
|
164
|
+
([i, f]) => {
|
|
165
|
+
(i || f) && F();
|
|
127
166
|
},
|
|
128
167
|
{ deep: !0 }
|
|
129
168
|
);
|
|
130
|
-
function
|
|
131
|
-
cancelAnimationFrame(
|
|
132
|
-
}
|
|
133
|
-
function
|
|
134
|
-
if (
|
|
135
|
-
|
|
136
|
-
let
|
|
137
|
-
|
|
169
|
+
function F() {
|
|
170
|
+
cancelAnimationFrame(a), a = requestAnimationFrame(I);
|
|
171
|
+
}
|
|
172
|
+
function I() {
|
|
173
|
+
if (o.value) {
|
|
174
|
+
d.value = o.value.scrollTop, h = j();
|
|
175
|
+
let i = A(d.value), f = i + h + n;
|
|
176
|
+
i = i - n, i = i < 0 ? 0 : i, f = f > c.value.length ? c.value.length : f, u.value = { start: i, end: f }, p.value = c.value.slice(i, f).map((w, b) => ({
|
|
138
177
|
data: w,
|
|
139
|
-
index: b +
|
|
178
|
+
index: b + i
|
|
140
179
|
}));
|
|
141
180
|
}
|
|
142
181
|
}
|
|
143
|
-
function
|
|
144
|
-
let
|
|
145
|
-
for (let
|
|
146
|
-
if (
|
|
147
|
-
w = Math.max(0,
|
|
182
|
+
function A(i) {
|
|
183
|
+
let f = Math.floor(s.value.length / 16), w = -1, b = -1;
|
|
184
|
+
for (let _ = 0; _ < 16; _++) {
|
|
185
|
+
if (s.value.at(f * _).sum >= i) {
|
|
186
|
+
w = Math.max(0, _ - 1);
|
|
148
187
|
break;
|
|
149
188
|
}
|
|
150
|
-
|
|
189
|
+
_ === 15 && (w = _);
|
|
151
190
|
}
|
|
152
|
-
w *=
|
|
153
|
-
for (let
|
|
154
|
-
if (
|
|
155
|
-
b =
|
|
191
|
+
w *= f;
|
|
192
|
+
for (let _ = w; _ < s.value.length; _++)
|
|
193
|
+
if (s.value[_].sum >= i) {
|
|
194
|
+
b = _;
|
|
156
195
|
break;
|
|
157
196
|
}
|
|
158
197
|
return Math.max(0, b);
|
|
159
198
|
}
|
|
160
|
-
function
|
|
161
|
-
let
|
|
162
|
-
for (let b = w; b <
|
|
199
|
+
function j() {
|
|
200
|
+
let i = 0, f = 0, w = z();
|
|
201
|
+
for (let b = w; b < s.value.length && (i++, f += s.value[b].height, !(f >= r.height.value)); b++)
|
|
163
202
|
;
|
|
164
|
-
return
|
|
203
|
+
return i;
|
|
165
204
|
}
|
|
166
|
-
function
|
|
205
|
+
function D(i) {
|
|
167
206
|
if (typeof t == "number")
|
|
168
|
-
return
|
|
169
|
-
let
|
|
170
|
-
return
|
|
207
|
+
return i * t;
|
|
208
|
+
let f = s.value[i];
|
|
209
|
+
return f.sum - f.height;
|
|
171
210
|
}
|
|
172
|
-
function
|
|
173
|
-
return
|
|
211
|
+
function $(i) {
|
|
212
|
+
return s.value.at(i) || { sum: 0, height: 0 };
|
|
174
213
|
}
|
|
175
|
-
function
|
|
176
|
-
let
|
|
177
|
-
return
|
|
214
|
+
function z() {
|
|
215
|
+
let i = u.value.start;
|
|
216
|
+
return i >= n && (i += n), i;
|
|
178
217
|
}
|
|
179
|
-
function
|
|
180
|
-
if (
|
|
181
|
-
const
|
|
182
|
-
|
|
218
|
+
function M(i) {
|
|
219
|
+
if (o.value) {
|
|
220
|
+
const f = $(i);
|
|
221
|
+
o.value.scrollTop = f.sum - f.height, I();
|
|
183
222
|
}
|
|
184
223
|
}
|
|
185
|
-
const
|
|
224
|
+
const N = g(() => ({
|
|
186
225
|
style: {
|
|
187
226
|
width: "100%",
|
|
188
|
-
height: `${
|
|
227
|
+
height: `${H.value}px`
|
|
189
228
|
}
|
|
190
|
-
})),
|
|
229
|
+
})), Q = g(() => ({
|
|
191
230
|
style: {
|
|
192
|
-
transform: `translate3d(0, ${
|
|
231
|
+
transform: `translate3d(0, ${v.value}px, 0)`,
|
|
193
232
|
"will-change": "transform"
|
|
194
233
|
}
|
|
195
|
-
})),
|
|
234
|
+
})), k = {
|
|
196
235
|
overflowY: "auto"
|
|
197
236
|
};
|
|
198
237
|
return {
|
|
199
|
-
list:
|
|
200
|
-
visiableList:
|
|
201
|
-
getItemHeightData:
|
|
202
|
-
totalHeight:
|
|
203
|
-
clientHeight:
|
|
204
|
-
scrollTo:
|
|
205
|
-
scrollTop:
|
|
238
|
+
list: p,
|
|
239
|
+
visiableList: B,
|
|
240
|
+
getItemHeightData: $,
|
|
241
|
+
totalHeight: H,
|
|
242
|
+
clientHeight: r.height,
|
|
243
|
+
scrollTo: M,
|
|
244
|
+
scrollTop: d,
|
|
206
245
|
containerProps: {
|
|
207
|
-
ref:
|
|
246
|
+
ref: o,
|
|
208
247
|
onScroll: () => {
|
|
209
|
-
|
|
248
|
+
F();
|
|
210
249
|
},
|
|
211
|
-
style:
|
|
250
|
+
style: k
|
|
212
251
|
},
|
|
213
|
-
wrapperProps:
|
|
214
|
-
innerProps:
|
|
252
|
+
wrapperProps: N,
|
|
253
|
+
innerProps: Q
|
|
215
254
|
};
|
|
216
255
|
}
|
|
217
|
-
const
|
|
218
|
-
function
|
|
219
|
-
const { voidFn: e, boolFn:
|
|
220
|
-
voidFn: (
|
|
256
|
+
const ve = Symbol(), pe = Symbol(), he = Symbol(), ge = Symbol(), me = Symbol(), be = Symbol(), _e = Symbol(), ye = Symbol(), we = Symbol();
|
|
257
|
+
function _t() {
|
|
258
|
+
const { voidFn: e, boolFn: l, boolRef: t, arrayRef: n } = {
|
|
259
|
+
voidFn: (v) => {
|
|
221
260
|
},
|
|
222
|
-
boolFn: (
|
|
261
|
+
boolFn: (v) => !1,
|
|
223
262
|
boolRef: g(() => !1),
|
|
224
263
|
arrayRef: g(() => [])
|
|
225
|
-
},
|
|
264
|
+
}, o = x(ge, n), r = x(he, l), a = x(ye, t), c = x(pe, e), d = x(ve, e), u = x(me, e), h = x(be, e), p = x(_e, e), s = x(we, e);
|
|
226
265
|
return {
|
|
227
|
-
selected:
|
|
228
|
-
isSelected:
|
|
229
|
-
isAllSelected:
|
|
230
|
-
toggle:
|
|
231
|
-
toggleAll:
|
|
232
|
-
select:
|
|
233
|
-
selectAll:
|
|
234
|
-
unselect:
|
|
235
|
-
unselectAll:
|
|
266
|
+
selected: o,
|
|
267
|
+
isSelected: r,
|
|
268
|
+
isAllSelected: a,
|
|
269
|
+
toggle: c,
|
|
270
|
+
toggleAll: d,
|
|
271
|
+
select: u,
|
|
272
|
+
selectAll: h,
|
|
273
|
+
unselect: p,
|
|
274
|
+
unselectAll: s
|
|
236
275
|
};
|
|
237
276
|
}
|
|
238
|
-
function
|
|
239
|
-
const t =
|
|
240
|
-
function
|
|
241
|
-
e.value.forEach((
|
|
242
|
-
t.value[
|
|
277
|
+
function yt(e, l) {
|
|
278
|
+
const t = m({}), n = g(() => e.value.filter((s) => t.value[s[l]])), o = g(() => n.value.length != 0 && Object.keys(t.value).length == e.value.length);
|
|
279
|
+
function r() {
|
|
280
|
+
e.value.forEach((s) => {
|
|
281
|
+
t.value[s[l]] = !0;
|
|
243
282
|
});
|
|
244
283
|
}
|
|
245
|
-
function
|
|
284
|
+
function a() {
|
|
246
285
|
t.value = {};
|
|
247
286
|
}
|
|
248
|
-
function
|
|
249
|
-
|
|
250
|
-
t.value[
|
|
287
|
+
function c(s) {
|
|
288
|
+
s.forEach((v) => {
|
|
289
|
+
t.value[v[l]] || (t.value[v[l]] = !0);
|
|
251
290
|
});
|
|
252
291
|
}
|
|
253
|
-
function
|
|
254
|
-
|
|
255
|
-
t.value[
|
|
292
|
+
function d(s) {
|
|
293
|
+
s.forEach((v) => {
|
|
294
|
+
t.value[v[l]] && delete t.value[v[l]];
|
|
256
295
|
});
|
|
257
296
|
}
|
|
258
|
-
function
|
|
259
|
-
return !!t.value[
|
|
297
|
+
function u(s) {
|
|
298
|
+
return !!t.value[s[l]];
|
|
260
299
|
}
|
|
261
|
-
function
|
|
262
|
-
|
|
263
|
-
|
|
300
|
+
function h(s) {
|
|
301
|
+
s.forEach((v) => {
|
|
302
|
+
u(v) ? delete t.value[v[l]] : t.value[v[l]] = !0;
|
|
264
303
|
});
|
|
265
304
|
}
|
|
266
|
-
function
|
|
267
|
-
|
|
305
|
+
function p() {
|
|
306
|
+
o.value ? a() : r();
|
|
268
307
|
}
|
|
269
|
-
return
|
|
270
|
-
selected:
|
|
271
|
-
select:
|
|
272
|
-
selectAll:
|
|
273
|
-
unselect:
|
|
274
|
-
unselectAll:
|
|
275
|
-
toggle:
|
|
276
|
-
toggleAll:
|
|
277
|
-
isSelected:
|
|
278
|
-
isAllSelected:
|
|
308
|
+
return O(ve, p), O(pe, h), O(he, u), O(ge, n), O(me, c), O(be, r), O(_e, d), O(ye, o), O(we, a), {
|
|
309
|
+
selected: n,
|
|
310
|
+
select: c,
|
|
311
|
+
selectAll: r,
|
|
312
|
+
unselect: d,
|
|
313
|
+
unselectAll: a,
|
|
314
|
+
toggle: h,
|
|
315
|
+
toggleAll: p,
|
|
316
|
+
isSelected: u,
|
|
317
|
+
isAllSelected: o
|
|
279
318
|
};
|
|
280
319
|
}
|
|
281
|
-
const
|
|
320
|
+
const st = Symbol(), ut = /* @__PURE__ */ K({
|
|
282
321
|
__name: "Dialog",
|
|
283
322
|
props: {
|
|
284
323
|
visiable: { type: Boolean, default: !1 },
|
|
@@ -286,58 +325,58 @@ const Ue = Symbol(), We = /* @__PURE__ */ T({
|
|
|
286
325
|
dialogClass: { default: "" }
|
|
287
326
|
},
|
|
288
327
|
emits: ["update:visiable"],
|
|
289
|
-
setup(e, { emit:
|
|
290
|
-
const t = e,
|
|
291
|
-
t.closeOnClickOverlay &&
|
|
328
|
+
setup(e, { emit: l }) {
|
|
329
|
+
const t = e, n = () => {
|
|
330
|
+
t.closeOnClickOverlay && l("update:visiable", !1);
|
|
292
331
|
};
|
|
293
|
-
return
|
|
294
|
-
default:
|
|
295
|
-
e.visiable ? (
|
|
332
|
+
return O(st, () => l("update:visiable", !1)), (o, r) => (E(), se(ue, { name: "modal" }, {
|
|
333
|
+
default: ce(() => [
|
|
334
|
+
e.visiable ? (E(), P("div", {
|
|
296
335
|
key: 0,
|
|
297
|
-
onClick:
|
|
336
|
+
onClick: n,
|
|
298
337
|
class: "modal absolute inset-0 bottom-0 z-50 flex bg-stone-900 bg-opacity-50"
|
|
299
338
|
}, [
|
|
300
339
|
C("div", {
|
|
301
|
-
onClick:
|
|
340
|
+
onClick: r[0] || (r[0] = Ce(() => {
|
|
302
341
|
}, ["stop"])),
|
|
303
|
-
class:
|
|
342
|
+
class: Be(["dialog m-auto flex flex-col", e.dialogClass])
|
|
304
343
|
}, [
|
|
305
|
-
|
|
344
|
+
J(o.$slots, "default")
|
|
306
345
|
], 2)
|
|
307
|
-
])) :
|
|
346
|
+
])) : Pe("", !0)
|
|
308
347
|
]),
|
|
309
348
|
_: 3
|
|
310
349
|
}));
|
|
311
350
|
}
|
|
312
351
|
});
|
|
313
|
-
function
|
|
314
|
-
function
|
|
315
|
-
const
|
|
352
|
+
function wt(e) {
|
|
353
|
+
function l(t, n) {
|
|
354
|
+
const o = document.createElement("div"), r = {
|
|
316
355
|
setup() {
|
|
317
|
-
return () =>
|
|
318
|
-
|
|
356
|
+
return () => U(
|
|
357
|
+
ut,
|
|
319
358
|
{
|
|
320
359
|
visiable: !0,
|
|
321
360
|
"onUpdate:visiable": () => {
|
|
322
|
-
|
|
361
|
+
o?.remove();
|
|
323
362
|
},
|
|
324
363
|
...e
|
|
325
364
|
},
|
|
326
365
|
{
|
|
327
|
-
default: () =>
|
|
366
|
+
default: () => U(t, n)
|
|
328
367
|
}
|
|
329
368
|
);
|
|
330
369
|
}
|
|
331
370
|
};
|
|
332
|
-
return document.body.appendChild(
|
|
333
|
-
close: () =>
|
|
371
|
+
return document.body.appendChild(o), Re(U(r), o), {
|
|
372
|
+
close: () => o?.remove()
|
|
334
373
|
};
|
|
335
374
|
}
|
|
336
375
|
return {
|
|
337
|
-
create:
|
|
376
|
+
create: l
|
|
338
377
|
};
|
|
339
378
|
}
|
|
340
|
-
const
|
|
379
|
+
const ct = ["xlink:href", "fill", "color"], St = /* @__PURE__ */ K({
|
|
341
380
|
__name: "SvgIcon",
|
|
342
381
|
props: {
|
|
343
382
|
name: null,
|
|
@@ -347,57 +386,184 @@ const qe = ["xlink:href", "fill", "color"], ot = /* @__PURE__ */ T({
|
|
|
347
386
|
height: null
|
|
348
387
|
},
|
|
349
388
|
setup(e) {
|
|
350
|
-
const
|
|
351
|
-
width:
|
|
352
|
-
height:
|
|
353
|
-
aspectRatio:
|
|
389
|
+
const l = e, t = g(() => `#${l.prefix}-${l.name}`), n = g(() => ({
|
|
390
|
+
width: l.width,
|
|
391
|
+
height: l.height,
|
|
392
|
+
aspectRatio: l.width && l.height ? void 0 : "1/1"
|
|
354
393
|
}));
|
|
355
|
-
return (
|
|
394
|
+
return (o, r) => (E(), P("svg", {
|
|
356
395
|
"aria-hidden": "",
|
|
357
|
-
style:
|
|
396
|
+
style: X(y(n))
|
|
358
397
|
}, [
|
|
359
398
|
C("use", {
|
|
360
|
-
"xlink:href":
|
|
399
|
+
"xlink:href": y(t),
|
|
361
400
|
fill: e.color,
|
|
362
401
|
color: e.color
|
|
363
|
-
}, null, 8,
|
|
402
|
+
}, null, 8, ct)
|
|
364
403
|
], 4));
|
|
365
404
|
}
|
|
366
|
-
})
|
|
405
|
+
});
|
|
406
|
+
function ft(e) {
|
|
407
|
+
const { containerEl: l, sliderEl: t, autoHeight: n, performance: o = {} } = e, r = m(!0), a = We(Q, 1e3), c = Ue(W, 1e3, !0, !0);
|
|
408
|
+
let d, u = "";
|
|
409
|
+
const h = m(0), p = m(0), s = m(0), v = m({
|
|
410
|
+
top: 0,
|
|
411
|
+
scrollTop: 0,
|
|
412
|
+
scrollHeight: 0,
|
|
413
|
+
clientHeight: 0
|
|
414
|
+
}), H = m({
|
|
415
|
+
clientHeight: 0
|
|
416
|
+
}), B = g(() => !!p.value), F = g(() => v.value.scrollHeight > v.value.clientHeight), I = g(() => v.value.clientHeight - H.value.clientHeight), A = g(() => v.value.scrollHeight - v.value.clientHeight), j = g(() => Math.max(
|
|
417
|
+
v.value.clientHeight / v.value.scrollHeight,
|
|
418
|
+
0.05
|
|
419
|
+
)), D = g(() => j.value * v.value.clientHeight), $ = g(() => ({
|
|
420
|
+
willChange: "transform",
|
|
421
|
+
transform: `translate3d(0,${s.value}px,0)`,
|
|
422
|
+
height: n ? `${D.value}px` : void 0
|
|
423
|
+
}));
|
|
424
|
+
function z(T) {
|
|
425
|
+
p.value = T.clientY - t.value.getBoundingClientRect().top || 1, u = getComputedStyle(l.value).scrollBehavior, u === "smooth" && (l.value.style.scrollBehavior = "unset");
|
|
426
|
+
}
|
|
427
|
+
function M() {
|
|
428
|
+
l.value.style.scrollBehavior = u, p.value = 0, a();
|
|
429
|
+
}
|
|
430
|
+
function N() {
|
|
431
|
+
r.value = !1;
|
|
432
|
+
}
|
|
433
|
+
function Q() {
|
|
434
|
+
B.value || (r.value = !0);
|
|
435
|
+
}
|
|
436
|
+
function k(T) {
|
|
437
|
+
if (!B.value)
|
|
438
|
+
return;
|
|
439
|
+
let S = T.clientY - v.value.top - p.value;
|
|
440
|
+
S < 0 ? s.value = 0 : S >= I.value ? s.value = I.value : s.value = S, l.value.scrollTo({
|
|
441
|
+
top: s.value / I.value * A.value
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
function i() {
|
|
445
|
+
B.value || f();
|
|
446
|
+
}
|
|
447
|
+
function f() {
|
|
448
|
+
cancelAnimationFrame(d), d = requestAnimationFrame(w);
|
|
449
|
+
}
|
|
450
|
+
function w() {
|
|
451
|
+
l.value && (h.value = o.scrollTop?.value ?? l.value.scrollTop, s.value = h.value / A.value * I.value);
|
|
452
|
+
}
|
|
453
|
+
function b(T) {
|
|
454
|
+
let S = "addEventListener";
|
|
455
|
+
T === "add" ? S = "addEventListener" : S = "removeEventListener", t.value?.[S]("pointerdown", z, {
|
|
456
|
+
passive: !0
|
|
457
|
+
}), window[S]("pointermove", k, { passive: !0 }), window[S]("pointerup", M, { passive: !0 });
|
|
458
|
+
}
|
|
459
|
+
const _ = new MutationObserver((T) => {
|
|
460
|
+
T.map((xe) => xe.oldValue).join().includes("height") ? W() : H.value.clientHeight === 0 && c();
|
|
461
|
+
});
|
|
462
|
+
function W() {
|
|
463
|
+
v.value.top = l.value?.getBoundingClientRect().top ?? 0, v.value.scrollHeight = l.value?.scrollHeight ?? 0, v.value.clientHeight = l.value?.clientHeight ?? 0, n ? H.value.clientHeight = D.value : H.value.clientHeight = t.value?.clientHeight ?? 0;
|
|
464
|
+
}
|
|
465
|
+
function Oe() {
|
|
466
|
+
l.value && t.value ? (l.value.addEventListener("scroll", i, {
|
|
467
|
+
passive: !0
|
|
468
|
+
}), b("add"), _.observe(l.value, {
|
|
469
|
+
subtree: !0,
|
|
470
|
+
attributeOldValue: !0,
|
|
471
|
+
attributeFilter: ["style"]
|
|
472
|
+
}), setTimeout(() => {
|
|
473
|
+
W();
|
|
474
|
+
}, 100)) : console.error("useScrollBar:", "\u521D\u59CB\u5316\u5931\u8D25!", { containerEl: l, sliderEl: t });
|
|
475
|
+
}
|
|
476
|
+
return V(h, () => {
|
|
477
|
+
N(), a();
|
|
478
|
+
}), {
|
|
479
|
+
isScrollEnd: r,
|
|
480
|
+
isDragSlider: B,
|
|
481
|
+
scrollable: F,
|
|
482
|
+
sliderPos: $,
|
|
483
|
+
init: Oe,
|
|
484
|
+
modifySliderEventListener: b
|
|
485
|
+
};
|
|
486
|
+
}
|
|
487
|
+
const dt = (e) => ($e("data-v-9645dfb5"), e = e(), Le(), e), vt = /* @__PURE__ */ dt(() => /* @__PURE__ */ C("div", { class: "default-slider" }, null, -1)), pt = /* @__PURE__ */ K({
|
|
488
|
+
__name: "ScrollBar",
|
|
489
|
+
props: {
|
|
490
|
+
containerEl: null,
|
|
491
|
+
autoHide: { type: Boolean },
|
|
492
|
+
autoHeight: { type: Boolean },
|
|
493
|
+
performance: null
|
|
494
|
+
},
|
|
495
|
+
setup(e, { expose: l }) {
|
|
496
|
+
const t = e, n = !!Fe().default, o = m(null), r = g(() => t.containerEl), a = ft({
|
|
497
|
+
containerEl: r,
|
|
498
|
+
sliderEl: o,
|
|
499
|
+
autoHeight: n ? t.autoHeight : !0,
|
|
500
|
+
performance: t.performance
|
|
501
|
+
}), { scrollable: c, isScrollEnd: d, sliderPos: u } = a, h = t.autoHide ? g(() => !d.value) : g(() => c.value);
|
|
502
|
+
return G(() => {
|
|
503
|
+
ae(() => {
|
|
504
|
+
a.init();
|
|
505
|
+
});
|
|
506
|
+
}), ie(() => {
|
|
507
|
+
a.modifySliderEventListener("remove");
|
|
508
|
+
}), l({ uScrollBarReturn: a }), (p, s) => (E(), se(ue, null, {
|
|
509
|
+
default: ce(() => [
|
|
510
|
+
Ae(C("div", {
|
|
511
|
+
ref_key: "sliderRef",
|
|
512
|
+
ref: o,
|
|
513
|
+
class: "slider-wrapper",
|
|
514
|
+
style: X(y(u))
|
|
515
|
+
}, [
|
|
516
|
+
J(p.$slots, "default", {}, () => [
|
|
517
|
+
vt
|
|
518
|
+
], !0)
|
|
519
|
+
], 4), [
|
|
520
|
+
[De, y(h)]
|
|
521
|
+
])
|
|
522
|
+
]),
|
|
523
|
+
_: 3
|
|
524
|
+
}));
|
|
525
|
+
}
|
|
526
|
+
});
|
|
527
|
+
const Se = (e, l) => {
|
|
528
|
+
const t = e.__vccOpts || e;
|
|
529
|
+
for (const [n, o] of l)
|
|
530
|
+
t[n] = o;
|
|
531
|
+
return t;
|
|
532
|
+
}, Ot = /* @__PURE__ */ Se(pt, [["__scopeId", "data-v-9645dfb5"]]), ht = { class: "virtualListWrapper" }, gt = {
|
|
367
533
|
inheritAttrs: !1
|
|
368
|
-
},
|
|
369
|
-
...
|
|
534
|
+
}, mt = /* @__PURE__ */ K({
|
|
535
|
+
...gt,
|
|
370
536
|
__name: "VirtualList",
|
|
371
537
|
props: {
|
|
372
538
|
data: null,
|
|
373
539
|
itemHeight: null,
|
|
374
540
|
overscan: { default: 10 }
|
|
375
541
|
},
|
|
376
|
-
setup(e, { expose:
|
|
377
|
-
const t = e,
|
|
378
|
-
itemHeight: (
|
|
542
|
+
setup(e, { expose: l }) {
|
|
543
|
+
const t = e, n = it(Ve(t, "data"), {
|
|
544
|
+
itemHeight: (u) => t.itemHeight(t.data[u]),
|
|
379
545
|
overscan: t.overscan
|
|
380
|
-
}), { list:
|
|
381
|
-
return
|
|
382
|
-
vListReturn:
|
|
383
|
-
}), (
|
|
384
|
-
C("div",
|
|
385
|
-
onScrollPassive:
|
|
386
|
-
ref:
|
|
546
|
+
}), { list: o, containerProps: r, wrapperProps: a, innerProps: c, getItemHeightData: d } = n;
|
|
547
|
+
return l({
|
|
548
|
+
vListReturn: n
|
|
549
|
+
}), (u, h) => (E(), P("div", ht, [
|
|
550
|
+
C("div", Ke({
|
|
551
|
+
onScrollPassive: h[0] || (h[0] = (...p) => y(r).onScroll && y(r).onScroll(...p)),
|
|
552
|
+
ref: y(r).ref,
|
|
387
553
|
class: "virtualList"
|
|
388
|
-
},
|
|
389
|
-
C("div",
|
|
390
|
-
C("div",
|
|
391
|
-
(
|
|
392
|
-
key:
|
|
393
|
-
style:
|
|
394
|
-
height: `${
|
|
554
|
+
}, u.$attrs), [
|
|
555
|
+
C("div", Z(ee(y(a))), [
|
|
556
|
+
C("div", Z(ee(y(c))), [
|
|
557
|
+
(E(!0), P(je, null, ze(y(o), ({ index: p, data: s }) => (E(), P("div", {
|
|
558
|
+
key: p,
|
|
559
|
+
style: X({
|
|
560
|
+
height: `${y(d)(p).height}px`,
|
|
395
561
|
display: "flex"
|
|
396
562
|
})
|
|
397
563
|
}, [
|
|
398
|
-
|
|
399
|
-
data:
|
|
400
|
-
index:
|
|
564
|
+
J(u.$slots, "default", {
|
|
565
|
+
data: s,
|
|
566
|
+
index: p
|
|
401
567
|
}, void 0, !0)
|
|
402
568
|
], 4))), 128))
|
|
403
569
|
], 16)
|
|
@@ -406,27 +572,23 @@ const qe = ["xlink:href", "fill", "color"], ot = /* @__PURE__ */ T({
|
|
|
406
572
|
]));
|
|
407
573
|
}
|
|
408
574
|
});
|
|
409
|
-
const
|
|
410
|
-
const t = e.__vccOpts || e;
|
|
411
|
-
for (const [o, a] of n)
|
|
412
|
-
t[o] = a;
|
|
413
|
-
return t;
|
|
414
|
-
}, lt = /* @__PURE__ */ Xe(Je, [["__scopeId", "data-v-134ad8ab"]]);
|
|
575
|
+
const xt = /* @__PURE__ */ Se(mt, [["__scopeId", "data-v-134ad8ab"]]);
|
|
415
576
|
export {
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
577
|
+
Ot as ScrollBar,
|
|
578
|
+
St as SvgIcon,
|
|
579
|
+
xt as VirtualList,
|
|
580
|
+
ge as allSelectedKey,
|
|
581
|
+
st as closeDialogKey,
|
|
582
|
+
wt as dialogController,
|
|
583
|
+
ye as isAllSelectedKey,
|
|
584
|
+
he as isSelectedKey,
|
|
585
|
+
be as selectAllKey,
|
|
586
|
+
me as selectKey,
|
|
587
|
+
ve as toggleAllKey,
|
|
588
|
+
pe as toggleKey,
|
|
589
|
+
we as unselectAllKey,
|
|
590
|
+
_e as unselectKey,
|
|
591
|
+
yt as useSelectable,
|
|
592
|
+
_t as useSelectableInjectors,
|
|
593
|
+
it as useVirtualList
|
|
432
594
|
};
|
package/dist/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(d,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(d=typeof globalThis<"u"?globalThis:d||self,e(d.ui={},d.Vue))})(this,function(d,e){"use strict";var k;const O=typeof window<"u";O&&((k=window?.navigator)==null?void 0:k.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function D(t){return typeof t=="function"?t():e.unref(t)}function U(t){return t}function W(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}function q(t,o=!0){e.getCurrentInstance()?e.onMounted(t):o?t():e.nextTick(t)}function R(t){var o;const n=D(t);return(o=n?.$el)!=null?o:n}const G=O?window:void 0;O&&window.document,O&&window.navigator,O&&window.location;function Y(t,o=!1){const n=e.ref(),l=()=>n.value=Boolean(t());return l(),q(l,o),n}const S=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},v="__vueuse_ssr_handlers__";S[v]=S[v]||{},S[v];var T=Object.getOwnPropertySymbols,J=Object.prototype.hasOwnProperty,X=Object.prototype.propertyIsEnumerable,Z=(t,o)=>{var n={};for(var l in t)J.call(t,l)&&o.indexOf(l)<0&&(n[l]=t[l]);if(t!=null&&T)for(var l of T(t))o.indexOf(l)<0&&X.call(t,l)&&(n[l]=t[l]);return n};function ee(t,o,n={}){const l=n,{window:a=G}=l,i=Z(l,["window"]);let s;const p=Y(()=>a&&"ResizeObserver"in a),h=()=>{s&&(s.disconnect(),s=void 0)},f=e.watch(()=>R(t),m=>{h(),p.value&&a&&m&&(s=new ResizeObserver(o),s.observe(m,i))},{immediate:!0,flush:"post"}),g=()=>{h(),f()};return W(g),{isSupported:p,stop:g}}function te(t,o={width:0,height:0},n={}){const{box:l="content-box"}=n,a=e.ref(o.width),i=e.ref(o.height);return ee(t,([s])=>{const p=l==="border-box"?s.borderBoxSize:l==="content-box"?s.contentBoxSize:s.devicePixelContentBoxSize;p?(a.value=p.reduce((h,{inlineSize:f})=>h+f,0),i.value=p.reduce((h,{blockSize:f})=>h+f,0)):(a.value=s.contentRect.width,i.value=s.contentRect.height)},n),e.watch(()=>R(t),s=>{a.value=s?o.width:0,i.value=s?o.height:0}),{width:a,height:i}}var V;(function(t){t.UP="UP",t.RIGHT="RIGHT",t.DOWN="DOWN",t.LEFT="LEFT",t.NONE="NONE"})(V||(V={}));var ne=Object.defineProperty,$=Object.getOwnPropertySymbols,oe=Object.prototype.hasOwnProperty,le=Object.prototype.propertyIsEnumerable,L=(t,o,n)=>o in t?ne(t,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[o]=n,re=(t,o)=>{for(var n in o||(o={}))oe.call(o,n)&&L(t,n,o[n]);if($)for(var n of $(o))le.call(o,n)&&L(t,n,o[n]);return t};re({linear:U},{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 F(t,o){const{itemHeight:n,overscan:l=5}=o,a=e.ref(),i=te(a);let s;const p=e.shallowRef(t),h=e.ref(0),f=e.ref({start:0,end:10});let g=0;const m=e.ref([]),c=e.computed(()=>{let{sum:r,height:u}={sum:0,height:0};return p.value.map((w,_)=>(typeof n=="number"?u=n:u=n(_),r+=u,{height:u,sum:r}))}),b=e.computed(()=>_e(f.value.start)),z=e.computed(()=>typeof n=="number"?c.value.length*n:c.value.at(-1)?.sum||0),ge=e.computed(()=>{let r=m.value.length-l,u=Math.max(r-g,0);return m.value.slice(u,r)});e.onMounted(()=>{}),e.onUnmounted(()=>cancelAnimationFrame(s)),e.watch([i.width,i.height,p],([r,u])=>{(r||u)&&H()},{deep:!0});function H(){cancelAnimationFrame(s),s=requestAnimationFrame(M)}function M(){if(a.value){h.value=a.value.scrollTop,g=ye();let r=be(h.value),u=r+g+l;r=r-l,r=r<0?0:r,u=u>p.value.length?p.value.length:u,f.value={start:r,end:u},m.value=p.value.slice(r,u).map((w,_)=>({data:w,index:_+r}))}}function be(r){let u=Math.floor(c.value.length/16),w=-1,_=-1;for(let y=0;y<16;y++){if(c.value.at(u*y).sum>=r){w=Math.max(0,y-1);break}y===15&&(w=y)}w*=u;for(let y=w;y<c.value.length;y++)if(c.value[y].sum>=r){_=y;break}return Math.max(0,_)}function ye(){let r=0,u=0,w=we();for(let _=w;_<c.value.length&&(u+=c.value[_].height,!(u>=i.height.value));_++,r++);return r}function _e(r){if(typeof n=="number")return r*n;let u=c.value[r];return u.sum-u.height}function Q(r){return c.value.at(r)||{sum:0,height:0}}function we(){let r=f.value.start;return r>=l&&(r+=l),r}function Oe(r){if(a.value){const u=Q(r);a.value.scrollTop=u.sum-u.height,M()}}const Se=e.computed(()=>({style:{width:"100%",height:`${z.value}px`}})),ve=e.computed(()=>({style:{transform:`translate3d(0, ${b.value}px, 0)`,"will-change":"transform"}})),Ie={overflowY:"auto"};return{list:m,visiableList:ge,getItemHeightData:Q,totalHeight:z,clientHeight:i.height,scrollTo:Oe,scrollTop:h,containerProps:{ref:a,onScroll:()=>{H()},style:Ie},wrapperProps:Se,innerProps:ve}}const I=Symbol(),P=Symbol(),C=Symbol(),E=Symbol(),A=Symbol(),x=Symbol(),B=Symbol(),K=Symbol(),j=Symbol();function ae(){const{voidFn:t,boolFn:o,boolRef:n,arrayRef:l}={voidFn:b=>{},boolFn:b=>!1,boolRef:e.computed(()=>!1),arrayRef:e.computed(()=>[])},a=e.inject(E,l),i=e.inject(C,o),s=e.inject(K,n),p=e.inject(P,t),h=e.inject(I,t),f=e.inject(A,t),g=e.inject(x,t),m=e.inject(B,t),c=e.inject(j,t);return{selected:a,isSelected:i,isAllSelected:s,toggle:p,toggleAll:h,select:f,selectAll:g,unselect:m,unselectAll:c}}function ie(t,o){const n=e.ref({}),l=e.computed(()=>t.value.filter(c=>n.value[c[o]])),a=e.computed(()=>l.value.length!=0&&Object.keys(n.value).length==t.value.length);function i(){t.value.forEach(c=>{n.value[c[o]]=!0})}function s(){n.value={}}function p(c){c.forEach(b=>{n.value[b[o]]||(n.value[b[o]]=!0)})}function h(c){c.forEach(b=>{n.value[b[o]]&&delete n.value[b[o]]})}function f(c){return!!n.value[c[o]]}function g(c){c.forEach(b=>{f(b)?delete n.value[b[o]]:n.value[b[o]]=!0})}function m(){a.value?s():i()}return e.provide(I,m),e.provide(P,g),e.provide(C,f),e.provide(E,l),e.provide(A,p),e.provide(x,i),e.provide(B,h),e.provide(K,a),e.provide(j,s),{selected:l,select:p,selectAll:i,unselect:h,unselectAll:s,toggle:g,toggleAll:m,isSelected:f,isAllSelected:a}}const N=Symbol(),se=e.defineComponent({__name:"Dialog",props:{visiable:{type:Boolean,default:!1},closeOnClickOverlay:{type:Boolean,default:!0},dialogClass:{default:""}},emits:["update:visiable"],setup(t,{emit:o}){const n=t,l=()=>{n.closeOnClickOverlay&&o("update:visiable",!1)};return e.provide(N,()=>o("update:visiable",!1)),(a,i)=>(e.openBlock(),e.createBlock(e.Transition,{name:"modal"},{default:e.withCtx(()=>[t.visiable?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:l,class:"modal absolute inset-0 bottom-0 z-50 flex bg-stone-900 bg-opacity-50"},[e.createElementVNode("div",{onClick:i[0]||(i[0]=e.withModifiers(()=>{},["stop"])),class:e.normalizeClass(["dialog m-auto flex flex-col",t.dialogClass])},[e.renderSlot(a.$slots,"default")],2)])):e.createCommentVNode("",!0)]),_:3}))}});function ce(t){function o(n,l){const a=document.createElement("div"),i={setup(){return()=>e.h(se,{visiable:!0,"onUpdate:visiable":()=>{a?.remove()},...t},{default:()=>e.h(n,l)})}};return document.body.appendChild(a),e.render(e.h(i),a),{close:()=>a?.remove()}}return{create:o}}const ue=["xlink:href","fill","color"],de=e.defineComponent({__name:"SvgIcon",props:{name:null,prefix:{default:"icon"},color:{default:"#FFF"},width:null,height:null},setup(t){const o=t,n=e.computed(()=>`#${o.prefix}-${o.name}`),l=e.computed(()=>({width:o.width,height:o.height,aspectRatio:o.width&&o.height?void 0:"1/1"}));return(a,i)=>(e.openBlock(),e.createElementBlock("svg",{"aria-hidden":"",style:e.normalizeStyle(e.unref(l))},[e.createElementVNode("use",{"xlink:href":e.unref(n),fill:t.color,color:t.color},null,8,ue)],4))}}),fe={class:"virtualListWrapper"},pe={inheritAttrs:!1},me=e.defineComponent({...pe,__name:"VirtualList",props:{data:null,itemHeight:null,overscan:{default:10}},setup(t,{expose:o}){const n=t,l=F(e.toRef(n,"data"),{itemHeight:f=>n.itemHeight(n.data[f]),overscan:n.overscan}),{list:a,containerProps:i,wrapperProps:s,innerProps:p,getItemHeightData:h}=l;return o({vListReturn:l}),(f,g)=>(e.openBlock(),e.createElementBlock("div",fe,[e.createElementVNode("div",e.mergeProps({onScrollPassive:g[0]||(g[0]=(...m)=>e.unref(i).onScroll&&e.unref(i).onScroll(...m)),ref:e.unref(i).ref,class:"virtualList"},f.$attrs),[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(s))),[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(p))),[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),({index:m,data:c})=>(e.openBlock(),e.createElementBlock("div",{key:m,style:e.normalizeStyle({height:`${e.unref(h)(m).height}px`,display:"flex"})},[e.renderSlot(f.$slots,"default",{data:c,index:m},void 0,!0)],4))),128))],16)],16)],16)]))}}),Ce="",he=((t,o)=>{const n=t.__vccOpts||t;for(const[l,a]of o)n[l]=a;return n})(me,[["__scopeId","data-v-134ad8ab"]]);d.SvgIcon=de,d.VirtualList=he,d.allSelectedKey=E,d.closeDialogKey=N,d.dialogController=ce,d.isAllSelectedKey=K,d.isSelectedKey=C,d.selectAllKey=x,d.selectKey=A,d.toggleAllKey=I,d.toggleKey=P,d.unselectAllKey=j,d.unselectKey=B,d.useSelectable=ie,d.useSelectableInjectors=ae,d.useVirtualList=F,Object.defineProperties(d,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
1
|
+
(function(g,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(g=typeof globalThis<"u"?globalThis:g||self,e(g.ui={},g.Vue))})(this,function(g,e){"use strict";var G;const I=typeof window<"u";I&&((G=window?.navigator)==null?void 0:G.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function B(t){return typeof t=="function"?t():e.unref(t)}function J(t,n){function l(...o){t(()=>n.apply(this,o),{fn:n,thisArg:this,args:o})}return l}function ie(t,n={}){let l,o;return i=>{const a=B(t),d=B(n.maxWait);if(l&&clearTimeout(l),a<=0||d!==void 0&&d<=0)return o&&(clearTimeout(o),o=null),i();d&&!o&&(o=setTimeout(()=>{l&&clearTimeout(l),o=null,i()},d)),l=setTimeout(()=>{o&&clearTimeout(o),o=null,i()},a)}}function ae(t,n=!0,l=!0){let o=0,r,i=!0;const a=()=>{r&&(clearTimeout(r),r=void 0)};return p=>{const u=B(t),v=Date.now()-o;if(a(),u<=0)return o=Date.now(),p();v>u&&(l||!i)?(o=Date.now(),p()):n&&(r=setTimeout(()=>{o=Date.now(),i=!0,a(),p()},u)),!l&&!r&&(r=setTimeout(()=>i=!0,u)),i=!1}}function se(t){return t}function ce(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}function ue(t,n=200,l={}){return J(ie(n,l),t)}function de(t,n=200,l=!1,o=!0){return J(ae(n,l,o),t)}function fe(t,n=!0){e.getCurrentInstance()?e.onMounted(t):n?t():e.nextTick(t)}function X(t){var n;const l=B(t);return(n=l?.$el)!=null?n:l}const pe=I?window:void 0;I&&window.document,I&&window.navigator,I&&window.location;function he(t,n=!1){const l=e.ref(),o=()=>l.value=Boolean(t());return o(),fe(o,n),l}const R=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},A="__vueuse_ssr_handlers__";R[A]=R[A]||{},R[A];var Z=Object.getOwnPropertySymbols,me=Object.prototype.hasOwnProperty,ge=Object.prototype.propertyIsEnumerable,ve=(t,n)=>{var l={};for(var o in t)me.call(t,o)&&n.indexOf(o)<0&&(l[o]=t[o]);if(t!=null&&Z)for(var o of Z(t))n.indexOf(o)<0&&ge.call(t,o)&&(l[o]=t[o]);return l};function be(t,n,l={}){const o=l,{window:r=pe}=o,i=ve(o,["window"]);let a;const d=he(()=>r&&"ResizeObserver"in r),p=()=>{a&&(a.disconnect(),a=void 0)},u=e.watch(()=>X(t),m=>{p(),d.value&&r&&m&&(a=new ResizeObserver(n),a.observe(m,i))},{immediate:!0,flush:"post"}),v=()=>{p(),u()};return ce(v),{isSupported:d,stop:v}}function ye(t,n={width:0,height:0},l={}){const{box:o="content-box"}=l,r=e.ref(n.width),i=e.ref(n.height);return be(t,([a])=>{const d=o==="border-box"?a.borderBoxSize:o==="content-box"?a.contentBoxSize:a.devicePixelContentBoxSize;d?(r.value=d.reduce((p,{inlineSize:u})=>p+u,0),i.value=d.reduce((p,{blockSize:u})=>p+u,0)):(r.value=a.contentRect.width,i.value=a.contentRect.height)},l),e.watch(()=>X(t),a=>{r.value=a?n.width:0,i.value=a?n.height:0}),{width:r,height:i}}var ee;(function(t){t.UP="UP",t.RIGHT="RIGHT",t.DOWN="DOWN",t.LEFT="LEFT",t.NONE="NONE"})(ee||(ee={}));var _e=Object.defineProperty,te=Object.getOwnPropertySymbols,we=Object.prototype.hasOwnProperty,Se=Object.prototype.propertyIsEnumerable,le=(t,n,l)=>n in t?_e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[n]=l,Oe=(t,n)=>{for(var l in n||(n={}))we.call(n,l)&&le(t,l,n[l]);if(te)for(var l of te(n))Se.call(n,l)&&le(t,l,n[l]);return t};Oe({linear:se},{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 ne(t,n){const{itemHeight:l,overscan:o=5}=n,r=e.ref(),i=ye(r);let a;const d=e.shallowRef(t),p=e.ref(0),u=e.ref({start:0,end:10});let v=0;const m=e.ref([]),c=e.computed(()=>{let{sum:s,height:f}={sum:0,height:0};return d.value.map((_,b)=>(typeof l=="number"?f=l:f=l(b),s+=f,{height:f,sum:s}))}),h=e.computed(()=>P(u.value.start)),S=e.computed(()=>typeof l=="number"?c.value.length*l:c.value.at(-1)?.sum||0),T=e.computed(()=>{let s=m.value.length-o,f=Math.max(s-v,0);return m.value.slice(f,s)});e.onMounted(()=>{}),e.onUnmounted(()=>cancelAnimationFrame(a)),e.watch([i.width,i.height,d],([s,f])=>{(s||f)&&H()},{deep:!0});function H(){cancelAnimationFrame(a),a=requestAnimationFrame(O)}function O(){if(r.value){p.value=r.value.scrollTop,v=M();let s=C(p.value),f=s+v+o;s=s-o,s=s<0?0:s,f=f>d.value.length?d.value.length:f,u.value={start:s,end:f},m.value=d.value.slice(s,f).map((_,b)=>({data:_,index:b+s}))}}function C(s){let f=Math.floor(c.value.length/16),_=-1,b=-1;for(let y=0;y<16;y++){if(c.value.at(f*y).sum>=s){_=Math.max(0,y-1);break}y===15&&(_=y)}_*=f;for(let y=_;y<c.value.length;y++)if(c.value[y].sum>=s){b=y;break}return Math.max(0,b)}function M(){let s=0,f=0,_=z();for(let b=_;b<c.value.length&&(s++,f+=c.value[b].height,!(f>=i.height.value));b++);return s}function P(s){if(typeof l=="number")return s*l;let f=c.value[s];return f.sum-f.height}function x(s){return c.value.at(s)||{sum:0,height:0}}function z(){let s=u.value.start;return s>=o&&(s+=o),s}function Q(s){if(r.value){const f=x(s);r.value.scrollTop=f.sum-f.height,O()}}const U=e.computed(()=>({style:{width:"100%",height:`${S.value}px`}})),W=e.computed(()=>({style:{transform:`translate3d(0, ${h.value}px, 0)`,"will-change":"transform"}})),q={overflowY:"auto"};return{list:m,visiableList:T,getItemHeightData:x,totalHeight:S,clientHeight:i.height,scrollTo:Q,scrollTop:p,containerProps:{ref:r,onScroll:()=>{H()},style:q},wrapperProps:U,innerProps:W}}const D=Symbol(),F=Symbol(),L=Symbol(),j=Symbol(),K=Symbol(),V=Symbol(),$=Symbol(),k=Symbol(),N=Symbol();function Ee(){const{voidFn:t,boolFn:n,boolRef:l,arrayRef:o}={voidFn:h=>{},boolFn:h=>!1,boolRef:e.computed(()=>!1),arrayRef:e.computed(()=>[])},r=e.inject(j,o),i=e.inject(L,n),a=e.inject(k,l),d=e.inject(F,t),p=e.inject(D,t),u=e.inject(K,t),v=e.inject(V,t),m=e.inject($,t),c=e.inject(N,t);return{selected:r,isSelected:i,isAllSelected:a,toggle:d,toggleAll:p,select:u,selectAll:v,unselect:m,unselectAll:c}}function Te(t,n){const l=e.ref({}),o=e.computed(()=>t.value.filter(c=>l.value[c[n]])),r=e.computed(()=>o.value.length!=0&&Object.keys(l.value).length==t.value.length);function i(){t.value.forEach(c=>{l.value[c[n]]=!0})}function a(){l.value={}}function d(c){c.forEach(h=>{l.value[h[n]]||(l.value[h[n]]=!0)})}function p(c){c.forEach(h=>{l.value[h[n]]&&delete l.value[h[n]]})}function u(c){return!!l.value[c[n]]}function v(c){c.forEach(h=>{u(h)?delete l.value[h[n]]:l.value[h[n]]=!0})}function m(){r.value?a():i()}return e.provide(D,m),e.provide(F,v),e.provide(L,u),e.provide(j,o),e.provide(K,d),e.provide(V,i),e.provide($,p),e.provide(k,r),e.provide(N,a),{selected:o,select:d,selectAll:i,unselect:p,unselectAll:a,toggle:v,toggleAll:m,isSelected:u,isAllSelected:r}}const oe=Symbol(),Ie=e.defineComponent({__name:"Dialog",props:{visiable:{type:Boolean,default:!1},closeOnClickOverlay:{type:Boolean,default:!0},dialogClass:{default:""}},emits:["update:visiable"],setup(t,{emit:n}){const l=t,o=()=>{l.closeOnClickOverlay&&n("update:visiable",!1)};return e.provide(oe,()=>n("update:visiable",!1)),(r,i)=>(e.openBlock(),e.createBlock(e.Transition,{name:"modal"},{default:e.withCtx(()=>[t.visiable?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:o,class:"modal absolute inset-0 bottom-0 z-50 flex bg-stone-900 bg-opacity-50"},[e.createElementVNode("div",{onClick:i[0]||(i[0]=e.withModifiers(()=>{},["stop"])),class:e.normalizeClass(["dialog m-auto flex flex-col",t.dialogClass])},[e.renderSlot(r.$slots,"default")],2)])):e.createCommentVNode("",!0)]),_:3}))}});function Be(t){function n(l,o){const r=document.createElement("div"),i={setup(){return()=>e.h(Ie,{visiable:!0,"onUpdate:visiable":()=>{r?.remove()},...t},{default:()=>e.h(l,o)})}};return document.body.appendChild(r),e.render(e.h(i),r),{close:()=>r?.remove()}}return{create:n}}const He=["xlink:href","fill","color"],Ce=e.defineComponent({__name:"SvgIcon",props:{name:null,prefix:{default:"icon"},color:{default:"#FFF"},width:null,height:null},setup(t){const n=t,l=e.computed(()=>`#${n.prefix}-${n.name}`),o=e.computed(()=>({width:n.width,height:n.height,aspectRatio:n.width&&n.height?void 0:"1/1"}));return(r,i)=>(e.openBlock(),e.createElementBlock("svg",{"aria-hidden":"",style:e.normalizeStyle(e.unref(o))},[e.createElementVNode("use",{"xlink:href":e.unref(l),fill:t.color,color:t.color},null,8,He)],4))}});function Pe(t){const{containerEl:n,sliderEl:l,autoHeight:o,performance:r={}}=t,i=e.ref(!0),a=ue(W,1e3),d=de(Y,1e3,!0,!0);let p,u="";const v=e.ref(0),m=e.ref(0),c=e.ref(0),h=e.ref({top:0,scrollTop:0,scrollHeight:0,clientHeight:0}),S=e.ref({clientHeight:0}),T=e.computed(()=>!!m.value),H=e.computed(()=>h.value.scrollHeight>h.value.clientHeight),O=e.computed(()=>h.value.clientHeight-S.value.clientHeight),C=e.computed(()=>h.value.scrollHeight-h.value.clientHeight),M=e.computed(()=>Math.max(h.value.clientHeight/h.value.scrollHeight,.05)),P=e.computed(()=>M.value*h.value.clientHeight),x=e.computed(()=>({willChange:"transform",transform:`translate3d(0,${c.value}px,0)`,height:o?`${P.value}px`:void 0}));function z(E){m.value=E.clientY-l.value.getBoundingClientRect().top||1,u=getComputedStyle(n.value).scrollBehavior,u==="smooth"&&(n.value.style.scrollBehavior="unset")}function Q(){n.value.style.scrollBehavior=u,m.value=0,a()}function U(){i.value=!1}function W(){T.value||(i.value=!0)}function q(E){if(!T.value)return;let w=E.clientY-h.value.top-m.value;w<0?c.value=0:w>=O.value?c.value=O.value:c.value=w,n.value.scrollTo({top:c.value/O.value*C.value})}function s(){T.value||f()}function f(){cancelAnimationFrame(p),p=requestAnimationFrame(_)}function _(){n.value&&(v.value=r.scrollTop?.value??n.value.scrollTop,c.value=v.value/C.value*O.value)}function b(E){let w="addEventListener";E==="add"?w="addEventListener":w="removeEventListener",l.value?.[w]("pointerdown",z,{passive:!0}),window[w]("pointermove",q,{passive:!0}),window[w]("pointerup",Q,{passive:!0})}const y=new MutationObserver(E=>{E.map(Ve=>Ve.oldValue).join().includes("height")?Y():S.value.clientHeight===0&&d()});function Y(){h.value.top=n.value?.getBoundingClientRect().top??0,h.value.scrollHeight=n.value?.scrollHeight??0,h.value.clientHeight=n.value?.clientHeight??0,o?S.value.clientHeight=P.value:S.value.clientHeight=l.value?.clientHeight??0}function Ke(){n.value&&l.value?(n.value.addEventListener("scroll",s,{passive:!0}),b("add"),y.observe(n.value,{subtree:!0,attributeOldValue:!0,attributeFilter:["style"]}),setTimeout(()=>{Y()},100)):console.error("useScrollBar:","\u521D\u59CB\u5316\u5931\u8D25!",{containerEl:n,sliderEl:l})}return e.watch(v,()=>{U(),a()}),{isScrollEnd:i,isDragSlider:T,scrollable:H,sliderPos:x,init:Ke,modifySliderEventListener:b}}const xe=(t=>(e.pushScopeId("data-v-9645dfb5"),t=t(),e.popScopeId(),t))(()=>e.createElementVNode("div",{class:"default-slider"},null,-1)),Re=e.defineComponent({__name:"ScrollBar",props:{containerEl:null,autoHide:{type:Boolean},autoHeight:{type:Boolean},performance:null},setup(t,{expose:n}){const l=t,o=!!e.useSlots().default,r=e.ref(null),i=e.computed(()=>l.containerEl),a=Pe({containerEl:i,sliderEl:r,autoHeight:o?l.autoHeight:!0,performance:l.performance}),{scrollable:d,isScrollEnd:p,sliderPos:u}=a,v=l.autoHide?e.computed(()=>!p.value):e.computed(()=>d.value);return e.onMounted(()=>{e.nextTick(()=>{a.init()})}),e.onUnmounted(()=>{a.modifySliderEventListener("remove")}),n({uScrollBarReturn:a}),(m,c)=>(e.openBlock(),e.createBlock(e.Transition,null,{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"sliderRef",ref:r,class:"slider-wrapper",style:e.normalizeStyle(e.unref(u))},[e.renderSlot(m.$slots,"default",{},()=>[xe],!0)],4),[[e.vShow,e.unref(v)]])]),_:3}))}}),Ne="",re=(t,n)=>{const l=t.__vccOpts||t;for(const[o,r]of n)l[o]=r;return l},Ae=re(Re,[["__scopeId","data-v-9645dfb5"]]),De={class:"virtualListWrapper"},Fe={inheritAttrs:!1},Le=e.defineComponent({...Fe,__name:"VirtualList",props:{data:null,itemHeight:null,overscan:{default:10}},setup(t,{expose:n}){const l=t,o=ne(e.toRef(l,"data"),{itemHeight:u=>l.itemHeight(l.data[u]),overscan:l.overscan}),{list:r,containerProps:i,wrapperProps:a,innerProps:d,getItemHeightData:p}=o;return n({vListReturn:o}),(u,v)=>(e.openBlock(),e.createElementBlock("div",De,[e.createElementVNode("div",e.mergeProps({onScrollPassive:v[0]||(v[0]=(...m)=>e.unref(i).onScroll&&e.unref(i).onScroll(...m)),ref:e.unref(i).ref,class:"virtualList"},u.$attrs),[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(a))),[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(d))),[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),({index:m,data:c})=>(e.openBlock(),e.createElementBlock("div",{key:m,style:e.normalizeStyle({height:`${e.unref(p)(m).height}px`,display:"flex"})},[e.renderSlot(u.$slots,"default",{data:c,index:m},void 0,!0)],4))),128))],16)],16)],16)]))}}),Me="",je=re(Le,[["__scopeId","data-v-134ad8ab"]]);g.ScrollBar=Ae,g.SvgIcon=Ce,g.VirtualList=je,g.allSelectedKey=j,g.closeDialogKey=oe,g.dialogController=Be,g.isAllSelectedKey=k,g.isSelectedKey=L,g.selectAllKey=V,g.selectKey=K,g.toggleAllKey=D,g.toggleKey=F,g.unselectAllKey=N,g.unselectKey=$,g.useSelectable=Te,g.useSelectableInjectors=Ee,g.useVirtualList=ne,Object.defineProperties(g,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.virtualListWrapper[data-v-134ad8ab]{width:100%;height:100%;position:relative}.virtualList[data-v-134ad8ab] ::-webkit-scrollbar{display:none}.virtualList[data-v-134ad8ab]{width:100%;height:100%;position:absolute;overflow-y:auto;scroll-behavior:smooth;user-select:none}.virtualList[data-v-134ad8ab]::-webkit-scrollbar{display:none}
|
|
1
|
+
.v-enter-active[data-v-9645dfb5]{opacity:0}.v-leave-active[data-v-9645dfb5]{transition:all .15s ease-out}.v-leave-to[data-v-9645dfb5]{opacity:0}.slider-wrapper[data-v-9645dfb5]{z-index:100;position:absolute;right:0;touch-action:none}.default-slider[data-v-9645dfb5]{width:6px;height:100%;background-color:#0003;border-radius:3px;margin-right:3px}.virtualListWrapper[data-v-134ad8ab]{width:100%;height:100%;position:relative}.virtualList[data-v-134ad8ab] ::-webkit-scrollbar{display:none}.virtualList[data-v-134ad8ab]{width:100%;height:100%;position:absolute;overflow-y:auto;scroll-behavior:smooth;user-select:none}.virtualList[data-v-134ad8ab]::-webkit-scrollbar{display:none}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,4 +2,5 @@ export * from "./useVirtualList";
|
|
|
2
2
|
export * from "./useSelectable";
|
|
3
3
|
export * from "./dialog";
|
|
4
4
|
export { default as SvgIcon } from "./svgIcon/SvgIcon.vue";
|
|
5
|
+
export { default as ScrollBar } from "./scroll-bar";
|
|
5
6
|
export { default as VirtualList } from "./useVirtualList/VirtualList.vue";
|