st-comp 0.0.69 → 0.0.71
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/lib/ChartLayout.cjs.js +1 -0
- package/lib/ChartLayout.es.js +71 -0
- package/lib/Dialog.cjs.js +1 -0
- package/lib/Dialog.es.js +89 -0
- package/lib/HeatMap.cjs.js +1 -0
- package/lib/HeatMap.es.js +117 -0
- package/lib/Kline.cjs.js +1 -0
- package/lib/Kline.es.js +2631 -0
- package/lib/KlineNew.cjs.js +1 -0
- package/lib/KlineNew.es.js +614 -0
- package/lib/LinearLegend.cjs.js +1 -0
- package/lib/LinearLegend.es.js +62 -0
- package/lib/Map.cjs.js +1 -0
- package/lib/{bundle.js → Map.es.js} +43 -41504
- package/lib/Pagination.cjs.js +1 -0
- package/lib/Pagination.es.js +624 -0
- package/lib/Pie.cjs.js +2 -0
- package/lib/Pie.es.js +159 -0
- package/lib/Table.cjs.js +20 -0
- package/lib/Table.es.js +4006 -0
- package/lib/TreeMap.cjs.js +2 -0
- package/lib/TreeMap.es.js +162 -0
- package/lib/VarietySearch.cjs.js +12 -0
- package/lib/VarietySearch.es.js +3335 -0
- package/lib/VirtualTable.cjs.js +13 -0
- package/lib/VirtualTable.es.js +2679 -0
- package/lib/_commonjsHelpers-10dfc225.js +8 -0
- package/lib/_commonjsHelpers-87b0abe8.cjs +1 -0
- package/lib/_plugin-vue_export-helper-dad06003.js +9 -0
- package/lib/_plugin-vue_export-helper-f246444f.cjs +1 -0
- package/lib/base-4865d432.cjs +9 -0
- package/lib/base-a240bf62.js +762 -0
- package/lib/bundle.cjs.js +1 -0
- package/lib/bundle.es.js +46 -0
- package/lib/bundle.umd-4967d574.js +16091 -0
- package/lib/bundle.umd-c5698c50.cjs +71 -0
- package/lib/castArray-3341cbb4.cjs +1 -0
- package/lib/castArray-a723a736.js +10 -0
- package/lib/config-provider-3db4dac6.js +148 -0
- package/lib/config-provider-cf4edc1e.cjs +1 -0
- package/lib/el-button-c24606d0.cjs +1 -0
- package/lib/el-button-fa6a5742.js +231 -0
- package/lib/el-empty-282e5e93.js +204 -0
- package/lib/el-empty-608948d9.cjs +1 -0
- package/lib/el-icon-7718f55e.cjs +1 -0
- package/lib/el-icon-d9ef9ccc.js +592 -0
- package/lib/el-overlay-7fceb816.cjs +5 -0
- package/lib/el-overlay-9b7bdd18.js +678 -0
- package/lib/el-scrollbar-7dc53299.js +248 -0
- package/lib/el-scrollbar-bc381e35.cjs +1 -0
- package/lib/el-select-85ed2643.js +1894 -0
- package/lib/el-select-a50741c1.cjs +9 -0
- package/lib/el-tag-308f715a.js +2416 -0
- package/lib/el-tag-87fd3960.cjs +1 -0
- package/lib/el-tooltip-0ea8fbf8.cjs +1 -0
- package/lib/el-tooltip-4ed993c7.js +1 -0
- package/lib/focus-trap-2a734f35.cjs +3 -0
- package/lib/focus-trap-6922b96b.js +376 -0
- package/lib/index-1508a06b.js +556 -0
- package/lib/index-48a9f60d.cjs +1 -0
- package/lib/index-657047bb.js +513 -0
- package/lib/index-eea0bcb3.cjs +1 -0
- package/lib/index.esm-8d9a2abe.js +2432 -0
- package/lib/index.esm-94a95a2a.cjs +3 -0
- package/lib/raf-5e5c53db.cjs +1 -0
- package/lib/raf-fc8a56cf.js +6 -0
- package/lib/scroll-bb8039ba.cjs +1 -0
- package/lib/scroll-cfdae01b.js +35 -0
- package/lib/style.css +1 -1
- package/lib/typescript-7ae59c4c.js +4 -0
- package/lib/typescript-b63f8e83.cjs +1 -0
- package/lib/vnode-a9714179.js +14 -0
- package/lib/vnode-abafec9e.cjs +1 -0
- package/lib/zh-cn-92978806.js +134 -0
- package/lib/zh-cn-d4df7172.cjs +1 -0
- package/package.json +3 -3
- package/packages/ChartLayout/index.ts +5 -5
- package/packages/Dialog/index.ts +5 -5
- package/packages/HeatMap/index.ts +5 -5
- package/packages/Kline/componentsNew/KlineUtils/index.vue +2 -3
- package/packages/LinearLegend/index.ts +5 -5
- package/packages/Map/index.ts +5 -5
- package/packages/Pagination/index.ts +5 -5
- package/packages/Pie/index.ts +5 -5
- package/packages/Table/index.ts +5 -5
- package/packages/TreeMap/index.ts +5 -5
- package/packages/VarietySearch/index.ts +5 -5
- package/packages/VirtualTable/index.ts +5 -5
- package/vitePlugins/createExportFile.ts +5 -5
- package/lib/bundle.umd.cjs +0 -139
|
@@ -0,0 +1,2679 @@
|
|
|
1
|
+
import { aa as Do, a6 as Me, d as N, b as le, u as De, k as Y, C as Lo, i as Ot, z as Po, t as et, H as $e, E as Wo, e as St, A as ke, v as Xe, B as Fo, w as Xt } from "./base-a240bf62.js";
|
|
2
|
+
import { E as Jt } from "./el-empty-282e5e93.js";
|
|
3
|
+
import { B as Go, d as Ko, u as Vo } from "./el-scrollbar-7dc53299.js";
|
|
4
|
+
import { getCurrentInstance as Rt, computed as R, defineComponent as ge, ref as G, reactive as $o, unref as r, watch as Le, onBeforeUnmount as Qt, h as me, withModifiers as ko, onMounted as xt, nextTick as Ve, resolveDynamicComponent as Nt, shallowRef as Te, isVNode as Ie, toRef as At, createVNode as _, mergeProps as B, inject as eo, provide as Bo, mergeModels as zt, useModel as jo, onUnmounted as qo, openBlock as Uo, createBlock as Yo, withCtx as Dt } from "vue";
|
|
5
|
+
import { m as to } from "./typescript-7ae59c4c.js";
|
|
6
|
+
import { c as oo, r as no } from "./raf-fc8a56cf.js";
|
|
7
|
+
import { g as Zo } from "./scroll-cfdae01b.js";
|
|
8
|
+
import { c as Xo } from "./castArray-a723a736.js";
|
|
9
|
+
import { E as lo, t as Jo, u as Qo, b as en } from "./index-1508a06b.js";
|
|
10
|
+
import { _ as tn } from "./_plugin-vue_export-helper-dad06003.js";
|
|
11
|
+
var Lt = Number.isNaN || function(t) {
|
|
12
|
+
return typeof t == "number" && t !== t;
|
|
13
|
+
};
|
|
14
|
+
function on(e, t) {
|
|
15
|
+
return !!(e === t || Lt(e) && Lt(t));
|
|
16
|
+
}
|
|
17
|
+
function nn(e, t) {
|
|
18
|
+
if (e.length !== t.length)
|
|
19
|
+
return !1;
|
|
20
|
+
for (var o = 0; o < e.length; o++)
|
|
21
|
+
if (!on(e[o], t[o]))
|
|
22
|
+
return !1;
|
|
23
|
+
return !0;
|
|
24
|
+
}
|
|
25
|
+
function ln(e, t) {
|
|
26
|
+
t === void 0 && (t = nn);
|
|
27
|
+
var o = null;
|
|
28
|
+
function n() {
|
|
29
|
+
for (var s = [], a = 0; a < arguments.length; a++)
|
|
30
|
+
s[a] = arguments[a];
|
|
31
|
+
if (o && o.lastThis === this && t(s, o.lastArgs))
|
|
32
|
+
return o.lastResult;
|
|
33
|
+
var i = e.apply(this, s);
|
|
34
|
+
return o = {
|
|
35
|
+
lastResult: i,
|
|
36
|
+
lastArgs: s,
|
|
37
|
+
lastThis: this
|
|
38
|
+
}, i;
|
|
39
|
+
}
|
|
40
|
+
return n.clear = function() {
|
|
41
|
+
o = null;
|
|
42
|
+
}, n;
|
|
43
|
+
}
|
|
44
|
+
const rn = () => {
|
|
45
|
+
const t = Rt().proxy.$props;
|
|
46
|
+
return R(() => {
|
|
47
|
+
const o = (n, s, a) => ({});
|
|
48
|
+
return t.perfMode ? Do(o) : ln(o);
|
|
49
|
+
});
|
|
50
|
+
}, Pt = 50, Wt = "itemRendered", Ft = "scroll", Ke = "forward", st = "backward", Ce = "auto", ro = "smart", it = "start", ze = "center", ct = "end", dt = "horizontal", ao = "vertical", so = "rtl", ut = "negative", io = "positive-ascending", co = "positive-descending", an = {
|
|
51
|
+
[dt]: "left",
|
|
52
|
+
[ao]: "top"
|
|
53
|
+
}, sn = 20, ht = Me({
|
|
54
|
+
type: N([Number, Function]),
|
|
55
|
+
required: !0
|
|
56
|
+
}), ft = Me({
|
|
57
|
+
type: Number
|
|
58
|
+
}), mt = Me({
|
|
59
|
+
type: Number,
|
|
60
|
+
default: 2
|
|
61
|
+
}), cn = Me({
|
|
62
|
+
type: String,
|
|
63
|
+
values: ["ltr", "rtl"],
|
|
64
|
+
default: "ltr"
|
|
65
|
+
}), vt = Me({
|
|
66
|
+
type: Number,
|
|
67
|
+
default: 0
|
|
68
|
+
}), tt = Me({
|
|
69
|
+
type: Number,
|
|
70
|
+
required: !0
|
|
71
|
+
}), uo = Me({
|
|
72
|
+
type: String,
|
|
73
|
+
values: ["horizontal", "vertical"],
|
|
74
|
+
default: ao
|
|
75
|
+
}), ho = le({
|
|
76
|
+
className: {
|
|
77
|
+
type: String,
|
|
78
|
+
default: ""
|
|
79
|
+
},
|
|
80
|
+
containerElement: {
|
|
81
|
+
type: N([String, Object]),
|
|
82
|
+
default: "div"
|
|
83
|
+
},
|
|
84
|
+
data: {
|
|
85
|
+
type: N(Array),
|
|
86
|
+
default: () => to([])
|
|
87
|
+
},
|
|
88
|
+
direction: cn,
|
|
89
|
+
height: {
|
|
90
|
+
type: [String, Number],
|
|
91
|
+
required: !0
|
|
92
|
+
},
|
|
93
|
+
innerElement: {
|
|
94
|
+
type: [String, Object],
|
|
95
|
+
default: "div"
|
|
96
|
+
},
|
|
97
|
+
style: {
|
|
98
|
+
type: N([Object, String, Array])
|
|
99
|
+
},
|
|
100
|
+
useIsScrolling: {
|
|
101
|
+
type: Boolean,
|
|
102
|
+
default: !1
|
|
103
|
+
},
|
|
104
|
+
width: {
|
|
105
|
+
type: [Number, String],
|
|
106
|
+
required: !1
|
|
107
|
+
},
|
|
108
|
+
perfMode: {
|
|
109
|
+
type: Boolean,
|
|
110
|
+
default: !0
|
|
111
|
+
},
|
|
112
|
+
scrollbarAlwaysOn: {
|
|
113
|
+
type: Boolean,
|
|
114
|
+
default: !1
|
|
115
|
+
}
|
|
116
|
+
}), dn = le({
|
|
117
|
+
cache: mt,
|
|
118
|
+
estimatedItemSize: ft,
|
|
119
|
+
layout: uo,
|
|
120
|
+
initScrollOffset: vt,
|
|
121
|
+
total: tt,
|
|
122
|
+
itemSize: ht,
|
|
123
|
+
...ho
|
|
124
|
+
}), gt = {
|
|
125
|
+
type: Number,
|
|
126
|
+
default: 6
|
|
127
|
+
}, fo = { type: Number, default: 0 }, mo = { type: Number, default: 2 }, He = le({
|
|
128
|
+
columnCache: mt,
|
|
129
|
+
columnWidth: ht,
|
|
130
|
+
estimatedColumnWidth: ft,
|
|
131
|
+
estimatedRowHeight: ft,
|
|
132
|
+
initScrollLeft: vt,
|
|
133
|
+
initScrollTop: vt,
|
|
134
|
+
itemKey: {
|
|
135
|
+
type: N(Function),
|
|
136
|
+
default: ({
|
|
137
|
+
columnIndex: e,
|
|
138
|
+
rowIndex: t
|
|
139
|
+
}) => `${t}:${e}`
|
|
140
|
+
},
|
|
141
|
+
rowCache: mt,
|
|
142
|
+
rowHeight: ht,
|
|
143
|
+
totalColumn: tt,
|
|
144
|
+
totalRow: tt,
|
|
145
|
+
hScrollbarSize: gt,
|
|
146
|
+
vScrollbarSize: gt,
|
|
147
|
+
scrollbarStartGap: fo,
|
|
148
|
+
scrollbarEndGap: mo,
|
|
149
|
+
role: String,
|
|
150
|
+
...ho
|
|
151
|
+
}), vo = le({
|
|
152
|
+
alwaysOn: Boolean,
|
|
153
|
+
class: String,
|
|
154
|
+
layout: uo,
|
|
155
|
+
total: tt,
|
|
156
|
+
ratio: {
|
|
157
|
+
type: Number,
|
|
158
|
+
required: !0
|
|
159
|
+
},
|
|
160
|
+
clientSize: {
|
|
161
|
+
type: Number,
|
|
162
|
+
required: !0
|
|
163
|
+
},
|
|
164
|
+
scrollFrom: {
|
|
165
|
+
type: Number,
|
|
166
|
+
required: !0
|
|
167
|
+
},
|
|
168
|
+
scrollbarSize: gt,
|
|
169
|
+
startGap: fo,
|
|
170
|
+
endGap: mo,
|
|
171
|
+
visible: Boolean
|
|
172
|
+
}), Ze = (e, t) => e < t ? Ke : st, Gt = (e) => e === so;
|
|
173
|
+
let Ae = null;
|
|
174
|
+
function Kt(e = !1) {
|
|
175
|
+
if (Ae === null || e) {
|
|
176
|
+
const t = document.createElement("div"), o = t.style;
|
|
177
|
+
o.width = "50px", o.height = "50px", o.overflow = "scroll", o.direction = "rtl";
|
|
178
|
+
const n = document.createElement("div"), s = n.style;
|
|
179
|
+
return s.width = "100px", s.height = "100px", t.appendChild(n), document.body.appendChild(t), t.scrollLeft > 0 ? Ae = co : (t.scrollLeft = 1, t.scrollLeft === 0 ? Ae = ut : Ae = io), document.body.removeChild(t), Ae;
|
|
180
|
+
}
|
|
181
|
+
return Ae;
|
|
182
|
+
}
|
|
183
|
+
function un({ move: e, size: t, bar: o }, n) {
|
|
184
|
+
const s = {}, a = `translate${o.axis}(${e}px)`;
|
|
185
|
+
return s[o.size] = t, s.transform = a, s.msTransform = a, s.webkitTransform = a, n === "horizontal" ? s.height = "100%" : s.width = "100%", s;
|
|
186
|
+
}
|
|
187
|
+
const Vt = ge({
|
|
188
|
+
name: "ElVirtualScrollBar",
|
|
189
|
+
props: vo,
|
|
190
|
+
emits: ["scroll", "start-move", "stop-move"],
|
|
191
|
+
setup(e, { emit: t }) {
|
|
192
|
+
const o = R(() => e.startGap + e.endGap), n = De("virtual-scrollbar"), s = De("scrollbar"), a = G(), i = G();
|
|
193
|
+
let c = null, m = null;
|
|
194
|
+
const h = $o({
|
|
195
|
+
isDragging: !1,
|
|
196
|
+
traveled: 0
|
|
197
|
+
}), d = R(() => Go[e.layout]), v = R(() => e.clientSize - r(o)), w = R(() => ({
|
|
198
|
+
position: "absolute",
|
|
199
|
+
width: `${dt === e.layout ? v.value : e.scrollbarSize}px`,
|
|
200
|
+
height: `${dt === e.layout ? e.scrollbarSize : v.value}px`,
|
|
201
|
+
[an[e.layout]]: "2px",
|
|
202
|
+
right: "2px",
|
|
203
|
+
bottom: "2px",
|
|
204
|
+
borderRadius: "4px"
|
|
205
|
+
})), g = R(() => {
|
|
206
|
+
const T = e.ratio, O = e.clientSize;
|
|
207
|
+
if (T >= 100)
|
|
208
|
+
return Number.POSITIVE_INFINITY;
|
|
209
|
+
if (T >= 50)
|
|
210
|
+
return T * O / 100;
|
|
211
|
+
const M = O / 3;
|
|
212
|
+
return Math.floor(Math.min(Math.max(T * O, sn), M));
|
|
213
|
+
}), f = R(() => {
|
|
214
|
+
if (!Number.isFinite(g.value))
|
|
215
|
+
return {
|
|
216
|
+
display: "none"
|
|
217
|
+
};
|
|
218
|
+
const T = `${g.value}px`;
|
|
219
|
+
return un({
|
|
220
|
+
bar: d.value,
|
|
221
|
+
size: T,
|
|
222
|
+
move: h.traveled
|
|
223
|
+
}, e.layout);
|
|
224
|
+
}), l = R(() => Math.floor(e.clientSize - g.value - r(o))), u = () => {
|
|
225
|
+
window.addEventListener("mousemove", x), window.addEventListener("mouseup", S);
|
|
226
|
+
const T = r(i);
|
|
227
|
+
T && (m = document.onselectstart, document.onselectstart = () => !1, T.addEventListener("touchmove", x), T.addEventListener("touchend", S));
|
|
228
|
+
}, y = () => {
|
|
229
|
+
window.removeEventListener("mousemove", x), window.removeEventListener("mouseup", S), document.onselectstart = m, m = null;
|
|
230
|
+
const T = r(i);
|
|
231
|
+
T && (T.removeEventListener("touchmove", x), T.removeEventListener("touchend", S));
|
|
232
|
+
}, b = (T) => {
|
|
233
|
+
T.stopImmediatePropagation(), !(T.ctrlKey || [1, 2].includes(T.button)) && (h.isDragging = !0, h[d.value.axis] = T.currentTarget[d.value.offset] - (T[d.value.client] - T.currentTarget.getBoundingClientRect()[d.value.direction]), t("start-move"), u());
|
|
234
|
+
}, S = () => {
|
|
235
|
+
h.isDragging = !1, h[d.value.axis] = 0, t("stop-move"), y();
|
|
236
|
+
}, x = (T) => {
|
|
237
|
+
const { isDragging: O } = h;
|
|
238
|
+
if (!O || !i.value || !a.value)
|
|
239
|
+
return;
|
|
240
|
+
const M = h[d.value.axis];
|
|
241
|
+
if (!M)
|
|
242
|
+
return;
|
|
243
|
+
oo(c);
|
|
244
|
+
const A = (a.value.getBoundingClientRect()[d.value.direction] - T[d.value.client]) * -1, C = i.value[d.value.offset] - M, P = A - C;
|
|
245
|
+
c = no(() => {
|
|
246
|
+
h.traveled = Math.max(e.startGap, Math.min(P, l.value)), t("scroll", P, l.value);
|
|
247
|
+
});
|
|
248
|
+
}, I = (T) => {
|
|
249
|
+
const O = Math.abs(T.target.getBoundingClientRect()[d.value.direction] - T[d.value.client]), M = i.value[d.value.offset] / 2, A = O - M;
|
|
250
|
+
h.traveled = Math.max(0, Math.min(A, l.value)), t("scroll", A, l.value);
|
|
251
|
+
};
|
|
252
|
+
return Le(() => e.scrollFrom, (T) => {
|
|
253
|
+
h.isDragging || (h.traveled = Math.ceil(T * l.value));
|
|
254
|
+
}), Qt(() => {
|
|
255
|
+
y();
|
|
256
|
+
}), () => me("div", {
|
|
257
|
+
role: "presentation",
|
|
258
|
+
ref: a,
|
|
259
|
+
class: [
|
|
260
|
+
n.b(),
|
|
261
|
+
e.class,
|
|
262
|
+
(e.alwaysOn || h.isDragging) && "always-on"
|
|
263
|
+
],
|
|
264
|
+
style: w.value,
|
|
265
|
+
onMousedown: ko(I, ["stop", "prevent"]),
|
|
266
|
+
onTouchstartPrevent: b
|
|
267
|
+
}, me("div", {
|
|
268
|
+
ref: i,
|
|
269
|
+
class: s.e("thumb"),
|
|
270
|
+
style: f.value,
|
|
271
|
+
onMousedown: b
|
|
272
|
+
}, []));
|
|
273
|
+
}
|
|
274
|
+
}), hn = ({ atXEndEdge: e, atXStartEdge: t, atYEndEdge: o, atYStartEdge: n }, s) => {
|
|
275
|
+
let a = null, i = 0, c = 0;
|
|
276
|
+
const m = (d, v) => {
|
|
277
|
+
const w = d <= 0 && t.value || d >= 0 && e.value, g = v <= 0 && n.value || v >= 0 && o.value;
|
|
278
|
+
return w && g;
|
|
279
|
+
};
|
|
280
|
+
return {
|
|
281
|
+
hasReachedEdge: m,
|
|
282
|
+
onWheel: (d) => {
|
|
283
|
+
oo(a);
|
|
284
|
+
let v = d.deltaX, w = d.deltaY;
|
|
285
|
+
Math.abs(v) > Math.abs(w) ? w = 0 : v = 0, d.shiftKey && w !== 0 && (v = w, w = 0), !(m(i, c) && m(i + v, c + w)) && (i += v, c += w, d.preventDefault(), a = no(() => {
|
|
286
|
+
s(i, c), i = 0, c = 0;
|
|
287
|
+
}));
|
|
288
|
+
}
|
|
289
|
+
};
|
|
290
|
+
}, go = ({
|
|
291
|
+
name: e,
|
|
292
|
+
clearCache: t,
|
|
293
|
+
getColumnPosition: o,
|
|
294
|
+
getColumnStartIndexForOffset: n,
|
|
295
|
+
getColumnStopIndexForStartIndex: s,
|
|
296
|
+
getEstimatedTotalHeight: a,
|
|
297
|
+
getEstimatedTotalWidth: i,
|
|
298
|
+
getColumnOffset: c,
|
|
299
|
+
getRowOffset: m,
|
|
300
|
+
getRowPosition: h,
|
|
301
|
+
getRowStartIndexForOffset: d,
|
|
302
|
+
getRowStopIndexForStartIndex: v,
|
|
303
|
+
initCache: w,
|
|
304
|
+
injectToInstance: g,
|
|
305
|
+
validateProps: f
|
|
306
|
+
}) => ge({
|
|
307
|
+
name: e ?? "ElVirtualList",
|
|
308
|
+
props: He,
|
|
309
|
+
emits: [Wt, Ft],
|
|
310
|
+
setup(l, { emit: u, expose: y, slots: b }) {
|
|
311
|
+
const S = De("vl");
|
|
312
|
+
f(l);
|
|
313
|
+
const x = Rt(), I = G(w(l, x));
|
|
314
|
+
g == null || g(x, I);
|
|
315
|
+
const T = G(), O = G(), M = G(), A = G(null), C = G({
|
|
316
|
+
isScrolling: !1,
|
|
317
|
+
scrollLeft: Y(l.initScrollLeft) ? l.initScrollLeft : 0,
|
|
318
|
+
scrollTop: Y(l.initScrollTop) ? l.initScrollTop : 0,
|
|
319
|
+
updateRequested: !1,
|
|
320
|
+
xAxisScrollDir: Ke,
|
|
321
|
+
yAxisScrollDir: Ke
|
|
322
|
+
}), P = rn(), $ = R(() => Number.parseInt(`${l.height}`, 10)), k = R(() => Number.parseInt(`${l.width}`, 10)), V = R(() => {
|
|
323
|
+
const { totalColumn: E, totalRow: H, columnCache: p } = l, { isScrolling: L, xAxisScrollDir: z, scrollLeft: D } = r(C);
|
|
324
|
+
if (E === 0 || H === 0)
|
|
325
|
+
return [0, 0, 0, 0];
|
|
326
|
+
const W = n(l, D, r(I)), F = s(l, W, D, r(I)), K = !L || z === st ? Math.max(1, p) : 1, X = !L || z === Ke ? Math.max(1, p) : 1;
|
|
327
|
+
return [
|
|
328
|
+
Math.max(0, W - K),
|
|
329
|
+
Math.max(0, Math.min(E - 1, F + X)),
|
|
330
|
+
W,
|
|
331
|
+
F
|
|
332
|
+
];
|
|
333
|
+
}), j = R(() => {
|
|
334
|
+
const { totalColumn: E, totalRow: H, rowCache: p } = l, { isScrolling: L, yAxisScrollDir: z, scrollTop: D } = r(C);
|
|
335
|
+
if (E === 0 || H === 0)
|
|
336
|
+
return [0, 0, 0, 0];
|
|
337
|
+
const W = d(l, D, r(I)), F = v(l, W, D, r(I)), K = !L || z === st ? Math.max(1, p) : 1, X = !L || z === Ke ? Math.max(1, p) : 1;
|
|
338
|
+
return [
|
|
339
|
+
Math.max(0, W - K),
|
|
340
|
+
Math.max(0, Math.min(H - 1, F + X)),
|
|
341
|
+
W,
|
|
342
|
+
F
|
|
343
|
+
];
|
|
344
|
+
}), Z = R(() => a(l, r(I))), q = R(() => i(l, r(I))), ce = R(() => {
|
|
345
|
+
var E;
|
|
346
|
+
return [
|
|
347
|
+
{
|
|
348
|
+
position: "relative",
|
|
349
|
+
overflow: "hidden",
|
|
350
|
+
WebkitOverflowScrolling: "touch",
|
|
351
|
+
willChange: "transform"
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
direction: l.direction,
|
|
355
|
+
height: Y(l.height) ? `${l.height}px` : l.height,
|
|
356
|
+
width: Y(l.width) ? `${l.width}px` : l.width
|
|
357
|
+
},
|
|
358
|
+
(E = l.style) != null ? E : {}
|
|
359
|
+
];
|
|
360
|
+
}), ye = R(() => {
|
|
361
|
+
const E = `${r(q)}px`;
|
|
362
|
+
return {
|
|
363
|
+
height: `${r(Z)}px`,
|
|
364
|
+
pointerEvents: r(C).isScrolling ? "none" : void 0,
|
|
365
|
+
width: E
|
|
366
|
+
};
|
|
367
|
+
}), oe = () => {
|
|
368
|
+
const { totalColumn: E, totalRow: H } = l;
|
|
369
|
+
if (E > 0 && H > 0) {
|
|
370
|
+
const [
|
|
371
|
+
F,
|
|
372
|
+
K,
|
|
373
|
+
X,
|
|
374
|
+
te
|
|
375
|
+
] = r(V), [ee, U, Ye, nt] = r(j);
|
|
376
|
+
u(Wt, {
|
|
377
|
+
columnCacheStart: F,
|
|
378
|
+
columnCacheEnd: K,
|
|
379
|
+
rowCacheStart: ee,
|
|
380
|
+
rowCacheEnd: U,
|
|
381
|
+
columnVisibleStart: X,
|
|
382
|
+
columnVisibleEnd: te,
|
|
383
|
+
rowVisibleStart: Ye,
|
|
384
|
+
rowVisibleEnd: nt
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
const {
|
|
388
|
+
scrollLeft: p,
|
|
389
|
+
scrollTop: L,
|
|
390
|
+
updateRequested: z,
|
|
391
|
+
xAxisScrollDir: D,
|
|
392
|
+
yAxisScrollDir: W
|
|
393
|
+
} = r(C);
|
|
394
|
+
u(Ft, {
|
|
395
|
+
xAxisScrollDir: D,
|
|
396
|
+
scrollLeft: p,
|
|
397
|
+
yAxisScrollDir: W,
|
|
398
|
+
scrollTop: L,
|
|
399
|
+
updateRequested: z
|
|
400
|
+
});
|
|
401
|
+
}, we = (E) => {
|
|
402
|
+
const {
|
|
403
|
+
clientHeight: H,
|
|
404
|
+
clientWidth: p,
|
|
405
|
+
scrollHeight: L,
|
|
406
|
+
scrollLeft: z,
|
|
407
|
+
scrollTop: D,
|
|
408
|
+
scrollWidth: W
|
|
409
|
+
} = E.currentTarget, F = r(C);
|
|
410
|
+
if (F.scrollTop === D && F.scrollLeft === z)
|
|
411
|
+
return;
|
|
412
|
+
let K = z;
|
|
413
|
+
if (Gt(l.direction))
|
|
414
|
+
switch (Kt()) {
|
|
415
|
+
case ut:
|
|
416
|
+
K = -z;
|
|
417
|
+
break;
|
|
418
|
+
case co:
|
|
419
|
+
K = W - p - z;
|
|
420
|
+
break;
|
|
421
|
+
}
|
|
422
|
+
C.value = {
|
|
423
|
+
...F,
|
|
424
|
+
isScrolling: !0,
|
|
425
|
+
scrollLeft: K,
|
|
426
|
+
scrollTop: Math.max(0, Math.min(D, L - H)),
|
|
427
|
+
updateRequested: !0,
|
|
428
|
+
xAxisScrollDir: Ze(F.scrollLeft, K),
|
|
429
|
+
yAxisScrollDir: Ze(F.scrollTop, D)
|
|
430
|
+
}, Ve(() => Se()), Oe(), oe();
|
|
431
|
+
}, be = (E, H) => {
|
|
432
|
+
const p = r($), L = (Z.value - p) / H * E;
|
|
433
|
+
J({
|
|
434
|
+
scrollTop: Math.min(Z.value - p, L)
|
|
435
|
+
});
|
|
436
|
+
}, de = (E, H) => {
|
|
437
|
+
const p = r(k), L = (q.value - p) / H * E;
|
|
438
|
+
J({
|
|
439
|
+
scrollLeft: Math.min(q.value - p, L)
|
|
440
|
+
});
|
|
441
|
+
}, { onWheel: re } = hn({
|
|
442
|
+
atXStartEdge: R(() => C.value.scrollLeft <= 0),
|
|
443
|
+
atXEndEdge: R(() => C.value.scrollLeft >= q.value - r(k)),
|
|
444
|
+
atYStartEdge: R(() => C.value.scrollTop <= 0),
|
|
445
|
+
atYEndEdge: R(() => C.value.scrollTop >= Z.value - r($))
|
|
446
|
+
}, (E, H) => {
|
|
447
|
+
var p, L, z, D;
|
|
448
|
+
(L = (p = O.value) == null ? void 0 : p.onMouseUp) == null || L.call(p), (D = (z = M.value) == null ? void 0 : z.onMouseUp) == null || D.call(z);
|
|
449
|
+
const W = r(k), F = r($);
|
|
450
|
+
J({
|
|
451
|
+
scrollLeft: Math.min(C.value.scrollLeft + E, q.value - W),
|
|
452
|
+
scrollTop: Math.min(C.value.scrollTop + H, Z.value - F)
|
|
453
|
+
});
|
|
454
|
+
}), J = ({
|
|
455
|
+
scrollLeft: E = C.value.scrollLeft,
|
|
456
|
+
scrollTop: H = C.value.scrollTop
|
|
457
|
+
}) => {
|
|
458
|
+
E = Math.max(E, 0), H = Math.max(H, 0);
|
|
459
|
+
const p = r(C);
|
|
460
|
+
H === p.scrollTop && E === p.scrollLeft || (C.value = {
|
|
461
|
+
...p,
|
|
462
|
+
xAxisScrollDir: Ze(p.scrollLeft, E),
|
|
463
|
+
yAxisScrollDir: Ze(p.scrollTop, H),
|
|
464
|
+
scrollLeft: E,
|
|
465
|
+
scrollTop: H,
|
|
466
|
+
updateRequested: !0
|
|
467
|
+
}, Ve(() => Se()), Oe(), oe());
|
|
468
|
+
}, Pe = (E = 0, H = 0, p = Ce) => {
|
|
469
|
+
const L = r(C);
|
|
470
|
+
H = Math.max(0, Math.min(H, l.totalColumn - 1)), E = Math.max(0, Math.min(E, l.totalRow - 1));
|
|
471
|
+
const z = Zo(S.namespace.value), D = r(I), W = a(l, D), F = i(l, D);
|
|
472
|
+
J({
|
|
473
|
+
scrollLeft: c(l, H, p, L.scrollLeft, D, F > l.width ? z : 0),
|
|
474
|
+
scrollTop: m(l, E, p, L.scrollTop, D, W > l.height ? z : 0)
|
|
475
|
+
});
|
|
476
|
+
}, ue = (E, H) => {
|
|
477
|
+
const { columnWidth: p, direction: L, rowHeight: z } = l, D = P.value(t && p, t && z, t && L), W = `${E},${H}`;
|
|
478
|
+
if (Po(D, W))
|
|
479
|
+
return D[W];
|
|
480
|
+
{
|
|
481
|
+
const [, F] = o(l, H, r(I)), K = r(I), X = Gt(L), [te, ee] = h(l, E, K), [U] = o(l, H, K);
|
|
482
|
+
return D[W] = {
|
|
483
|
+
position: "absolute",
|
|
484
|
+
left: X ? void 0 : `${F}px`,
|
|
485
|
+
right: X ? `${F}px` : void 0,
|
|
486
|
+
top: `${ee}px`,
|
|
487
|
+
height: `${te}px`,
|
|
488
|
+
width: `${U}px`
|
|
489
|
+
}, D[W];
|
|
490
|
+
}
|
|
491
|
+
}, Se = () => {
|
|
492
|
+
C.value.isScrolling = !1, Ve(() => {
|
|
493
|
+
P.value(-1, null, null);
|
|
494
|
+
});
|
|
495
|
+
};
|
|
496
|
+
xt(() => {
|
|
497
|
+
if (!Lo)
|
|
498
|
+
return;
|
|
499
|
+
const { initScrollLeft: E, initScrollTop: H } = l, p = r(T);
|
|
500
|
+
p && (Y(E) && (p.scrollLeft = E), Y(H) && (p.scrollTop = H)), oe();
|
|
501
|
+
});
|
|
502
|
+
const Oe = () => {
|
|
503
|
+
const { direction: E } = l, { scrollLeft: H, scrollTop: p, updateRequested: L } = r(C), z = r(T);
|
|
504
|
+
if (L && z) {
|
|
505
|
+
if (E === so)
|
|
506
|
+
switch (Kt()) {
|
|
507
|
+
case ut: {
|
|
508
|
+
z.scrollLeft = -H;
|
|
509
|
+
break;
|
|
510
|
+
}
|
|
511
|
+
case io: {
|
|
512
|
+
z.scrollLeft = H;
|
|
513
|
+
break;
|
|
514
|
+
}
|
|
515
|
+
default: {
|
|
516
|
+
const { clientWidth: D, scrollWidth: W } = z;
|
|
517
|
+
z.scrollLeft = W - D - H;
|
|
518
|
+
break;
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
else
|
|
522
|
+
z.scrollLeft = Math.max(0, H);
|
|
523
|
+
z.scrollTop = Math.max(0, p);
|
|
524
|
+
}
|
|
525
|
+
}, { resetAfterColumnIndex: Re, resetAfterRowIndex: We, resetAfter: Fe } = x.proxy;
|
|
526
|
+
y({
|
|
527
|
+
windowRef: T,
|
|
528
|
+
innerRef: A,
|
|
529
|
+
getItemStyleCache: P,
|
|
530
|
+
scrollTo: J,
|
|
531
|
+
scrollToItem: Pe,
|
|
532
|
+
states: C,
|
|
533
|
+
resetAfterColumnIndex: Re,
|
|
534
|
+
resetAfterRowIndex: We,
|
|
535
|
+
resetAfter: Fe
|
|
536
|
+
});
|
|
537
|
+
const Q = () => {
|
|
538
|
+
const {
|
|
539
|
+
scrollbarAlwaysOn: E,
|
|
540
|
+
scrollbarStartGap: H,
|
|
541
|
+
scrollbarEndGap: p,
|
|
542
|
+
totalColumn: L,
|
|
543
|
+
totalRow: z
|
|
544
|
+
} = l, D = r(k), W = r($), F = r(q), K = r(Z), { scrollLeft: X, scrollTop: te } = r(C), ee = me(Vt, {
|
|
545
|
+
ref: O,
|
|
546
|
+
alwaysOn: E,
|
|
547
|
+
startGap: H,
|
|
548
|
+
endGap: p,
|
|
549
|
+
class: S.e("horizontal"),
|
|
550
|
+
clientSize: D,
|
|
551
|
+
layout: "horizontal",
|
|
552
|
+
onScroll: de,
|
|
553
|
+
ratio: D * 100 / F,
|
|
554
|
+
scrollFrom: X / (F - D),
|
|
555
|
+
total: z,
|
|
556
|
+
visible: !0
|
|
557
|
+
}), U = me(Vt, {
|
|
558
|
+
ref: M,
|
|
559
|
+
alwaysOn: E,
|
|
560
|
+
startGap: H,
|
|
561
|
+
endGap: p,
|
|
562
|
+
class: S.e("vertical"),
|
|
563
|
+
clientSize: W,
|
|
564
|
+
layout: "vertical",
|
|
565
|
+
onScroll: be,
|
|
566
|
+
ratio: W * 100 / K,
|
|
567
|
+
scrollFrom: te / (K - W),
|
|
568
|
+
total: L,
|
|
569
|
+
visible: !0
|
|
570
|
+
});
|
|
571
|
+
return {
|
|
572
|
+
horizontalScrollbar: ee,
|
|
573
|
+
verticalScrollbar: U
|
|
574
|
+
};
|
|
575
|
+
}, ae = () => {
|
|
576
|
+
var E;
|
|
577
|
+
const [H, p] = r(V), [L, z] = r(j), { data: D, totalColumn: W, totalRow: F, useIsScrolling: K, itemKey: X } = l, te = [];
|
|
578
|
+
if (F > 0 && W > 0)
|
|
579
|
+
for (let ee = L; ee <= z; ee++)
|
|
580
|
+
for (let U = H; U <= p; U++)
|
|
581
|
+
te.push((E = b.default) == null ? void 0 : E.call(b, {
|
|
582
|
+
columnIndex: U,
|
|
583
|
+
data: D,
|
|
584
|
+
key: X({ columnIndex: U, data: D, rowIndex: ee }),
|
|
585
|
+
isScrolling: K ? r(C).isScrolling : void 0,
|
|
586
|
+
style: ue(ee, U),
|
|
587
|
+
rowIndex: ee
|
|
588
|
+
}));
|
|
589
|
+
return te;
|
|
590
|
+
}, he = () => {
|
|
591
|
+
const E = Nt(l.innerElement), H = ae();
|
|
592
|
+
return [
|
|
593
|
+
me(E, {
|
|
594
|
+
style: r(ye),
|
|
595
|
+
ref: A
|
|
596
|
+
}, Ot(E) ? H : {
|
|
597
|
+
default: () => H
|
|
598
|
+
})
|
|
599
|
+
];
|
|
600
|
+
};
|
|
601
|
+
return () => {
|
|
602
|
+
const E = Nt(l.containerElement), { horizontalScrollbar: H, verticalScrollbar: p } = Q(), L = he();
|
|
603
|
+
return me("div", {
|
|
604
|
+
key: 0,
|
|
605
|
+
class: S.e("wrapper"),
|
|
606
|
+
role: l.role
|
|
607
|
+
}, [
|
|
608
|
+
me(E, {
|
|
609
|
+
class: l.className,
|
|
610
|
+
style: r(ce),
|
|
611
|
+
onScroll: we,
|
|
612
|
+
onWheel: re,
|
|
613
|
+
ref: T
|
|
614
|
+
}, Ot(E) ? L : { default: () => L }),
|
|
615
|
+
H,
|
|
616
|
+
p
|
|
617
|
+
]);
|
|
618
|
+
};
|
|
619
|
+
}
|
|
620
|
+
}), $t = "ElFixedSizeGrid", fn = go({
|
|
621
|
+
name: "ElFixedSizeGrid",
|
|
622
|
+
getColumnPosition: ({ columnWidth: e }, t) => [
|
|
623
|
+
e,
|
|
624
|
+
t * e
|
|
625
|
+
],
|
|
626
|
+
getRowPosition: ({ rowHeight: e }, t) => [
|
|
627
|
+
e,
|
|
628
|
+
t * e
|
|
629
|
+
],
|
|
630
|
+
getEstimatedTotalHeight: ({ totalRow: e, rowHeight: t }) => t * e,
|
|
631
|
+
getEstimatedTotalWidth: ({ totalColumn: e, columnWidth: t }) => t * e,
|
|
632
|
+
getColumnOffset: ({ totalColumn: e, columnWidth: t, width: o }, n, s, a, i, c) => {
|
|
633
|
+
o = Number(o);
|
|
634
|
+
const m = Math.max(0, e * t - o), h = Math.min(m, n * t), d = Math.max(0, n * t - o + c + t);
|
|
635
|
+
switch (s === "smart" && (a >= d - o && a <= h + o ? s = Ce : s = ze), s) {
|
|
636
|
+
case it:
|
|
637
|
+
return h;
|
|
638
|
+
case ct:
|
|
639
|
+
return d;
|
|
640
|
+
case ze: {
|
|
641
|
+
const v = Math.round(d + (h - d) / 2);
|
|
642
|
+
return v < Math.ceil(o / 2) ? 0 : v > m + Math.floor(o / 2) ? m : v;
|
|
643
|
+
}
|
|
644
|
+
case Ce:
|
|
645
|
+
default:
|
|
646
|
+
return a >= d && a <= h ? a : d > h || a < d ? d : h;
|
|
647
|
+
}
|
|
648
|
+
},
|
|
649
|
+
getRowOffset: ({ rowHeight: e, height: t, totalRow: o }, n, s, a, i, c) => {
|
|
650
|
+
t = Number(t);
|
|
651
|
+
const m = Math.max(0, o * e - t), h = Math.min(m, n * e), d = Math.max(0, n * e - t + c + e);
|
|
652
|
+
switch (s === ro && (a >= d - t && a <= h + t ? s = Ce : s = ze), s) {
|
|
653
|
+
case it:
|
|
654
|
+
return h;
|
|
655
|
+
case ct:
|
|
656
|
+
return d;
|
|
657
|
+
case ze: {
|
|
658
|
+
const v = Math.round(d + (h - d) / 2);
|
|
659
|
+
return v < Math.ceil(t / 2) ? 0 : v > m + Math.floor(t / 2) ? m : v;
|
|
660
|
+
}
|
|
661
|
+
case Ce:
|
|
662
|
+
default:
|
|
663
|
+
return a >= d && a <= h ? a : d > h || a < d ? d : h;
|
|
664
|
+
}
|
|
665
|
+
},
|
|
666
|
+
getColumnStartIndexForOffset: ({ columnWidth: e, totalColumn: t }, o) => Math.max(0, Math.min(t - 1, Math.floor(o / e))),
|
|
667
|
+
getColumnStopIndexForStartIndex: ({ columnWidth: e, totalColumn: t, width: o }, n, s) => {
|
|
668
|
+
const a = n * e, i = Math.ceil((o + s - a) / e);
|
|
669
|
+
return Math.max(0, Math.min(t - 1, n + i - 1));
|
|
670
|
+
},
|
|
671
|
+
getRowStartIndexForOffset: ({ rowHeight: e, totalRow: t }, o) => Math.max(0, Math.min(t - 1, Math.floor(o / e))),
|
|
672
|
+
getRowStopIndexForStartIndex: ({ rowHeight: e, totalRow: t, height: o }, n, s) => {
|
|
673
|
+
const a = n * e, i = Math.ceil((o + s - a) / e);
|
|
674
|
+
return Math.max(0, Math.min(t - 1, n + i - 1));
|
|
675
|
+
},
|
|
676
|
+
initCache: () => {
|
|
677
|
+
},
|
|
678
|
+
clearCache: !0,
|
|
679
|
+
validateProps: ({ columnWidth: e, rowHeight: t }) => {
|
|
680
|
+
process.env.NODE_ENV !== "production" && (Y(e) || et($t, `
|
|
681
|
+
"columnWidth" must be passed as number,
|
|
682
|
+
instead ${typeof e} was given.
|
|
683
|
+
`), Y(t) || et($t, `
|
|
684
|
+
"columnWidth" must be passed as number,
|
|
685
|
+
instead ${typeof t} was given.
|
|
686
|
+
`));
|
|
687
|
+
}
|
|
688
|
+
}), { max: ot, min: yo, floor: wo } = Math, kt = "ElDynamicSizeGrid", mn = {
|
|
689
|
+
column: "columnWidth",
|
|
690
|
+
row: "rowHeight"
|
|
691
|
+
}, yt = {
|
|
692
|
+
column: "lastVisitedColumnIndex",
|
|
693
|
+
row: "lastVisitedRowIndex"
|
|
694
|
+
}, ie = (e, t, o, n) => {
|
|
695
|
+
const [s, a, i] = [
|
|
696
|
+
o[n],
|
|
697
|
+
e[mn[n]],
|
|
698
|
+
o[yt[n]]
|
|
699
|
+
];
|
|
700
|
+
if (t > i) {
|
|
701
|
+
let c = 0;
|
|
702
|
+
if (i >= 0) {
|
|
703
|
+
const m = s[i];
|
|
704
|
+
c = m.offset + m.size;
|
|
705
|
+
}
|
|
706
|
+
for (let m = i + 1; m <= t; m++) {
|
|
707
|
+
const h = a(m);
|
|
708
|
+
s[m] = {
|
|
709
|
+
offset: c,
|
|
710
|
+
size: h
|
|
711
|
+
}, c += h;
|
|
712
|
+
}
|
|
713
|
+
o[yt[n]] = t;
|
|
714
|
+
}
|
|
715
|
+
return s[t];
|
|
716
|
+
}, bo = (e, t, o, n, s, a) => {
|
|
717
|
+
for (; o <= n; ) {
|
|
718
|
+
const i = o + wo((n - o) / 2), c = ie(e, i, t, a).offset;
|
|
719
|
+
if (c === s)
|
|
720
|
+
return i;
|
|
721
|
+
c < s ? o = i + 1 : n = i - 1;
|
|
722
|
+
}
|
|
723
|
+
return ot(0, o - 1);
|
|
724
|
+
}, vn = (e, t, o, n, s) => {
|
|
725
|
+
const a = s === "column" ? e.totalColumn : e.totalRow;
|
|
726
|
+
let i = 1;
|
|
727
|
+
for (; o < a && ie(e, o, t, s).offset < n; )
|
|
728
|
+
o += i, i *= 2;
|
|
729
|
+
return bo(e, t, wo(o / 2), yo(o, a - 1), n, s);
|
|
730
|
+
}, Bt = (e, t, o, n) => {
|
|
731
|
+
const [s, a] = [
|
|
732
|
+
t[n],
|
|
733
|
+
t[yt[n]]
|
|
734
|
+
];
|
|
735
|
+
return (a > 0 ? s[a].offset : 0) >= o ? bo(e, t, 0, a, o, n) : vn(e, t, ot(0, a), o, n);
|
|
736
|
+
}, So = ({ totalRow: e }, { estimatedRowHeight: t, lastVisitedRowIndex: o, row: n }) => {
|
|
737
|
+
let s = 0;
|
|
738
|
+
if (o >= e && (o = e - 1), o >= 0) {
|
|
739
|
+
const c = n[o];
|
|
740
|
+
s = c.offset + c.size;
|
|
741
|
+
}
|
|
742
|
+
const i = (e - o - 1) * t;
|
|
743
|
+
return s + i;
|
|
744
|
+
}, Ro = ({ totalColumn: e }, { column: t, estimatedColumnWidth: o, lastVisitedColumnIndex: n }) => {
|
|
745
|
+
let s = 0;
|
|
746
|
+
if (n > e && (n = e - 1), n >= 0) {
|
|
747
|
+
const c = t[n];
|
|
748
|
+
s = c.offset + c.size;
|
|
749
|
+
}
|
|
750
|
+
const i = (e - n - 1) * o;
|
|
751
|
+
return s + i;
|
|
752
|
+
}, gn = {
|
|
753
|
+
column: Ro,
|
|
754
|
+
row: So
|
|
755
|
+
}, jt = (e, t, o, n, s, a, i) => {
|
|
756
|
+
const [c, m] = [
|
|
757
|
+
a === "row" ? e.height : e.width,
|
|
758
|
+
gn[a]
|
|
759
|
+
], h = ie(e, t, s, a), d = m(e, s), v = ot(0, yo(d - c, h.offset)), w = ot(0, h.offset - c + i + h.size);
|
|
760
|
+
switch (o === ro && (n >= w - c && n <= v + c ? o = Ce : o = ze), o) {
|
|
761
|
+
case it:
|
|
762
|
+
return v;
|
|
763
|
+
case ct:
|
|
764
|
+
return w;
|
|
765
|
+
case ze:
|
|
766
|
+
return Math.round(w + (v - w) / 2);
|
|
767
|
+
case Ce:
|
|
768
|
+
default:
|
|
769
|
+
return n >= w && n <= v ? n : w > v || n < w ? w : v;
|
|
770
|
+
}
|
|
771
|
+
}, yn = go({
|
|
772
|
+
name: "ElDynamicSizeGrid",
|
|
773
|
+
getColumnPosition: (e, t, o) => {
|
|
774
|
+
const n = ie(e, t, o, "column");
|
|
775
|
+
return [n.size, n.offset];
|
|
776
|
+
},
|
|
777
|
+
getRowPosition: (e, t, o) => {
|
|
778
|
+
const n = ie(e, t, o, "row");
|
|
779
|
+
return [n.size, n.offset];
|
|
780
|
+
},
|
|
781
|
+
getColumnOffset: (e, t, o, n, s, a) => jt(e, t, o, n, s, "column", a),
|
|
782
|
+
getRowOffset: (e, t, o, n, s, a) => jt(e, t, o, n, s, "row", a),
|
|
783
|
+
getColumnStartIndexForOffset: (e, t, o) => Bt(e, o, t, "column"),
|
|
784
|
+
getColumnStopIndexForStartIndex: (e, t, o, n) => {
|
|
785
|
+
const s = ie(e, t, n, "column"), a = o + e.width;
|
|
786
|
+
let i = s.offset + s.size, c = t;
|
|
787
|
+
for (; c < e.totalColumn - 1 && i < a; )
|
|
788
|
+
c++, i += ie(e, t, n, "column").size;
|
|
789
|
+
return c;
|
|
790
|
+
},
|
|
791
|
+
getEstimatedTotalHeight: So,
|
|
792
|
+
getEstimatedTotalWidth: Ro,
|
|
793
|
+
getRowStartIndexForOffset: (e, t, o) => Bt(e, o, t, "row"),
|
|
794
|
+
getRowStopIndexForStartIndex: (e, t, o, n) => {
|
|
795
|
+
const { totalRow: s, height: a } = e, i = ie(e, t, n, "row"), c = o + a;
|
|
796
|
+
let m = i.size + i.offset, h = t;
|
|
797
|
+
for (; h < s - 1 && m < c; )
|
|
798
|
+
h++, m += ie(e, h, n, "row").size;
|
|
799
|
+
return h;
|
|
800
|
+
},
|
|
801
|
+
injectToInstance: (e, t) => {
|
|
802
|
+
const o = ({ columnIndex: a, rowIndex: i }, c) => {
|
|
803
|
+
var m, h;
|
|
804
|
+
c = Wo(c) ? !0 : c, Y(a) && (t.value.lastVisitedColumnIndex = Math.min(t.value.lastVisitedColumnIndex, a - 1)), Y(i) && (t.value.lastVisitedRowIndex = Math.min(t.value.lastVisitedRowIndex, i - 1)), (m = e.exposed) == null || m.getItemStyleCache.value(-1, null, null), c && ((h = e.proxy) == null || h.$forceUpdate());
|
|
805
|
+
}, n = (a, i) => {
|
|
806
|
+
o({
|
|
807
|
+
columnIndex: a
|
|
808
|
+
}, i);
|
|
809
|
+
}, s = (a, i) => {
|
|
810
|
+
o({
|
|
811
|
+
rowIndex: a
|
|
812
|
+
}, i);
|
|
813
|
+
};
|
|
814
|
+
Object.assign(e.proxy, {
|
|
815
|
+
resetAfterColumnIndex: n,
|
|
816
|
+
resetAfterRowIndex: s,
|
|
817
|
+
resetAfter: o
|
|
818
|
+
});
|
|
819
|
+
},
|
|
820
|
+
initCache: ({
|
|
821
|
+
estimatedColumnWidth: e = Pt,
|
|
822
|
+
estimatedRowHeight: t = Pt
|
|
823
|
+
}) => ({
|
|
824
|
+
column: {},
|
|
825
|
+
estimatedColumnWidth: e,
|
|
826
|
+
estimatedRowHeight: t,
|
|
827
|
+
lastVisitedColumnIndex: -1,
|
|
828
|
+
lastVisitedRowIndex: -1,
|
|
829
|
+
row: {}
|
|
830
|
+
}),
|
|
831
|
+
clearCache: !1,
|
|
832
|
+
validateProps: ({ columnWidth: e, rowHeight: t }) => {
|
|
833
|
+
process.env.NODE_ENV !== "production" && ($e(e) || et(kt, `
|
|
834
|
+
"columnWidth" must be passed as function,
|
|
835
|
+
instead ${typeof e} was given.
|
|
836
|
+
`), $e(t) || et(kt, `
|
|
837
|
+
"rowHeight" must be passed as function,
|
|
838
|
+
instead ${typeof t} was given.
|
|
839
|
+
`));
|
|
840
|
+
}
|
|
841
|
+
});
|
|
842
|
+
var Be = /* @__PURE__ */ ((e) => (e.ASC = "asc", e.DESC = "desc", e))(Be || {}), je = /* @__PURE__ */ ((e) => (e.CENTER = "center", e.RIGHT = "right", e))(je || {}), xo = /* @__PURE__ */ ((e) => (e.LEFT = "left", e.RIGHT = "right", e))(xo || {});
|
|
843
|
+
const wt = {
|
|
844
|
+
asc: "desc",
|
|
845
|
+
desc: "asc"
|
|
846
|
+
/* ASC */
|
|
847
|
+
}, qe = Symbol("placeholder"), wn = (e, t, o) => {
|
|
848
|
+
var n;
|
|
849
|
+
const s = {
|
|
850
|
+
flexGrow: 0,
|
|
851
|
+
flexShrink: 0,
|
|
852
|
+
...o ? {} : {
|
|
853
|
+
flexGrow: e.flexGrow || 0,
|
|
854
|
+
flexShrink: e.flexShrink || 1
|
|
855
|
+
}
|
|
856
|
+
};
|
|
857
|
+
o || (s.flexShrink = 1);
|
|
858
|
+
const a = {
|
|
859
|
+
...(n = e.style) != null ? n : {},
|
|
860
|
+
...s,
|
|
861
|
+
flexBasis: "auto",
|
|
862
|
+
width: e.width
|
|
863
|
+
};
|
|
864
|
+
return t || (e.maxWidth && (a.maxWidth = e.maxWidth), e.minWidth && (a.minWidth = e.minWidth)), a;
|
|
865
|
+
};
|
|
866
|
+
function bn(e, t, o) {
|
|
867
|
+
const n = R(() => r(t).filter((l) => !l.hidden)), s = R(() => r(n).filter((l) => l.fixed === "left" || l.fixed === !0)), a = R(() => r(n).filter((l) => l.fixed === "right")), i = R(() => r(n).filter((l) => !l.fixed)), c = R(() => {
|
|
868
|
+
const l = [];
|
|
869
|
+
return r(s).forEach((u) => {
|
|
870
|
+
l.push({
|
|
871
|
+
...u,
|
|
872
|
+
placeholderSign: qe
|
|
873
|
+
});
|
|
874
|
+
}), r(i).forEach((u) => {
|
|
875
|
+
l.push(u);
|
|
876
|
+
}), r(a).forEach((u) => {
|
|
877
|
+
l.push({
|
|
878
|
+
...u,
|
|
879
|
+
placeholderSign: qe
|
|
880
|
+
});
|
|
881
|
+
}), l;
|
|
882
|
+
}), m = R(() => r(s).length || r(a).length), h = R(() => r(t).reduce((u, y) => (u[y.key] = wn(y, r(o), e.fixed), u), {})), d = R(() => r(n).reduce((l, u) => l + u.width, 0)), v = (l) => r(t).find((u) => u.key === l), w = (l) => r(h)[l], g = (l, u) => {
|
|
883
|
+
l.width = u;
|
|
884
|
+
};
|
|
885
|
+
function f(l) {
|
|
886
|
+
var u;
|
|
887
|
+
const { key: y } = l.currentTarget.dataset;
|
|
888
|
+
if (!y)
|
|
889
|
+
return;
|
|
890
|
+
const { sortState: b, sortBy: S } = e;
|
|
891
|
+
let x = Be.ASC;
|
|
892
|
+
St(b) ? x = wt[b[y]] : x = wt[S.order], (u = e.onColumnSort) == null || u.call(e, { column: v(y), key: y, order: x });
|
|
893
|
+
}
|
|
894
|
+
return {
|
|
895
|
+
columns: t,
|
|
896
|
+
columnsStyles: h,
|
|
897
|
+
columnsTotalWidth: d,
|
|
898
|
+
fixedColumnsOnLeft: s,
|
|
899
|
+
fixedColumnsOnRight: a,
|
|
900
|
+
hasFixedColumns: m,
|
|
901
|
+
mainColumns: c,
|
|
902
|
+
normalColumns: i,
|
|
903
|
+
visibleColumns: n,
|
|
904
|
+
getColumn: v,
|
|
905
|
+
getColumnStyle: w,
|
|
906
|
+
updateColumnWidth: g,
|
|
907
|
+
onColumnSorted: f
|
|
908
|
+
};
|
|
909
|
+
}
|
|
910
|
+
const Sn = (e, {
|
|
911
|
+
mainTableRef: t,
|
|
912
|
+
leftTableRef: o,
|
|
913
|
+
rightTableRef: n,
|
|
914
|
+
onMaybeEndReached: s
|
|
915
|
+
}) => {
|
|
916
|
+
const a = G({ scrollLeft: 0, scrollTop: 0 });
|
|
917
|
+
function i(g) {
|
|
918
|
+
var f, l, u;
|
|
919
|
+
const { scrollTop: y } = g;
|
|
920
|
+
(f = t.value) == null || f.scrollTo(g), (l = o.value) == null || l.scrollToTop(y), (u = n.value) == null || u.scrollToTop(y);
|
|
921
|
+
}
|
|
922
|
+
function c(g) {
|
|
923
|
+
a.value = g, i(g);
|
|
924
|
+
}
|
|
925
|
+
function m(g) {
|
|
926
|
+
a.value.scrollTop = g, i(r(a));
|
|
927
|
+
}
|
|
928
|
+
function h(g) {
|
|
929
|
+
var f, l;
|
|
930
|
+
a.value.scrollLeft = g, (l = (f = t.value) == null ? void 0 : f.scrollTo) == null || l.call(f, r(a));
|
|
931
|
+
}
|
|
932
|
+
function d(g) {
|
|
933
|
+
var f;
|
|
934
|
+
c(g), (f = e.onScroll) == null || f.call(e, g);
|
|
935
|
+
}
|
|
936
|
+
function v({ scrollTop: g }) {
|
|
937
|
+
const { scrollTop: f } = r(a);
|
|
938
|
+
g !== f && m(g);
|
|
939
|
+
}
|
|
940
|
+
function w(g, f = "auto") {
|
|
941
|
+
var l;
|
|
942
|
+
(l = t.value) == null || l.scrollToRow(g, f);
|
|
943
|
+
}
|
|
944
|
+
return Le(() => r(a).scrollTop, (g, f) => {
|
|
945
|
+
g > f && s();
|
|
946
|
+
}), {
|
|
947
|
+
scrollPos: a,
|
|
948
|
+
scrollTo: c,
|
|
949
|
+
scrollToLeft: h,
|
|
950
|
+
scrollToTop: m,
|
|
951
|
+
scrollToRow: w,
|
|
952
|
+
onScroll: d,
|
|
953
|
+
onVerticalScroll: v
|
|
954
|
+
};
|
|
955
|
+
}, Rn = (e, { mainTableRef: t, leftTableRef: o, rightTableRef: n }) => {
|
|
956
|
+
const s = Rt(), { emit: a } = s, i = Te(!1), c = Te(null), m = G(e.defaultExpandedRowKeys || []), h = G(-1), d = Te(null), v = G({}), w = G({}), g = Te({}), f = Te({}), l = Te({}), u = R(() => Y(e.estimatedRowHeight));
|
|
957
|
+
function y(M) {
|
|
958
|
+
var A;
|
|
959
|
+
(A = e.onRowsRendered) == null || A.call(e, M), M.rowCacheEnd > r(h) && (h.value = M.rowCacheEnd);
|
|
960
|
+
}
|
|
961
|
+
function b({ hovered: M, rowKey: A }) {
|
|
962
|
+
c.value = M ? A : null;
|
|
963
|
+
}
|
|
964
|
+
function S({
|
|
965
|
+
expanded: M,
|
|
966
|
+
rowData: A,
|
|
967
|
+
rowIndex: C,
|
|
968
|
+
rowKey: P
|
|
969
|
+
}) {
|
|
970
|
+
var $, k;
|
|
971
|
+
const V = [...r(m)], j = V.indexOf(P);
|
|
972
|
+
M ? j === -1 && V.push(P) : j > -1 && V.splice(j, 1), m.value = V, a("update:expandedRowKeys", V), ($ = e.onRowExpand) == null || $.call(e, {
|
|
973
|
+
expanded: M,
|
|
974
|
+
rowData: A,
|
|
975
|
+
rowIndex: C,
|
|
976
|
+
rowKey: P
|
|
977
|
+
}), (k = e.onExpandedRowsChange) == null || k.call(e, V);
|
|
978
|
+
}
|
|
979
|
+
const x = Ko(() => {
|
|
980
|
+
var M, A, C, P;
|
|
981
|
+
i.value = !0, v.value = { ...r(v), ...r(w) }, I(r(d), !1), w.value = {}, d.value = null, (M = t.value) == null || M.forceUpdate(), (A = o.value) == null || A.forceUpdate(), (C = n.value) == null || C.forceUpdate(), (P = s.proxy) == null || P.$forceUpdate(), i.value = !1;
|
|
982
|
+
}, 0);
|
|
983
|
+
function I(M, A = !1) {
|
|
984
|
+
r(u) && [t, o, n].forEach((C) => {
|
|
985
|
+
const P = r(C);
|
|
986
|
+
P && P.resetAfterRowIndex(M, A);
|
|
987
|
+
});
|
|
988
|
+
}
|
|
989
|
+
function T(M, A, C) {
|
|
990
|
+
const P = r(d);
|
|
991
|
+
(P === null || P > C) && (d.value = C), w.value[M] = A;
|
|
992
|
+
}
|
|
993
|
+
function O({ rowKey: M, height: A, rowIndex: C }, P) {
|
|
994
|
+
P ? P === xo.RIGHT ? l.value[M] = A : g.value[M] = A : f.value[M] = A;
|
|
995
|
+
const $ = Math.max(...[g, l, f].map((k) => k.value[M] || 0));
|
|
996
|
+
r(v)[M] !== $ && (T(M, $, C), x());
|
|
997
|
+
}
|
|
998
|
+
return {
|
|
999
|
+
hoveringRowKey: c,
|
|
1000
|
+
expandedRowKeys: m,
|
|
1001
|
+
lastRenderedRowIndex: h,
|
|
1002
|
+
isDynamic: u,
|
|
1003
|
+
isResetting: i,
|
|
1004
|
+
rowHeights: v,
|
|
1005
|
+
resetAfterIndex: I,
|
|
1006
|
+
onRowExpanded: S,
|
|
1007
|
+
onRowHovered: b,
|
|
1008
|
+
onRowsRendered: y,
|
|
1009
|
+
onRowHeightChange: O
|
|
1010
|
+
};
|
|
1011
|
+
}, xn = (e, { expandedRowKeys: t, lastRenderedRowIndex: o, resetAfterIndex: n }) => {
|
|
1012
|
+
const s = G({}), a = R(() => {
|
|
1013
|
+
const c = {}, { data: m, rowKey: h } = e, d = r(t);
|
|
1014
|
+
if (!d || !d.length)
|
|
1015
|
+
return m;
|
|
1016
|
+
const v = [], w = /* @__PURE__ */ new Set();
|
|
1017
|
+
d.forEach((f) => w.add(f));
|
|
1018
|
+
let g = m.slice();
|
|
1019
|
+
for (g.forEach((f) => c[f[h]] = 0); g.length > 0; ) {
|
|
1020
|
+
const f = g.shift();
|
|
1021
|
+
v.push(f), w.has(f[h]) && Array.isArray(f.children) && f.children.length > 0 && (g = [...f.children, ...g], f.children.forEach((l) => c[l[h]] = c[f[h]] + 1));
|
|
1022
|
+
}
|
|
1023
|
+
return s.value = c, v;
|
|
1024
|
+
}), i = R(() => {
|
|
1025
|
+
const { data: c, expandColumnKey: m } = e;
|
|
1026
|
+
return m ? r(a) : c;
|
|
1027
|
+
});
|
|
1028
|
+
return Le(i, (c, m) => {
|
|
1029
|
+
c !== m && (o.value = -1, n(0, !0));
|
|
1030
|
+
}), {
|
|
1031
|
+
data: i,
|
|
1032
|
+
depthMap: s
|
|
1033
|
+
};
|
|
1034
|
+
}, Tn = (e, t) => e + t, Je = (e) => ke(e) ? e.reduce(Tn, 0) : e, pe = (e, t, o = {}) => $e(e) ? e(t) : e ?? o, ve = (e) => (["width", "maxWidth", "minWidth", "height"].forEach((t) => {
|
|
1035
|
+
e[t] = Xe(e[t]);
|
|
1036
|
+
}), e), To = (e) => Ie(e) ? (t) => me(e, t) : e, En = (e, {
|
|
1037
|
+
columnsTotalWidth: t,
|
|
1038
|
+
data: o,
|
|
1039
|
+
fixedColumnsOnLeft: n,
|
|
1040
|
+
fixedColumnsOnRight: s
|
|
1041
|
+
}) => {
|
|
1042
|
+
const a = R(() => {
|
|
1043
|
+
const { fixed: S, width: x, vScrollbarSize: I } = e, T = x - I;
|
|
1044
|
+
return S ? Math.max(Math.round(r(t)), T) : T;
|
|
1045
|
+
}), i = R(() => r(a) + (e.fixed ? e.vScrollbarSize : 0)), c = R(() => {
|
|
1046
|
+
const { height: S = 0, maxHeight: x = 0, footerHeight: I, hScrollbarSize: T } = e;
|
|
1047
|
+
if (x > 0) {
|
|
1048
|
+
const O = r(f), M = r(m), C = r(g) + O + M + T;
|
|
1049
|
+
return Math.min(C, x - I);
|
|
1050
|
+
}
|
|
1051
|
+
return S - I;
|
|
1052
|
+
}), m = R(() => {
|
|
1053
|
+
const { rowHeight: S, estimatedRowHeight: x } = e, I = r(o);
|
|
1054
|
+
return Y(x) ? I.length * x : I.length * S;
|
|
1055
|
+
}), h = R(() => {
|
|
1056
|
+
const { maxHeight: S } = e, x = r(c);
|
|
1057
|
+
if (Y(S) && S > 0)
|
|
1058
|
+
return x;
|
|
1059
|
+
const I = r(m) + r(g) + r(f);
|
|
1060
|
+
return Math.min(x, I);
|
|
1061
|
+
}), d = (S) => S.width, v = R(() => Je(r(n).map(d))), w = R(() => Je(r(s).map(d))), g = R(() => Je(e.headerHeight)), f = R(() => {
|
|
1062
|
+
var S;
|
|
1063
|
+
return (((S = e.fixedData) == null ? void 0 : S.length) || 0) * e.rowHeight;
|
|
1064
|
+
}), l = R(() => r(c) - r(g) - r(f)), u = R(() => {
|
|
1065
|
+
const { style: S = {}, height: x, width: I } = e;
|
|
1066
|
+
return ve({
|
|
1067
|
+
...S,
|
|
1068
|
+
height: x,
|
|
1069
|
+
width: I
|
|
1070
|
+
});
|
|
1071
|
+
}), y = R(() => ve({ height: e.footerHeight })), b = R(() => ({
|
|
1072
|
+
top: Xe(r(g)),
|
|
1073
|
+
bottom: Xe(e.footerHeight),
|
|
1074
|
+
width: Xe(e.width)
|
|
1075
|
+
}));
|
|
1076
|
+
return {
|
|
1077
|
+
bodyWidth: a,
|
|
1078
|
+
fixedTableHeight: h,
|
|
1079
|
+
mainTableHeight: c,
|
|
1080
|
+
leftTableWidth: v,
|
|
1081
|
+
rightTableWidth: w,
|
|
1082
|
+
headerWidth: i,
|
|
1083
|
+
rowsHeight: m,
|
|
1084
|
+
windowHeight: l,
|
|
1085
|
+
footerHeight: y,
|
|
1086
|
+
emptyStyle: b,
|
|
1087
|
+
rootStyle: u,
|
|
1088
|
+
headerHeight: g
|
|
1089
|
+
};
|
|
1090
|
+
}, Cn = (e) => {
|
|
1091
|
+
const t = G(), o = G(0), n = G(0);
|
|
1092
|
+
let s;
|
|
1093
|
+
return xt(() => {
|
|
1094
|
+
s = Vo(t, ([a]) => {
|
|
1095
|
+
const { width: i, height: c } = a.contentRect, { paddingLeft: m, paddingRight: h, paddingTop: d, paddingBottom: v } = getComputedStyle(a.target), w = Number.parseInt(m) || 0, g = Number.parseInt(h) || 0, f = Number.parseInt(d) || 0, l = Number.parseInt(v) || 0;
|
|
1096
|
+
o.value = i - w - g, n.value = c - f - l;
|
|
1097
|
+
}).stop;
|
|
1098
|
+
}), Qt(() => {
|
|
1099
|
+
s == null || s();
|
|
1100
|
+
}), Le([o, n], ([a, i]) => {
|
|
1101
|
+
var c;
|
|
1102
|
+
(c = e.onResize) == null || c.call(e, {
|
|
1103
|
+
width: a,
|
|
1104
|
+
height: i
|
|
1105
|
+
});
|
|
1106
|
+
}), {
|
|
1107
|
+
sizer: t,
|
|
1108
|
+
width: o,
|
|
1109
|
+
height: n
|
|
1110
|
+
};
|
|
1111
|
+
};
|
|
1112
|
+
function _n(e) {
|
|
1113
|
+
const t = G(), o = G(), n = G(), {
|
|
1114
|
+
columns: s,
|
|
1115
|
+
columnsStyles: a,
|
|
1116
|
+
columnsTotalWidth: i,
|
|
1117
|
+
fixedColumnsOnLeft: c,
|
|
1118
|
+
fixedColumnsOnRight: m,
|
|
1119
|
+
hasFixedColumns: h,
|
|
1120
|
+
mainColumns: d,
|
|
1121
|
+
onColumnSorted: v
|
|
1122
|
+
} = bn(e, At(e, "columns"), At(e, "fixed")), {
|
|
1123
|
+
scrollTo: w,
|
|
1124
|
+
scrollToLeft: g,
|
|
1125
|
+
scrollToTop: f,
|
|
1126
|
+
scrollToRow: l,
|
|
1127
|
+
onScroll: u,
|
|
1128
|
+
onVerticalScroll: y,
|
|
1129
|
+
scrollPos: b
|
|
1130
|
+
} = Sn(e, {
|
|
1131
|
+
mainTableRef: t,
|
|
1132
|
+
leftTableRef: o,
|
|
1133
|
+
rightTableRef: n,
|
|
1134
|
+
onMaybeEndReached: Fe
|
|
1135
|
+
}), {
|
|
1136
|
+
expandedRowKeys: S,
|
|
1137
|
+
hoveringRowKey: x,
|
|
1138
|
+
lastRenderedRowIndex: I,
|
|
1139
|
+
isDynamic: T,
|
|
1140
|
+
isResetting: O,
|
|
1141
|
+
rowHeights: M,
|
|
1142
|
+
resetAfterIndex: A,
|
|
1143
|
+
onRowExpanded: C,
|
|
1144
|
+
onRowHeightChange: P,
|
|
1145
|
+
onRowHovered: $,
|
|
1146
|
+
onRowsRendered: k
|
|
1147
|
+
} = Rn(e, {
|
|
1148
|
+
mainTableRef: t,
|
|
1149
|
+
leftTableRef: o,
|
|
1150
|
+
rightTableRef: n
|
|
1151
|
+
}), { data: V, depthMap: j } = xn(e, {
|
|
1152
|
+
expandedRowKeys: S,
|
|
1153
|
+
lastRenderedRowIndex: I,
|
|
1154
|
+
resetAfterIndex: A
|
|
1155
|
+
}), {
|
|
1156
|
+
bodyWidth: Z,
|
|
1157
|
+
fixedTableHeight: q,
|
|
1158
|
+
mainTableHeight: ce,
|
|
1159
|
+
leftTableWidth: ye,
|
|
1160
|
+
rightTableWidth: oe,
|
|
1161
|
+
headerWidth: we,
|
|
1162
|
+
rowsHeight: be,
|
|
1163
|
+
windowHeight: de,
|
|
1164
|
+
footerHeight: re,
|
|
1165
|
+
emptyStyle: J,
|
|
1166
|
+
rootStyle: Pe,
|
|
1167
|
+
headerHeight: ue
|
|
1168
|
+
} = En(e, {
|
|
1169
|
+
columnsTotalWidth: i,
|
|
1170
|
+
data: V,
|
|
1171
|
+
fixedColumnsOnLeft: c,
|
|
1172
|
+
fixedColumnsOnRight: m
|
|
1173
|
+
}), Se = Te(!1), Oe = G(), Re = R(() => {
|
|
1174
|
+
const Q = r(V).length === 0;
|
|
1175
|
+
return ke(e.fixedData) ? e.fixedData.length === 0 && Q : Q;
|
|
1176
|
+
});
|
|
1177
|
+
function We(Q) {
|
|
1178
|
+
const { estimatedRowHeight: ae, rowHeight: he, rowKey: fe } = e;
|
|
1179
|
+
return ae ? r(M)[r(V)[Q][fe]] || ae : he;
|
|
1180
|
+
}
|
|
1181
|
+
function Fe() {
|
|
1182
|
+
const { onEndReached: Q } = e;
|
|
1183
|
+
if (!Q)
|
|
1184
|
+
return;
|
|
1185
|
+
const { scrollTop: ae } = r(b), he = r(be), fe = r(de), E = he - (ae + fe) + e.hScrollbarSize;
|
|
1186
|
+
r(I) >= 0 && he === ae + r(ce) - r(ue) && Q(E);
|
|
1187
|
+
}
|
|
1188
|
+
return Le(() => e.expandedRowKeys, (Q) => S.value = Q, {
|
|
1189
|
+
deep: !0
|
|
1190
|
+
}), {
|
|
1191
|
+
columns: s,
|
|
1192
|
+
containerRef: Oe,
|
|
1193
|
+
mainTableRef: t,
|
|
1194
|
+
leftTableRef: o,
|
|
1195
|
+
rightTableRef: n,
|
|
1196
|
+
isDynamic: T,
|
|
1197
|
+
isResetting: O,
|
|
1198
|
+
isScrolling: Se,
|
|
1199
|
+
hoveringRowKey: x,
|
|
1200
|
+
hasFixedColumns: h,
|
|
1201
|
+
columnsStyles: a,
|
|
1202
|
+
columnsTotalWidth: i,
|
|
1203
|
+
data: V,
|
|
1204
|
+
expandedRowKeys: S,
|
|
1205
|
+
depthMap: j,
|
|
1206
|
+
fixedColumnsOnLeft: c,
|
|
1207
|
+
fixedColumnsOnRight: m,
|
|
1208
|
+
mainColumns: d,
|
|
1209
|
+
bodyWidth: Z,
|
|
1210
|
+
emptyStyle: J,
|
|
1211
|
+
rootStyle: Pe,
|
|
1212
|
+
headerWidth: we,
|
|
1213
|
+
footerHeight: re,
|
|
1214
|
+
mainTableHeight: ce,
|
|
1215
|
+
fixedTableHeight: q,
|
|
1216
|
+
leftTableWidth: ye,
|
|
1217
|
+
rightTableWidth: oe,
|
|
1218
|
+
showEmpty: Re,
|
|
1219
|
+
getRowHeight: We,
|
|
1220
|
+
onColumnSorted: v,
|
|
1221
|
+
onRowHovered: $,
|
|
1222
|
+
onRowExpanded: C,
|
|
1223
|
+
onRowsRendered: k,
|
|
1224
|
+
onRowHeightChange: P,
|
|
1225
|
+
scrollTo: w,
|
|
1226
|
+
scrollToLeft: g,
|
|
1227
|
+
scrollToTop: f,
|
|
1228
|
+
scrollToRow: l,
|
|
1229
|
+
onScroll: u,
|
|
1230
|
+
onVerticalScroll: y
|
|
1231
|
+
};
|
|
1232
|
+
}
|
|
1233
|
+
const Tt = Symbol("tableV2"), Eo = String, Ue = {
|
|
1234
|
+
type: N(Array),
|
|
1235
|
+
required: !0
|
|
1236
|
+
}, Et = {
|
|
1237
|
+
type: N(Array)
|
|
1238
|
+
}, Co = {
|
|
1239
|
+
...Et,
|
|
1240
|
+
required: !0
|
|
1241
|
+
}, Hn = String, qt = {
|
|
1242
|
+
type: N(Array),
|
|
1243
|
+
default: () => to([])
|
|
1244
|
+
}, Ee = {
|
|
1245
|
+
type: Number,
|
|
1246
|
+
required: !0
|
|
1247
|
+
}, _o = {
|
|
1248
|
+
type: N([String, Number, Symbol]),
|
|
1249
|
+
default: "id"
|
|
1250
|
+
}, Ut = {
|
|
1251
|
+
type: N(Object)
|
|
1252
|
+
}, _e = le({
|
|
1253
|
+
class: String,
|
|
1254
|
+
columns: Ue,
|
|
1255
|
+
columnsStyles: {
|
|
1256
|
+
type: N(Object),
|
|
1257
|
+
required: !0
|
|
1258
|
+
},
|
|
1259
|
+
depth: Number,
|
|
1260
|
+
expandColumnKey: Hn,
|
|
1261
|
+
estimatedRowHeight: {
|
|
1262
|
+
...He.estimatedRowHeight,
|
|
1263
|
+
default: void 0
|
|
1264
|
+
},
|
|
1265
|
+
isScrolling: Boolean,
|
|
1266
|
+
onRowExpand: {
|
|
1267
|
+
type: N(Function)
|
|
1268
|
+
},
|
|
1269
|
+
onRowHover: {
|
|
1270
|
+
type: N(Function)
|
|
1271
|
+
},
|
|
1272
|
+
onRowHeightChange: {
|
|
1273
|
+
type: N(Function)
|
|
1274
|
+
},
|
|
1275
|
+
rowData: {
|
|
1276
|
+
type: N(Object),
|
|
1277
|
+
required: !0
|
|
1278
|
+
},
|
|
1279
|
+
rowEventHandlers: {
|
|
1280
|
+
type: N(Object)
|
|
1281
|
+
},
|
|
1282
|
+
rowIndex: {
|
|
1283
|
+
type: Number,
|
|
1284
|
+
required: !0
|
|
1285
|
+
},
|
|
1286
|
+
rowKey: _o,
|
|
1287
|
+
style: {
|
|
1288
|
+
type: N(Object)
|
|
1289
|
+
}
|
|
1290
|
+
}), at = {
|
|
1291
|
+
type: Number,
|
|
1292
|
+
required: !0
|
|
1293
|
+
}, Ct = le({
|
|
1294
|
+
class: String,
|
|
1295
|
+
columns: Ue,
|
|
1296
|
+
fixedHeaderData: {
|
|
1297
|
+
type: N(Array)
|
|
1298
|
+
},
|
|
1299
|
+
headerData: {
|
|
1300
|
+
type: N(Array),
|
|
1301
|
+
required: !0
|
|
1302
|
+
},
|
|
1303
|
+
headerHeight: {
|
|
1304
|
+
type: N([Number, Array]),
|
|
1305
|
+
default: 50
|
|
1306
|
+
},
|
|
1307
|
+
rowWidth: at,
|
|
1308
|
+
rowHeight: {
|
|
1309
|
+
type: Number,
|
|
1310
|
+
default: 50
|
|
1311
|
+
},
|
|
1312
|
+
height: at,
|
|
1313
|
+
width: at
|
|
1314
|
+
}), Qe = le({
|
|
1315
|
+
columns: Ue,
|
|
1316
|
+
data: Co,
|
|
1317
|
+
fixedData: Et,
|
|
1318
|
+
estimatedRowHeight: _e.estimatedRowHeight,
|
|
1319
|
+
width: Ee,
|
|
1320
|
+
height: Ee,
|
|
1321
|
+
headerWidth: Ee,
|
|
1322
|
+
headerHeight: Ct.headerHeight,
|
|
1323
|
+
bodyWidth: Ee,
|
|
1324
|
+
rowHeight: Ee,
|
|
1325
|
+
cache: dn.cache,
|
|
1326
|
+
useIsScrolling: Boolean,
|
|
1327
|
+
scrollbarAlwaysOn: He.scrollbarAlwaysOn,
|
|
1328
|
+
scrollbarStartGap: He.scrollbarStartGap,
|
|
1329
|
+
scrollbarEndGap: He.scrollbarEndGap,
|
|
1330
|
+
class: Eo,
|
|
1331
|
+
style: Ut,
|
|
1332
|
+
containerStyle: Ut,
|
|
1333
|
+
getRowHeight: {
|
|
1334
|
+
type: N(Function),
|
|
1335
|
+
required: !0
|
|
1336
|
+
},
|
|
1337
|
+
rowKey: _e.rowKey,
|
|
1338
|
+
onRowsRendered: {
|
|
1339
|
+
type: N(Function)
|
|
1340
|
+
},
|
|
1341
|
+
onScroll: {
|
|
1342
|
+
type: N(Function)
|
|
1343
|
+
}
|
|
1344
|
+
}), pn = le({
|
|
1345
|
+
cache: Qe.cache,
|
|
1346
|
+
estimatedRowHeight: _e.estimatedRowHeight,
|
|
1347
|
+
rowKey: _o,
|
|
1348
|
+
headerClass: {
|
|
1349
|
+
type: N([
|
|
1350
|
+
String,
|
|
1351
|
+
Function
|
|
1352
|
+
])
|
|
1353
|
+
},
|
|
1354
|
+
headerProps: {
|
|
1355
|
+
type: N([
|
|
1356
|
+
Object,
|
|
1357
|
+
Function
|
|
1358
|
+
])
|
|
1359
|
+
},
|
|
1360
|
+
headerCellProps: {
|
|
1361
|
+
type: N([
|
|
1362
|
+
Object,
|
|
1363
|
+
Function
|
|
1364
|
+
])
|
|
1365
|
+
},
|
|
1366
|
+
headerHeight: Ct.headerHeight,
|
|
1367
|
+
footerHeight: {
|
|
1368
|
+
type: Number,
|
|
1369
|
+
default: 0
|
|
1370
|
+
},
|
|
1371
|
+
rowClass: {
|
|
1372
|
+
type: N([String, Function])
|
|
1373
|
+
},
|
|
1374
|
+
rowProps: {
|
|
1375
|
+
type: N([Object, Function])
|
|
1376
|
+
},
|
|
1377
|
+
rowHeight: {
|
|
1378
|
+
type: Number,
|
|
1379
|
+
default: 50
|
|
1380
|
+
},
|
|
1381
|
+
cellProps: {
|
|
1382
|
+
type: N([
|
|
1383
|
+
Object,
|
|
1384
|
+
Function
|
|
1385
|
+
])
|
|
1386
|
+
},
|
|
1387
|
+
columns: Ue,
|
|
1388
|
+
data: Co,
|
|
1389
|
+
dataGetter: {
|
|
1390
|
+
type: N(Function)
|
|
1391
|
+
},
|
|
1392
|
+
fixedData: Et,
|
|
1393
|
+
expandColumnKey: _e.expandColumnKey,
|
|
1394
|
+
expandedRowKeys: qt,
|
|
1395
|
+
defaultExpandedRowKeys: qt,
|
|
1396
|
+
class: Eo,
|
|
1397
|
+
fixed: Boolean,
|
|
1398
|
+
style: {
|
|
1399
|
+
type: N(Object)
|
|
1400
|
+
},
|
|
1401
|
+
width: Ee,
|
|
1402
|
+
height: Ee,
|
|
1403
|
+
maxHeight: Number,
|
|
1404
|
+
useIsScrolling: Boolean,
|
|
1405
|
+
indentSize: {
|
|
1406
|
+
type: Number,
|
|
1407
|
+
default: 12
|
|
1408
|
+
},
|
|
1409
|
+
iconSize: {
|
|
1410
|
+
type: Number,
|
|
1411
|
+
default: 12
|
|
1412
|
+
},
|
|
1413
|
+
hScrollbarSize: He.hScrollbarSize,
|
|
1414
|
+
vScrollbarSize: He.vScrollbarSize,
|
|
1415
|
+
scrollbarAlwaysOn: vo.alwaysOn,
|
|
1416
|
+
sortBy: {
|
|
1417
|
+
type: N(Object),
|
|
1418
|
+
default: () => ({})
|
|
1419
|
+
},
|
|
1420
|
+
sortState: {
|
|
1421
|
+
type: N(Object),
|
|
1422
|
+
default: void 0
|
|
1423
|
+
},
|
|
1424
|
+
onColumnSort: {
|
|
1425
|
+
type: N(Function)
|
|
1426
|
+
},
|
|
1427
|
+
onExpandedRowsChange: {
|
|
1428
|
+
type: N(Function)
|
|
1429
|
+
},
|
|
1430
|
+
onEndReached: {
|
|
1431
|
+
type: N(Function)
|
|
1432
|
+
},
|
|
1433
|
+
onRowExpand: _e.onRowExpand,
|
|
1434
|
+
onScroll: Qe.onScroll,
|
|
1435
|
+
onRowsRendered: Qe.onRowsRendered,
|
|
1436
|
+
rowEventHandlers: _e.rowEventHandlers
|
|
1437
|
+
}), _t = (e, {
|
|
1438
|
+
slots: t
|
|
1439
|
+
}) => {
|
|
1440
|
+
var o;
|
|
1441
|
+
const {
|
|
1442
|
+
cellData: n,
|
|
1443
|
+
style: s
|
|
1444
|
+
} = e, a = ((o = n == null ? void 0 : n.toString) == null ? void 0 : o.call(n)) || "";
|
|
1445
|
+
return _("div", {
|
|
1446
|
+
class: e.class,
|
|
1447
|
+
title: a,
|
|
1448
|
+
style: s
|
|
1449
|
+
}, [t.default ? t.default(e) : a]);
|
|
1450
|
+
};
|
|
1451
|
+
_t.displayName = "ElTableV2Cell";
|
|
1452
|
+
_t.inheritAttrs = !1;
|
|
1453
|
+
const Ht = (e, {
|
|
1454
|
+
slots: t
|
|
1455
|
+
}) => {
|
|
1456
|
+
var o, n;
|
|
1457
|
+
return t.default ? t.default(e) : _("div", {
|
|
1458
|
+
class: e.class,
|
|
1459
|
+
title: (o = e.column) == null ? void 0 : o.title
|
|
1460
|
+
}, [(n = e.column) == null ? void 0 : n.title]);
|
|
1461
|
+
};
|
|
1462
|
+
Ht.displayName = "ElTableV2HeaderCell";
|
|
1463
|
+
Ht.inheritAttrs = !1;
|
|
1464
|
+
const Mn = le({
|
|
1465
|
+
class: String,
|
|
1466
|
+
columns: Ue,
|
|
1467
|
+
columnsStyles: {
|
|
1468
|
+
type: N(Object),
|
|
1469
|
+
required: !0
|
|
1470
|
+
},
|
|
1471
|
+
headerIndex: Number,
|
|
1472
|
+
style: { type: N(Object) }
|
|
1473
|
+
}), In = ge({
|
|
1474
|
+
name: "ElTableV2HeaderRow",
|
|
1475
|
+
props: Mn,
|
|
1476
|
+
setup(e, {
|
|
1477
|
+
slots: t
|
|
1478
|
+
}) {
|
|
1479
|
+
return () => {
|
|
1480
|
+
const {
|
|
1481
|
+
columns: o,
|
|
1482
|
+
columnsStyles: n,
|
|
1483
|
+
headerIndex: s,
|
|
1484
|
+
style: a
|
|
1485
|
+
} = e;
|
|
1486
|
+
let i = o.map((c, m) => t.cell({
|
|
1487
|
+
columns: o,
|
|
1488
|
+
column: c,
|
|
1489
|
+
columnIndex: m,
|
|
1490
|
+
headerIndex: s,
|
|
1491
|
+
style: n[c.key]
|
|
1492
|
+
}));
|
|
1493
|
+
return t.header && (i = t.header({
|
|
1494
|
+
cells: i.map((c) => ke(c) && c.length === 1 ? c[0] : c),
|
|
1495
|
+
columns: o,
|
|
1496
|
+
headerIndex: s
|
|
1497
|
+
})), _("div", {
|
|
1498
|
+
class: e.class,
|
|
1499
|
+
style: a,
|
|
1500
|
+
role: "row"
|
|
1501
|
+
}, [i]);
|
|
1502
|
+
};
|
|
1503
|
+
}
|
|
1504
|
+
}), On = "ElTableV2Header", Nn = ge({
|
|
1505
|
+
name: On,
|
|
1506
|
+
props: Ct,
|
|
1507
|
+
setup(e, {
|
|
1508
|
+
slots: t,
|
|
1509
|
+
expose: o
|
|
1510
|
+
}) {
|
|
1511
|
+
const n = De("table-v2"), s = G(), a = R(() => ve({
|
|
1512
|
+
width: e.width,
|
|
1513
|
+
height: e.height
|
|
1514
|
+
})), i = R(() => ve({
|
|
1515
|
+
width: e.rowWidth,
|
|
1516
|
+
height: e.height
|
|
1517
|
+
})), c = R(() => Xo(r(e.headerHeight))), m = (v) => {
|
|
1518
|
+
const w = r(s);
|
|
1519
|
+
Ve(() => {
|
|
1520
|
+
w != null && w.scroll && w.scroll({
|
|
1521
|
+
left: v
|
|
1522
|
+
});
|
|
1523
|
+
});
|
|
1524
|
+
}, h = () => {
|
|
1525
|
+
const v = n.e("fixed-header-row"), {
|
|
1526
|
+
columns: w,
|
|
1527
|
+
fixedHeaderData: g,
|
|
1528
|
+
rowHeight: f
|
|
1529
|
+
} = e;
|
|
1530
|
+
return g == null ? void 0 : g.map((l, u) => {
|
|
1531
|
+
var y;
|
|
1532
|
+
const b = ve({
|
|
1533
|
+
height: f,
|
|
1534
|
+
width: "100%"
|
|
1535
|
+
});
|
|
1536
|
+
return (y = t.fixed) == null ? void 0 : y.call(t, {
|
|
1537
|
+
class: v,
|
|
1538
|
+
columns: w,
|
|
1539
|
+
rowData: l,
|
|
1540
|
+
rowIndex: -(u + 1),
|
|
1541
|
+
style: b
|
|
1542
|
+
});
|
|
1543
|
+
});
|
|
1544
|
+
}, d = () => {
|
|
1545
|
+
const v = n.e("dynamic-header-row"), {
|
|
1546
|
+
columns: w
|
|
1547
|
+
} = e;
|
|
1548
|
+
return r(c).map((g, f) => {
|
|
1549
|
+
var l;
|
|
1550
|
+
const u = ve({
|
|
1551
|
+
width: "100%",
|
|
1552
|
+
height: g
|
|
1553
|
+
});
|
|
1554
|
+
return (l = t.dynamic) == null ? void 0 : l.call(t, {
|
|
1555
|
+
class: v,
|
|
1556
|
+
columns: w,
|
|
1557
|
+
headerIndex: f,
|
|
1558
|
+
style: u
|
|
1559
|
+
});
|
|
1560
|
+
});
|
|
1561
|
+
};
|
|
1562
|
+
return o({
|
|
1563
|
+
scrollToLeft: m
|
|
1564
|
+
}), () => {
|
|
1565
|
+
if (!(e.height <= 0))
|
|
1566
|
+
return _("div", {
|
|
1567
|
+
ref: s,
|
|
1568
|
+
class: e.class,
|
|
1569
|
+
style: r(a),
|
|
1570
|
+
role: "rowgroup"
|
|
1571
|
+
}, [_("div", {
|
|
1572
|
+
style: r(i),
|
|
1573
|
+
class: n.e("header")
|
|
1574
|
+
}, [d(), h()])]);
|
|
1575
|
+
};
|
|
1576
|
+
}
|
|
1577
|
+
}), An = (e) => {
|
|
1578
|
+
const {
|
|
1579
|
+
isScrolling: t
|
|
1580
|
+
} = eo(Tt), o = G(!1), n = G(), s = R(() => Y(e.estimatedRowHeight) && e.rowIndex >= 0), a = (m = !1) => {
|
|
1581
|
+
const h = r(n);
|
|
1582
|
+
if (!h)
|
|
1583
|
+
return;
|
|
1584
|
+
const {
|
|
1585
|
+
columns: d,
|
|
1586
|
+
onRowHeightChange: v,
|
|
1587
|
+
rowKey: w,
|
|
1588
|
+
rowIndex: g,
|
|
1589
|
+
style: f
|
|
1590
|
+
} = e, {
|
|
1591
|
+
height: l
|
|
1592
|
+
} = h.getBoundingClientRect();
|
|
1593
|
+
o.value = !0, Ve(() => {
|
|
1594
|
+
if (m || l !== Number.parseInt(f.height)) {
|
|
1595
|
+
const u = d[0], y = (u == null ? void 0 : u.placeholderSign) === qe;
|
|
1596
|
+
v == null || v({
|
|
1597
|
+
rowKey: w,
|
|
1598
|
+
height: l,
|
|
1599
|
+
rowIndex: g
|
|
1600
|
+
}, u && !y && u.fixed);
|
|
1601
|
+
}
|
|
1602
|
+
});
|
|
1603
|
+
}, i = R(() => {
|
|
1604
|
+
const {
|
|
1605
|
+
rowData: m,
|
|
1606
|
+
rowIndex: h,
|
|
1607
|
+
rowKey: d,
|
|
1608
|
+
onRowHover: v
|
|
1609
|
+
} = e, w = e.rowEventHandlers || {}, g = {};
|
|
1610
|
+
return Object.entries(w).forEach(([f, l]) => {
|
|
1611
|
+
$e(l) && (g[f] = (u) => {
|
|
1612
|
+
l({
|
|
1613
|
+
event: u,
|
|
1614
|
+
rowData: m,
|
|
1615
|
+
rowIndex: h,
|
|
1616
|
+
rowKey: d
|
|
1617
|
+
});
|
|
1618
|
+
});
|
|
1619
|
+
}), v && [{
|
|
1620
|
+
name: "onMouseleave",
|
|
1621
|
+
hovered: !1
|
|
1622
|
+
}, {
|
|
1623
|
+
name: "onMouseenter",
|
|
1624
|
+
hovered: !0
|
|
1625
|
+
}].forEach(({
|
|
1626
|
+
name: f,
|
|
1627
|
+
hovered: l
|
|
1628
|
+
}) => {
|
|
1629
|
+
const u = g[f];
|
|
1630
|
+
g[f] = (y) => {
|
|
1631
|
+
v({
|
|
1632
|
+
event: y,
|
|
1633
|
+
hovered: l,
|
|
1634
|
+
rowData: m,
|
|
1635
|
+
rowIndex: h,
|
|
1636
|
+
rowKey: d
|
|
1637
|
+
}), u == null || u(y);
|
|
1638
|
+
};
|
|
1639
|
+
}), g;
|
|
1640
|
+
}), c = (m) => {
|
|
1641
|
+
const {
|
|
1642
|
+
onRowExpand: h,
|
|
1643
|
+
rowData: d,
|
|
1644
|
+
rowIndex: v,
|
|
1645
|
+
rowKey: w
|
|
1646
|
+
} = e;
|
|
1647
|
+
h == null || h({
|
|
1648
|
+
expanded: m,
|
|
1649
|
+
rowData: d,
|
|
1650
|
+
rowIndex: v,
|
|
1651
|
+
rowKey: w
|
|
1652
|
+
});
|
|
1653
|
+
};
|
|
1654
|
+
return xt(() => {
|
|
1655
|
+
r(s) && a(!0);
|
|
1656
|
+
}), {
|
|
1657
|
+
isScrolling: t,
|
|
1658
|
+
measurable: s,
|
|
1659
|
+
measured: o,
|
|
1660
|
+
rowRef: n,
|
|
1661
|
+
eventHandlers: i,
|
|
1662
|
+
onExpand: c
|
|
1663
|
+
};
|
|
1664
|
+
}, zn = "ElTableV2TableRow", Dn = ge({
|
|
1665
|
+
name: zn,
|
|
1666
|
+
props: _e,
|
|
1667
|
+
setup(e, {
|
|
1668
|
+
expose: t,
|
|
1669
|
+
slots: o,
|
|
1670
|
+
attrs: n
|
|
1671
|
+
}) {
|
|
1672
|
+
const {
|
|
1673
|
+
eventHandlers: s,
|
|
1674
|
+
isScrolling: a,
|
|
1675
|
+
measurable: i,
|
|
1676
|
+
measured: c,
|
|
1677
|
+
rowRef: m,
|
|
1678
|
+
onExpand: h
|
|
1679
|
+
} = An(e);
|
|
1680
|
+
return t({
|
|
1681
|
+
onExpand: h
|
|
1682
|
+
}), () => {
|
|
1683
|
+
const {
|
|
1684
|
+
columns: d,
|
|
1685
|
+
columnsStyles: v,
|
|
1686
|
+
expandColumnKey: w,
|
|
1687
|
+
depth: g,
|
|
1688
|
+
rowData: f,
|
|
1689
|
+
rowIndex: l,
|
|
1690
|
+
style: u
|
|
1691
|
+
} = e;
|
|
1692
|
+
let y = d.map((b, S) => {
|
|
1693
|
+
const x = ke(f.children) && f.children.length > 0 && b.key === w;
|
|
1694
|
+
return o.cell({
|
|
1695
|
+
column: b,
|
|
1696
|
+
columns: d,
|
|
1697
|
+
columnIndex: S,
|
|
1698
|
+
depth: g,
|
|
1699
|
+
style: v[b.key],
|
|
1700
|
+
rowData: f,
|
|
1701
|
+
rowIndex: l,
|
|
1702
|
+
isScrolling: r(a),
|
|
1703
|
+
expandIconProps: x ? {
|
|
1704
|
+
rowData: f,
|
|
1705
|
+
rowIndex: l,
|
|
1706
|
+
onExpand: h
|
|
1707
|
+
} : void 0
|
|
1708
|
+
});
|
|
1709
|
+
});
|
|
1710
|
+
if (o.row && (y = o.row({
|
|
1711
|
+
cells: y.map((b) => ke(b) && b.length === 1 ? b[0] : b),
|
|
1712
|
+
style: u,
|
|
1713
|
+
columns: d,
|
|
1714
|
+
depth: g,
|
|
1715
|
+
rowData: f,
|
|
1716
|
+
rowIndex: l,
|
|
1717
|
+
isScrolling: r(a)
|
|
1718
|
+
})), r(i)) {
|
|
1719
|
+
const {
|
|
1720
|
+
height: b,
|
|
1721
|
+
...S
|
|
1722
|
+
} = u || {}, x = r(c);
|
|
1723
|
+
return _("div", B({
|
|
1724
|
+
ref: m,
|
|
1725
|
+
class: e.class,
|
|
1726
|
+
style: x ? u : S,
|
|
1727
|
+
role: "row"
|
|
1728
|
+
}, n, r(s)), [y]);
|
|
1729
|
+
}
|
|
1730
|
+
return _("div", B(n, {
|
|
1731
|
+
ref: m,
|
|
1732
|
+
class: e.class,
|
|
1733
|
+
style: u,
|
|
1734
|
+
role: "row"
|
|
1735
|
+
}, r(s)), [y]);
|
|
1736
|
+
};
|
|
1737
|
+
}
|
|
1738
|
+
}), Ln = (e) => {
|
|
1739
|
+
const {
|
|
1740
|
+
sortOrder: t
|
|
1741
|
+
} = e;
|
|
1742
|
+
return _(lo, {
|
|
1743
|
+
size: 14,
|
|
1744
|
+
class: e.class
|
|
1745
|
+
}, {
|
|
1746
|
+
default: () => [t === Be.ASC ? _(Jo, null, null) : _(Qo, null, null)]
|
|
1747
|
+
});
|
|
1748
|
+
}, Pn = (e) => {
|
|
1749
|
+
const {
|
|
1750
|
+
expanded: t,
|
|
1751
|
+
expandable: o,
|
|
1752
|
+
onExpand: n,
|
|
1753
|
+
style: s,
|
|
1754
|
+
size: a
|
|
1755
|
+
} = e, i = {
|
|
1756
|
+
onClick: o ? () => n(!t) : void 0,
|
|
1757
|
+
class: e.class
|
|
1758
|
+
};
|
|
1759
|
+
return _(lo, B(i, {
|
|
1760
|
+
size: a,
|
|
1761
|
+
style: s
|
|
1762
|
+
}), {
|
|
1763
|
+
default: () => [_(en, null, null)]
|
|
1764
|
+
});
|
|
1765
|
+
}, Wn = "ElTableV2Grid", Fn = (e) => {
|
|
1766
|
+
const t = G(), o = G(), n = R(() => {
|
|
1767
|
+
const {
|
|
1768
|
+
data: l,
|
|
1769
|
+
rowHeight: u,
|
|
1770
|
+
estimatedRowHeight: y
|
|
1771
|
+
} = e;
|
|
1772
|
+
if (!y)
|
|
1773
|
+
return l.length * u;
|
|
1774
|
+
}), s = R(() => {
|
|
1775
|
+
const {
|
|
1776
|
+
fixedData: l,
|
|
1777
|
+
rowHeight: u
|
|
1778
|
+
} = e;
|
|
1779
|
+
return ((l == null ? void 0 : l.length) || 0) * u;
|
|
1780
|
+
}), a = R(() => Je(e.headerHeight)), i = R(() => {
|
|
1781
|
+
const {
|
|
1782
|
+
height: l
|
|
1783
|
+
} = e;
|
|
1784
|
+
return Math.max(0, l - r(a) - r(s));
|
|
1785
|
+
}), c = R(() => r(a) + r(s) > 0), m = ({
|
|
1786
|
+
data: l,
|
|
1787
|
+
rowIndex: u
|
|
1788
|
+
}) => l[u][e.rowKey];
|
|
1789
|
+
function h({
|
|
1790
|
+
rowCacheStart: l,
|
|
1791
|
+
rowCacheEnd: u,
|
|
1792
|
+
rowVisibleStart: y,
|
|
1793
|
+
rowVisibleEnd: b
|
|
1794
|
+
}) {
|
|
1795
|
+
var S;
|
|
1796
|
+
(S = e.onRowsRendered) == null || S.call(e, {
|
|
1797
|
+
rowCacheStart: l,
|
|
1798
|
+
rowCacheEnd: u,
|
|
1799
|
+
rowVisibleStart: y,
|
|
1800
|
+
rowVisibleEnd: b
|
|
1801
|
+
});
|
|
1802
|
+
}
|
|
1803
|
+
function d(l, u) {
|
|
1804
|
+
var y;
|
|
1805
|
+
(y = o.value) == null || y.resetAfterRowIndex(l, u);
|
|
1806
|
+
}
|
|
1807
|
+
function v(l, u) {
|
|
1808
|
+
const y = r(t), b = r(o);
|
|
1809
|
+
!y || !b || (St(l) ? (y.scrollToLeft(l.scrollLeft), b.scrollTo(l)) : (y.scrollToLeft(l), b.scrollTo({
|
|
1810
|
+
scrollLeft: l,
|
|
1811
|
+
scrollTop: u
|
|
1812
|
+
})));
|
|
1813
|
+
}
|
|
1814
|
+
function w(l) {
|
|
1815
|
+
var u;
|
|
1816
|
+
(u = r(o)) == null || u.scrollTo({
|
|
1817
|
+
scrollTop: l
|
|
1818
|
+
});
|
|
1819
|
+
}
|
|
1820
|
+
function g(l, u) {
|
|
1821
|
+
var y;
|
|
1822
|
+
(y = r(o)) == null || y.scrollToItem(l, 1, u);
|
|
1823
|
+
}
|
|
1824
|
+
function f() {
|
|
1825
|
+
var l, u;
|
|
1826
|
+
(l = r(o)) == null || l.$forceUpdate(), (u = r(t)) == null || u.$forceUpdate();
|
|
1827
|
+
}
|
|
1828
|
+
return {
|
|
1829
|
+
bodyRef: o,
|
|
1830
|
+
forceUpdate: f,
|
|
1831
|
+
fixedRowHeight: s,
|
|
1832
|
+
gridHeight: i,
|
|
1833
|
+
hasHeader: c,
|
|
1834
|
+
headerHeight: a,
|
|
1835
|
+
headerRef: t,
|
|
1836
|
+
totalHeight: n,
|
|
1837
|
+
itemKey: m,
|
|
1838
|
+
onItemRendered: h,
|
|
1839
|
+
resetAfterRowIndex: d,
|
|
1840
|
+
scrollTo: v,
|
|
1841
|
+
scrollToTop: w,
|
|
1842
|
+
scrollToRow: g
|
|
1843
|
+
};
|
|
1844
|
+
}, pt = ge({
|
|
1845
|
+
name: Wn,
|
|
1846
|
+
props: Qe,
|
|
1847
|
+
setup(e, {
|
|
1848
|
+
slots: t,
|
|
1849
|
+
expose: o
|
|
1850
|
+
}) {
|
|
1851
|
+
const {
|
|
1852
|
+
ns: n
|
|
1853
|
+
} = eo(Tt), {
|
|
1854
|
+
bodyRef: s,
|
|
1855
|
+
fixedRowHeight: a,
|
|
1856
|
+
gridHeight: i,
|
|
1857
|
+
hasHeader: c,
|
|
1858
|
+
headerRef: m,
|
|
1859
|
+
headerHeight: h,
|
|
1860
|
+
totalHeight: d,
|
|
1861
|
+
forceUpdate: v,
|
|
1862
|
+
itemKey: w,
|
|
1863
|
+
onItemRendered: g,
|
|
1864
|
+
resetAfterRowIndex: f,
|
|
1865
|
+
scrollTo: l,
|
|
1866
|
+
scrollToTop: u,
|
|
1867
|
+
scrollToRow: y
|
|
1868
|
+
} = Fn(e);
|
|
1869
|
+
o({
|
|
1870
|
+
forceUpdate: v,
|
|
1871
|
+
totalHeight: d,
|
|
1872
|
+
scrollTo: l,
|
|
1873
|
+
scrollToTop: u,
|
|
1874
|
+
scrollToRow: y,
|
|
1875
|
+
resetAfterRowIndex: f
|
|
1876
|
+
});
|
|
1877
|
+
const b = () => e.bodyWidth;
|
|
1878
|
+
return () => {
|
|
1879
|
+
const {
|
|
1880
|
+
cache: S,
|
|
1881
|
+
columns: x,
|
|
1882
|
+
data: I,
|
|
1883
|
+
fixedData: T,
|
|
1884
|
+
useIsScrolling: O,
|
|
1885
|
+
scrollbarAlwaysOn: M,
|
|
1886
|
+
scrollbarEndGap: A,
|
|
1887
|
+
scrollbarStartGap: C,
|
|
1888
|
+
style: P,
|
|
1889
|
+
rowHeight: $,
|
|
1890
|
+
bodyWidth: k,
|
|
1891
|
+
estimatedRowHeight: V,
|
|
1892
|
+
headerWidth: j,
|
|
1893
|
+
height: Z,
|
|
1894
|
+
width: q,
|
|
1895
|
+
getRowHeight: ce,
|
|
1896
|
+
onScroll: ye
|
|
1897
|
+
} = e, oe = Y(V), we = oe ? yn : fn, be = r(h);
|
|
1898
|
+
return _("div", {
|
|
1899
|
+
role: "table",
|
|
1900
|
+
class: [n.e("table"), e.class],
|
|
1901
|
+
style: P
|
|
1902
|
+
}, [_(we, {
|
|
1903
|
+
ref: s,
|
|
1904
|
+
data: I,
|
|
1905
|
+
useIsScrolling: O,
|
|
1906
|
+
itemKey: w,
|
|
1907
|
+
columnCache: 0,
|
|
1908
|
+
columnWidth: oe ? b : k,
|
|
1909
|
+
totalColumn: 1,
|
|
1910
|
+
totalRow: I.length,
|
|
1911
|
+
rowCache: S,
|
|
1912
|
+
rowHeight: oe ? ce : $,
|
|
1913
|
+
width: q,
|
|
1914
|
+
height: r(i),
|
|
1915
|
+
class: n.e("body"),
|
|
1916
|
+
role: "rowgroup",
|
|
1917
|
+
scrollbarStartGap: C,
|
|
1918
|
+
scrollbarEndGap: A,
|
|
1919
|
+
scrollbarAlwaysOn: M,
|
|
1920
|
+
onScroll: ye,
|
|
1921
|
+
onItemRendered: g,
|
|
1922
|
+
perfMode: !1
|
|
1923
|
+
}, {
|
|
1924
|
+
default: (de) => {
|
|
1925
|
+
var re;
|
|
1926
|
+
const J = I[de.rowIndex];
|
|
1927
|
+
return (re = t.row) == null ? void 0 : re.call(t, {
|
|
1928
|
+
...de,
|
|
1929
|
+
columns: x,
|
|
1930
|
+
rowData: J
|
|
1931
|
+
});
|
|
1932
|
+
}
|
|
1933
|
+
}), r(c) && _(Nn, {
|
|
1934
|
+
ref: m,
|
|
1935
|
+
class: n.e("header-wrapper"),
|
|
1936
|
+
columns: x,
|
|
1937
|
+
headerData: I,
|
|
1938
|
+
headerHeight: e.headerHeight,
|
|
1939
|
+
fixedHeaderData: T,
|
|
1940
|
+
rowWidth: j,
|
|
1941
|
+
rowHeight: $,
|
|
1942
|
+
width: q,
|
|
1943
|
+
height: Math.min(be + r(a), Z)
|
|
1944
|
+
}, {
|
|
1945
|
+
dynamic: t.header,
|
|
1946
|
+
fixed: t.row
|
|
1947
|
+
})]);
|
|
1948
|
+
};
|
|
1949
|
+
}
|
|
1950
|
+
});
|
|
1951
|
+
function Gn(e) {
|
|
1952
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Ie(e);
|
|
1953
|
+
}
|
|
1954
|
+
const Kn = (e, {
|
|
1955
|
+
slots: t
|
|
1956
|
+
}) => {
|
|
1957
|
+
const {
|
|
1958
|
+
mainTableRef: o,
|
|
1959
|
+
...n
|
|
1960
|
+
} = e;
|
|
1961
|
+
return _(pt, B({
|
|
1962
|
+
ref: o
|
|
1963
|
+
}, n), Gn(t) ? t : {
|
|
1964
|
+
default: () => [t]
|
|
1965
|
+
});
|
|
1966
|
+
};
|
|
1967
|
+
function Vn(e) {
|
|
1968
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Ie(e);
|
|
1969
|
+
}
|
|
1970
|
+
const $n = (e, {
|
|
1971
|
+
slots: t
|
|
1972
|
+
}) => {
|
|
1973
|
+
if (!e.columns.length)
|
|
1974
|
+
return;
|
|
1975
|
+
const {
|
|
1976
|
+
leftTableRef: o,
|
|
1977
|
+
...n
|
|
1978
|
+
} = e;
|
|
1979
|
+
return _(pt, B({
|
|
1980
|
+
ref: o
|
|
1981
|
+
}, n), Vn(t) ? t : {
|
|
1982
|
+
default: () => [t]
|
|
1983
|
+
});
|
|
1984
|
+
};
|
|
1985
|
+
function kn(e) {
|
|
1986
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Ie(e);
|
|
1987
|
+
}
|
|
1988
|
+
const Bn = (e, {
|
|
1989
|
+
slots: t
|
|
1990
|
+
}) => {
|
|
1991
|
+
if (!e.columns.length)
|
|
1992
|
+
return;
|
|
1993
|
+
const {
|
|
1994
|
+
rightTableRef: o,
|
|
1995
|
+
...n
|
|
1996
|
+
} = e;
|
|
1997
|
+
return _(pt, B({
|
|
1998
|
+
ref: o
|
|
1999
|
+
}, n), kn(t) ? t : {
|
|
2000
|
+
default: () => [t]
|
|
2001
|
+
});
|
|
2002
|
+
};
|
|
2003
|
+
function jn(e) {
|
|
2004
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Ie(e);
|
|
2005
|
+
}
|
|
2006
|
+
const qn = (e, {
|
|
2007
|
+
slots: t
|
|
2008
|
+
}) => {
|
|
2009
|
+
const {
|
|
2010
|
+
columns: o,
|
|
2011
|
+
columnsStyles: n,
|
|
2012
|
+
depthMap: s,
|
|
2013
|
+
expandColumnKey: a,
|
|
2014
|
+
expandedRowKeys: i,
|
|
2015
|
+
estimatedRowHeight: c,
|
|
2016
|
+
hasFixedColumns: m,
|
|
2017
|
+
hoveringRowKey: h,
|
|
2018
|
+
rowData: d,
|
|
2019
|
+
rowIndex: v,
|
|
2020
|
+
style: w,
|
|
2021
|
+
isScrolling: g,
|
|
2022
|
+
rowProps: f,
|
|
2023
|
+
rowClass: l,
|
|
2024
|
+
rowKey: u,
|
|
2025
|
+
rowEventHandlers: y,
|
|
2026
|
+
ns: b,
|
|
2027
|
+
onRowHovered: S,
|
|
2028
|
+
onRowExpanded: x
|
|
2029
|
+
} = e, I = pe(l, {
|
|
2030
|
+
columns: o,
|
|
2031
|
+
rowData: d,
|
|
2032
|
+
rowIndex: v
|
|
2033
|
+
}, ""), T = pe(f, {
|
|
2034
|
+
columns: o,
|
|
2035
|
+
rowData: d,
|
|
2036
|
+
rowIndex: v
|
|
2037
|
+
}), O = d[u], M = s[O] || 0, A = !!a, C = v < 0, P = [b.e("row"), I, {
|
|
2038
|
+
[b.e(`row-depth-${M}`)]: A && v >= 0,
|
|
2039
|
+
[b.is("expanded")]: A && i.includes(O),
|
|
2040
|
+
[b.is("hovered")]: !g && O === h,
|
|
2041
|
+
[b.is("fixed")]: !M && C,
|
|
2042
|
+
[b.is("customized")]: !!t.row
|
|
2043
|
+
}], $ = m ? S : void 0, k = {
|
|
2044
|
+
...T,
|
|
2045
|
+
columns: o,
|
|
2046
|
+
columnsStyles: n,
|
|
2047
|
+
class: P,
|
|
2048
|
+
depth: M,
|
|
2049
|
+
expandColumnKey: a,
|
|
2050
|
+
estimatedRowHeight: C ? void 0 : c,
|
|
2051
|
+
isScrolling: g,
|
|
2052
|
+
rowIndex: v,
|
|
2053
|
+
rowData: d,
|
|
2054
|
+
rowKey: O,
|
|
2055
|
+
rowEventHandlers: y,
|
|
2056
|
+
style: w
|
|
2057
|
+
};
|
|
2058
|
+
return _(Dn, B(k, {
|
|
2059
|
+
onRowHover: $,
|
|
2060
|
+
onRowExpand: x
|
|
2061
|
+
}), jn(t) ? t : {
|
|
2062
|
+
default: () => [t]
|
|
2063
|
+
});
|
|
2064
|
+
}, bt = ({
|
|
2065
|
+
columns: e,
|
|
2066
|
+
column: t,
|
|
2067
|
+
columnIndex: o,
|
|
2068
|
+
depth: n,
|
|
2069
|
+
expandIconProps: s,
|
|
2070
|
+
isScrolling: a,
|
|
2071
|
+
rowData: i,
|
|
2072
|
+
rowIndex: c,
|
|
2073
|
+
style: m,
|
|
2074
|
+
expandedRowKeys: h,
|
|
2075
|
+
ns: d,
|
|
2076
|
+
cellProps: v,
|
|
2077
|
+
expandColumnKey: w,
|
|
2078
|
+
indentSize: g,
|
|
2079
|
+
iconSize: f,
|
|
2080
|
+
rowKey: l
|
|
2081
|
+
}, {
|
|
2082
|
+
slots: u
|
|
2083
|
+
}) => {
|
|
2084
|
+
const y = ve(m);
|
|
2085
|
+
if (t.placeholderSign === qe)
|
|
2086
|
+
return _("div", {
|
|
2087
|
+
class: d.em("row-cell", "placeholder"),
|
|
2088
|
+
style: y
|
|
2089
|
+
}, null);
|
|
2090
|
+
const {
|
|
2091
|
+
cellRenderer: b,
|
|
2092
|
+
dataKey: S,
|
|
2093
|
+
dataGetter: x
|
|
2094
|
+
} = t, T = To(b) || u.default || ((Z) => _(_t, Z, null)), O = $e(x) ? x({
|
|
2095
|
+
columns: e,
|
|
2096
|
+
column: t,
|
|
2097
|
+
columnIndex: o,
|
|
2098
|
+
rowData: i,
|
|
2099
|
+
rowIndex: c
|
|
2100
|
+
}) : Fo(i, S ?? ""), M = pe(v, {
|
|
2101
|
+
cellData: O,
|
|
2102
|
+
columns: e,
|
|
2103
|
+
column: t,
|
|
2104
|
+
columnIndex: o,
|
|
2105
|
+
rowIndex: c,
|
|
2106
|
+
rowData: i
|
|
2107
|
+
}), A = {
|
|
2108
|
+
class: d.e("cell-text"),
|
|
2109
|
+
columns: e,
|
|
2110
|
+
column: t,
|
|
2111
|
+
columnIndex: o,
|
|
2112
|
+
cellData: O,
|
|
2113
|
+
isScrolling: a,
|
|
2114
|
+
rowData: i,
|
|
2115
|
+
rowIndex: c
|
|
2116
|
+
}, C = T(A), P = [d.e("row-cell"), t.class, t.align === je.CENTER && d.is("align-center"), t.align === je.RIGHT && d.is("align-right")], $ = c >= 0 && w && t.key === w, k = c >= 0 && h.includes(i[l]);
|
|
2117
|
+
let V;
|
|
2118
|
+
const j = `margin-inline-start: ${n * g}px;`;
|
|
2119
|
+
return $ && (St(s) ? V = _(Pn, B(s, {
|
|
2120
|
+
class: [d.e("expand-icon"), d.is("expanded", k)],
|
|
2121
|
+
size: f,
|
|
2122
|
+
expanded: k,
|
|
2123
|
+
style: j,
|
|
2124
|
+
expandable: !0
|
|
2125
|
+
}), null) : V = _("div", {
|
|
2126
|
+
style: [j, `width: ${f}px; height: ${f}px;`].join(" ")
|
|
2127
|
+
}, null)), _("div", B({
|
|
2128
|
+
class: P,
|
|
2129
|
+
style: y
|
|
2130
|
+
}, M, {
|
|
2131
|
+
role: "cell"
|
|
2132
|
+
}), [V, C]);
|
|
2133
|
+
};
|
|
2134
|
+
bt.inheritAttrs = !1;
|
|
2135
|
+
function Un(e) {
|
|
2136
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Ie(e);
|
|
2137
|
+
}
|
|
2138
|
+
const Yn = ({
|
|
2139
|
+
columns: e,
|
|
2140
|
+
columnsStyles: t,
|
|
2141
|
+
headerIndex: o,
|
|
2142
|
+
style: n,
|
|
2143
|
+
headerClass: s,
|
|
2144
|
+
headerProps: a,
|
|
2145
|
+
ns: i
|
|
2146
|
+
}, {
|
|
2147
|
+
slots: c
|
|
2148
|
+
}) => {
|
|
2149
|
+
const m = {
|
|
2150
|
+
columns: e,
|
|
2151
|
+
headerIndex: o
|
|
2152
|
+
}, h = [i.e("header-row"), pe(s, m, ""), {
|
|
2153
|
+
[i.is("customized")]: !!c.header
|
|
2154
|
+
}], d = {
|
|
2155
|
+
...pe(a, m),
|
|
2156
|
+
columnsStyles: t,
|
|
2157
|
+
class: h,
|
|
2158
|
+
columns: e,
|
|
2159
|
+
headerIndex: o,
|
|
2160
|
+
style: n
|
|
2161
|
+
};
|
|
2162
|
+
return _(In, d, Un(c) ? c : {
|
|
2163
|
+
default: () => [c]
|
|
2164
|
+
});
|
|
2165
|
+
}, Yt = (e, {
|
|
2166
|
+
slots: t
|
|
2167
|
+
}) => {
|
|
2168
|
+
const {
|
|
2169
|
+
column: o,
|
|
2170
|
+
ns: n,
|
|
2171
|
+
style: s,
|
|
2172
|
+
onColumnSorted: a
|
|
2173
|
+
} = e, i = ve(s);
|
|
2174
|
+
if (o.placeholderSign === qe)
|
|
2175
|
+
return _("div", {
|
|
2176
|
+
class: n.em("header-row-cell", "placeholder"),
|
|
2177
|
+
style: i
|
|
2178
|
+
}, null);
|
|
2179
|
+
const {
|
|
2180
|
+
headerCellRenderer: c,
|
|
2181
|
+
headerClass: m,
|
|
2182
|
+
sortable: h
|
|
2183
|
+
} = o, d = {
|
|
2184
|
+
...e,
|
|
2185
|
+
class: n.e("header-cell-text")
|
|
2186
|
+
}, w = (To(c) || t.default || ((x) => _(Ht, x, null)))(d), {
|
|
2187
|
+
sortBy: g,
|
|
2188
|
+
sortState: f,
|
|
2189
|
+
headerCellProps: l
|
|
2190
|
+
} = e;
|
|
2191
|
+
let u, y;
|
|
2192
|
+
if (f) {
|
|
2193
|
+
const x = f[o.key];
|
|
2194
|
+
u = !!wt[x], y = u ? x : Be.ASC;
|
|
2195
|
+
} else
|
|
2196
|
+
u = o.key === g.key, y = u ? g.order : Be.ASC;
|
|
2197
|
+
const b = [n.e("header-cell"), pe(m, e, ""), o.align === je.CENTER && n.is("align-center"), o.align === je.RIGHT && n.is("align-right"), h && n.is("sortable")], S = {
|
|
2198
|
+
...pe(l, e),
|
|
2199
|
+
onClick: o.sortable ? a : void 0,
|
|
2200
|
+
class: b,
|
|
2201
|
+
style: i,
|
|
2202
|
+
"data-key": o.key
|
|
2203
|
+
};
|
|
2204
|
+
return _("div", B(S, {
|
|
2205
|
+
role: "columnheader"
|
|
2206
|
+
}), [w, h && _(Ln, {
|
|
2207
|
+
class: [n.e("sort-icon"), u && n.is("sorting")],
|
|
2208
|
+
sortOrder: y
|
|
2209
|
+
}, null)]);
|
|
2210
|
+
}, Ho = (e, {
|
|
2211
|
+
slots: t
|
|
2212
|
+
}) => {
|
|
2213
|
+
var o;
|
|
2214
|
+
return _("div", {
|
|
2215
|
+
class: e.class,
|
|
2216
|
+
style: e.style
|
|
2217
|
+
}, [(o = t.default) == null ? void 0 : o.call(t)]);
|
|
2218
|
+
};
|
|
2219
|
+
Ho.displayName = "ElTableV2Footer";
|
|
2220
|
+
const po = (e, {
|
|
2221
|
+
slots: t
|
|
2222
|
+
}) => _("div", {
|
|
2223
|
+
class: e.class,
|
|
2224
|
+
style: e.style
|
|
2225
|
+
}, [t.default ? t.default() : _(Jt, null, null)]);
|
|
2226
|
+
po.displayName = "ElTableV2Empty";
|
|
2227
|
+
const Mo = (e, {
|
|
2228
|
+
slots: t
|
|
2229
|
+
}) => {
|
|
2230
|
+
var o;
|
|
2231
|
+
return _("div", {
|
|
2232
|
+
class: e.class,
|
|
2233
|
+
style: e.style
|
|
2234
|
+
}, [(o = t.default) == null ? void 0 : o.call(t)]);
|
|
2235
|
+
};
|
|
2236
|
+
Mo.displayName = "ElTableV2Overlay";
|
|
2237
|
+
function Ge(e) {
|
|
2238
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Ie(e);
|
|
2239
|
+
}
|
|
2240
|
+
const Zn = "ElTableV2", Xn = ge({
|
|
2241
|
+
name: Zn,
|
|
2242
|
+
props: pn,
|
|
2243
|
+
setup(e, {
|
|
2244
|
+
slots: t,
|
|
2245
|
+
expose: o
|
|
2246
|
+
}) {
|
|
2247
|
+
const n = De("table-v2"), {
|
|
2248
|
+
columnsStyles: s,
|
|
2249
|
+
fixedColumnsOnLeft: a,
|
|
2250
|
+
fixedColumnsOnRight: i,
|
|
2251
|
+
mainColumns: c,
|
|
2252
|
+
mainTableHeight: m,
|
|
2253
|
+
fixedTableHeight: h,
|
|
2254
|
+
leftTableWidth: d,
|
|
2255
|
+
rightTableWidth: v,
|
|
2256
|
+
data: w,
|
|
2257
|
+
depthMap: g,
|
|
2258
|
+
expandedRowKeys: f,
|
|
2259
|
+
hasFixedColumns: l,
|
|
2260
|
+
hoveringRowKey: u,
|
|
2261
|
+
mainTableRef: y,
|
|
2262
|
+
leftTableRef: b,
|
|
2263
|
+
rightTableRef: S,
|
|
2264
|
+
isDynamic: x,
|
|
2265
|
+
isResetting: I,
|
|
2266
|
+
isScrolling: T,
|
|
2267
|
+
bodyWidth: O,
|
|
2268
|
+
emptyStyle: M,
|
|
2269
|
+
rootStyle: A,
|
|
2270
|
+
headerWidth: C,
|
|
2271
|
+
footerHeight: P,
|
|
2272
|
+
showEmpty: $,
|
|
2273
|
+
scrollTo: k,
|
|
2274
|
+
scrollToLeft: V,
|
|
2275
|
+
scrollToTop: j,
|
|
2276
|
+
scrollToRow: Z,
|
|
2277
|
+
getRowHeight: q,
|
|
2278
|
+
onColumnSorted: ce,
|
|
2279
|
+
onRowHeightChange: ye,
|
|
2280
|
+
onRowHovered: oe,
|
|
2281
|
+
onRowExpanded: we,
|
|
2282
|
+
onRowsRendered: be,
|
|
2283
|
+
onScroll: de,
|
|
2284
|
+
onVerticalScroll: re
|
|
2285
|
+
} = _n(e);
|
|
2286
|
+
return o({
|
|
2287
|
+
scrollTo: k,
|
|
2288
|
+
scrollToLeft: V,
|
|
2289
|
+
scrollToTop: j,
|
|
2290
|
+
scrollToRow: Z
|
|
2291
|
+
}), Bo(Tt, {
|
|
2292
|
+
ns: n,
|
|
2293
|
+
isResetting: I,
|
|
2294
|
+
hoveringRowKey: u,
|
|
2295
|
+
isScrolling: T
|
|
2296
|
+
}), () => {
|
|
2297
|
+
const {
|
|
2298
|
+
cache: J,
|
|
2299
|
+
cellProps: Pe,
|
|
2300
|
+
estimatedRowHeight: ue,
|
|
2301
|
+
expandColumnKey: Se,
|
|
2302
|
+
fixedData: Oe,
|
|
2303
|
+
headerHeight: Re,
|
|
2304
|
+
headerClass: We,
|
|
2305
|
+
headerProps: Fe,
|
|
2306
|
+
headerCellProps: Q,
|
|
2307
|
+
sortBy: ae,
|
|
2308
|
+
sortState: he,
|
|
2309
|
+
rowHeight: fe,
|
|
2310
|
+
rowClass: E,
|
|
2311
|
+
rowEventHandlers: H,
|
|
2312
|
+
rowKey: p,
|
|
2313
|
+
rowProps: L,
|
|
2314
|
+
scrollbarAlwaysOn: z,
|
|
2315
|
+
indentSize: D,
|
|
2316
|
+
iconSize: W,
|
|
2317
|
+
useIsScrolling: F,
|
|
2318
|
+
vScrollbarSize: K,
|
|
2319
|
+
width: X
|
|
2320
|
+
} = e, te = r(w), ee = {
|
|
2321
|
+
cache: J,
|
|
2322
|
+
class: n.e("main"),
|
|
2323
|
+
columns: r(c),
|
|
2324
|
+
data: te,
|
|
2325
|
+
fixedData: Oe,
|
|
2326
|
+
estimatedRowHeight: ue,
|
|
2327
|
+
bodyWidth: r(O) + K,
|
|
2328
|
+
headerHeight: Re,
|
|
2329
|
+
headerWidth: r(C),
|
|
2330
|
+
height: r(m),
|
|
2331
|
+
mainTableRef: y,
|
|
2332
|
+
rowKey: p,
|
|
2333
|
+
rowHeight: fe,
|
|
2334
|
+
scrollbarAlwaysOn: z,
|
|
2335
|
+
scrollbarStartGap: 2,
|
|
2336
|
+
scrollbarEndGap: K,
|
|
2337
|
+
useIsScrolling: F,
|
|
2338
|
+
width: X,
|
|
2339
|
+
getRowHeight: q,
|
|
2340
|
+
onRowsRendered: be,
|
|
2341
|
+
onScroll: de
|
|
2342
|
+
}, U = r(d), Ye = r(h), nt = {
|
|
2343
|
+
cache: J,
|
|
2344
|
+
class: n.e("left"),
|
|
2345
|
+
columns: r(a),
|
|
2346
|
+
data: te,
|
|
2347
|
+
estimatedRowHeight: ue,
|
|
2348
|
+
leftTableRef: b,
|
|
2349
|
+
rowHeight: fe,
|
|
2350
|
+
bodyWidth: U,
|
|
2351
|
+
headerWidth: U,
|
|
2352
|
+
headerHeight: Re,
|
|
2353
|
+
height: Ye,
|
|
2354
|
+
rowKey: p,
|
|
2355
|
+
scrollbarAlwaysOn: z,
|
|
2356
|
+
scrollbarStartGap: 2,
|
|
2357
|
+
scrollbarEndGap: K,
|
|
2358
|
+
useIsScrolling: F,
|
|
2359
|
+
width: U,
|
|
2360
|
+
getRowHeight: q,
|
|
2361
|
+
onScroll: re
|
|
2362
|
+
}, lt = r(v) + K, Io = {
|
|
2363
|
+
cache: J,
|
|
2364
|
+
class: n.e("right"),
|
|
2365
|
+
columns: r(i),
|
|
2366
|
+
data: te,
|
|
2367
|
+
estimatedRowHeight: ue,
|
|
2368
|
+
rightTableRef: S,
|
|
2369
|
+
rowHeight: fe,
|
|
2370
|
+
bodyWidth: lt,
|
|
2371
|
+
headerWidth: lt,
|
|
2372
|
+
headerHeight: Re,
|
|
2373
|
+
height: Ye,
|
|
2374
|
+
rowKey: p,
|
|
2375
|
+
scrollbarAlwaysOn: z,
|
|
2376
|
+
scrollbarStartGap: 2,
|
|
2377
|
+
scrollbarEndGap: K,
|
|
2378
|
+
width: lt,
|
|
2379
|
+
style: `--${r(n.namespace)}-table-scrollbar-size: ${K}px`,
|
|
2380
|
+
useIsScrolling: F,
|
|
2381
|
+
getRowHeight: q,
|
|
2382
|
+
onScroll: re
|
|
2383
|
+
}, Ne = r(s), Oo = {
|
|
2384
|
+
ns: n,
|
|
2385
|
+
depthMap: r(g),
|
|
2386
|
+
columnsStyles: Ne,
|
|
2387
|
+
expandColumnKey: Se,
|
|
2388
|
+
expandedRowKeys: r(f),
|
|
2389
|
+
estimatedRowHeight: ue,
|
|
2390
|
+
hasFixedColumns: r(l),
|
|
2391
|
+
hoveringRowKey: r(u),
|
|
2392
|
+
rowProps: L,
|
|
2393
|
+
rowClass: E,
|
|
2394
|
+
rowKey: p,
|
|
2395
|
+
rowEventHandlers: H,
|
|
2396
|
+
onRowHovered: oe,
|
|
2397
|
+
onRowExpanded: we,
|
|
2398
|
+
onRowHeightChange: ye
|
|
2399
|
+
}, Mt = {
|
|
2400
|
+
cellProps: Pe,
|
|
2401
|
+
expandColumnKey: Se,
|
|
2402
|
+
indentSize: D,
|
|
2403
|
+
iconSize: W,
|
|
2404
|
+
rowKey: p,
|
|
2405
|
+
expandedRowKeys: r(f),
|
|
2406
|
+
ns: n
|
|
2407
|
+
}, No = {
|
|
2408
|
+
ns: n,
|
|
2409
|
+
headerClass: We,
|
|
2410
|
+
headerProps: Fe,
|
|
2411
|
+
columnsStyles: Ne
|
|
2412
|
+
}, It = {
|
|
2413
|
+
ns: n,
|
|
2414
|
+
sortBy: ae,
|
|
2415
|
+
sortState: he,
|
|
2416
|
+
headerCellProps: Q,
|
|
2417
|
+
onColumnSorted: ce
|
|
2418
|
+
}, se = {
|
|
2419
|
+
row: (rt) => _(qn, B(rt, Oo), {
|
|
2420
|
+
row: t.row,
|
|
2421
|
+
cell: (ne) => {
|
|
2422
|
+
let xe;
|
|
2423
|
+
return t.cell ? _(bt, B(ne, Mt, {
|
|
2424
|
+
style: Ne[ne.column.key]
|
|
2425
|
+
}), Ge(xe = t.cell(ne)) ? xe : {
|
|
2426
|
+
default: () => [xe]
|
|
2427
|
+
}) : _(bt, B(ne, Mt, {
|
|
2428
|
+
style: Ne[ne.column.key]
|
|
2429
|
+
}), null);
|
|
2430
|
+
}
|
|
2431
|
+
}),
|
|
2432
|
+
header: (rt) => _(Yn, B(rt, No), {
|
|
2433
|
+
header: t.header,
|
|
2434
|
+
cell: (ne) => {
|
|
2435
|
+
let xe;
|
|
2436
|
+
return t["header-cell"] ? _(Yt, B(ne, It, {
|
|
2437
|
+
style: Ne[ne.column.key]
|
|
2438
|
+
}), Ge(xe = t["header-cell"](ne)) ? xe : {
|
|
2439
|
+
default: () => [xe]
|
|
2440
|
+
}) : _(Yt, B(ne, It, {
|
|
2441
|
+
style: Ne[ne.column.key]
|
|
2442
|
+
}), null);
|
|
2443
|
+
}
|
|
2444
|
+
})
|
|
2445
|
+
}, Ao = [e.class, n.b(), n.e("root"), {
|
|
2446
|
+
[n.is("dynamic")]: r(x)
|
|
2447
|
+
}], zo = {
|
|
2448
|
+
class: n.e("footer"),
|
|
2449
|
+
style: r(P)
|
|
2450
|
+
};
|
|
2451
|
+
return _("div", {
|
|
2452
|
+
class: Ao,
|
|
2453
|
+
style: r(A)
|
|
2454
|
+
}, [_(Kn, ee, Ge(se) ? se : {
|
|
2455
|
+
default: () => [se]
|
|
2456
|
+
}), _($n, nt, Ge(se) ? se : {
|
|
2457
|
+
default: () => [se]
|
|
2458
|
+
}), _(Bn, Io, Ge(se) ? se : {
|
|
2459
|
+
default: () => [se]
|
|
2460
|
+
}), t.footer && _(Ho, zo, {
|
|
2461
|
+
default: t.footer
|
|
2462
|
+
}), r($) && _(po, {
|
|
2463
|
+
class: n.e("empty"),
|
|
2464
|
+
style: r(M)
|
|
2465
|
+
}, {
|
|
2466
|
+
default: t.empty
|
|
2467
|
+
}), t.overlay && _(Mo, {
|
|
2468
|
+
class: n.e("overlay")
|
|
2469
|
+
}, {
|
|
2470
|
+
default: t.overlay
|
|
2471
|
+
})]);
|
|
2472
|
+
};
|
|
2473
|
+
}
|
|
2474
|
+
}), Jn = le({
|
|
2475
|
+
disableWidth: Boolean,
|
|
2476
|
+
disableHeight: Boolean,
|
|
2477
|
+
onResize: {
|
|
2478
|
+
type: N(Function)
|
|
2479
|
+
}
|
|
2480
|
+
}), Qn = ge({
|
|
2481
|
+
name: "ElAutoResizer",
|
|
2482
|
+
props: Jn,
|
|
2483
|
+
setup(e, {
|
|
2484
|
+
slots: t
|
|
2485
|
+
}) {
|
|
2486
|
+
const o = De("auto-resizer"), {
|
|
2487
|
+
height: n,
|
|
2488
|
+
width: s,
|
|
2489
|
+
sizer: a
|
|
2490
|
+
} = Cn(e), i = {
|
|
2491
|
+
width: "100%",
|
|
2492
|
+
height: "100%"
|
|
2493
|
+
};
|
|
2494
|
+
return () => {
|
|
2495
|
+
var c;
|
|
2496
|
+
return _("div", {
|
|
2497
|
+
ref: a,
|
|
2498
|
+
class: o.b(),
|
|
2499
|
+
style: i
|
|
2500
|
+
}, [(c = t.default) == null ? void 0 : c.call(t, {
|
|
2501
|
+
height: n.value,
|
|
2502
|
+
width: s.value
|
|
2503
|
+
})]);
|
|
2504
|
+
};
|
|
2505
|
+
}
|
|
2506
|
+
}), el = Xt(Xn), tl = Xt(Qn);
|
|
2507
|
+
const ol = {
|
|
2508
|
+
__name: "index",
|
|
2509
|
+
props: /* @__PURE__ */ zt({
|
|
2510
|
+
// 表格数据
|
|
2511
|
+
data: {
|
|
2512
|
+
type: Array,
|
|
2513
|
+
default: () => [{
|
|
2514
|
+
featureName: "第一个"
|
|
2515
|
+
}, {
|
|
2516
|
+
featureName: "第二个"
|
|
2517
|
+
}, {
|
|
2518
|
+
featureName: "第三个"
|
|
2519
|
+
}]
|
|
2520
|
+
},
|
|
2521
|
+
// 表格渲染DOM结构
|
|
2522
|
+
columns: {
|
|
2523
|
+
type: Array,
|
|
2524
|
+
default: () => [{
|
|
2525
|
+
key: "code",
|
|
2526
|
+
title: "品种",
|
|
2527
|
+
dataKey: "code",
|
|
2528
|
+
width: 120,
|
|
2529
|
+
fixed: !0,
|
|
2530
|
+
cellRenderer: ({
|
|
2531
|
+
rowData: e
|
|
2532
|
+
}) => {
|
|
2533
|
+
const {
|
|
2534
|
+
featureName: t
|
|
2535
|
+
} = e;
|
|
2536
|
+
return _("div", {
|
|
2537
|
+
class: "overflowText",
|
|
2538
|
+
title: `${t}`
|
|
2539
|
+
}, [t]);
|
|
2540
|
+
}
|
|
2541
|
+
}]
|
|
2542
|
+
},
|
|
2543
|
+
// 功能配置项
|
|
2544
|
+
config: {
|
|
2545
|
+
type: Object,
|
|
2546
|
+
default: () => {
|
|
2547
|
+
}
|
|
2548
|
+
}
|
|
2549
|
+
}, {
|
|
2550
|
+
activeData: {
|
|
2551
|
+
default: () => []
|
|
2552
|
+
},
|
|
2553
|
+
activeDataModifiers: {}
|
|
2554
|
+
}),
|
|
2555
|
+
emits: /* @__PURE__ */ zt(["scrollCallBack"], ["update:activeData"]),
|
|
2556
|
+
setup(e, {
|
|
2557
|
+
emit: t
|
|
2558
|
+
}) {
|
|
2559
|
+
const o = t, n = e, s = R(() => ({
|
|
2560
|
+
activeRowNum: 1,
|
|
2561
|
+
// 激活行数量, 默认1
|
|
2562
|
+
activeRowKey: "id",
|
|
2563
|
+
// 激活行key, 默认id
|
|
2564
|
+
isOpenPageUpDown: !0,
|
|
2565
|
+
// 是否开启键盘pageUp,pageDown移动选择行功能
|
|
2566
|
+
...n.config
|
|
2567
|
+
})), a = G(null), i = jo(e, "activeData"), c = R(() => {
|
|
2568
|
+
const {
|
|
2569
|
+
activeRowKey: f
|
|
2570
|
+
} = s.value;
|
|
2571
|
+
return i.value.map((l) => l[f]);
|
|
2572
|
+
}), m = ({
|
|
2573
|
+
rowData: f
|
|
2574
|
+
}) => {
|
|
2575
|
+
const {
|
|
2576
|
+
activeRowNum: l,
|
|
2577
|
+
activeRowKey: u
|
|
2578
|
+
} = s.value;
|
|
2579
|
+
if (!l || !i.value.length)
|
|
2580
|
+
return;
|
|
2581
|
+
let y = "";
|
|
2582
|
+
return f[u] === c.value[0] && (y += " virtualTable-active-Area-start"), f[u] === c.value[c.value.length - 1] && (y += " virtualTable-active-Area-end"), c.value.includes(f[u]) && (y += " virtualTable-active-Area-row"), y;
|
|
2583
|
+
}, h = ({
|
|
2584
|
+
rowData: f,
|
|
2585
|
+
rowIndex: l
|
|
2586
|
+
}) => {
|
|
2587
|
+
const {
|
|
2588
|
+
activeRowNum: u,
|
|
2589
|
+
activeRowKey: y
|
|
2590
|
+
} = s.value;
|
|
2591
|
+
if (!u || c.value.includes(f[y]))
|
|
2592
|
+
return;
|
|
2593
|
+
const b = Math.floor(l / u) * u;
|
|
2594
|
+
i.value = n.data.slice(b, b + u);
|
|
2595
|
+
};
|
|
2596
|
+
let d = !1, v = 0;
|
|
2597
|
+
const w = (f) => {
|
|
2598
|
+
let l = !1;
|
|
2599
|
+
const u = document.querySelector("#VirtualTable").querySelector(".el-table-v2__body").querySelector("div").querySelector("div"), y = Number(u.style.height.split("px")[0]), b = document.querySelector("#VirtualTable").querySelector(".el-table-v2__body").querySelector("div"), S = Number(b.style.height.split("px")[0]);
|
|
2600
|
+
y - f.scrollTop === S && (l = !0), d === !1 && (v = f.scrollLeft), o("scrollCallBack", {
|
|
2601
|
+
...f,
|
|
2602
|
+
isTouchBottom: l
|
|
2603
|
+
});
|
|
2604
|
+
}, g = ({
|
|
2605
|
+
code: f
|
|
2606
|
+
}) => {
|
|
2607
|
+
var S, x, I, T;
|
|
2608
|
+
const {
|
|
2609
|
+
data: l
|
|
2610
|
+
} = n, {
|
|
2611
|
+
activeRowNum: u,
|
|
2612
|
+
activeRowKey: y
|
|
2613
|
+
} = s.value;
|
|
2614
|
+
if (!l.length)
|
|
2615
|
+
return;
|
|
2616
|
+
const b = l.findIndex((O) => O[y] === c.value[0]);
|
|
2617
|
+
if (f === "PageUp") {
|
|
2618
|
+
const O = b - u;
|
|
2619
|
+
O >= 0 && (i.value = l.slice(O, b), d = !0, (S = a.value) == null || S.scrollToRow(O), (x = a.value) == null || x.scrollToLeft(v), d = !1);
|
|
2620
|
+
return;
|
|
2621
|
+
} else if (f === "PageDown")
|
|
2622
|
+
if (i.value[i.value.length - 1][y] === l[l.length - 1][y])
|
|
2623
|
+
o("scrollCallBack", {
|
|
2624
|
+
yAxisScrollDir: "forward",
|
|
2625
|
+
isTouchBottom: !0
|
|
2626
|
+
});
|
|
2627
|
+
else {
|
|
2628
|
+
const O = b + u;
|
|
2629
|
+
i.value = l.slice(O, O + u), d = !0, (I = a.value) == null || I.scrollToRow(O + i.value.length - 1), (T = a.value) == null || T.scrollToLeft(v), d = !1;
|
|
2630
|
+
}
|
|
2631
|
+
};
|
|
2632
|
+
return Le(() => s.value.isOpenPageUpDown, (f) => {
|
|
2633
|
+
f && s.value.activeRowNum && window.addEventListener("keydown", g);
|
|
2634
|
+
}, {
|
|
2635
|
+
immediate: !0
|
|
2636
|
+
}), qo(() => {
|
|
2637
|
+
window.removeEventListener("keydown", g);
|
|
2638
|
+
}), (f, l) => {
|
|
2639
|
+
const u = Jt, y = el, b = tl;
|
|
2640
|
+
return Uo(), Yo(b, null, {
|
|
2641
|
+
default: Dt(({
|
|
2642
|
+
height: S,
|
|
2643
|
+
width: x
|
|
2644
|
+
}) => [_(y, {
|
|
2645
|
+
id: "VirtualTable",
|
|
2646
|
+
ref_key: "tableRef",
|
|
2647
|
+
ref: a,
|
|
2648
|
+
width: x,
|
|
2649
|
+
height: S,
|
|
2650
|
+
data: e.data,
|
|
2651
|
+
columns: e.columns,
|
|
2652
|
+
"row-class": m,
|
|
2653
|
+
"row-event-handlers": {
|
|
2654
|
+
onClick: h
|
|
2655
|
+
},
|
|
2656
|
+
fixed: "",
|
|
2657
|
+
border: "",
|
|
2658
|
+
onScroll: w
|
|
2659
|
+
}, {
|
|
2660
|
+
empty: Dt(() => [_(u, {
|
|
2661
|
+
description: "暂无数据",
|
|
2662
|
+
style: {
|
|
2663
|
+
height: "100%"
|
|
2664
|
+
}
|
|
2665
|
+
})]),
|
|
2666
|
+
_: 2
|
|
2667
|
+
}, 1032, ["width", "height", "data", "columns", "row-event-handlers"])]),
|
|
2668
|
+
_: 1
|
|
2669
|
+
});
|
|
2670
|
+
};
|
|
2671
|
+
}
|
|
2672
|
+
};
|
|
2673
|
+
const Zt = /* @__PURE__ */ tn(ol, [["__scopeId", "data-v-7b74bdcc"]]);
|
|
2674
|
+
Zt.install = (e) => {
|
|
2675
|
+
e.component("st-virtualTable", Zt);
|
|
2676
|
+
};
|
|
2677
|
+
export {
|
|
2678
|
+
Zt as default
|
|
2679
|
+
};
|