@dazhicheng/ui 1.4.14 → 1.4.16
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/components/tt-form-adapter/component/index.d.ts +1 -1
- package/dist/components/tt-form-adapter/component/index.d.ts.map +1 -1
- package/dist/components/tt-form-adapter/index.d.ts.map +1 -1
- package/dist/components/tt-icon/index.d.ts +6 -6
- package/dist/components/tt-icon/index.d.ts.map +1 -1
- package/dist/components/tt-icon/index.vue.d.ts +3 -3
- package/dist/components/tt-icon/index.vue.d.ts.map +1 -1
- package/dist/components/tt-image/src/components/ImageViewer.d.ts +1 -1
- package/dist/components/tt-modal/src/RenderModal.vue.d.ts.map +1 -1
- package/dist/components/tt-table/src/Table.vue.d.ts +7 -9
- package/dist/components/tt-table/src/Table.vue.d.ts.map +1 -1
- package/dist/components/tt-table/src/components/TableColumnModal.vue.d.ts +27 -0
- package/dist/components/tt-table/src/components/TableColumnModal.vue.d.ts.map +1 -0
- package/dist/components/tt-table/src/components/TableToobalTools.vue.d.ts +1552 -7
- package/dist/components/tt-table/src/components/TableToobalTools.vue.d.ts.map +1 -1
- package/dist/components/tt-table/src/hooks/useColumns.d.ts +0 -4
- package/dist/components/tt-table/src/hooks/useColumns.d.ts.map +1 -1
- package/dist/components/tt-table/src/hooks/useCustomColumns.d.ts +20 -0
- package/dist/components/tt-table/src/hooks/useCustomColumns.d.ts.map +1 -0
- package/dist/components/tt-table/src/hooks/useTable.d.ts.map +1 -1
- package/dist/components/tt-table/src/hooks/useTableFormEvent.d.ts +2 -3
- package/dist/components/tt-table/src/hooks/useTableFormEvent.d.ts.map +1 -1
- package/dist/components/tt-table/src/hooks/useTableRender.d.ts +10 -1
- package/dist/components/tt-table/src/hooks/useTableRender.d.ts.map +1 -1
- package/dist/components/tt-table/src/props.d.ts +1 -1
- package/dist/components/tt-table/src/toolProps.d.ts +0 -60
- package/dist/components/tt-table/src/toolProps.d.ts.map +1 -1
- package/dist/components/tt-table/src/types/table.d.ts +13 -8
- package/dist/components/tt-table/src/types/table.d.ts.map +1 -1
- package/dist/components/tt-table/src/types/tableTools.d.ts +1 -45
- package/dist/components/tt-table/src/types/tableTools.d.ts.map +1 -1
- package/dist/components/tt-table/src/utils/table-api.d.ts +1 -1
- package/dist/components/types.d.ts +9 -0
- package/dist/components/types.d.ts.map +1 -1
- package/dist/{css-CKklk3nV.js → css-BizbCFH3.js} +1 -0
- package/dist/css-DhJ-Bn4t.js +4 -0
- package/dist/{event-CRLYHSpv.js → event-BpZD5QYv.js} +1 -1
- package/dist/{icon-D7uEJbj1.js → icon-C8mOBgGn.js} +2 -2
- package/dist/{index-BIBy0DdB.js → index-Ay_e-Mu_.js} +5 -5
- package/dist/{index-lcTqqAHV.js → index-BQ2KedE7.js} +8 -8
- package/dist/{index-BD10znQT.js → index-BR3sT_rT.js} +5 -5
- package/dist/{index-BPAF_VnM.js → index-BY-Xyp5q.js} +7 -7
- package/dist/{index-CBTogxcz.js → index-BiA7AsUl.js} +1 -1
- package/dist/{index-CPbbaIQc.js → index-BsKcOBVC.js} +20 -20
- package/dist/index-By3DWh_m.js +3559 -0
- package/dist/{index-Ctbxly20.js → index-CDw4vJ_J.js} +5 -5
- package/dist/{index-LwQmtsvY.js → index-CQEli-Vx.js} +1 -1
- package/dist/index-D1S5IgHw.js +2502 -0
- package/dist/{index-oWr7FvHH.js → index-DARbDgFW.js} +6 -6
- package/dist/{index-BwUPEK34.js → index-DftzFo8M.js} +2 -2
- package/dist/index-DtD9KW7p.js +436 -0
- package/dist/{index-YaBtguVL.js → index-HEvFEYVF.js} +11762 -10474
- package/dist/{index-D0IHErAs.js → index-iDdpdLyC.js} +22 -16
- package/dist/{index-Bod7doXW.js → index-kCYWgqco.js} +121 -121
- package/dist/{index-CluCT7Mm.js → index-qhJRQdTJ.js} +1 -1
- package/dist/{index-C-7vG864.js → index-tQY6pN96.js} +2 -2
- package/dist/{index-BXG36tZ-.js → index-zMyxrv4a.js} +6 -6
- package/dist/index.js +11 -11
- package/dist/panel-time-pick.vue2-3mXww5KZ.js +1603 -0
- package/dist/style.css +1 -1
- package/dist/{use-form-common-props-D8bK4KUX.js → use-form-common-props-Co2xJKSS.js} +1 -1
- package/dist/{use-form-item-Bzpa4RlP.js → use-form-item-BHXTK2Pf.js} +2 -2
- package/dist/useProps-m8gnZipa.js +215 -0
- package/dist/{util-DjnYC4OO.js → util-BFu351R4.js} +6 -6
- package/package.json +4 -3
- package/dist/components/tt-table/src/TableForm.vue.d.ts +0 -150
- package/dist/components/tt-table/src/TableForm.vue.d.ts.map +0 -1
- package/dist/components/tt-table/src/hooks/useFullscreen.d.ts +0 -12
- package/dist/components/tt-table/src/hooks/useFullscreen.d.ts.map +0 -1
- package/dist/index-Dz7KMhiX.js +0 -2700
- package/dist/panel-time-pick.vue2-D2Vh8Qtc.js +0 -2026
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { l as ft, d as D } from "./index-
|
|
2
|
-
import { b as ut, a as Y, u as lt, h as ct, j as tt, w as ht, o as dt } from "./use-form-common-props-
|
|
3
|
-
import { i as W } from "./icon-
|
|
1
|
+
import { l as ft, d as D } from "./index-HEvFEYVF.js";
|
|
2
|
+
import { b as ut, a as Y, u as lt, h as ct, j as tt, w as ht, o as dt } from "./use-form-common-props-Co2xJKSS.js";
|
|
3
|
+
import { i as W } from "./icon-C8mOBgGn.js";
|
|
4
4
|
import { getCurrentInstance as gt, inject as et, ref as rt, computed as g, useSlots as bt, Text as vt, defineComponent as at, createBlock as B, openBlock as x, resolveDynamicComponent as N, mergeProps as pt, unref as v, withCtx as C, createElementBlock as $, createCommentVNode as U, Fragment as mt, renderSlot as _, normalizeClass as z, provide as yt, reactive as kt, toRef as q } from "vue";
|
|
5
|
-
import { E as K } from "./index-
|
|
6
|
-
import { u as xt } from "./index-
|
|
7
|
-
import { u as St } from "./use-form-item-
|
|
5
|
+
import { E as K } from "./index-iDdpdLyC.js";
|
|
6
|
+
import { u as xt } from "./index-qhJRQdTJ.js";
|
|
7
|
+
import { u as St } from "./use-form-item-BHXTK2Pf.js";
|
|
8
8
|
const Mt = [
|
|
9
9
|
"default",
|
|
10
10
|
"primary",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isClient as g } from "@vueuse/core";
|
|
2
|
-
import { a as x } from "./index-
|
|
3
|
-
import { i as C } from "./use-form-common-props-
|
|
2
|
+
import { a as x } from "./index-HEvFEYVF.js";
|
|
3
|
+
import { i as C } from "./use-form-common-props-Co2xJKSS.js";
|
|
4
4
|
const s = /* @__PURE__ */ new Map();
|
|
5
5
|
if (g) {
|
|
6
6
|
let e;
|
|
@@ -0,0 +1,436 @@
|
|
|
1
|
+
import { b as U, e as P, a as re, t as se, d as G, w as ne } from "./use-form-common-props-Co2xJKSS.js";
|
|
2
|
+
import { u as ie } from "./index-BiA7AsUl.js";
|
|
3
|
+
import { defineComponent as V, inject as te, ref as f, computed as C, onBeforeUnmount as ce, toRef as X, createBlock as $, openBlock as B, Transition as ue, unref as k, withCtx as le, withDirectives as ve, createElementVNode as j, withModifiers as fe, normalizeClass as O, normalizeStyle as I, vShow as me, createElementBlock as ae, Fragment as de, createVNode as Y, watch as F, nextTick as J, provide as pe, reactive as be, onActivated as he, onMounted as ge, onUpdated as ye, createCommentVNode as Se, resolveDynamicComponent as we, renderSlot as ze } from "vue";
|
|
4
|
+
import { useEventListener as K, isClient as Ee, useResizeObserver as Q } from "@vueuse/core";
|
|
5
|
+
import { B as xe, r as He, G as R } from "./util-BFu351R4.js";
|
|
6
|
+
import { d as oe, o as Te } from "./index-HEvFEYVF.js";
|
|
7
|
+
import { a as Z } from "./index-iDdpdLyC.js";
|
|
8
|
+
const Re = U({
|
|
9
|
+
/**
|
|
10
|
+
* @description trigger distance(px)
|
|
11
|
+
*/
|
|
12
|
+
distance: {
|
|
13
|
+
type: Number,
|
|
14
|
+
default: 0
|
|
15
|
+
},
|
|
16
|
+
/**
|
|
17
|
+
* @description height of scrollbar
|
|
18
|
+
*/
|
|
19
|
+
height: {
|
|
20
|
+
type: [String, Number],
|
|
21
|
+
default: ""
|
|
22
|
+
},
|
|
23
|
+
/**
|
|
24
|
+
* @description max height of scrollbar
|
|
25
|
+
*/
|
|
26
|
+
maxHeight: {
|
|
27
|
+
type: [String, Number],
|
|
28
|
+
default: ""
|
|
29
|
+
},
|
|
30
|
+
/**
|
|
31
|
+
* @description whether to use the native scrollbar
|
|
32
|
+
*/
|
|
33
|
+
native: Boolean,
|
|
34
|
+
/**
|
|
35
|
+
* @description style of wrap
|
|
36
|
+
*/
|
|
37
|
+
wrapStyle: {
|
|
38
|
+
type: re([String, Object, Array]),
|
|
39
|
+
default: ""
|
|
40
|
+
},
|
|
41
|
+
/**
|
|
42
|
+
* @description class of wrap
|
|
43
|
+
*/
|
|
44
|
+
wrapClass: {
|
|
45
|
+
type: [String, Array],
|
|
46
|
+
default: ""
|
|
47
|
+
},
|
|
48
|
+
/**
|
|
49
|
+
* @description class of view
|
|
50
|
+
*/
|
|
51
|
+
viewClass: {
|
|
52
|
+
type: [String, Array],
|
|
53
|
+
default: ""
|
|
54
|
+
},
|
|
55
|
+
/**
|
|
56
|
+
* @description style of view
|
|
57
|
+
*/
|
|
58
|
+
viewStyle: {
|
|
59
|
+
type: [String, Array, Object],
|
|
60
|
+
default: ""
|
|
61
|
+
},
|
|
62
|
+
/**
|
|
63
|
+
* @description do not respond to container size changes, if the container size does not change, it is better to set it to optimize performance
|
|
64
|
+
*/
|
|
65
|
+
noresize: Boolean,
|
|
66
|
+
// 如果 container 尺寸不会发生变化,最好设置它可以优化性能
|
|
67
|
+
/**
|
|
68
|
+
* @description element tag of the view
|
|
69
|
+
*/
|
|
70
|
+
tag: {
|
|
71
|
+
type: String,
|
|
72
|
+
default: "div"
|
|
73
|
+
},
|
|
74
|
+
/**
|
|
75
|
+
* @description always show
|
|
76
|
+
*/
|
|
77
|
+
always: Boolean,
|
|
78
|
+
/**
|
|
79
|
+
* @description minimum size of scrollbar
|
|
80
|
+
*/
|
|
81
|
+
minSize: {
|
|
82
|
+
type: Number,
|
|
83
|
+
default: 20
|
|
84
|
+
},
|
|
85
|
+
/**
|
|
86
|
+
* @description Wrap tabindex
|
|
87
|
+
*/
|
|
88
|
+
tabindex: {
|
|
89
|
+
type: [String, Number],
|
|
90
|
+
default: void 0
|
|
91
|
+
},
|
|
92
|
+
/**
|
|
93
|
+
* @description id of view
|
|
94
|
+
*/
|
|
95
|
+
id: String,
|
|
96
|
+
/**
|
|
97
|
+
* @description role of view
|
|
98
|
+
*/
|
|
99
|
+
role: String,
|
|
100
|
+
...ie(["ariaLabel", "ariaOrientation"])
|
|
101
|
+
}), Ce = {
|
|
102
|
+
"end-reached": (r) => ["left", "right", "top", "bottom"].includes(r),
|
|
103
|
+
scroll: ({
|
|
104
|
+
scrollTop: r,
|
|
105
|
+
scrollLeft: h
|
|
106
|
+
}) => [r, h].every(P)
|
|
107
|
+
}, Le = U({
|
|
108
|
+
always: {
|
|
109
|
+
type: Boolean,
|
|
110
|
+
default: !0
|
|
111
|
+
},
|
|
112
|
+
minSize: {
|
|
113
|
+
type: Number,
|
|
114
|
+
required: !0
|
|
115
|
+
}
|
|
116
|
+
}), Ne = U({
|
|
117
|
+
vertical: Boolean,
|
|
118
|
+
size: String,
|
|
119
|
+
move: Number,
|
|
120
|
+
ratio: {
|
|
121
|
+
type: Number,
|
|
122
|
+
required: !0
|
|
123
|
+
},
|
|
124
|
+
always: Boolean
|
|
125
|
+
}), q = /* @__PURE__ */ Symbol(
|
|
126
|
+
"scrollbarContextKey"
|
|
127
|
+
), Pe = "Thumb";
|
|
128
|
+
var ee = /* @__PURE__ */ V({
|
|
129
|
+
__name: "thumb",
|
|
130
|
+
props: Ne,
|
|
131
|
+
setup(r) {
|
|
132
|
+
const h = r, n = te(q), a = oe("scrollbar");
|
|
133
|
+
n || se(Pe, "can not inject scrollbar context");
|
|
134
|
+
const m = f(), u = f(), S = f({}), g = f(!1);
|
|
135
|
+
let p = !1, i = !1, d = 0, v = 0, o = Ee ? document.onselectstart : null;
|
|
136
|
+
const e = C(() => xe[h.vertical ? "vertical" : "horizontal"]), l = C(
|
|
137
|
+
() => He({
|
|
138
|
+
size: h.size,
|
|
139
|
+
move: h.move,
|
|
140
|
+
bar: e.value
|
|
141
|
+
})
|
|
142
|
+
), z = C(
|
|
143
|
+
() => (
|
|
144
|
+
// offsetRatioX = original width of thumb / current width of thumb / ratioX
|
|
145
|
+
// offsetRatioY = original height of thumb / current height of thumb / ratioY
|
|
146
|
+
// instance height = wrap height - GAP
|
|
147
|
+
m.value[e.value.offset] ** 2 / n.wrapElement[e.value.scrollSize] / h.ratio / u.value[e.value.offset]
|
|
148
|
+
)
|
|
149
|
+
), w = (c) => {
|
|
150
|
+
var b;
|
|
151
|
+
if (c.stopPropagation(), c.ctrlKey || [1, 2].includes(c.button)) return;
|
|
152
|
+
(b = window.getSelection()) == null || b.removeAllRanges(), T(c);
|
|
153
|
+
const E = c.currentTarget;
|
|
154
|
+
E && (S.value[e.value.axis] = E[e.value.offset] - (c[e.value.client] - E.getBoundingClientRect()[e.value.direction]));
|
|
155
|
+
}, H = (c) => {
|
|
156
|
+
if (!u.value || !m.value || !n.wrapElement) return;
|
|
157
|
+
const b = Math.abs(
|
|
158
|
+
c.target.getBoundingClientRect()[e.value.direction] - c[e.value.client]
|
|
159
|
+
), E = u.value[e.value.offset] / 2, y = (b - E) * 100 * z.value / m.value[e.value.offset];
|
|
160
|
+
n.wrapElement[e.value.scroll] = y * n.wrapElement[e.value.scrollSize] / 100;
|
|
161
|
+
}, T = (c) => {
|
|
162
|
+
c.stopImmediatePropagation(), p = !0, d = n.wrapElement.scrollHeight, v = n.wrapElement.scrollWidth, document.addEventListener("mousemove", A), document.addEventListener("mouseup", L), o = document.onselectstart, document.onselectstart = () => !1;
|
|
163
|
+
}, A = (c) => {
|
|
164
|
+
if (!m.value || !u.value || p === !1) return;
|
|
165
|
+
const b = S.value[e.value.axis];
|
|
166
|
+
if (!b) return;
|
|
167
|
+
const E = (m.value.getBoundingClientRect()[e.value.direction] - c[e.value.client]) * -1, y = u.value[e.value.offset] - b, t = (E - y) * 100 * z.value / m.value[e.value.offset];
|
|
168
|
+
e.value.scroll === "scrollLeft" ? n.wrapElement[e.value.scroll] = t * v / 100 : n.wrapElement[e.value.scroll] = t * d / 100;
|
|
169
|
+
}, L = () => {
|
|
170
|
+
p = !1, S.value[e.value.axis] = 0, document.removeEventListener("mousemove", A), document.removeEventListener("mouseup", L), N(), i && (g.value = !1);
|
|
171
|
+
}, W = () => {
|
|
172
|
+
i = !1, g.value = !!h.size;
|
|
173
|
+
}, D = () => {
|
|
174
|
+
i = !0, g.value = p;
|
|
175
|
+
};
|
|
176
|
+
ce(() => {
|
|
177
|
+
N(), document.removeEventListener("mouseup", L);
|
|
178
|
+
});
|
|
179
|
+
const N = () => {
|
|
180
|
+
document.onselectstart !== o && (document.onselectstart = o);
|
|
181
|
+
};
|
|
182
|
+
return K(
|
|
183
|
+
X(n, "scrollbarElement"),
|
|
184
|
+
"mousemove",
|
|
185
|
+
W
|
|
186
|
+
), K(
|
|
187
|
+
X(n, "scrollbarElement"),
|
|
188
|
+
"mouseleave",
|
|
189
|
+
D
|
|
190
|
+
), (c, b) => (B(), $(ue, {
|
|
191
|
+
name: k(a).b("fade"),
|
|
192
|
+
persisted: ""
|
|
193
|
+
}, {
|
|
194
|
+
default: le(() => [
|
|
195
|
+
ve(j(
|
|
196
|
+
"div",
|
|
197
|
+
{
|
|
198
|
+
ref_key: "instance",
|
|
199
|
+
ref: m,
|
|
200
|
+
class: O([k(a).e("bar"), k(a).is(e.value.key)]),
|
|
201
|
+
onMousedown: H,
|
|
202
|
+
onClick: b[0] || (b[0] = fe(() => {
|
|
203
|
+
}, ["stop"]))
|
|
204
|
+
},
|
|
205
|
+
[
|
|
206
|
+
j(
|
|
207
|
+
"div",
|
|
208
|
+
{
|
|
209
|
+
ref_key: "thumb",
|
|
210
|
+
ref: u,
|
|
211
|
+
class: O(k(a).e("thumb")),
|
|
212
|
+
style: I(l.value),
|
|
213
|
+
onMousedown: w
|
|
214
|
+
},
|
|
215
|
+
null,
|
|
216
|
+
38
|
|
217
|
+
/* CLASS, STYLE, NEED_HYDRATION */
|
|
218
|
+
)
|
|
219
|
+
],
|
|
220
|
+
34
|
|
221
|
+
/* CLASS, NEED_HYDRATION */
|
|
222
|
+
), [
|
|
223
|
+
[me, r.always || g.value]
|
|
224
|
+
])
|
|
225
|
+
]),
|
|
226
|
+
_: 1
|
|
227
|
+
/* STABLE */
|
|
228
|
+
}, 8, ["name"]));
|
|
229
|
+
}
|
|
230
|
+
}), ke = /* @__PURE__ */ V({
|
|
231
|
+
__name: "bar",
|
|
232
|
+
props: Le,
|
|
233
|
+
setup(r, { expose: h }) {
|
|
234
|
+
const n = r, a = te(q), m = f(0), u = f(0), S = f(""), g = f(""), p = f(1), i = f(1);
|
|
235
|
+
return h({
|
|
236
|
+
handleScroll: (o) => {
|
|
237
|
+
if (o) {
|
|
238
|
+
const e = o.offsetHeight - R, l = o.offsetWidth - R;
|
|
239
|
+
u.value = o.scrollTop * 100 / e * p.value, m.value = o.scrollLeft * 100 / l * i.value;
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
update: () => {
|
|
243
|
+
const o = a == null ? void 0 : a.wrapElement;
|
|
244
|
+
if (!o) return;
|
|
245
|
+
const e = o.offsetHeight - R, l = o.offsetWidth - R, z = e ** 2 / o.scrollHeight, w = l ** 2 / o.scrollWidth, H = Math.max(z, n.minSize), T = Math.max(w, n.minSize);
|
|
246
|
+
p.value = z / (e - z) / (H / (e - H)), i.value = w / (l - w) / (T / (l - T)), g.value = H + R < e ? `${H}px` : "", S.value = T + R < l ? `${T}px` : "";
|
|
247
|
+
}
|
|
248
|
+
}), (o, e) => (B(), ae(
|
|
249
|
+
de,
|
|
250
|
+
null,
|
|
251
|
+
[
|
|
252
|
+
Y(ee, {
|
|
253
|
+
move: m.value,
|
|
254
|
+
ratio: i.value,
|
|
255
|
+
size: S.value,
|
|
256
|
+
always: r.always
|
|
257
|
+
}, null, 8, ["move", "ratio", "size", "always"]),
|
|
258
|
+
Y(ee, {
|
|
259
|
+
move: u.value,
|
|
260
|
+
ratio: p.value,
|
|
261
|
+
size: g.value,
|
|
262
|
+
vertical: "",
|
|
263
|
+
always: r.always
|
|
264
|
+
}, null, 8, ["move", "ratio", "size", "always"])
|
|
265
|
+
],
|
|
266
|
+
64
|
|
267
|
+
/* STABLE_FRAGMENT */
|
|
268
|
+
));
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
const Be = ["tabindex"], _ = "ElScrollbar";
|
|
272
|
+
var Oe = /* @__PURE__ */ V({
|
|
273
|
+
name: _,
|
|
274
|
+
__name: "scrollbar",
|
|
275
|
+
props: Re,
|
|
276
|
+
emits: Ce,
|
|
277
|
+
setup(r, { expose: h, emit: n }) {
|
|
278
|
+
const a = r, m = n, u = oe("scrollbar");
|
|
279
|
+
let S, g, p, i = 0, d = 0, v = "";
|
|
280
|
+
const o = {
|
|
281
|
+
bottom: !1,
|
|
282
|
+
top: !1,
|
|
283
|
+
right: !1,
|
|
284
|
+
left: !1
|
|
285
|
+
}, e = f(), l = f(), z = f(), w = f(), H = C(() => {
|
|
286
|
+
const t = {}, s = Z(a.height), x = Z(a.maxHeight);
|
|
287
|
+
return s && (t.height = s), x && (t.maxHeight = x), [a.wrapStyle, t];
|
|
288
|
+
}), T = C(() => [
|
|
289
|
+
a.wrapClass,
|
|
290
|
+
u.e("wrap"),
|
|
291
|
+
{ [u.em("wrap", "hidden-default")]: !a.native }
|
|
292
|
+
]), A = C(() => [u.e("view"), a.viewClass]), L = (t) => {
|
|
293
|
+
var s;
|
|
294
|
+
return (s = o[t]) != null ? s : !1;
|
|
295
|
+
}, W = {
|
|
296
|
+
top: "bottom",
|
|
297
|
+
bottom: "top",
|
|
298
|
+
left: "right",
|
|
299
|
+
right: "left"
|
|
300
|
+
}, D = (t) => {
|
|
301
|
+
const s = W[v];
|
|
302
|
+
if (!s) return;
|
|
303
|
+
const x = t[v], M = t[s];
|
|
304
|
+
x && !o[v] && (o[v] = !0), !M && o[s] && (o[s] = !1);
|
|
305
|
+
}, N = () => {
|
|
306
|
+
var t;
|
|
307
|
+
if (l.value) {
|
|
308
|
+
(t = w.value) == null || t.handleScroll(l.value);
|
|
309
|
+
const s = i, x = d;
|
|
310
|
+
i = l.value.scrollTop, d = l.value.scrollLeft;
|
|
311
|
+
const M = {
|
|
312
|
+
bottom: i + l.value.clientHeight >= l.value.scrollHeight - a.distance,
|
|
313
|
+
top: i <= a.distance && s !== 0,
|
|
314
|
+
right: d + l.value.clientWidth >= l.value.scrollWidth - a.distance && x !== d,
|
|
315
|
+
left: d <= a.distance && x !== 0
|
|
316
|
+
};
|
|
317
|
+
if (m("scroll", {
|
|
318
|
+
scrollTop: i,
|
|
319
|
+
scrollLeft: d
|
|
320
|
+
}), s !== i && (v = i > s ? "bottom" : "top"), x !== d && (v = d > x ? "right" : "left"), a.distance > 0) {
|
|
321
|
+
if (L(v))
|
|
322
|
+
return;
|
|
323
|
+
D(M);
|
|
324
|
+
}
|
|
325
|
+
M[v] && m("end-reached", v);
|
|
326
|
+
}
|
|
327
|
+
};
|
|
328
|
+
function c(t, s) {
|
|
329
|
+
Te(t) ? l.value.scrollTo(t) : P(t) && P(s) && l.value.scrollTo(t, s);
|
|
330
|
+
}
|
|
331
|
+
const b = (t) => {
|
|
332
|
+
if (!P(t)) {
|
|
333
|
+
G(_, "value must be a number");
|
|
334
|
+
return;
|
|
335
|
+
}
|
|
336
|
+
l.value.scrollTop = t;
|
|
337
|
+
}, E = (t) => {
|
|
338
|
+
if (!P(t)) {
|
|
339
|
+
G(_, "value must be a number");
|
|
340
|
+
return;
|
|
341
|
+
}
|
|
342
|
+
l.value.scrollLeft = t;
|
|
343
|
+
}, y = () => {
|
|
344
|
+
var t;
|
|
345
|
+
(t = w.value) == null || t.update(), o[v] = !1;
|
|
346
|
+
};
|
|
347
|
+
return F(
|
|
348
|
+
() => a.noresize,
|
|
349
|
+
(t) => {
|
|
350
|
+
t ? (S == null || S(), g == null || g(), p == null || p()) : ({ stop: S } = Q(z, y), { stop: g } = Q(l, y), p = K("resize", y));
|
|
351
|
+
},
|
|
352
|
+
{ immediate: !0 }
|
|
353
|
+
), F(
|
|
354
|
+
() => [a.maxHeight, a.height],
|
|
355
|
+
() => {
|
|
356
|
+
a.native || J(() => {
|
|
357
|
+
var t;
|
|
358
|
+
y(), l.value && ((t = w.value) == null || t.handleScroll(l.value));
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
), pe(
|
|
362
|
+
q,
|
|
363
|
+
be({
|
|
364
|
+
scrollbarElement: e,
|
|
365
|
+
wrapElement: l
|
|
366
|
+
})
|
|
367
|
+
), he(() => {
|
|
368
|
+
l.value && (l.value.scrollTop = i, l.value.scrollLeft = d);
|
|
369
|
+
}), ge(() => {
|
|
370
|
+
a.native || J(() => {
|
|
371
|
+
y();
|
|
372
|
+
});
|
|
373
|
+
}), ye(() => y()), h({
|
|
374
|
+
/** @description scrollbar wrap ref */
|
|
375
|
+
wrapRef: l,
|
|
376
|
+
/** @description update scrollbar state manually */
|
|
377
|
+
update: y,
|
|
378
|
+
/** @description scrolls to a particular set of coordinates */
|
|
379
|
+
scrollTo: c,
|
|
380
|
+
/** @description set distance to scroll top */
|
|
381
|
+
setScrollTop: b,
|
|
382
|
+
/** @description set distance to scroll left */
|
|
383
|
+
setScrollLeft: E,
|
|
384
|
+
/** @description handle scroll event */
|
|
385
|
+
handleScroll: N
|
|
386
|
+
}), (t, s) => (B(), ae(
|
|
387
|
+
"div",
|
|
388
|
+
{
|
|
389
|
+
ref_key: "scrollbarRef",
|
|
390
|
+
ref: e,
|
|
391
|
+
class: O(k(u).b())
|
|
392
|
+
},
|
|
393
|
+
[
|
|
394
|
+
j("div", {
|
|
395
|
+
ref_key: "wrapRef",
|
|
396
|
+
ref: l,
|
|
397
|
+
class: O(T.value),
|
|
398
|
+
style: I(H.value),
|
|
399
|
+
tabindex: r.tabindex,
|
|
400
|
+
onScroll: N
|
|
401
|
+
}, [
|
|
402
|
+
(B(), $(we(r.tag), {
|
|
403
|
+
id: r.id,
|
|
404
|
+
ref_key: "resizeRef",
|
|
405
|
+
ref: z,
|
|
406
|
+
class: O(A.value),
|
|
407
|
+
style: I(r.viewStyle),
|
|
408
|
+
role: r.role,
|
|
409
|
+
"aria-label": r.ariaLabel,
|
|
410
|
+
"aria-orientation": r.ariaOrientation
|
|
411
|
+
}, {
|
|
412
|
+
default: le(() => [
|
|
413
|
+
ze(t.$slots, "default")
|
|
414
|
+
]),
|
|
415
|
+
_: 3
|
|
416
|
+
/* FORWARDED */
|
|
417
|
+
}, 8, ["id", "class", "style", "role", "aria-label", "aria-orientation"]))
|
|
418
|
+
], 46, Be),
|
|
419
|
+
r.native ? Se("v-if", !0) : (B(), $(ke, {
|
|
420
|
+
key: 0,
|
|
421
|
+
ref_key: "barRef",
|
|
422
|
+
ref: w,
|
|
423
|
+
always: r.always,
|
|
424
|
+
"min-size": r.minSize
|
|
425
|
+
}, null, 8, ["always", "min-size"]))
|
|
426
|
+
],
|
|
427
|
+
2
|
|
428
|
+
/* CLASS */
|
|
429
|
+
));
|
|
430
|
+
}
|
|
431
|
+
});
|
|
432
|
+
const Ie = ne(Oe);
|
|
433
|
+
export {
|
|
434
|
+
Ie as E,
|
|
435
|
+
Ce as s
|
|
436
|
+
};
|