@vtable-guild/vtable-guild 2.6.4 → 2.7.1
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 +19 -0
- package/css/tailwind3-utilities.css +15 -0
- package/css/tailwind3.css +4 -0
- package/css/tailwind4.css +4 -0
- package/dist/css/presets/antdv.css +2 -0
- package/dist/css/presets/element-plus.css +2 -0
- package/dist/css/style.css +19 -0
- package/dist/css/tailwind3-utilities.css +15 -0
- package/dist/css/tailwind3.css +4 -0
- package/dist/css/tailwind4.css +4 -0
- package/dist/index.full.mjs +3712 -3404
- 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 +355 -324
- 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 +110 -104
- 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/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/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/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 +23 -8
- package/dist/table/src/types/table.d.ts.map +1 -1
- package/dist/table/src/utils/columnWidth.d.ts +12 -0
- package/dist/table/src/utils/columnWidth.d.ts.map +1 -0
- package/dist/table/src/utils/columnWidth.mjs +26 -0
- package/dist/table/src/utils/columnWidth.test.d.ts +2 -0
- package/dist/table/src/utils/columnWidth.test.d.ts.map +1 -0
- 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 +3 -0
- package/dist/theme/src/presets/antdv/table.d.ts.map +1 -1
- package/dist/theme/src/presets/antdv/table.mjs +4 -0
- package/dist/theme/src/presets/element-plus/table.d.ts +3 -0
- package/dist/theme/src/presets/element-plus/table.d.ts.map +1 -1
- package/dist/theme/src/presets/element-plus/table.mjs +4 -0
- package/package.json +1 -1
|
@@ -1,47 +1,50 @@
|
|
|
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 { devWarn as
|
|
5
|
-
import { mergeThemeConfigs as
|
|
6
|
-
import { mergeDeep as
|
|
7
|
-
import
|
|
8
|
-
import { VTABLE_GUILD_INJECTION_KEY as
|
|
9
|
-
import { resolveTooltipThemePreset as
|
|
10
|
-
import { antdvTableCompatClasses as
|
|
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
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
|
|
37
|
-
|
|
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);
|
|
38
41
|
}
|
|
39
|
-
const
|
|
40
|
-
function
|
|
42
|
+
const Hl = [["xxxl", 2e3], ["xxl", 1600], ["xl", 1200], ["lg", 992], ["md", 768], ["sm", 576], ["xs", 0]];
|
|
43
|
+
function Fe() {
|
|
41
44
|
if (typeof window > "u")
|
|
42
45
|
return /* @__PURE__ */ new Set(["md", "sm", "xs"]);
|
|
43
46
|
const l = window.innerWidth, i = /* @__PURE__ */ new Set();
|
|
44
|
-
return
|
|
47
|
+
return Hl.forEach(([s, r]) => {
|
|
45
48
|
if (s === "xs") {
|
|
46
49
|
l < 576 && i.add("xs");
|
|
47
50
|
return;
|
|
@@ -49,28 +52,28 @@ function Le() {
|
|
|
49
52
|
l >= r && i.add(s);
|
|
50
53
|
}), i;
|
|
51
54
|
}
|
|
52
|
-
function
|
|
55
|
+
function Oe(l, i) {
|
|
53
56
|
return l.reduce((s, r) => {
|
|
54
57
|
if (typeof r == "symbol")
|
|
55
58
|
return s.push(r), s;
|
|
56
59
|
if (r.responsive?.length && !r.responsive.some((m) => i.has(m)))
|
|
57
60
|
return s;
|
|
58
|
-
const
|
|
61
|
+
const w = r.fixed === !0 ? "left" : r.fixed;
|
|
59
62
|
if ("children" in r && Array.isArray(r.children)) {
|
|
60
|
-
const m =
|
|
63
|
+
const m = Oe(r.children, i);
|
|
61
64
|
return m.length === 0 || s.push({
|
|
62
65
|
...r,
|
|
63
|
-
fixed:
|
|
66
|
+
fixed: w,
|
|
64
67
|
children: m
|
|
65
68
|
}), s;
|
|
66
69
|
}
|
|
67
|
-
return s.push(
|
|
70
|
+
return s.push(w === r.fixed ? r : {
|
|
68
71
|
...r,
|
|
69
|
-
fixed:
|
|
72
|
+
fixed: w
|
|
70
73
|
}), s;
|
|
71
74
|
}, []);
|
|
72
75
|
}
|
|
73
|
-
const
|
|
76
|
+
const wo = /* @__PURE__ */ zt({
|
|
74
77
|
name: "VTable",
|
|
75
78
|
props: {
|
|
76
79
|
dataSource: {
|
|
@@ -81,6 +84,10 @@ const io = /* @__PURE__ */ Pt({
|
|
|
81
84
|
type: Array,
|
|
82
85
|
default: () => []
|
|
83
86
|
},
|
|
87
|
+
columnOrder: {
|
|
88
|
+
type: Array,
|
|
89
|
+
default: void 0
|
|
90
|
+
},
|
|
84
91
|
rowKey: {
|
|
85
92
|
type: [String, Function],
|
|
86
93
|
default: "key"
|
|
@@ -105,6 +112,10 @@ const io = /* @__PURE__ */ Pt({
|
|
|
105
112
|
type: Boolean,
|
|
106
113
|
default: !0
|
|
107
114
|
},
|
|
115
|
+
rowDraggable: {
|
|
116
|
+
type: Boolean,
|
|
117
|
+
default: !1
|
|
118
|
+
},
|
|
108
119
|
tableLayout: {
|
|
109
120
|
type: String,
|
|
110
121
|
default: void 0
|
|
@@ -254,37 +265,38 @@ const io = /* @__PURE__ */ Pt({
|
|
|
254
265
|
},
|
|
255
266
|
emits: {
|
|
256
267
|
change: (l, i, s) => !0,
|
|
257
|
-
resizeColumn: (l, i) => !0
|
|
268
|
+
resizeColumn: (l, i) => !0,
|
|
269
|
+
rowDragEnd: (l, i) => !0
|
|
258
270
|
},
|
|
259
271
|
slots: Object,
|
|
260
272
|
setup(l, {
|
|
261
273
|
slots: i,
|
|
262
274
|
emit: s
|
|
263
275
|
}) {
|
|
264
|
-
const r =
|
|
265
|
-
const t = r?.theme ?? {}, o =
|
|
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);
|
|
266
278
|
return {
|
|
267
279
|
...t,
|
|
268
|
-
button:
|
|
269
|
-
checkbox:
|
|
270
|
-
input:
|
|
271
|
-
radio:
|
|
272
|
-
scrollbar:
|
|
273
|
-
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)
|
|
274
286
|
};
|
|
275
287
|
});
|
|
276
|
-
|
|
288
|
+
Ee(Te, {
|
|
277
289
|
get themePreset() {
|
|
278
|
-
return
|
|
290
|
+
return w.value;
|
|
279
291
|
},
|
|
280
292
|
get cssMode() {
|
|
281
293
|
return m.value;
|
|
282
294
|
},
|
|
283
295
|
get classPrefix() {
|
|
284
|
-
return
|
|
296
|
+
return g.value;
|
|
285
297
|
},
|
|
286
298
|
get theme() {
|
|
287
|
-
return
|
|
299
|
+
return Ke.value;
|
|
288
300
|
},
|
|
289
301
|
get locale() {
|
|
290
302
|
return r?.locale ?? "zh-CN";
|
|
@@ -296,36 +308,36 @@ const io = /* @__PURE__ */ Pt({
|
|
|
296
308
|
return r?.localeOverrides ?? {};
|
|
297
309
|
}
|
|
298
310
|
});
|
|
299
|
-
const
|
|
311
|
+
const ke = a(() => el(w.value) ?? Rl), {
|
|
300
312
|
slots: e
|
|
301
|
-
} =
|
|
302
|
-
compatClasses:
|
|
303
|
-
}),
|
|
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(() => ({
|
|
304
316
|
...r?.locales ?? {},
|
|
305
317
|
...l.locales ?? {}
|
|
306
|
-
})),
|
|
307
|
-
const t =
|
|
308
|
-
return
|
|
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());
|
|
310
322
|
function k() {
|
|
311
|
-
|
|
323
|
+
q.value = Fe();
|
|
312
324
|
}
|
|
313
|
-
|
|
325
|
+
Wt(() => {
|
|
314
326
|
k(), window.addEventListener("resize", k);
|
|
315
|
-
}),
|
|
327
|
+
}), Mt(() => {
|
|
316
328
|
window.removeEventListener("resize", k);
|
|
317
329
|
});
|
|
318
|
-
const
|
|
319
|
-
leafColumns:
|
|
320
|
-
} =
|
|
321
|
-
getSortOrder:
|
|
322
|
-
toggleSortOrder:
|
|
323
|
-
sortData:
|
|
324
|
-
sorterState:
|
|
325
|
-
sorterResult:
|
|
326
|
-
sortColumns:
|
|
327
|
-
} =
|
|
328
|
-
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,
|
|
329
341
|
tableSortDirections: () => l.sortDirections,
|
|
330
342
|
onSorterChange(t) {
|
|
331
343
|
const o = P();
|
|
@@ -335,16 +347,16 @@ const io = /* @__PURE__ */ Pt({
|
|
|
335
347
|
});
|
|
336
348
|
}
|
|
337
349
|
}), {
|
|
338
|
-
getFilteredValue:
|
|
339
|
-
confirmFilter:
|
|
340
|
-
resetFilter:
|
|
350
|
+
getFilteredValue: Ve,
|
|
351
|
+
confirmFilter: Ye,
|
|
352
|
+
resetFilter: $e,
|
|
341
353
|
getAllFilters: z,
|
|
342
|
-
filterData:
|
|
343
|
-
} =
|
|
344
|
-
columns: () =>
|
|
354
|
+
filterData: Ue
|
|
355
|
+
} = Il({
|
|
356
|
+
columns: () => L.value,
|
|
345
357
|
onFilterChange(t) {
|
|
346
358
|
const o = P();
|
|
347
|
-
s("change", t,
|
|
359
|
+
s("change", t, Z.value, {
|
|
348
360
|
action: "filter",
|
|
349
361
|
currentDataSource: o
|
|
350
362
|
});
|
|
@@ -352,156 +364,165 @@ const io = /* @__PURE__ */ Pt({
|
|
|
352
364
|
});
|
|
353
365
|
function P() {
|
|
354
366
|
let t = l.dataSource;
|
|
355
|
-
return t =
|
|
367
|
+
return t = Ue(t), t = We(t), t;
|
|
356
368
|
}
|
|
357
369
|
const W = a(() => P());
|
|
358
|
-
function
|
|
359
|
-
|
|
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;
|
|
360
373
|
}
|
|
361
374
|
const {
|
|
362
|
-
flattenData:
|
|
363
|
-
rowMetaMap:
|
|
364
|
-
isTreeData:
|
|
365
|
-
toggleTreeExpand:
|
|
366
|
-
isTreeExpanded:
|
|
367
|
-
indentSize:
|
|
368
|
-
} =
|
|
375
|
+
flattenData: ee,
|
|
376
|
+
rowMetaMap: te,
|
|
377
|
+
isTreeData: M,
|
|
378
|
+
toggleTreeExpand: Ge,
|
|
379
|
+
isTreeExpanded: Xe,
|
|
380
|
+
indentSize: Je
|
|
381
|
+
} = yl({
|
|
369
382
|
data: () => W.value,
|
|
370
383
|
childrenColumnName: () => l.childrenColumnName,
|
|
371
384
|
indentSize: () => l.indentSize,
|
|
372
|
-
getRowKey:
|
|
385
|
+
getRowKey: E,
|
|
373
386
|
defaultExpandedRowKeys: () => l.defaultExpandedRowKeys,
|
|
374
387
|
expandedRowKeys: () => l.expandedRowKeys,
|
|
375
388
|
defaultExpandAllRows: () => l.defaultExpandAllRows,
|
|
376
389
|
onExpand: l.onExpand,
|
|
377
390
|
onExpandedRowsChange: l.onExpandedRowsChange
|
|
378
391
|
}), {
|
|
379
|
-
hoverRange:
|
|
380
|
-
setHoverRange:
|
|
381
|
-
clearHoverRange:
|
|
382
|
-
} =
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
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({
|
|
393
414
|
rowSelection: () => l.rowSelection,
|
|
394
|
-
getRowKey:
|
|
415
|
+
getRowKey: E,
|
|
395
416
|
data: () => W.value,
|
|
396
417
|
visibleData: () => p.value,
|
|
397
418
|
childrenColumnName: () => l.childrenColumnName,
|
|
398
419
|
onSelectionChange() {
|
|
399
|
-
s("change", z(),
|
|
420
|
+
s("change", z(), Z.value, {
|
|
400
421
|
action: "select",
|
|
401
422
|
currentDataSource: p.value
|
|
402
423
|
});
|
|
403
424
|
}
|
|
404
425
|
}), {
|
|
405
|
-
isExpanded:
|
|
406
|
-
toggleExpand:
|
|
407
|
-
} =
|
|
426
|
+
isExpanded: st,
|
|
427
|
+
toggleExpand: ut
|
|
428
|
+
} = ml({
|
|
408
429
|
expandable: () => l.expandable,
|
|
409
|
-
getRowKey:
|
|
430
|
+
getRowKey: E,
|
|
410
431
|
data: () => p.value
|
|
411
|
-
}),
|
|
432
|
+
}), le = (t) => {
|
|
412
433
|
const o = l.expandable;
|
|
413
434
|
return o ? o.rowExpandable ? o.rowExpandable(t) : !!o.expandedRowRender : !1;
|
|
414
|
-
},
|
|
415
|
-
|
|
416
|
-
},
|
|
435
|
+
}, ct = (t, o) => {
|
|
436
|
+
le(t) && ut(t, o);
|
|
437
|
+
}, oe = "__vtg_selection__", ae = "__vtg_expand__", ft = a(() => {
|
|
417
438
|
const t = l.expandable, o = l.rowSelection, d = t && t.showExpandColumn !== !1 ? {
|
|
418
|
-
key:
|
|
439
|
+
key: ae,
|
|
419
440
|
title: "",
|
|
420
441
|
width: t.columnWidth ?? 48,
|
|
421
442
|
align: "center",
|
|
422
443
|
fixed: t.fixed === !0 ? "left" : t.fixed
|
|
423
444
|
} : null, u = o ? {
|
|
424
|
-
key:
|
|
445
|
+
key: oe,
|
|
425
446
|
title: "",
|
|
426
447
|
width: o.columnWidth ?? 48,
|
|
427
448
|
align: "center",
|
|
428
449
|
fixed: o.fixed === !0 ? "left" : o.fixed || void 0
|
|
429
|
-
} : null,
|
|
430
|
-
let
|
|
431
|
-
for (const
|
|
432
|
-
if (
|
|
433
|
-
d && !
|
|
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);
|
|
434
455
|
continue;
|
|
435
456
|
}
|
|
436
|
-
if (
|
|
437
|
-
u && !
|
|
457
|
+
if (B === Sl) {
|
|
458
|
+
u && !c && (y.push(u), c = !0);
|
|
438
459
|
continue;
|
|
439
460
|
}
|
|
440
|
-
|
|
461
|
+
y.push(B);
|
|
441
462
|
}
|
|
442
|
-
return d && !
|
|
463
|
+
return d && !v && y.unshift(d), u && !c && y.unshift(u), nl(y, l.columnOrder, [oe, ae]);
|
|
443
464
|
}), {
|
|
444
465
|
leafColumns: f,
|
|
445
|
-
headerRows:
|
|
446
|
-
} =
|
|
447
|
-
columnWidths:
|
|
448
|
-
startResize:
|
|
449
|
-
isResizing:
|
|
450
|
-
} =
|
|
466
|
+
headerRows: j
|
|
467
|
+
} = Ne(() => ft.value), mt = a(() => j.value.length > 1), {
|
|
468
|
+
columnWidths: V,
|
|
469
|
+
startResize: pt,
|
|
470
|
+
isResizing: vt
|
|
471
|
+
} = pl({
|
|
451
472
|
onResizeColumn(t, o) {
|
|
452
473
|
s("resizeColumn", t, o);
|
|
453
474
|
}
|
|
454
475
|
}), {
|
|
455
|
-
headerWrapRef:
|
|
456
|
-
bodyWrapRef:
|
|
457
|
-
scrollState:
|
|
458
|
-
handleBodyScroll:
|
|
459
|
-
fixedOffsets:
|
|
460
|
-
syncHorizontalScroll:
|
|
461
|
-
} =
|
|
476
|
+
headerWrapRef: Y,
|
|
477
|
+
bodyWrapRef: ne,
|
|
478
|
+
scrollState: re,
|
|
479
|
+
handleBodyScroll: de,
|
|
480
|
+
fixedOffsets: ie,
|
|
481
|
+
syncHorizontalScroll: wt
|
|
482
|
+
} = sl({
|
|
462
483
|
displayColumns: () => f.value,
|
|
463
|
-
columnWidths:
|
|
464
|
-
}),
|
|
465
|
-
compatClass:
|
|
466
|
-
fixedOffsets:
|
|
467
|
-
scrollState:
|
|
484
|
+
columnWidths: V
|
|
485
|
+
}), se = a(() => dl({
|
|
486
|
+
compatClass: R,
|
|
487
|
+
fixedOffsets: ie,
|
|
488
|
+
scrollState: re,
|
|
468
489
|
empty: p.value.length === 0,
|
|
469
490
|
fixedHeader: l.scroll?.y !== void 0,
|
|
470
|
-
fixedColumn:
|
|
471
|
-
horizontalScroll:
|
|
472
|
-
layoutFixed:
|
|
473
|
-
})),
|
|
474
|
-
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)
|
|
475
496
|
return {
|
|
476
497
|
position: "sticky",
|
|
477
|
-
top: `${
|
|
498
|
+
top: `${C.value.offsetHeader ?? 0}px`,
|
|
478
499
|
zIndex: "4"
|
|
479
500
|
};
|
|
480
|
-
}),
|
|
481
|
-
bodyHeight:
|
|
482
|
-
} =
|
|
483
|
-
enabled: () =>
|
|
484
|
-
wrapperEl: () =>
|
|
485
|
-
headerEl: () =>
|
|
486
|
-
summaryEl: () =>
|
|
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,
|
|
487
508
|
hasData: () => p.value.length > 0
|
|
488
|
-
}),
|
|
509
|
+
}), Ct = a(() => {
|
|
489
510
|
const t = l.scroll?.y;
|
|
490
511
|
if (t !== void 0)
|
|
491
|
-
return
|
|
512
|
+
return I.value ? pe.value : typeof t == "number" ? Number.isFinite(t) && t > 0 ? t : void 0 : t;
|
|
492
513
|
}), {
|
|
493
|
-
enabled:
|
|
514
|
+
enabled: T,
|
|
494
515
|
itemHeight: xt,
|
|
495
|
-
listHeight:
|
|
496
|
-
fixedHeight:
|
|
497
|
-
resolvedScrollY:
|
|
498
|
-
} =
|
|
516
|
+
listHeight: St,
|
|
517
|
+
fixedHeight: bt,
|
|
518
|
+
resolvedScrollY: Dt
|
|
519
|
+
} = vl({
|
|
499
520
|
virtual: () => l.virtual,
|
|
500
521
|
scrollY: () => l.scroll?.y,
|
|
501
522
|
size: () => l.size,
|
|
502
523
|
rowHeight: () => l.rowHeight,
|
|
503
|
-
measuredHeight: () =>
|
|
504
|
-
}),
|
|
524
|
+
measuredHeight: () => pe.value
|
|
525
|
+
}), ve = a(() => L.value.some((t) => !!t.customCell || !!t.customRender)), U = a(() => !mt.value || l.bordered ? {
|
|
505
526
|
table: "",
|
|
506
527
|
th: "",
|
|
507
528
|
td: ""
|
|
@@ -509,72 +530,72 @@ const io = /* @__PURE__ */ Pt({
|
|
|
509
530
|
table: e.groupedHeaderTable(),
|
|
510
531
|
th: e.groupedHeaderTh(),
|
|
511
532
|
td: e.groupedHeaderTd()
|
|
512
|
-
}),
|
|
513
|
-
b([
|
|
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]) => {
|
|
514
535
|
}, {
|
|
515
536
|
immediate: !0
|
|
516
|
-
}), b([() => l.virtual,
|
|
537
|
+
}), b([() => l.virtual, Dt], ([t, o]) => {
|
|
517
538
|
if (!t) return;
|
|
518
539
|
const d = String(l.scroll?.y);
|
|
519
|
-
o.kind === "compat-px" ?
|
|
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}`;
|
|
520
541
|
}, {
|
|
521
542
|
immediate: !0
|
|
522
543
|
});
|
|
523
|
-
const
|
|
524
|
-
b(() =>
|
|
525
|
-
t && (
|
|
526
|
-
}), b(() =>
|
|
527
|
-
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);
|
|
528
549
|
});
|
|
529
|
-
const
|
|
530
|
-
b(
|
|
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) => {
|
|
531
552
|
}, {
|
|
532
553
|
immediate: !0
|
|
533
554
|
});
|
|
534
555
|
const {
|
|
535
|
-
metrics:
|
|
536
|
-
} =
|
|
537
|
-
enabled: () =>
|
|
538
|
-
headerEl: () =>
|
|
556
|
+
metrics: Ce
|
|
557
|
+
} = cl({
|
|
558
|
+
enabled: () => X.value,
|
|
559
|
+
headerEl: () => Y.value,
|
|
539
560
|
columns: () => f.value,
|
|
540
|
-
columnWidths:
|
|
561
|
+
columnWidths: V,
|
|
541
562
|
hasHeader: () => l.showHeader !== !1
|
|
542
563
|
});
|
|
543
|
-
b([
|
|
564
|
+
b([X, Ce], ([t, o]) => {
|
|
544
565
|
!t || o || l.showHeader;
|
|
545
566
|
}, {
|
|
546
567
|
immediate: !0
|
|
547
568
|
});
|
|
548
|
-
function
|
|
549
|
-
return
|
|
569
|
+
function Et(t) {
|
|
570
|
+
return M.value ? te.value.get(t)?.level ?? 0 : 0;
|
|
550
571
|
}
|
|
551
|
-
function
|
|
552
|
-
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 : "";
|
|
553
574
|
}
|
|
554
|
-
function
|
|
575
|
+
function Tt(t, o) {
|
|
555
576
|
return l.customRow?.(t, o);
|
|
556
577
|
}
|
|
557
|
-
function
|
|
578
|
+
function Ht(t, o) {
|
|
558
579
|
return l.customHeaderRow?.(t, o);
|
|
559
580
|
}
|
|
560
|
-
function
|
|
581
|
+
function Bt(t) {
|
|
561
582
|
if (typeof t.title != "function")
|
|
562
583
|
return t.title ?? "";
|
|
563
|
-
const o = t, d =
|
|
584
|
+
const o = t, d = je.value.filter((u) => !!u.column);
|
|
564
585
|
return t.title({
|
|
565
|
-
sortOrder: o.sorter ?
|
|
566
|
-
sortColumn:
|
|
586
|
+
sortOrder: o.sorter ? _(o) ?? void 0 : void 0,
|
|
587
|
+
sortColumn: Me.value.column,
|
|
567
588
|
sortColumns: d.length > 0 ? d : void 0,
|
|
568
589
|
filters: z()
|
|
569
590
|
});
|
|
570
591
|
}
|
|
571
|
-
function
|
|
572
|
-
return !!(t.sorter &&
|
|
592
|
+
function Lt(t) {
|
|
593
|
+
return !!(t.sorter && _(t));
|
|
573
594
|
}
|
|
574
|
-
const
|
|
595
|
+
const xe = {
|
|
575
596
|
width: "100%",
|
|
576
597
|
minWidth: "100%"
|
|
577
|
-
},
|
|
598
|
+
}, Nt = {
|
|
578
599
|
thSortable: e.thSortable,
|
|
579
600
|
thSorted: e.thSorted,
|
|
580
601
|
tdSorted: e.tdSorted,
|
|
@@ -650,220 +671,230 @@ const io = /* @__PURE__ */ Pt({
|
|
|
650
671
|
expandedRowCell: e.expandedRowCell,
|
|
651
672
|
resizeHandle: e.resizeHandle,
|
|
652
673
|
tdRowHover: e.tdRowHover,
|
|
653
|
-
tdRowSelectedHover: e.tdRowSelectedHover
|
|
654
|
-
|
|
655
|
-
|
|
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, {
|
|
656
680
|
bodyCell: i.bodyCell,
|
|
657
681
|
headerCell: i.headerCell,
|
|
658
682
|
empty: i.empty,
|
|
659
|
-
getSortOrder:
|
|
660
|
-
toggleSortOrder:
|
|
661
|
-
isColumnSorted:
|
|
662
|
-
getFilteredValue:
|
|
663
|
-
confirmFilter:
|
|
664
|
-
resetFilter:
|
|
683
|
+
getSortOrder: _,
|
|
684
|
+
toggleSortOrder: Pe,
|
|
685
|
+
isColumnSorted: Lt,
|
|
686
|
+
getFilteredValue: Ve,
|
|
687
|
+
confirmFilter: Ye,
|
|
688
|
+
resetFilter: $e,
|
|
665
689
|
customFilterDropdown: i.customFilterDropdown,
|
|
666
690
|
customFilterIcon: i.customFilterIcon,
|
|
667
|
-
showSorterTooltip: a(() => l.showSorterTooltip ??
|
|
691
|
+
showSorterTooltip: a(() => l.showSorterTooltip ?? Se.value.showSorterTooltip),
|
|
668
692
|
headerEllipsis: a(() => l.headerEllipsis),
|
|
669
|
-
subThemeSlots:
|
|
670
|
-
presetConfig:
|
|
671
|
-
themePreset:
|
|
693
|
+
subThemeSlots: Nt,
|
|
694
|
+
presetConfig: Se,
|
|
695
|
+
themePreset: w,
|
|
672
696
|
cssMode: m,
|
|
673
|
-
classPrefix:
|
|
674
|
-
vtgClass: (t) =>
|
|
675
|
-
compatClass:
|
|
676
|
-
localeName:
|
|
677
|
-
locale:
|
|
697
|
+
classPrefix: g,
|
|
698
|
+
vtgClass: (t) => A(t, m.value, g.value),
|
|
699
|
+
compatClass: R,
|
|
700
|
+
localeName: K,
|
|
701
|
+
locale: ze,
|
|
678
702
|
rowSelection: () => l.rowSelection,
|
|
679
|
-
isSelected:
|
|
680
|
-
isDisabledRow:
|
|
681
|
-
getSelectionState:
|
|
682
|
-
toggleRow:
|
|
683
|
-
toggleAll:
|
|
684
|
-
allCheckedState: () =>
|
|
685
|
-
getRowKey:
|
|
686
|
-
invertSelection:
|
|
687
|
-
clearSelection:
|
|
688
|
-
getChangeableRowKeys:
|
|
689
|
-
fixedOffsets:
|
|
690
|
-
scrollState:
|
|
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,
|
|
691
715
|
leafColumnCount: a(() => f.value.length),
|
|
692
716
|
bordered: a(() => l.bordered),
|
|
693
|
-
tableLayout:
|
|
717
|
+
tableLayout: $,
|
|
694
718
|
sticky: a(() => l.sticky),
|
|
695
|
-
getRowProps:
|
|
696
|
-
getRowClassName:
|
|
697
|
-
getHeaderRowProps:
|
|
698
|
-
getColumnTitle:
|
|
719
|
+
getRowProps: Tt,
|
|
720
|
+
getRowClassName: It,
|
|
721
|
+
getHeaderRowProps: Ht,
|
|
722
|
+
getColumnTitle: Bt,
|
|
699
723
|
getPopupContainer: l.getPopupContainer,
|
|
700
724
|
transformCellText: l.transformCellText,
|
|
701
725
|
expandable: () => l.expandable,
|
|
702
|
-
isExpanded:
|
|
703
|
-
toggleExpand:
|
|
704
|
-
isRowExpandable:
|
|
705
|
-
columnWidths:
|
|
706
|
-
startResize:
|
|
707
|
-
isResizing: () =>
|
|
726
|
+
isExpanded: st,
|
|
727
|
+
toggleExpand: ct,
|
|
728
|
+
isRowExpandable: le,
|
|
729
|
+
columnWidths: V,
|
|
730
|
+
startResize: pt,
|
|
731
|
+
isResizing: () => vt.value,
|
|
708
732
|
displayColumns: a(() => f.value),
|
|
709
733
|
registerSummaryFixed: (t) => {
|
|
710
|
-
|
|
734
|
+
be.value = t;
|
|
711
735
|
},
|
|
712
|
-
isTreeData:
|
|
713
|
-
treeFlattenData:
|
|
714
|
-
getFlattenRow: (t) =>
|
|
715
|
-
toggleTreeExpand:
|
|
716
|
-
isTreeExpanded:
|
|
717
|
-
treeIndentSize:
|
|
718
|
-
hoverRange:
|
|
719
|
-
setHoverRange:
|
|
720
|
-
clearHoverRange:
|
|
721
|
-
|
|
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
|
+
}
|
|
722
753
|
}), () => {
|
|
723
754
|
let t;
|
|
724
755
|
const o = l.title ? l.title(p.value) : i.title ? i.title({
|
|
725
756
|
data: p.value
|
|
726
757
|
}) : null, d = l.footer ? l.footer(p.value) : i.footer ? i.footer({
|
|
727
758
|
data: p.value
|
|
728
|
-
}) : null, u = i.summary ? i.summary() : null,
|
|
729
|
-
tableLayout:
|
|
759
|
+
}) : null, u = i.summary ? i.summary() : null, x = be.value !== !1, y = l.scroll, v = {
|
|
760
|
+
tableLayout: $.value
|
|
730
761
|
};
|
|
731
|
-
|
|
732
|
-
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, {
|
|
733
764
|
loadingClass: e.loading()
|
|
734
|
-
},
|
|
765
|
+
}, Ae(t = i.loading()) ? t : {
|
|
735
766
|
default: () => [t]
|
|
736
|
-
}) : n(
|
|
767
|
+
}) : n(Le, {
|
|
737
768
|
loadingClass: e.loading(),
|
|
738
|
-
indicator:
|
|
769
|
+
indicator: At,
|
|
739
770
|
tip: Ft
|
|
740
771
|
}, null));
|
|
741
|
-
if (
|
|
742
|
-
const
|
|
743
|
-
ref:
|
|
744
|
-
class:
|
|
745
|
-
style:
|
|
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
|
|
746
777
|
}, [n("div", {
|
|
747
|
-
class:
|
|
778
|
+
class: A("block w-full min-w-full", m.value, g.value)
|
|
748
779
|
}, [n("table", {
|
|
749
|
-
class:
|
|
780
|
+
class: H.value,
|
|
750
781
|
style: v
|
|
751
|
-
}, [n(
|
|
782
|
+
}, [n(O, {
|
|
752
783
|
columns: f.value
|
|
753
|
-
}, null), n(
|
|
754
|
-
rows:
|
|
784
|
+
}, null), n(He, {
|
|
785
|
+
rows: j.value,
|
|
755
786
|
theadClass: e.thead(),
|
|
756
787
|
rowClass: e.tr(),
|
|
757
|
-
thClass:
|
|
788
|
+
thClass: we.value,
|
|
758
789
|
headerCellInnerClass: e.headerCellInner()
|
|
759
|
-
}, null)])])]) : null,
|
|
790
|
+
}, null)])])]) : null, Kt = T.value ? n(Dl, {
|
|
760
791
|
dataSource: p.value,
|
|
761
792
|
columns: f.value,
|
|
762
793
|
tbodyClass: e.tbody(),
|
|
763
794
|
rowClass: e.tr(),
|
|
764
|
-
tdClass:
|
|
795
|
+
tdClass: G.value,
|
|
765
796
|
emptyClass: e.empty(),
|
|
766
797
|
bodyCellEllipsisClass: e.bodyCellEllipsis(),
|
|
767
|
-
tableClass:
|
|
798
|
+
tableClass: H.value,
|
|
768
799
|
tableStyle: v,
|
|
769
800
|
rowKey: l.rowKey,
|
|
770
|
-
height:
|
|
801
|
+
height: St.value,
|
|
771
802
|
itemHeight: xt.value,
|
|
772
|
-
fixedHeight:
|
|
773
|
-
virtualColumn:
|
|
774
|
-
columnMetrics:
|
|
803
|
+
fixedHeight: bt.value,
|
|
804
|
+
virtualColumn: X.value,
|
|
805
|
+
columnMetrics: Ce.value,
|
|
775
806
|
showScrollBar: "hover",
|
|
776
|
-
onVirtualScroll: (
|
|
777
|
-
|
|
807
|
+
onVirtualScroll: (Re) => {
|
|
808
|
+
wt(Re.x, Re.maxX);
|
|
778
809
|
}
|
|
779
|
-
}, null) : null,
|
|
780
|
-
ref:
|
|
781
|
-
maxHeight:
|
|
810
|
+
}, null) : null, kt = T.value ? null : n(Ie, {
|
|
811
|
+
ref: ye,
|
|
812
|
+
maxHeight: Ct.value,
|
|
782
813
|
wrapClass: e.bodyWrapper(),
|
|
783
|
-
viewStyle:
|
|
784
|
-
onScroll:
|
|
814
|
+
viewStyle: xe,
|
|
815
|
+
onScroll: de
|
|
785
816
|
}, {
|
|
786
817
|
default: () => [n("table", {
|
|
787
|
-
class:
|
|
818
|
+
class: H.value,
|
|
788
819
|
style: v
|
|
789
|
-
}, [n(
|
|
820
|
+
}, [n(O, {
|
|
790
821
|
columns: f.value
|
|
791
|
-
}, null), n(
|
|
822
|
+
}, null), n(Be, {
|
|
792
823
|
dataSource: p.value,
|
|
793
824
|
columns: f.value,
|
|
794
825
|
tbodyClass: e.tbody(),
|
|
795
826
|
rowClass: e.tr(),
|
|
796
|
-
tdClass:
|
|
827
|
+
tdClass: G.value,
|
|
797
828
|
emptyClass: e.empty(),
|
|
798
829
|
bodyCellEllipsisClass: e.bodyCellEllipsis(),
|
|
799
830
|
rowKey: l.rowKey
|
|
800
|
-
}, null), u && !
|
|
831
|
+
}, null), u && !x && n("tfoot", {
|
|
801
832
|
class: e.summary()
|
|
802
833
|
}, [u])])]
|
|
803
|
-
}),
|
|
804
|
-
ref:
|
|
805
|
-
class:
|
|
806
|
-
style: {
|
|
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 ? {
|
|
807
838
|
position: "sticky",
|
|
808
|
-
bottom: `${
|
|
839
|
+
bottom: `${C.value?.offsetSummary ?? 0}px`,
|
|
809
840
|
zIndex: "4",
|
|
810
841
|
overflow: "hidden"
|
|
811
|
-
}
|
|
842
|
+
} : void 0
|
|
812
843
|
}, [n("div", {
|
|
813
|
-
class:
|
|
844
|
+
class: A("block w-full min-w-full", m.value, g.value)
|
|
814
845
|
}, [n("table", {
|
|
815
|
-
class:
|
|
846
|
+
class: H.value,
|
|
816
847
|
style: v
|
|
817
|
-
}, [n(
|
|
848
|
+
}, [n(O, {
|
|
818
849
|
columns: f.value
|
|
819
850
|
}, null), n("tfoot", {
|
|
820
851
|
class: e.summary()
|
|
821
852
|
}, [u])])])]) : null;
|
|
822
853
|
return n("div", {
|
|
823
|
-
class:
|
|
854
|
+
class: h(e.root(), I.value && e.rootAutoHeight(), se.value)
|
|
824
855
|
}, [o && n("div", {
|
|
825
856
|
class: e.title()
|
|
826
857
|
}, [o]), n("div", {
|
|
827
|
-
ref:
|
|
828
|
-
class:
|
|
829
|
-
}, [
|
|
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", {
|
|
830
861
|
class: e.footer()
|
|
831
862
|
}, [d])]);
|
|
832
863
|
}
|
|
833
|
-
const
|
|
834
|
-
class:
|
|
864
|
+
const J = n(jt, null, [n("table", {
|
|
865
|
+
class: H.value,
|
|
835
866
|
style: v
|
|
836
|
-
}, [n(
|
|
867
|
+
}, [n(O, {
|
|
837
868
|
columns: f.value
|
|
838
|
-
}, null), l.showHeader !== !1 && n(
|
|
839
|
-
rows:
|
|
869
|
+
}, null), l.showHeader !== !1 && n(He, {
|
|
870
|
+
rows: j.value,
|
|
840
871
|
theadClass: e.thead(),
|
|
841
872
|
rowClass: e.tr(),
|
|
842
|
-
thClass:
|
|
873
|
+
thClass: we.value,
|
|
843
874
|
headerCellInnerClass: e.headerCellInner()
|
|
844
|
-
}, null), n(
|
|
875
|
+
}, null), n(Be, {
|
|
845
876
|
dataSource: p.value,
|
|
846
877
|
columns: f.value,
|
|
847
878
|
tbodyClass: e.tbody(),
|
|
848
879
|
rowClass: e.tr(),
|
|
849
|
-
tdClass:
|
|
880
|
+
tdClass: G.value,
|
|
850
881
|
emptyClass: e.empty(),
|
|
851
882
|
bodyCellEllipsisClass: e.bodyCellEllipsis(),
|
|
852
883
|
rowKey: l.rowKey
|
|
853
884
|
}, null), u && n("tfoot", {
|
|
854
885
|
class: e.summary()
|
|
855
|
-
}, [u])]),
|
|
886
|
+
}, [u])]), De]);
|
|
856
887
|
return n("div", {
|
|
857
|
-
class:
|
|
888
|
+
class: h(e.root(), se.value)
|
|
858
889
|
}, [o && n("div", {
|
|
859
890
|
class: e.title()
|
|
860
|
-
}, [o]), n(
|
|
861
|
-
ref:
|
|
891
|
+
}, [o]), n(Ie, {
|
|
892
|
+
ref: he,
|
|
862
893
|
wrapClass: e.wrapper(),
|
|
863
|
-
viewStyle:
|
|
864
|
-
onScroll:
|
|
865
|
-
},
|
|
866
|
-
default: () => [
|
|
894
|
+
viewStyle: xe,
|
|
895
|
+
onScroll: de
|
|
896
|
+
}, Ae(J) ? J : {
|
|
897
|
+
default: () => [J]
|
|
867
898
|
}), d && n("div", {
|
|
868
899
|
class: e.footer()
|
|
869
900
|
}, [d])]);
|
|
@@ -871,5 +902,5 @@ const io = /* @__PURE__ */ Pt({
|
|
|
871
902
|
}
|
|
872
903
|
});
|
|
873
904
|
export {
|
|
874
|
-
|
|
905
|
+
wo as default
|
|
875
906
|
};
|