@vtable-guild/vtable-guild 2.6.3 → 2.7.0
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/css/presets/antdv.css +2 -0
- package/css/presets/element-plus.css +2 -0
- package/css/style.css +25 -3
- package/css/tailwind3-utilities.css +21 -3
- package/css/tailwind3.css +4 -0
- package/css/tailwind4.css +4 -0
- package/dist/core/src/components/VirtualList/VirtualList.d.ts.map +1 -1
- package/dist/core/src/components/VirtualList/VirtualList.mjs +97 -91
- package/dist/css/presets/antdv.css +2 -0
- package/dist/css/presets/element-plus.css +2 -0
- package/dist/css/style.css +25 -3
- package/dist/css/tailwind3-utilities.css +21 -3
- package/dist/css/tailwind3.css +4 -0
- package/dist/css/tailwind4.css +4 -0
- package/dist/index.full.mjs +4051 -3623
- package/dist/index.mjs +22 -19
- package/dist/table/src/components/ExpandedRowTr.d.ts +90 -0
- package/dist/table/src/components/ExpandedRowTr.d.ts.map +1 -0
- package/dist/table/src/components/ExpandedRowTr.mjs +61 -0
- package/dist/table/src/components/Table.d.ts +23 -3
- package/dist/table/src/components/Table.d.ts.map +1 -1
- package/dist/table/src/components/Table.mjs +421 -365
- package/dist/table/src/components/TableBody.d.ts.map +1 -1
- package/dist/table/src/components/TableBody.mjs +67 -58
- package/dist/table/src/components/VTable.vue.d.ts +4 -3
- package/dist/table/src/components/VTable.vue.d.ts.map +1 -1
- package/dist/table/src/components/VTable.vue.mjs +43 -37
- package/dist/table/src/components/VirtualTableBody.d.ts.map +1 -1
- package/dist/table/src/components/VirtualTableBody.mjs +151 -140
- package/dist/table/src/composables/index.d.ts +3 -0
- package/dist/table/src/composables/index.d.ts.map +1 -1
- package/dist/table/src/composables/useAutoHeight.d.ts +32 -0
- package/dist/table/src/composables/useAutoHeight.d.ts.map +1 -0
- package/dist/table/src/composables/useAutoHeight.mjs +66 -0
- package/dist/table/src/composables/useAutoHeight.test.d.ts +2 -0
- package/dist/table/src/composables/useAutoHeight.test.d.ts.map +1 -0
- package/dist/table/src/composables/useColumnDisplay.d.ts +26 -0
- package/dist/table/src/composables/useColumnDisplay.d.ts.map +1 -0
- package/dist/table/src/composables/useColumnDisplay.mjs +46 -0
- package/dist/table/src/composables/useColumnDisplay.test.d.ts +2 -0
- package/dist/table/src/composables/useColumnDisplay.test.d.ts.map +1 -0
- package/dist/table/src/composables/useColumnMetrics.d.ts.map +1 -1
- package/dist/table/src/composables/useColumnMetrics.mjs +49 -49
- package/dist/table/src/composables/useColumnMetrics.test.d.ts +2 -0
- package/dist/table/src/composables/useColumnMetrics.test.d.ts.map +1 -0
- package/dist/table/src/composables/useColumnWindow.mjs +16 -16
- package/dist/table/src/composables/useResize.d.ts.map +1 -1
- package/dist/table/src/composables/useResize.mjs +37 -31
- package/dist/table/src/composables/useRowDragSort.d.ts +79 -0
- package/dist/table/src/composables/useRowDragSort.d.ts.map +1 -0
- package/dist/table/src/composables/useRowDragSort.mjs +146 -0
- package/dist/table/src/composables/useRowDragSort.test.d.ts +2 -0
- package/dist/table/src/composables/useRowDragSort.test.d.ts.map +1 -0
- package/dist/table/src/composables/useScroll.d.ts +8 -0
- package/dist/table/src/composables/useScroll.d.ts.map +1 -1
- package/dist/table/src/composables/useScroll.mjs +37 -37
- package/dist/table/src/composables/useVirtual.d.ts +35 -0
- package/dist/table/src/composables/useVirtual.d.ts.map +1 -1
- package/dist/table/src/composables/useVirtual.mjs +44 -16
- package/dist/table/src/context.d.ts +14 -0
- package/dist/table/src/context.d.ts.map +1 -1
- package/dist/table/src/index.d.ts +14 -4
- package/dist/table/src/index.d.ts.map +1 -1
- package/dist/table/src/types/column.d.ts +6 -0
- package/dist/table/src/types/column.d.ts.map +1 -1
- package/dist/table/src/types/index.d.ts +1 -1
- package/dist/table/src/types/index.d.ts.map +1 -1
- package/dist/table/src/types/table.d.ts +32 -9
- package/dist/table/src/types/table.d.ts.map +1 -1
- package/dist/table/src/utils/rowKey.d.ts +8 -0
- package/dist/table/src/utils/rowKey.d.ts.map +1 -0
- package/dist/table/src/utils/rowKey.mjs +6 -0
- package/dist/theme/src/presets/antdv/table.d.ts +6 -1
- package/dist/theme/src/presets/antdv/table.d.ts.map +1 -1
- package/dist/theme/src/presets/antdv/table.mjs +14 -1
- package/dist/theme/src/presets/element-plus/table.d.ts +6 -1
- package/dist/theme/src/presets/element-plus/table.d.ts.map +1 -1
- package/dist/theme/src/presets/element-plus/table.mjs +8 -1
- package/package.json +1 -1
|
@@ -1,61 +1,66 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as zt, inject as Pt, computed as a, provide as Ee, ref as S, onMounted as Wt, onBeforeUnmount as Mt, watch as b, createVNode as n, Fragment as jt, isVNode as Vt } from "vue";
|
|
2
2
|
import "../../../core/src/utils/tv.mjs";
|
|
3
|
-
import { prefixThemeConfig as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import {
|
|
34
|
-
|
|
35
|
-
|
|
3
|
+
import { prefixThemeConfig as Yt, prefixVtgClassNames as A } from "../../../core/src/utils/classPrefix.mjs";
|
|
4
|
+
import { devWarn as $t } from "../../../core/src/utils/devWarn.mjs";
|
|
5
|
+
import { mergeThemeConfigs as D, useTheme as Ut } from "../../../core/src/composables/useTheme.mjs";
|
|
6
|
+
import { mergeDeep as F } from "../../../core/src/utils/mergeDeep.mjs";
|
|
7
|
+
import Ie from "../../../core/src/components/Scrollbar.mjs";
|
|
8
|
+
import { VTABLE_GUILD_INJECTION_KEY as Te } from "../../../core/src/plugin/index.mjs";
|
|
9
|
+
import { resolveTooltipThemePreset as Gt, resolveScrollbarThemePreset as Xt, resolveRadioThemePreset as Jt, resolveInputThemePreset as qt, resolveCheckboxThemePreset as Qt, resolveButtonThemePreset as Zt, resolveTableThemePreset as el, resolveTableLocalePreset as tl, resolveBuiltInTableLocale as ll } from "../../../theme/src/presets/index.mjs";
|
|
10
|
+
import { antdvTableCompatClasses as ol } from "../../../theme/src/compat/antdv-table.mjs";
|
|
11
|
+
import { filterVisibleColumns as al, applyColumnOrder as nl } from "../composables/useColumnDisplay.mjs";
|
|
12
|
+
import { getEllipsisConfig as rl } from "../utils/cell.mjs";
|
|
13
|
+
import { getRootCompatClass as dl } from "../utils/compat.mjs";
|
|
14
|
+
import { resolveRowKey as il } from "../utils/rowKey.mjs";
|
|
15
|
+
import { useScroll as sl } from "../composables/useScroll.mjs";
|
|
16
|
+
import { useAutoHeight as ul } from "../composables/useAutoHeight.mjs";
|
|
17
|
+
import { useColumnMetrics as cl } from "../composables/useColumnMetrics.mjs";
|
|
18
|
+
import { resolveFixedColumnRanges as fl } from "../composables/useColumnWindow.mjs";
|
|
19
|
+
import { useExpand as ml } from "../composables/useExpand.mjs";
|
|
20
|
+
import { useResize as pl } from "../composables/useResize.mjs";
|
|
21
|
+
import { useVirtual as vl, INVALID_SCROLL_Y_FALLBACK as wl } from "../composables/useVirtual.mjs";
|
|
22
|
+
import { useTreeData as yl } from "../composables/useTreeData.mjs";
|
|
23
|
+
import { useHoverState as hl } from "../composables/useHoverState.mjs";
|
|
24
|
+
import { useRowDragSort as gl } from "../composables/useRowDragSort.mjs";
|
|
25
|
+
import { TABLE_CONTEXT_KEY as Cl } from "../context.mjs";
|
|
26
|
+
import { EXPAND_COLUMN as xl, SELECTION_COLUMN as Sl } from "../constants.mjs";
|
|
27
|
+
import { resolveTablePresetConfig as bl } from "../preset-config.mjs";
|
|
28
|
+
import He from "./TableHeader.mjs";
|
|
29
|
+
import Be from "./TableBody.mjs";
|
|
30
|
+
import Dl from "./VirtualTableBody.mjs";
|
|
31
|
+
import Le from "./TableLoading.mjs";
|
|
32
|
+
import O from "./ColGroup.mjs";
|
|
33
|
+
import { antdvTableTheme as Rl } from "../../../theme/src/presets/antdv/table.mjs";
|
|
34
|
+
import { useColumns as Ne } from "../composables/useColumns.mjs";
|
|
35
|
+
import { useSorter as El } from "../composables/useSorter.mjs";
|
|
36
|
+
import { useFilter as Il } from "../composables/useFilter.mjs";
|
|
37
|
+
import { useSelection as Tl } from "../composables/useSelection.mjs";
|
|
38
|
+
import { cn as h } from "tailwind-variants";
|
|
39
|
+
function Ae(l) {
|
|
40
|
+
return typeof l == "function" || Object.prototype.toString.call(l) === "[object Object]" && !Vt(l);
|
|
36
41
|
}
|
|
37
|
-
const
|
|
38
|
-
function
|
|
42
|
+
const Hl = [["xxxl", 2e3], ["xxl", 1600], ["xl", 1200], ["lg", 992], ["md", 768], ["sm", 576], ["xs", 0]];
|
|
43
|
+
function Fe() {
|
|
39
44
|
if (typeof window > "u")
|
|
40
45
|
return /* @__PURE__ */ new Set(["md", "sm", "xs"]);
|
|
41
|
-
const l = window.innerWidth,
|
|
42
|
-
return
|
|
46
|
+
const l = window.innerWidth, i = /* @__PURE__ */ new Set();
|
|
47
|
+
return Hl.forEach(([s, r]) => {
|
|
43
48
|
if (s === "xs") {
|
|
44
|
-
l < 576 &&
|
|
49
|
+
l < 576 && i.add("xs");
|
|
45
50
|
return;
|
|
46
51
|
}
|
|
47
|
-
l >= r &&
|
|
48
|
-
}),
|
|
52
|
+
l >= r && i.add(s);
|
|
53
|
+
}), i;
|
|
49
54
|
}
|
|
50
|
-
function
|
|
55
|
+
function Oe(l, i) {
|
|
51
56
|
return l.reduce((s, r) => {
|
|
52
57
|
if (typeof r == "symbol")
|
|
53
58
|
return s.push(r), s;
|
|
54
|
-
if (r.responsive?.length && !r.responsive.some((m) =>
|
|
59
|
+
if (r.responsive?.length && !r.responsive.some((m) => i.has(m)))
|
|
55
60
|
return s;
|
|
56
61
|
const w = r.fixed === !0 ? "left" : r.fixed;
|
|
57
62
|
if ("children" in r && Array.isArray(r.children)) {
|
|
58
|
-
const m =
|
|
63
|
+
const m = Oe(r.children, i);
|
|
59
64
|
return m.length === 0 || s.push({
|
|
60
65
|
...r,
|
|
61
66
|
fixed: w,
|
|
@@ -68,7 +73,7 @@ function Ie(l, d) {
|
|
|
68
73
|
}), s;
|
|
69
74
|
}, []);
|
|
70
75
|
}
|
|
71
|
-
const
|
|
76
|
+
const wo = /* @__PURE__ */ zt({
|
|
72
77
|
name: "VTable",
|
|
73
78
|
props: {
|
|
74
79
|
dataSource: {
|
|
@@ -79,6 +84,10 @@ const Jl = /* @__PURE__ */ Nt({
|
|
|
79
84
|
type: Array,
|
|
80
85
|
default: () => []
|
|
81
86
|
},
|
|
87
|
+
columnOrder: {
|
|
88
|
+
type: Array,
|
|
89
|
+
default: void 0
|
|
90
|
+
},
|
|
82
91
|
rowKey: {
|
|
83
92
|
type: [String, Function],
|
|
84
93
|
default: "key"
|
|
@@ -103,6 +112,10 @@ const Jl = /* @__PURE__ */ Nt({
|
|
|
103
112
|
type: Boolean,
|
|
104
113
|
default: !0
|
|
105
114
|
},
|
|
115
|
+
rowDraggable: {
|
|
116
|
+
type: Boolean,
|
|
117
|
+
default: !1
|
|
118
|
+
},
|
|
106
119
|
tableLayout: {
|
|
107
120
|
type: String,
|
|
108
121
|
default: void 0
|
|
@@ -251,27 +264,28 @@ const Jl = /* @__PURE__ */ Nt({
|
|
|
251
264
|
}
|
|
252
265
|
},
|
|
253
266
|
emits: {
|
|
254
|
-
change: (l,
|
|
255
|
-
resizeColumn: (l,
|
|
267
|
+
change: (l, i, s) => !0,
|
|
268
|
+
resizeColumn: (l, i) => !0,
|
|
269
|
+
rowDragEnd: (l, i) => !0
|
|
256
270
|
},
|
|
257
271
|
slots: Object,
|
|
258
272
|
setup(l, {
|
|
259
|
-
slots:
|
|
273
|
+
slots: i,
|
|
260
274
|
emit: s
|
|
261
275
|
}) {
|
|
262
|
-
const r =
|
|
263
|
-
const t = r?.theme ?? {}, o = w.value,
|
|
276
|
+
const r = Pt(Te, null), w = a(() => r?.themePreset ?? "antdv"), m = a(() => r?.cssMode ?? "prebuilt"), g = a(() => r?.classPrefix ?? "vtg"), Ke = a(() => {
|
|
277
|
+
const t = r?.theme ?? {}, o = w.value, d = (u) => Yt(u, m.value, g.value);
|
|
264
278
|
return {
|
|
265
279
|
...t,
|
|
266
|
-
button:
|
|
267
|
-
checkbox:
|
|
268
|
-
input:
|
|
269
|
-
radio:
|
|
270
|
-
scrollbar:
|
|
271
|
-
tooltip:
|
|
280
|
+
button: D(d(Zt(o)), t.button),
|
|
281
|
+
checkbox: D(d(Qt(o)), t.checkbox),
|
|
282
|
+
input: D(d(qt(o)), t.input),
|
|
283
|
+
radio: D(d(Jt(o)), t.radio),
|
|
284
|
+
scrollbar: D(d(Xt(o)), t.scrollbar),
|
|
285
|
+
tooltip: D(d(Gt(o)), t.tooltip)
|
|
272
286
|
};
|
|
273
287
|
});
|
|
274
|
-
|
|
288
|
+
Ee(Te, {
|
|
275
289
|
get themePreset() {
|
|
276
290
|
return w.value;
|
|
277
291
|
},
|
|
@@ -279,10 +293,10 @@ const Jl = /* @__PURE__ */ Nt({
|
|
|
279
293
|
return m.value;
|
|
280
294
|
},
|
|
281
295
|
get classPrefix() {
|
|
282
|
-
return
|
|
296
|
+
return g.value;
|
|
283
297
|
},
|
|
284
298
|
get theme() {
|
|
285
|
-
return
|
|
299
|
+
return Ke.value;
|
|
286
300
|
},
|
|
287
301
|
get locale() {
|
|
288
302
|
return r?.locale ?? "zh-CN";
|
|
@@ -294,189 +308,221 @@ const Jl = /* @__PURE__ */ Nt({
|
|
|
294
308
|
return r?.localeOverrides ?? {};
|
|
295
309
|
}
|
|
296
310
|
});
|
|
297
|
-
const
|
|
311
|
+
const ke = a(() => el(w.value) ?? Rl), {
|
|
298
312
|
slots: e
|
|
299
|
-
} =
|
|
300
|
-
compatClasses:
|
|
301
|
-
}),
|
|
313
|
+
} = Ut("table", ke, l, {
|
|
314
|
+
compatClasses: ol
|
|
315
|
+
}), R = r?.compatClass === !0 ? (t) => `ant-table-${t}` : void 0, K = a(() => l.locale ?? r?.locale ?? "zh-CN"), _e = a(() => ({
|
|
302
316
|
...r?.locales ?? {},
|
|
303
317
|
...l.locales ?? {}
|
|
304
|
-
})),
|
|
305
|
-
const t =
|
|
306
|
-
return
|
|
307
|
-
}),
|
|
308
|
-
function
|
|
309
|
-
|
|
318
|
+
})), ze = a(() => {
|
|
319
|
+
const t = tl(w.value), o = ll(w.value, K.value), d = _e.value[K.value]?.table, u = F(F(t, o), d);
|
|
320
|
+
return F(u, F(r?.localeOverrides?.table ?? {}, l.localeOverrides));
|
|
321
|
+
}), q = S(Fe());
|
|
322
|
+
function k() {
|
|
323
|
+
q.value = Fe();
|
|
310
324
|
}
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
}),
|
|
314
|
-
window.removeEventListener("resize",
|
|
325
|
+
Wt(() => {
|
|
326
|
+
k(), window.addEventListener("resize", k);
|
|
327
|
+
}), Mt(() => {
|
|
328
|
+
window.removeEventListener("resize", k);
|
|
315
329
|
});
|
|
316
|
-
const
|
|
317
|
-
leafColumns:
|
|
318
|
-
} =
|
|
319
|
-
getSortOrder:
|
|
320
|
-
toggleSortOrder:
|
|
321
|
-
sortData:
|
|
322
|
-
sorterState:
|
|
323
|
-
sorterResult:
|
|
324
|
-
sortColumns:
|
|
325
|
-
} =
|
|
326
|
-
columns: () =>
|
|
330
|
+
const Q = a(() => Oe(l.columns, q.value)), C = a(() => l.sticky === !0 ? {} : typeof l.sticky == "object" ? l.sticky : void 0), {
|
|
331
|
+
leafColumns: L
|
|
332
|
+
} = Ne(() => Q.value), {
|
|
333
|
+
getSortOrder: _,
|
|
334
|
+
toggleSortOrder: Pe,
|
|
335
|
+
sortData: We,
|
|
336
|
+
sorterState: Me,
|
|
337
|
+
sorterResult: Z,
|
|
338
|
+
sortColumns: je
|
|
339
|
+
} = El({
|
|
340
|
+
columns: () => L.value,
|
|
327
341
|
tableSortDirections: () => l.sortDirections,
|
|
328
342
|
onSorterChange(t) {
|
|
329
|
-
const o =
|
|
330
|
-
s("change",
|
|
343
|
+
const o = P();
|
|
344
|
+
s("change", z(), t, {
|
|
331
345
|
action: "sort",
|
|
332
346
|
currentDataSource: o
|
|
333
347
|
});
|
|
334
348
|
}
|
|
335
349
|
}), {
|
|
336
|
-
getFilteredValue:
|
|
337
|
-
confirmFilter:
|
|
338
|
-
resetFilter:
|
|
339
|
-
getAllFilters:
|
|
340
|
-
filterData:
|
|
341
|
-
} =
|
|
342
|
-
columns: () =>
|
|
350
|
+
getFilteredValue: Ve,
|
|
351
|
+
confirmFilter: Ye,
|
|
352
|
+
resetFilter: $e,
|
|
353
|
+
getAllFilters: z,
|
|
354
|
+
filterData: Ue
|
|
355
|
+
} = Il({
|
|
356
|
+
columns: () => L.value,
|
|
343
357
|
onFilterChange(t) {
|
|
344
|
-
const o =
|
|
345
|
-
s("change", t,
|
|
358
|
+
const o = P();
|
|
359
|
+
s("change", t, Z.value, {
|
|
346
360
|
action: "filter",
|
|
347
361
|
currentDataSource: o
|
|
348
362
|
});
|
|
349
363
|
}
|
|
350
364
|
});
|
|
351
|
-
function
|
|
365
|
+
function P() {
|
|
352
366
|
let t = l.dataSource;
|
|
353
|
-
return t =
|
|
367
|
+
return t = Ue(t), t = We(t), t;
|
|
354
368
|
}
|
|
355
|
-
const
|
|
356
|
-
function
|
|
357
|
-
|
|
369
|
+
const W = a(() => P());
|
|
370
|
+
function E(t, o) {
|
|
371
|
+
const d = il(t, o, l.rowKey);
|
|
372
|
+
return l.rowKey === void 0 || typeof l.rowKey == "string" && l.rowKey in t, d;
|
|
358
373
|
}
|
|
359
374
|
const {
|
|
360
|
-
flattenData:
|
|
361
|
-
rowMetaMap:
|
|
362
|
-
isTreeData:
|
|
363
|
-
toggleTreeExpand:
|
|
364
|
-
isTreeExpanded:
|
|
365
|
-
indentSize:
|
|
366
|
-
} =
|
|
367
|
-
data: () =>
|
|
375
|
+
flattenData: ee,
|
|
376
|
+
rowMetaMap: te,
|
|
377
|
+
isTreeData: M,
|
|
378
|
+
toggleTreeExpand: Ge,
|
|
379
|
+
isTreeExpanded: Xe,
|
|
380
|
+
indentSize: Je
|
|
381
|
+
} = yl({
|
|
382
|
+
data: () => W.value,
|
|
368
383
|
childrenColumnName: () => l.childrenColumnName,
|
|
369
384
|
indentSize: () => l.indentSize,
|
|
370
|
-
getRowKey:
|
|
385
|
+
getRowKey: E,
|
|
371
386
|
defaultExpandedRowKeys: () => l.defaultExpandedRowKeys,
|
|
372
387
|
expandedRowKeys: () => l.expandedRowKeys,
|
|
373
388
|
defaultExpandAllRows: () => l.defaultExpandAllRows,
|
|
374
389
|
onExpand: l.onExpand,
|
|
375
390
|
onExpandedRowsChange: l.onExpandedRowsChange
|
|
376
391
|
}), {
|
|
377
|
-
hoverRange:
|
|
378
|
-
setHoverRange:
|
|
379
|
-
clearHoverRange:
|
|
380
|
-
} =
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
392
|
+
hoverRange: qe,
|
|
393
|
+
setHoverRange: Qe,
|
|
394
|
+
clearHoverRange: Ze
|
|
395
|
+
} = hl(100), N = gl({
|
|
396
|
+
enabled: () => l.rowDraggable === !0,
|
|
397
|
+
getRowKey: E,
|
|
398
|
+
dataSource: () => l.dataSource,
|
|
399
|
+
childrenColumnName: () => l.childrenColumnName,
|
|
400
|
+
onDrop(t, o) {
|
|
401
|
+
s("rowDragEnd", t, o);
|
|
402
|
+
}
|
|
403
|
+
}), p = a(() => M.value ? ee.value.map((t) => t.record) : W.value), {
|
|
404
|
+
isSelected: et,
|
|
405
|
+
isDisabled: tt,
|
|
406
|
+
getSelectionState: lt,
|
|
407
|
+
toggleRow: ot,
|
|
408
|
+
toggleAll: at,
|
|
409
|
+
allCheckedState: nt,
|
|
410
|
+
invertSelection: rt,
|
|
411
|
+
clearSelection: dt,
|
|
412
|
+
getChangeableRowKeys: it
|
|
413
|
+
} = Tl({
|
|
391
414
|
rowSelection: () => l.rowSelection,
|
|
392
|
-
getRowKey:
|
|
393
|
-
data: () =>
|
|
394
|
-
visibleData: () =>
|
|
415
|
+
getRowKey: E,
|
|
416
|
+
data: () => W.value,
|
|
417
|
+
visibleData: () => p.value,
|
|
395
418
|
childrenColumnName: () => l.childrenColumnName,
|
|
396
419
|
onSelectionChange() {
|
|
397
|
-
s("change",
|
|
420
|
+
s("change", z(), Z.value, {
|
|
398
421
|
action: "select",
|
|
399
|
-
currentDataSource:
|
|
422
|
+
currentDataSource: p.value
|
|
400
423
|
});
|
|
401
424
|
}
|
|
402
425
|
}), {
|
|
403
|
-
isExpanded:
|
|
404
|
-
toggleExpand:
|
|
405
|
-
} =
|
|
426
|
+
isExpanded: st,
|
|
427
|
+
toggleExpand: ut
|
|
428
|
+
} = ml({
|
|
406
429
|
expandable: () => l.expandable,
|
|
407
|
-
getRowKey:
|
|
408
|
-
data: () =>
|
|
409
|
-
}),
|
|
430
|
+
getRowKey: E,
|
|
431
|
+
data: () => p.value
|
|
432
|
+
}), le = (t) => {
|
|
410
433
|
const o = l.expandable;
|
|
411
434
|
return o ? o.rowExpandable ? o.rowExpandable(t) : !!o.expandedRowRender : !1;
|
|
412
|
-
},
|
|
413
|
-
|
|
414
|
-
},
|
|
415
|
-
const t = l.expandable, o = l.rowSelection,
|
|
416
|
-
key:
|
|
435
|
+
}, ct = (t, o) => {
|
|
436
|
+
le(t) && ut(t, o);
|
|
437
|
+
}, oe = "__vtg_selection__", ae = "__vtg_expand__", ft = a(() => {
|
|
438
|
+
const t = l.expandable, o = l.rowSelection, d = t && t.showExpandColumn !== !1 ? {
|
|
439
|
+
key: ae,
|
|
417
440
|
title: "",
|
|
418
441
|
width: t.columnWidth ?? 48,
|
|
419
442
|
align: "center",
|
|
420
443
|
fixed: t.fixed === !0 ? "left" : t.fixed
|
|
421
444
|
} : null, u = o ? {
|
|
422
|
-
key:
|
|
445
|
+
key: oe,
|
|
423
446
|
title: "",
|
|
424
447
|
width: o.columnWidth ?? 48,
|
|
425
448
|
align: "center",
|
|
426
449
|
fixed: o.fixed === !0 ? "left" : o.fixed || void 0
|
|
427
|
-
} : null,
|
|
428
|
-
let
|
|
429
|
-
for (const
|
|
430
|
-
if (
|
|
431
|
-
|
|
450
|
+
} : null, x = al(Q.value), y = [];
|
|
451
|
+
let v = !1, c = !1;
|
|
452
|
+
for (const B of x) {
|
|
453
|
+
if (B === xl) {
|
|
454
|
+
d && !v && (y.push(d), v = !0);
|
|
432
455
|
continue;
|
|
433
456
|
}
|
|
434
|
-
if (
|
|
435
|
-
u && !
|
|
457
|
+
if (B === Sl) {
|
|
458
|
+
u && !c && (y.push(u), c = !0);
|
|
436
459
|
continue;
|
|
437
460
|
}
|
|
438
|
-
|
|
461
|
+
y.push(B);
|
|
439
462
|
}
|
|
440
|
-
return
|
|
463
|
+
return d && !v && y.unshift(d), u && !c && y.unshift(u), nl(y, l.columnOrder, [oe, ae]);
|
|
441
464
|
}), {
|
|
442
465
|
leafColumns: f,
|
|
443
|
-
headerRows:
|
|
444
|
-
} =
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
466
|
+
headerRows: j
|
|
467
|
+
} = Ne(() => ft.value), mt = a(() => j.value.length > 1), {
|
|
468
|
+
columnWidths: V,
|
|
469
|
+
startResize: pt,
|
|
470
|
+
isResizing: vt
|
|
471
|
+
} = pl({
|
|
472
|
+
onResizeColumn(t, o) {
|
|
473
|
+
s("resizeColumn", t, o);
|
|
474
|
+
}
|
|
475
|
+
}), {
|
|
476
|
+
headerWrapRef: Y,
|
|
477
|
+
bodyWrapRef: ne,
|
|
478
|
+
scrollState: re,
|
|
479
|
+
handleBodyScroll: de,
|
|
480
|
+
fixedOffsets: ie,
|
|
481
|
+
syncHorizontalScroll: wt
|
|
482
|
+
} = sl({
|
|
483
|
+
displayColumns: () => f.value,
|
|
484
|
+
columnWidths: V
|
|
485
|
+
}), se = a(() => dl({
|
|
486
|
+
compatClass: R,
|
|
487
|
+
fixedOffsets: ie,
|
|
488
|
+
scrollState: re,
|
|
489
|
+
empty: p.value.length === 0,
|
|
458
490
|
fixedHeader: l.scroll?.y !== void 0,
|
|
459
|
-
fixedColumn:
|
|
460
|
-
horizontalScroll:
|
|
461
|
-
layoutFixed:
|
|
462
|
-
})),
|
|
463
|
-
if (
|
|
491
|
+
fixedColumn: ce.value && ue.value,
|
|
492
|
+
horizontalScroll: ce.value,
|
|
493
|
+
layoutFixed: $.value === "fixed"
|
|
494
|
+
})), I = a(() => l.scroll?.y === "auto"), yt = a(() => I.value || l.showHeader !== !1 && (!!l.scroll?.y || !!l.sticky)), ue = a(() => f.value.some((t) => t.fixed === "left" || t.fixed === "right")), ce = a(() => l.scroll?.x !== void 0 || !!l.expandable?.fixed), ht = a(() => L.value.some((t) => rl(t).enabled)), $ = a(() => l.tableLayout ? l.tableLayout : l.scroll?.y || l.scroll?.x || ue.value || ht.value ? "fixed" : "auto"), gt = a(() => {
|
|
495
|
+
if (C.value)
|
|
464
496
|
return {
|
|
465
497
|
position: "sticky",
|
|
466
|
-
top: `${
|
|
498
|
+
top: `${C.value.offsetHeader ?? 0}px`,
|
|
467
499
|
zIndex: "4"
|
|
468
500
|
};
|
|
501
|
+
}), fe = S(null), me = S(null), {
|
|
502
|
+
bodyHeight: pe
|
|
503
|
+
} = ul({
|
|
504
|
+
enabled: () => I.value,
|
|
505
|
+
wrapperEl: () => fe.value,
|
|
506
|
+
headerEl: () => Y.value,
|
|
507
|
+
summaryEl: () => me.value,
|
|
508
|
+
hasData: () => p.value.length > 0
|
|
509
|
+
}), Ct = a(() => {
|
|
510
|
+
const t = l.scroll?.y;
|
|
511
|
+
if (t !== void 0)
|
|
512
|
+
return I.value ? pe.value : typeof t == "number" ? Number.isFinite(t) && t > 0 ? t : void 0 : t;
|
|
469
513
|
}), {
|
|
470
514
|
enabled: T,
|
|
471
|
-
itemHeight:
|
|
472
|
-
listHeight:
|
|
473
|
-
fixedHeight:
|
|
474
|
-
|
|
515
|
+
itemHeight: xt,
|
|
516
|
+
listHeight: St,
|
|
517
|
+
fixedHeight: bt,
|
|
518
|
+
resolvedScrollY: Dt
|
|
519
|
+
} = vl({
|
|
475
520
|
virtual: () => l.virtual,
|
|
476
521
|
scrollY: () => l.scroll?.y,
|
|
477
522
|
size: () => l.size,
|
|
478
|
-
rowHeight: () => l.rowHeight
|
|
479
|
-
|
|
523
|
+
rowHeight: () => l.rowHeight,
|
|
524
|
+
measuredHeight: () => pe.value
|
|
525
|
+
}), ve = a(() => L.value.some((t) => !!t.customCell || !!t.customRender)), U = a(() => !mt.value || l.bordered ? {
|
|
480
526
|
table: "",
|
|
481
527
|
th: "",
|
|
482
528
|
td: ""
|
|
@@ -484,74 +530,72 @@ const Jl = /* @__PURE__ */ Nt({
|
|
|
484
530
|
table: e.groupedHeaderTable(),
|
|
485
531
|
th: e.groupedHeaderTh(),
|
|
486
532
|
td: e.groupedHeaderTd()
|
|
487
|
-
}),
|
|
488
|
-
|
|
533
|
+
}), H = a(() => h(e.table(), U.value.table) ?? ""), we = a(() => h(e.th(), U.value.th) ?? ""), G = a(() => h(e.td(), U.value.td) ?? "");
|
|
534
|
+
b([T, ve], ([t, o]) => {
|
|
535
|
+
}, {
|
|
536
|
+
immediate: !0
|
|
537
|
+
}), b([() => l.virtual, Dt], ([t, o]) => {
|
|
538
|
+
if (!t) return;
|
|
539
|
+
const d = String(l.scroll?.y);
|
|
540
|
+
o.kind === "compat-px" ? $t("vtable-scroll-y-compat-px", `[VTable] virtual 模式下字符串 scroll.y(${d})按 ${o.value}px 解析,这是兼容行为;请改用数字或 'auto'。`) : o.kind === "invalid-string" || o.kind === "invalid-number" && l.scroll?.y && `${wl}`;
|
|
489
541
|
}, {
|
|
490
542
|
immediate: !0
|
|
491
543
|
});
|
|
492
|
-
const
|
|
493
|
-
|
|
494
|
-
t && (
|
|
495
|
-
}),
|
|
496
|
-
t && (
|
|
544
|
+
const ye = S(null), he = S(null);
|
|
545
|
+
b(() => ye.value?.wrapRef, (t) => {
|
|
546
|
+
t && (ne.value = t);
|
|
547
|
+
}), b(() => he.value?.wrapRef, (t) => {
|
|
548
|
+
t && (ne.value = t);
|
|
497
549
|
});
|
|
498
|
-
const
|
|
499
|
-
|
|
500
|
-
startResize: vt,
|
|
501
|
-
isResizing: wt
|
|
502
|
-
} = ll({
|
|
503
|
-
onResizeColumn(t, o) {
|
|
504
|
-
s("resizeColumn", t, o);
|
|
505
|
-
}
|
|
506
|
-
}), yt = n(() => el(f.value)), ce = n(() => l.virtualColumn ? T.value ? re.value ? "列上有 customCell / customRender,可能返回 colSpan / rowSpan;单元格合并会让某个 td 缺席,进而破坏列宽不变量(虚拟模式本就不支持合并)" : yt.value.contiguous ? null : "固定列必须分列两端:左固定连成前缀、右固定连成后缀,中间夹着的固定列会被窗口跳过" : "它只作用于虚拟表体,需要同时开启 virtual 与 scroll.y" : null), V = n(() => l.virtualColumn && ce.value === null);
|
|
507
|
-
D(ce, (t) => {
|
|
550
|
+
const Rt = a(() => fl(f.value)), ge = a(() => l.virtualColumn ? T.value ? ve.value ? "列上有 customCell / customRender,可能返回 colSpan / rowSpan;单元格合并会让某个 td 缺席,进而破坏列宽不变量(虚拟模式本就不支持合并)" : Rt.value.contiguous ? null : "固定列必须分列两端:左固定连成前缀、右固定连成后缀,中间夹着的固定列会被窗口跳过" : "它只作用于虚拟表体,需要同时开启 virtual 与 scroll.y" : null), X = a(() => l.virtualColumn && ge.value === null);
|
|
551
|
+
b(ge, (t) => {
|
|
508
552
|
}, {
|
|
509
553
|
immediate: !0
|
|
510
554
|
});
|
|
511
555
|
const {
|
|
512
|
-
metrics:
|
|
513
|
-
} =
|
|
514
|
-
enabled: () =>
|
|
515
|
-
headerEl: () =>
|
|
556
|
+
metrics: Ce
|
|
557
|
+
} = cl({
|
|
558
|
+
enabled: () => X.value,
|
|
559
|
+
headerEl: () => Y.value,
|
|
516
560
|
columns: () => f.value,
|
|
517
|
-
columnWidths:
|
|
561
|
+
columnWidths: V,
|
|
518
562
|
hasHeader: () => l.showHeader !== !1
|
|
519
563
|
});
|
|
520
|
-
|
|
564
|
+
b([X, Ce], ([t, o]) => {
|
|
521
565
|
!t || o || l.showHeader;
|
|
522
566
|
}, {
|
|
523
567
|
immediate: !0
|
|
524
568
|
});
|
|
525
|
-
function
|
|
526
|
-
return
|
|
569
|
+
function Et(t) {
|
|
570
|
+
return M.value ? te.value.get(t)?.level ?? 0 : 0;
|
|
527
571
|
}
|
|
528
|
-
function
|
|
529
|
-
return l.rowClassName ? typeof l.rowClassName == "function" ? l.rowClassName(t, o,
|
|
572
|
+
function It(t, o) {
|
|
573
|
+
return l.rowClassName ? typeof l.rowClassName == "function" ? l.rowClassName(t, o, Et(t)) : l.rowClassName : "";
|
|
530
574
|
}
|
|
531
|
-
function
|
|
575
|
+
function Tt(t, o) {
|
|
532
576
|
return l.customRow?.(t, o);
|
|
533
577
|
}
|
|
534
|
-
function
|
|
578
|
+
function Ht(t, o) {
|
|
535
579
|
return l.customHeaderRow?.(t, o);
|
|
536
580
|
}
|
|
537
|
-
function
|
|
581
|
+
function Bt(t) {
|
|
538
582
|
if (typeof t.title != "function")
|
|
539
583
|
return t.title ?? "";
|
|
540
|
-
const o = t,
|
|
584
|
+
const o = t, d = je.value.filter((u) => !!u.column);
|
|
541
585
|
return t.title({
|
|
542
|
-
sortOrder: o.sorter ?
|
|
543
|
-
sortColumn:
|
|
544
|
-
sortColumns:
|
|
545
|
-
filters:
|
|
586
|
+
sortOrder: o.sorter ? _(o) ?? void 0 : void 0,
|
|
587
|
+
sortColumn: Me.value.column,
|
|
588
|
+
sortColumns: d.length > 0 ? d : void 0,
|
|
589
|
+
filters: z()
|
|
546
590
|
});
|
|
547
591
|
}
|
|
548
|
-
function
|
|
549
|
-
return !!(t.sorter &&
|
|
592
|
+
function Lt(t) {
|
|
593
|
+
return !!(t.sorter && _(t));
|
|
550
594
|
}
|
|
551
|
-
const
|
|
595
|
+
const xe = {
|
|
552
596
|
width: "100%",
|
|
553
597
|
minWidth: "100%"
|
|
554
|
-
},
|
|
598
|
+
}, Nt = {
|
|
555
599
|
thSortable: e.thSortable,
|
|
556
600
|
thSorted: e.thSorted,
|
|
557
601
|
tdSorted: e.tdSorted,
|
|
@@ -627,224 +671,236 @@ const Jl = /* @__PURE__ */ Nt({
|
|
|
627
671
|
expandedRowCell: e.expandedRowCell,
|
|
628
672
|
resizeHandle: e.resizeHandle,
|
|
629
673
|
tdRowHover: e.tdRowHover,
|
|
630
|
-
tdRowSelectedHover: e.tdRowSelectedHover
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
674
|
+
tdRowSelectedHover: e.tdRowSelectedHover,
|
|
675
|
+
trDragging: e.trDragging,
|
|
676
|
+
trDropAbove: e.trDropAbove,
|
|
677
|
+
trDropBelow: e.trDropBelow
|
|
678
|
+
}, Se = a(() => bl(w.value)), be = S(!1);
|
|
679
|
+
return Ee(Cl, {
|
|
680
|
+
bodyCell: i.bodyCell,
|
|
681
|
+
headerCell: i.headerCell,
|
|
682
|
+
empty: i.empty,
|
|
683
|
+
getSortOrder: _,
|
|
684
|
+
toggleSortOrder: Pe,
|
|
685
|
+
isColumnSorted: Lt,
|
|
686
|
+
getFilteredValue: Ve,
|
|
687
|
+
confirmFilter: Ye,
|
|
688
|
+
resetFilter: $e,
|
|
689
|
+
customFilterDropdown: i.customFilterDropdown,
|
|
690
|
+
customFilterIcon: i.customFilterIcon,
|
|
691
|
+
showSorterTooltip: a(() => l.showSorterTooltip ?? Se.value.showSorterTooltip),
|
|
692
|
+
headerEllipsis: a(() => l.headerEllipsis),
|
|
693
|
+
subThemeSlots: Nt,
|
|
694
|
+
presetConfig: Se,
|
|
648
695
|
themePreset: w,
|
|
649
696
|
cssMode: m,
|
|
650
|
-
classPrefix:
|
|
651
|
-
vtgClass: (t) =>
|
|
652
|
-
compatClass:
|
|
653
|
-
localeName:
|
|
654
|
-
locale:
|
|
697
|
+
classPrefix: g,
|
|
698
|
+
vtgClass: (t) => A(t, m.value, g.value),
|
|
699
|
+
compatClass: R,
|
|
700
|
+
localeName: K,
|
|
701
|
+
locale: ze,
|
|
655
702
|
rowSelection: () => l.rowSelection,
|
|
656
|
-
isSelected:
|
|
657
|
-
isDisabledRow:
|
|
658
|
-
getSelectionState:
|
|
659
|
-
toggleRow:
|
|
660
|
-
toggleAll:
|
|
661
|
-
allCheckedState: () =>
|
|
662
|
-
getRowKey:
|
|
663
|
-
invertSelection:
|
|
664
|
-
clearSelection:
|
|
665
|
-
getChangeableRowKeys:
|
|
666
|
-
fixedOffsets:
|
|
667
|
-
scrollState:
|
|
668
|
-
leafColumnCount:
|
|
669
|
-
bordered:
|
|
670
|
-
tableLayout:
|
|
671
|
-
sticky:
|
|
672
|
-
getRowProps:
|
|
673
|
-
getRowClassName:
|
|
674
|
-
getHeaderRowProps:
|
|
675
|
-
getColumnTitle:
|
|
703
|
+
isSelected: et,
|
|
704
|
+
isDisabledRow: tt,
|
|
705
|
+
getSelectionState: lt,
|
|
706
|
+
toggleRow: ot,
|
|
707
|
+
toggleAll: at,
|
|
708
|
+
allCheckedState: () => nt.value,
|
|
709
|
+
getRowKey: E,
|
|
710
|
+
invertSelection: rt,
|
|
711
|
+
clearSelection: dt,
|
|
712
|
+
getChangeableRowKeys: it,
|
|
713
|
+
fixedOffsets: ie,
|
|
714
|
+
scrollState: re,
|
|
715
|
+
leafColumnCount: a(() => f.value.length),
|
|
716
|
+
bordered: a(() => l.bordered),
|
|
717
|
+
tableLayout: $,
|
|
718
|
+
sticky: a(() => l.sticky),
|
|
719
|
+
getRowProps: Tt,
|
|
720
|
+
getRowClassName: It,
|
|
721
|
+
getHeaderRowProps: Ht,
|
|
722
|
+
getColumnTitle: Bt,
|
|
676
723
|
getPopupContainer: l.getPopupContainer,
|
|
677
724
|
transformCellText: l.transformCellText,
|
|
678
725
|
expandable: () => l.expandable,
|
|
679
|
-
isExpanded:
|
|
680
|
-
toggleExpand:
|
|
681
|
-
isRowExpandable:
|
|
682
|
-
columnWidths:
|
|
683
|
-
startResize:
|
|
684
|
-
isResizing: () =>
|
|
685
|
-
displayColumns:
|
|
726
|
+
isExpanded: st,
|
|
727
|
+
toggleExpand: ct,
|
|
728
|
+
isRowExpandable: le,
|
|
729
|
+
columnWidths: V,
|
|
730
|
+
startResize: pt,
|
|
731
|
+
isResizing: () => vt.value,
|
|
732
|
+
displayColumns: a(() => f.value),
|
|
686
733
|
registerSummaryFixed: (t) => {
|
|
687
|
-
|
|
734
|
+
be.value = t;
|
|
688
735
|
},
|
|
689
|
-
isTreeData:
|
|
690
|
-
treeFlattenData:
|
|
691
|
-
getFlattenRow: (t) =>
|
|
692
|
-
toggleTreeExpand:
|
|
693
|
-
isTreeExpanded:
|
|
694
|
-
treeIndentSize:
|
|
695
|
-
hoverRange:
|
|
696
|
-
setHoverRange:
|
|
697
|
-
clearHoverRange:
|
|
698
|
-
|
|
736
|
+
isTreeData: M,
|
|
737
|
+
treeFlattenData: ee,
|
|
738
|
+
getFlattenRow: (t) => te.value.get(t),
|
|
739
|
+
toggleTreeExpand: Ge,
|
|
740
|
+
isTreeExpanded: Xe,
|
|
741
|
+
treeIndentSize: Je,
|
|
742
|
+
hoverRange: qe,
|
|
743
|
+
setHoverRange: Qe,
|
|
744
|
+
clearHoverRange: Ze,
|
|
745
|
+
// 拖拽期间抑制 hover 高亮,避免干扰拖放指示线
|
|
746
|
+
hoverable: a(() => l.hoverable !== !1 && N.draggingKey.value === null),
|
|
747
|
+
rowDrag: {
|
|
748
|
+
enabled: a(() => l.rowDraggable === !0),
|
|
749
|
+
draggingKey: N.draggingKey,
|
|
750
|
+
dropTarget: N.dropTarget,
|
|
751
|
+
getBindings: (t, o, d) => N.getBindings(t, o, d)
|
|
752
|
+
}
|
|
699
753
|
}), () => {
|
|
700
754
|
let t;
|
|
701
|
-
const o = l.title ? l.title(
|
|
702
|
-
data:
|
|
703
|
-
}) : null,
|
|
704
|
-
data:
|
|
705
|
-
}) : null, u =
|
|
706
|
-
tableLayout:
|
|
755
|
+
const o = l.title ? l.title(p.value) : i.title ? i.title({
|
|
756
|
+
data: p.value
|
|
757
|
+
}) : null, d = l.footer ? l.footer(p.value) : i.footer ? i.footer({
|
|
758
|
+
data: p.value
|
|
759
|
+
}) : null, u = i.summary ? i.summary() : null, x = be.value !== !1, y = l.scroll, v = {
|
|
760
|
+
tableLayout: $.value
|
|
707
761
|
};
|
|
708
|
-
|
|
709
|
-
const c = l.loading,
|
|
762
|
+
y?.x ? (v.width = typeof y.x == "number" ? `${y.x}px` : y.x, v.minWidth = "100%") : v.width = "100%";
|
|
763
|
+
const c = l.loading, B = c === !0 || typeof c == "object" && c !== null && c.spinning !== !1, At = typeof c == "object" && c !== null ? c.indicator : void 0, Ft = typeof c == "object" && c !== null ? c.tip : void 0, De = B && (i.loading ? n(Le, {
|
|
710
764
|
loadingClass: e.loading()
|
|
711
|
-
},
|
|
765
|
+
}, Ae(t = i.loading()) ? t : {
|
|
712
766
|
default: () => [t]
|
|
713
|
-
}) :
|
|
767
|
+
}) : n(Le, {
|
|
714
768
|
loadingClass: e.loading(),
|
|
715
|
-
indicator:
|
|
716
|
-
tip:
|
|
769
|
+
indicator: At,
|
|
770
|
+
tip: Ft
|
|
717
771
|
}, null));
|
|
718
|
-
if (
|
|
719
|
-
const
|
|
720
|
-
ref:
|
|
721
|
-
class:
|
|
722
|
-
style:
|
|
723
|
-
}, [
|
|
724
|
-
class:
|
|
725
|
-
}, [
|
|
726
|
-
class:
|
|
772
|
+
if (yt.value) {
|
|
773
|
+
const Ot = l.showHeader !== !1 ? n("div", {
|
|
774
|
+
ref: Y,
|
|
775
|
+
class: h(e.headerWrapper(), C.value && R?.("sticky-holder")),
|
|
776
|
+
style: gt.value
|
|
777
|
+
}, [n("div", {
|
|
778
|
+
class: A("block w-full min-w-full", m.value, g.value)
|
|
779
|
+
}, [n("table", {
|
|
780
|
+
class: H.value,
|
|
727
781
|
style: v
|
|
728
|
-
}, [
|
|
782
|
+
}, [n(O, {
|
|
729
783
|
columns: f.value
|
|
730
|
-
}, null),
|
|
731
|
-
rows:
|
|
784
|
+
}, null), n(He, {
|
|
785
|
+
rows: j.value,
|
|
732
786
|
theadClass: e.thead(),
|
|
733
787
|
rowClass: e.tr(),
|
|
734
|
-
thClass:
|
|
788
|
+
thClass: we.value,
|
|
735
789
|
headerCellInnerClass: e.headerCellInner()
|
|
736
|
-
}, null)])])]) : null,
|
|
737
|
-
dataSource:
|
|
790
|
+
}, null)])])]) : null, Kt = T.value ? n(Dl, {
|
|
791
|
+
dataSource: p.value,
|
|
738
792
|
columns: f.value,
|
|
739
793
|
tbodyClass: e.tbody(),
|
|
740
794
|
rowClass: e.tr(),
|
|
741
|
-
tdClass:
|
|
795
|
+
tdClass: G.value,
|
|
742
796
|
emptyClass: e.empty(),
|
|
743
797
|
bodyCellEllipsisClass: e.bodyCellEllipsis(),
|
|
744
|
-
tableClass:
|
|
798
|
+
tableClass: H.value,
|
|
745
799
|
tableStyle: v,
|
|
746
800
|
rowKey: l.rowKey,
|
|
747
|
-
height:
|
|
748
|
-
itemHeight:
|
|
749
|
-
fixedHeight:
|
|
750
|
-
virtualColumn:
|
|
751
|
-
columnMetrics:
|
|
801
|
+
height: St.value,
|
|
802
|
+
itemHeight: xt.value,
|
|
803
|
+
fixedHeight: bt.value,
|
|
804
|
+
virtualColumn: X.value,
|
|
805
|
+
columnMetrics: Ce.value,
|
|
752
806
|
showScrollBar: "hover",
|
|
753
|
-
onVirtualScroll: (
|
|
754
|
-
|
|
807
|
+
onVirtualScroll: (Re) => {
|
|
808
|
+
wt(Re.x, Re.maxX);
|
|
755
809
|
}
|
|
756
|
-
}, null) : null,
|
|
757
|
-
ref:
|
|
758
|
-
maxHeight:
|
|
810
|
+
}, null) : null, kt = T.value ? null : n(Ie, {
|
|
811
|
+
ref: ye,
|
|
812
|
+
maxHeight: Ct.value,
|
|
759
813
|
wrapClass: e.bodyWrapper(),
|
|
760
|
-
viewStyle:
|
|
761
|
-
onScroll:
|
|
814
|
+
viewStyle: xe,
|
|
815
|
+
onScroll: de
|
|
762
816
|
}, {
|
|
763
|
-
default: () => [
|
|
764
|
-
class:
|
|
817
|
+
default: () => [n("table", {
|
|
818
|
+
class: H.value,
|
|
765
819
|
style: v
|
|
766
|
-
}, [
|
|
820
|
+
}, [n(O, {
|
|
767
821
|
columns: f.value
|
|
768
|
-
}, null),
|
|
769
|
-
dataSource:
|
|
822
|
+
}, null), n(Be, {
|
|
823
|
+
dataSource: p.value,
|
|
770
824
|
columns: f.value,
|
|
771
825
|
tbodyClass: e.tbody(),
|
|
772
826
|
rowClass: e.tr(),
|
|
773
|
-
tdClass:
|
|
827
|
+
tdClass: G.value,
|
|
774
828
|
emptyClass: e.empty(),
|
|
775
829
|
bodyCellEllipsisClass: e.bodyCellEllipsis(),
|
|
776
830
|
rowKey: l.rowKey
|
|
777
|
-
}, null), u && !
|
|
831
|
+
}, null), u && !x && n("tfoot", {
|
|
778
832
|
class: e.summary()
|
|
779
833
|
}, [u])])]
|
|
780
|
-
}),
|
|
781
|
-
|
|
782
|
-
|
|
834
|
+
}), _t = u && (x || T.value) ? n("div", {
|
|
835
|
+
ref: me,
|
|
836
|
+
class: h(e.headerWrapper(), R?.("summary"), C.value && x && R?.("sticky-holder")),
|
|
837
|
+
style: x ? {
|
|
783
838
|
position: "sticky",
|
|
784
|
-
bottom: `${
|
|
839
|
+
bottom: `${C.value?.offsetSummary ?? 0}px`,
|
|
785
840
|
zIndex: "4",
|
|
786
841
|
overflow: "hidden"
|
|
787
|
-
}
|
|
788
|
-
}, [
|
|
789
|
-
class:
|
|
790
|
-
}, [
|
|
791
|
-
class:
|
|
842
|
+
} : void 0
|
|
843
|
+
}, [n("div", {
|
|
844
|
+
class: A("block w-full min-w-full", m.value, g.value)
|
|
845
|
+
}, [n("table", {
|
|
846
|
+
class: H.value,
|
|
792
847
|
style: v
|
|
793
|
-
}, [
|
|
848
|
+
}, [n(O, {
|
|
794
849
|
columns: f.value
|
|
795
|
-
}, null),
|
|
850
|
+
}, null), n("tfoot", {
|
|
796
851
|
class: e.summary()
|
|
797
852
|
}, [u])])])]) : null;
|
|
798
|
-
return
|
|
799
|
-
class:
|
|
800
|
-
}, [o &&
|
|
853
|
+
return n("div", {
|
|
854
|
+
class: h(e.root(), I.value && e.rootAutoHeight(), se.value)
|
|
855
|
+
}, [o && n("div", {
|
|
801
856
|
class: e.title()
|
|
802
|
-
}, [o]),
|
|
803
|
-
|
|
804
|
-
|
|
857
|
+
}, [o]), n("div", {
|
|
858
|
+
ref: fe,
|
|
859
|
+
class: h(e.wrapper(), I.value && e.wrapperAutoHeight(), C.value && A("overflow-clip", m.value, g.value))
|
|
860
|
+
}, [Ot, Kt, kt, _t, De]), d && n("div", {
|
|
805
861
|
class: e.footer()
|
|
806
|
-
}, [
|
|
862
|
+
}, [d])]);
|
|
807
863
|
}
|
|
808
|
-
const
|
|
809
|
-
class:
|
|
864
|
+
const J = n(jt, null, [n("table", {
|
|
865
|
+
class: H.value,
|
|
810
866
|
style: v
|
|
811
|
-
}, [
|
|
867
|
+
}, [n(O, {
|
|
812
868
|
columns: f.value
|
|
813
|
-
}, null), l.showHeader !== !1 &&
|
|
814
|
-
rows:
|
|
869
|
+
}, null), l.showHeader !== !1 && n(He, {
|
|
870
|
+
rows: j.value,
|
|
815
871
|
theadClass: e.thead(),
|
|
816
872
|
rowClass: e.tr(),
|
|
817
|
-
thClass:
|
|
873
|
+
thClass: we.value,
|
|
818
874
|
headerCellInnerClass: e.headerCellInner()
|
|
819
|
-
}, null),
|
|
820
|
-
dataSource:
|
|
875
|
+
}, null), n(Be, {
|
|
876
|
+
dataSource: p.value,
|
|
821
877
|
columns: f.value,
|
|
822
878
|
tbodyClass: e.tbody(),
|
|
823
879
|
rowClass: e.tr(),
|
|
824
|
-
tdClass:
|
|
880
|
+
tdClass: G.value,
|
|
825
881
|
emptyClass: e.empty(),
|
|
826
882
|
bodyCellEllipsisClass: e.bodyCellEllipsis(),
|
|
827
883
|
rowKey: l.rowKey
|
|
828
|
-
}, null), u &&
|
|
884
|
+
}, null), u && n("tfoot", {
|
|
829
885
|
class: e.summary()
|
|
830
|
-
}, [u])]),
|
|
831
|
-
return
|
|
832
|
-
class:
|
|
833
|
-
}, [o &&
|
|
886
|
+
}, [u])]), De]);
|
|
887
|
+
return n("div", {
|
|
888
|
+
class: h(e.root(), se.value)
|
|
889
|
+
}, [o && n("div", {
|
|
834
890
|
class: e.title()
|
|
835
|
-
}, [o]),
|
|
836
|
-
ref:
|
|
891
|
+
}, [o]), n(Ie, {
|
|
892
|
+
ref: he,
|
|
837
893
|
wrapClass: e.wrapper(),
|
|
838
|
-
viewStyle:
|
|
839
|
-
onScroll:
|
|
840
|
-
},
|
|
841
|
-
default: () => [
|
|
842
|
-
}),
|
|
894
|
+
viewStyle: xe,
|
|
895
|
+
onScroll: de
|
|
896
|
+
}, Ae(J) ? J : {
|
|
897
|
+
default: () => [J]
|
|
898
|
+
}), d && n("div", {
|
|
843
899
|
class: e.footer()
|
|
844
|
-
}, [
|
|
900
|
+
}, [d])]);
|
|
845
901
|
};
|
|
846
902
|
}
|
|
847
903
|
});
|
|
848
904
|
export {
|
|
849
|
-
|
|
905
|
+
wo as default
|
|
850
906
|
};
|