@vtable-guild/vtable-guild 2.9.0-alpha.1 → 2.9.0-alpha.3
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 +10 -0
- package/css/presets/element-plus.css +10 -0
- package/css/style.css +138 -0
- package/css/tailwind3-utilities.css +118 -0
- package/css/tailwind3.css +20 -0
- package/css/tailwind4.css +20 -0
- package/dist/core/src/components/Button.d.ts +9 -0
- package/dist/core/src/components/Button.d.ts.map +1 -1
- package/dist/core/src/components/Button.mjs +11 -6
- package/dist/css/presets/antdv.css +10 -0
- package/dist/css/presets/element-plus.css +10 -0
- package/dist/css/style.css +138 -0
- package/dist/css/tailwind3-utilities.css +118 -0
- package/dist/css/tailwind3.css +20 -0
- package/dist/css/tailwind4.css +20 -0
- package/dist/icons/src/CheckCircleFilledIcon.d.ts +3 -0
- package/dist/icons/src/CheckCircleFilledIcon.d.ts.map +1 -0
- package/dist/icons/src/CheckCircleFilledIcon.mjs +9 -0
- package/dist/icons/src/CloseCircleFilledIcon.d.ts +3 -0
- package/dist/icons/src/CloseCircleFilledIcon.d.ts.map +1 -0
- package/dist/icons/src/CloseCircleFilledIcon.mjs +9 -0
- package/dist/icons/src/index.d.ts +2 -0
- package/dist/icons/src/index.d.ts.map +1 -1
- package/dist/index.full.mjs +6548 -5313
- package/dist/index.mjs +149 -115
- package/dist/table/src/components/Table.d.ts +3 -3
- package/dist/table/src/components/Table.d.ts.map +1 -1
- package/dist/table/src/components/Table.mjs +486 -460
- package/dist/table/src/components/TableCell.d.ts.map +1 -1
- package/dist/table/src/components/TableCell.mjs +109 -86
- package/dist/table/src/components/TableEditableCell.d.ts +29 -0
- package/dist/table/src/components/TableEditableCell.d.ts.map +1 -0
- package/dist/table/src/components/TableEditableCell.mjs +39 -0
- package/dist/table/src/components/TableEditableCell.test.d.ts +2 -0
- package/dist/table/src/components/TableEditableCell.test.d.ts.map +1 -0
- package/dist/table/src/components/TableHeaderCell.d.ts.map +1 -1
- package/dist/table/src/components/TableHeaderCell.mjs +174 -175
- package/dist/table/src/components/TableQuery.d.ts +108 -0
- package/dist/table/src/components/TableQuery.d.ts.map +1 -0
- package/dist/table/src/components/TableQuery.mjs +244 -0
- package/dist/table/src/components/TableQuery.test.d.ts +2 -0
- package/dist/table/src/components/TableQuery.test.d.ts.map +1 -0
- package/dist/table/src/components/VTableDynamicSlots.test.d.ts +2 -0
- package/dist/table/src/components/VTableDynamicSlots.test.d.ts.map +1 -0
- package/dist/table/src/components/VTableEditCell.vue.d.ts +19 -0
- package/dist/table/src/components/VTableEditCell.vue.d.ts.map +1 -0
- package/dist/table/src/components/VTableEditCell.vue.mjs +21 -0
- package/dist/table/src/components/VTableEditCell.vue2.mjs +4 -0
- package/dist/table/src/components/VTableQuery.vue.d.ts +18 -0
- package/dist/table/src/components/VTableQuery.vue.d.ts.map +1 -0
- package/dist/table/src/components/VTableQuery.vue.mjs +64 -0
- package/dist/table/src/components/VTableQuery.vue2.mjs +4 -0
- package/dist/table/src/composables/useTableDictionary.d.ts +5 -0
- package/dist/table/src/composables/useTableDictionary.d.ts.map +1 -0
- package/dist/table/src/composables/useTableDictionary.mjs +168 -0
- package/dist/table/src/composables/useTableDictionary.test.d.ts +2 -0
- package/dist/table/src/composables/useTableDictionary.test.d.ts.map +1 -0
- package/dist/table/src/composables/useTableEdit.d.ts.map +1 -1
- package/dist/table/src/composables/useTableEdit.mjs +352 -135
- package/dist/table/src/composables/useTableEditable.d.ts +4 -0
- package/dist/table/src/composables/useTableEditable.d.ts.map +1 -0
- package/dist/table/src/composables/useTableEditable.mjs +125 -0
- package/dist/table/src/composables/useTableEditable.test.d.ts +2 -0
- package/dist/table/src/composables/useTableEditable.test.d.ts.map +1 -0
- package/dist/table/src/composables/useTableQuery.d.ts.map +1 -1
- package/dist/table/src/composables/useTableQuery.mjs +33 -33
- package/dist/table/src/composables/useTableRequest.d.ts.map +1 -1
- package/dist/table/src/composables/useTableRequest.mjs +138 -97
- package/dist/table/src/composables/useTableRequest.polling.test.d.ts +2 -0
- package/dist/table/src/composables/useTableRequest.polling.test.d.ts.map +1 -0
- package/dist/table/src/context.d.ts +6 -2
- package/dist/table/src/context.d.ts.map +1 -1
- package/dist/table/src/controls.d.ts +4 -0
- package/dist/table/src/controls.d.ts.map +1 -0
- package/dist/table/src/controls.mjs +97 -0
- package/dist/table/src/controls.test.d.ts +2 -0
- package/dist/table/src/controls.test.d.ts.map +1 -0
- package/dist/table/src/index.d.ts +10 -0
- package/dist/table/src/index.d.ts.map +1 -1
- package/dist/table/src/renderers.d.ts.map +1 -1
- package/dist/table/src/renderers.mjs +88 -23
- package/dist/table/src/review-current.repro.test.d.ts +2 -0
- package/dist/table/src/review-current.repro.test.d.ts.map +1 -0
- package/dist/table/src/types/column.d.ts +4 -1
- package/dist/table/src/types/column.d.ts.map +1 -1
- package/dist/table/src/types/controls.d.ts +31 -0
- package/dist/table/src/types/controls.d.ts.map +1 -0
- package/dist/table/src/types/dictionary.d.ts +71 -0
- package/dist/table/src/types/dictionary.d.ts.map +1 -0
- package/dist/table/src/types/dictionary.typecheck.d.ts +6 -0
- package/dist/table/src/types/dictionary.typecheck.d.ts.map +1 -0
- package/dist/table/src/types/editable.d.ts +49 -0
- package/dist/table/src/types/editable.d.ts.map +1 -0
- package/dist/table/src/types/editable.typecheck.d.ts +15 -0
- package/dist/table/src/types/editable.typecheck.d.ts.map +1 -0
- package/dist/table/src/types/editing.d.ts +41 -4
- package/dist/table/src/types/editing.d.ts.map +1 -1
- package/dist/table/src/types/editing.typecheck.d.ts.map +1 -1
- package/dist/table/src/types/index.d.ts +4 -0
- package/dist/table/src/types/index.d.ts.map +1 -1
- package/dist/table/src/types/query-form.d.ts +90 -0
- package/dist/table/src/types/query-form.d.ts.map +1 -0
- package/dist/table/src/types/query-form.typecheck.d.ts +10 -0
- package/dist/table/src/types/query-form.typecheck.d.ts.map +1 -0
- package/dist/table/src/types/query.d.ts +6 -2
- package/dist/table/src/types/query.d.ts.map +1 -1
- package/dist/table/src/types/renderers.d.ts +15 -3
- package/dist/table/src/types/renderers.d.ts.map +1 -1
- package/dist/table/src/types/request.d.ts +20 -2
- package/dist/table/src/types/request.d.ts.map +1 -1
- package/dist/table/src/types/request.typecheck.d.ts.map +1 -1
- package/dist/table/src/utils/cell.d.ts +3 -2
- package/dist/table/src/utils/cell.d.ts.map +1 -1
- package/dist/table/src/utils/cell.mjs +45 -44
- package/dist/table/src/utils/fieldPath.d.ts +6 -0
- package/dist/table/src/utils/fieldPath.d.ts.map +1 -0
- package/dist/table/src/utils/fieldPath.mjs +29 -0
- package/dist/table/src/utils/queryFields.d.ts +4 -0
- package/dist/table/src/utils/queryFields.d.ts.map +1 -0
- package/dist/table/src/utils/queryFields.mjs +31 -0
- package/dist/table/src/utils/queryFields.test.d.ts +2 -0
- package/dist/table/src/utils/queryFields.test.d.ts.map +1 -0
- package/dist/table/src/utils/stateEqual.d.ts +3 -0
- package/dist/table/src/utils/stateEqual.d.ts.map +1 -0
- package/dist/table/src/utils/stateEqual.mjs +15 -0
- package/dist/theme/src/index.d.ts +4 -0
- package/dist/theme/src/index.d.ts.map +1 -1
- package/dist/theme/src/presets/antdv/table.d.ts +7 -0
- package/dist/theme/src/presets/antdv/table.d.ts.map +1 -1
- package/dist/theme/src/presets/antdv/table.mjs +7 -0
- package/dist/theme/src/presets/element-plus/table.d.ts +7 -0
- package/dist/theme/src/presets/element-plus/table.d.ts.map +1 -1
- package/dist/theme/src/presets/element-plus/table.mjs +7 -0
- package/dist/theme/src/query.d.ts +128 -0
- package/dist/theme/src/query.d.ts.map +1 -0
- package/dist/theme/src/query.mjs +56 -0
- package/dist/vtable-guild/src/augment.d.ts +2 -1
- package/dist/vtable-guild/src/augment.d.ts.map +1 -1
- package/dist/vtable-guild/src/index.d.ts +1 -0
- package/dist/vtable-guild/src/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,86 +1,86 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { isManual as
|
|
1
|
+
import { defineComponent as sl, ref as D, watch as L, onBeforeUnmount as he, computed as n, inject as cl, provide as Xe, onMounted as qe, shallowReactive as fl, onBeforeUpdate as ml, createVNode as r, Fragment as pl, nextTick as Je, isVNode as vl } from "vue";
|
|
2
|
+
import { isManual as we } from "../utils/manual.mjs";
|
|
3
3
|
import "../../../core/src/utils/tv.mjs";
|
|
4
|
-
import { prefixThemeConfig as
|
|
5
|
-
import { devWarn as
|
|
6
|
-
import { mergeThemeConfigs as A, useTheme as
|
|
7
|
-
import { mergeDeep as
|
|
8
|
-
import
|
|
9
|
-
import { VTABLE_GUILD_INJECTION_KEY as
|
|
10
|
-
import { paginationZhCN as
|
|
11
|
-
import { resolveTooltipThemePreset as
|
|
12
|
-
import { antdvTableCompatClasses as
|
|
13
|
-
import { usePagination as
|
|
14
|
-
import
|
|
15
|
-
import { filterVisibleColumns as
|
|
16
|
-
import { getEllipsisConfig as
|
|
17
|
-
import { getRootCompatClass as
|
|
18
|
-
import { resolveRowKey as
|
|
19
|
-
import { useScroll as
|
|
20
|
-
import { useAutoHeight as
|
|
21
|
-
import { useColumnMetrics as
|
|
22
|
-
import { useColumnLayout as
|
|
23
|
-
import { resolveFixedColumnRanges as
|
|
24
|
-
import { useExpand as
|
|
25
|
-
import { useResize as
|
|
26
|
-
import { useVirtual as
|
|
27
|
-
import { useTreeData as
|
|
28
|
-
import { useLazyTreeData as
|
|
29
|
-
import { useHoverState as
|
|
30
|
-
import { useRowDragSort as
|
|
31
|
-
import { TABLE_CONTEXT_KEY as
|
|
32
|
-
import { EXPAND_COLUMN as
|
|
33
|
-
import { resolveTablePresetConfig as
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import { antdvTableTheme as
|
|
41
|
-
import { useColumns as
|
|
42
|
-
import { useSorter as
|
|
43
|
-
import { useFilter as
|
|
44
|
-
import { useSelection as
|
|
45
|
-
import { cn as
|
|
46
|
-
function
|
|
47
|
-
return typeof l == "function" || Object.prototype.toString.call(l) === "[object Object]" && !
|
|
4
|
+
import { prefixThemeConfig as gl, prefixVtgClassNames as Z } from "../../../core/src/utils/classPrefix.mjs";
|
|
5
|
+
import { devWarn as yl } from "../../../core/src/utils/devWarn.mjs";
|
|
6
|
+
import { mergeThemeConfigs as A, useTheme as hl } from "../../../core/src/composables/useTheme.mjs";
|
|
7
|
+
import { mergeDeep as Q } from "../../../core/src/utils/mergeDeep.mjs";
|
|
8
|
+
import Ze from "../../../core/src/components/Scrollbar.mjs";
|
|
9
|
+
import { VTABLE_GUILD_INJECTION_KEY as Qe } from "../../../core/src/plugin/index.mjs";
|
|
10
|
+
import { paginationZhCN as wl } from "../../../theme/src/pagination.mjs";
|
|
11
|
+
import { resolveTooltipThemePreset as Cl, resolveScrollbarThemePreset as xl, resolveRadioThemePreset as bl, resolveInputThemePreset as Sl, resolveCheckboxThemePreset as Dl, resolveButtonThemePreset as Tl, resolveTableThemePreset as El, resolveTableLocalePreset as Rl, resolveBuiltInTableLocale as Il, resolveBuiltInLocale as Ll } from "../../../theme/src/presets/index.mjs";
|
|
12
|
+
import { antdvTableCompatClasses as Hl } from "../../../theme/src/compat/antdv-table.mjs";
|
|
13
|
+
import { usePagination as Bl } from "../composables/usePagination.mjs";
|
|
14
|
+
import Fl from "./TablePagination.mjs";
|
|
15
|
+
import { filterVisibleColumns as Nl, applyColumnOrder as Pl } from "../composables/useColumnDisplay.mjs";
|
|
16
|
+
import { getEllipsisConfig as Ol } from "../utils/cell.mjs";
|
|
17
|
+
import { getRootCompatClass as _l } from "../utils/compat.mjs";
|
|
18
|
+
import { resolveRowKey as kl } from "../utils/rowKey.mjs";
|
|
19
|
+
import { useScroll as Al } from "../composables/useScroll.mjs";
|
|
20
|
+
import { useAutoHeight as Wl } from "../composables/useAutoHeight.mjs";
|
|
21
|
+
import { useColumnMetrics as zl } from "../composables/useColumnMetrics.mjs";
|
|
22
|
+
import { useColumnLayout as Kl } from "../composables/useColumnLayout.mjs";
|
|
23
|
+
import { resolveFixedColumnRanges as Ml } from "../composables/useColumnWindow.mjs";
|
|
24
|
+
import { useExpand as jl } from "../composables/useExpand.mjs";
|
|
25
|
+
import { useResize as Vl } from "../composables/useResize.mjs";
|
|
26
|
+
import { useVirtual as Yl, INVALID_SCROLL_Y_FALLBACK as $l } from "../composables/useVirtual.mjs";
|
|
27
|
+
import { useTreeData as Ul } from "../composables/useTreeData.mjs";
|
|
28
|
+
import { useLazyTreeData as Gl } from "../composables/useLazyTreeData.mjs";
|
|
29
|
+
import { useHoverState as Xl } from "../composables/useHoverState.mjs";
|
|
30
|
+
import { useRowDragSort as ql } from "../composables/useRowDragSort.mjs";
|
|
31
|
+
import { TABLE_CONTEXT_KEY as Jl } from "../context.mjs";
|
|
32
|
+
import { EXPAND_COLUMN as Zl, SELECTION_COLUMN as Ql } from "../constants.mjs";
|
|
33
|
+
import { resolveTablePresetConfig as ea } from "../preset-config.mjs";
|
|
34
|
+
import et from "./TableHeader.mjs";
|
|
35
|
+
import tt from "./TableBody.mjs";
|
|
36
|
+
import ta from "./VirtualTableBody.mjs";
|
|
37
|
+
import lt from "./TableLoading.mjs";
|
|
38
|
+
import ee from "./ColGroup.mjs";
|
|
39
|
+
import te from "./ColumnWidthRow.mjs";
|
|
40
|
+
import { antdvTableTheme as la } from "../../../theme/src/presets/antdv/table.mjs";
|
|
41
|
+
import { useColumns as at } from "../composables/useColumns.mjs";
|
|
42
|
+
import { useSorter as aa } from "../composables/useSorter.mjs";
|
|
43
|
+
import { useFilter as oa } from "../composables/useFilter.mjs";
|
|
44
|
+
import { useSelection as na } from "../composables/useSelection.mjs";
|
|
45
|
+
import { cn as H } from "tailwind-variants";
|
|
46
|
+
function ot(l) {
|
|
47
|
+
return typeof l == "function" || Object.prototype.toString.call(l) === "[object Object]" && !vl(l);
|
|
48
48
|
}
|
|
49
|
-
const
|
|
49
|
+
const ra = [["xxxl", 2e3], ["xxl", 1600], ["xl", 1200], ["lg", 992], ["md", 768], ["sm", 576], ["xs", 0]];
|
|
50
50
|
function nt() {
|
|
51
51
|
if (typeof window > "u")
|
|
52
52
|
return /* @__PURE__ */ new Set(["md", "sm", "xs"]);
|
|
53
|
-
const l = window.innerWidth,
|
|
54
|
-
return
|
|
53
|
+
const l = window.innerWidth, i = /* @__PURE__ */ new Set();
|
|
54
|
+
return ra.forEach(([u, c]) => {
|
|
55
55
|
if (u === "xs") {
|
|
56
|
-
l < 576 &&
|
|
56
|
+
l < 576 && i.add("xs");
|
|
57
57
|
return;
|
|
58
58
|
}
|
|
59
|
-
l >= c &&
|
|
60
|
-
}),
|
|
59
|
+
l >= c && i.add(u);
|
|
60
|
+
}), i;
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function rt(l, i) {
|
|
63
63
|
return l.reduce((u, c) => {
|
|
64
64
|
if (typeof c == "symbol")
|
|
65
65
|
return u.push(c), u;
|
|
66
|
-
if (c.responsive?.length && !c.responsive.some((
|
|
66
|
+
if (c.responsive?.length && !c.responsive.some((T) => i.has(T)))
|
|
67
67
|
return u;
|
|
68
|
-
const
|
|
68
|
+
const b = c.fixed === !0 ? "left" : c.fixed;
|
|
69
69
|
if ("children" in c && Array.isArray(c.children)) {
|
|
70
|
-
const
|
|
71
|
-
return
|
|
70
|
+
const T = rt(c.children, i);
|
|
71
|
+
return T.length === 0 || u.push({
|
|
72
72
|
...c,
|
|
73
|
-
fixed:
|
|
74
|
-
children:
|
|
73
|
+
fixed: b,
|
|
74
|
+
children: T
|
|
75
75
|
}), u;
|
|
76
76
|
}
|
|
77
|
-
return u.push(
|
|
77
|
+
return u.push(b === c.fixed ? c : {
|
|
78
78
|
...c,
|
|
79
|
-
fixed:
|
|
79
|
+
fixed: b
|
|
80
80
|
}), u;
|
|
81
81
|
}, []);
|
|
82
82
|
}
|
|
83
|
-
const
|
|
83
|
+
const Qa = /* @__PURE__ */ sl({
|
|
84
84
|
name: "VTable",
|
|
85
85
|
props: {
|
|
86
86
|
pagination: {
|
|
@@ -299,52 +299,52 @@ const qa = /* @__PURE__ */ ul({
|
|
|
299
299
|
}
|
|
300
300
|
},
|
|
301
301
|
emits: {
|
|
302
|
-
change: (l,
|
|
303
|
-
resizeColumn: (l,
|
|
304
|
-
rowDragEnd: (l,
|
|
302
|
+
change: (l, i, u) => !0,
|
|
303
|
+
resizeColumn: (l, i) => !0,
|
|
304
|
+
rowDragEnd: (l, i) => !0
|
|
305
305
|
},
|
|
306
306
|
slots: Object,
|
|
307
307
|
setup(l, {
|
|
308
|
-
slots:
|
|
308
|
+
slots: i,
|
|
309
309
|
emit: u,
|
|
310
310
|
expose: c
|
|
311
311
|
}) {
|
|
312
|
-
const
|
|
313
|
-
let
|
|
314
|
-
|
|
312
|
+
const b = D(!1);
|
|
313
|
+
let T;
|
|
314
|
+
L(() => {
|
|
315
315
|
const e = l.loading;
|
|
316
316
|
return [e === !0 || typeof e == "object" && e !== null && e.spinning !== !1, typeof e == "object" && e !== null ? e.delay : 0];
|
|
317
317
|
}, ([e, a]) => {
|
|
318
|
-
clearTimeout(
|
|
319
|
-
|
|
320
|
-
}, a)) :
|
|
318
|
+
clearTimeout(T), e ? !a || !Number.isFinite(a) || a < 0 ? b.value = !0 : b.value || (T = setTimeout(() => {
|
|
319
|
+
b.value = !0;
|
|
320
|
+
}, a)) : b.value = !1;
|
|
321
321
|
}, {
|
|
322
322
|
immediate: !0
|
|
323
|
-
}),
|
|
324
|
-
const
|
|
325
|
-
const e = h?.theme ?? {}, a = E.value,
|
|
323
|
+
}), he(() => clearTimeout(T));
|
|
324
|
+
const Ce = n(() => typeof l.loading == "object" ? l.loading?.wrapperClassName : void 0), h = cl(Qe, null), E = n(() => h?.themePreset ?? "antdv"), B = n(() => h?.cssMode ?? "prebuilt"), F = n(() => h?.classPrefix ?? "vtg"), it = n(() => {
|
|
325
|
+
const e = h?.theme ?? {}, a = E.value, o = (d) => gl(d, B.value, F.value);
|
|
326
326
|
return {
|
|
327
327
|
...e,
|
|
328
|
-
button: A(
|
|
329
|
-
checkbox: A(
|
|
330
|
-
input: A(
|
|
331
|
-
radio: A(
|
|
332
|
-
scrollbar: A(
|
|
333
|
-
tooltip: A(
|
|
328
|
+
button: A(o(Tl(a)), e.button),
|
|
329
|
+
checkbox: A(o(Dl(a)), e.checkbox),
|
|
330
|
+
input: A(o(Sl(a)), e.input),
|
|
331
|
+
radio: A(o(bl(a)), e.radio),
|
|
332
|
+
scrollbar: A(o(xl(a)), e.scrollbar),
|
|
333
|
+
tooltip: A(o(Cl(a)), e.tooltip)
|
|
334
334
|
};
|
|
335
335
|
});
|
|
336
|
-
|
|
336
|
+
Xe(Qe, {
|
|
337
337
|
get themePreset() {
|
|
338
338
|
return E.value;
|
|
339
339
|
},
|
|
340
340
|
get cssMode() {
|
|
341
|
-
return
|
|
341
|
+
return B.value;
|
|
342
342
|
},
|
|
343
343
|
get classPrefix() {
|
|
344
|
-
return
|
|
344
|
+
return F.value;
|
|
345
345
|
},
|
|
346
346
|
get theme() {
|
|
347
|
-
return
|
|
347
|
+
return it.value;
|
|
348
348
|
},
|
|
349
349
|
get locale() {
|
|
350
350
|
return h?.locale ?? "zh-CN";
|
|
@@ -359,140 +359,140 @@ const qa = /* @__PURE__ */ ul({
|
|
|
359
359
|
return h?.compatClass;
|
|
360
360
|
}
|
|
361
361
|
});
|
|
362
|
-
const
|
|
362
|
+
const dt = n(() => El(E.value) ?? la), {
|
|
363
363
|
slots: t
|
|
364
|
-
} =
|
|
365
|
-
compatClasses:
|
|
366
|
-
}), W = h?.compatClass === !0 ? (e) => `ant-table-${e}` : void 0,
|
|
364
|
+
} = hl("table", dt, l, {
|
|
365
|
+
compatClasses: Hl
|
|
366
|
+
}), W = h?.compatClass === !0 ? (e) => `ant-table-${e}` : void 0, z = n(() => l.locale ?? h?.locale ?? "zh-CN"), xe = n(() => ({
|
|
367
367
|
...h?.locales ?? {},
|
|
368
368
|
...l.locales ?? {}
|
|
369
|
-
})),
|
|
370
|
-
const e =
|
|
371
|
-
return
|
|
372
|
-
}),
|
|
373
|
-
function
|
|
374
|
-
|
|
369
|
+
})), ut = n(() => {
|
|
370
|
+
const e = Rl(E.value), a = Il(E.value, z.value), o = xe.value[z.value]?.table, d = Q(Q(e, a), o);
|
|
371
|
+
return Q(d, Q(h?.localeOverrides?.table ?? {}, l.localeOverrides));
|
|
372
|
+
}), le = D(nt());
|
|
373
|
+
function ae() {
|
|
374
|
+
le.value = nt();
|
|
375
375
|
}
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
}),
|
|
379
|
-
window.removeEventListener("resize",
|
|
376
|
+
qe(() => {
|
|
377
|
+
ae(), window.addEventListener("resize", ae);
|
|
378
|
+
}), he(() => {
|
|
379
|
+
window.removeEventListener("resize", ae);
|
|
380
380
|
});
|
|
381
|
-
const
|
|
382
|
-
leafColumns:
|
|
383
|
-
} =
|
|
384
|
-
getSortOrder:
|
|
385
|
-
toggleSortOrder:
|
|
386
|
-
sortData:
|
|
387
|
-
sorterState:
|
|
381
|
+
const be = n(() => rt(l.columns, le.value)), P = n(() => l.sticky === !0 ? {} : typeof l.sticky == "object" ? l.sticky : void 0), {
|
|
382
|
+
leafColumns: j
|
|
383
|
+
} = at(() => be.value), {
|
|
384
|
+
getSortOrder: oe,
|
|
385
|
+
toggleSortOrder: st,
|
|
386
|
+
sortData: ct,
|
|
387
|
+
sorterState: ft,
|
|
388
388
|
sorterResult: ne,
|
|
389
|
-
sortColumns:
|
|
390
|
-
} =
|
|
391
|
-
columns: () =>
|
|
389
|
+
sortColumns: mt
|
|
390
|
+
} = aa({
|
|
391
|
+
columns: () => j.value,
|
|
392
392
|
tableSortDirections: () => l.sortDirections,
|
|
393
393
|
onSorterChange(e) {
|
|
394
|
-
const a =
|
|
395
|
-
u("change",
|
|
394
|
+
const a = re();
|
|
395
|
+
u("change", V(), e, {
|
|
396
396
|
action: "sort",
|
|
397
397
|
currentDataSource: a,
|
|
398
|
-
...
|
|
399
|
-
}),
|
|
398
|
+
...ie()
|
|
399
|
+
}), ue();
|
|
400
400
|
}
|
|
401
401
|
}), {
|
|
402
|
-
getFilteredValue:
|
|
402
|
+
getFilteredValue: pt,
|
|
403
403
|
confirmFilter: vt,
|
|
404
|
-
resetFilter:
|
|
405
|
-
getAllFilters:
|
|
406
|
-
filterData:
|
|
407
|
-
} =
|
|
408
|
-
columns: () =>
|
|
404
|
+
resetFilter: gt,
|
|
405
|
+
getAllFilters: V,
|
|
406
|
+
filterData: yt
|
|
407
|
+
} = oa({
|
|
408
|
+
columns: () => j.value,
|
|
409
409
|
onFilterChange(e) {
|
|
410
|
-
const a =
|
|
410
|
+
const a = re(), o = f.resetForFilter();
|
|
411
411
|
u("change", e, ne.value, {
|
|
412
412
|
action: "filter",
|
|
413
413
|
currentDataSource: a,
|
|
414
|
-
...
|
|
415
|
-
}),
|
|
414
|
+
...ie(o)
|
|
415
|
+
}), ue();
|
|
416
416
|
}
|
|
417
|
-
}), C =
|
|
417
|
+
}), C = Gl({
|
|
418
418
|
data: () => l.dataSource,
|
|
419
419
|
loadData: () => l.loadData,
|
|
420
420
|
isLeaf: () => l.isLeaf,
|
|
421
421
|
childrenColumnName: () => l.childrenColumnName,
|
|
422
|
-
getRowKey:
|
|
422
|
+
getRowKey: S,
|
|
423
423
|
onLoadError: (e, a) => l.onTreeLoadError?.(e, a)
|
|
424
424
|
});
|
|
425
|
-
function
|
|
425
|
+
function re() {
|
|
426
426
|
let e = C.data.value;
|
|
427
|
-
return
|
|
427
|
+
return we(l.manual, "filter") || (e = yt(e)), we(l.manual, "sort") || (e = ct(e)), e;
|
|
428
428
|
}
|
|
429
|
-
const
|
|
430
|
-
manual: () =>
|
|
429
|
+
const K = n(() => re()), f = Bl({
|
|
430
|
+
manual: () => we(l.manual, "pagination"),
|
|
431
431
|
pagination: () => l.pagination,
|
|
432
|
-
data: () =>
|
|
432
|
+
data: () => K.value,
|
|
433
433
|
onChange(e) {
|
|
434
|
-
u("change",
|
|
434
|
+
u("change", V(), ne.value, {
|
|
435
435
|
action: "paginate",
|
|
436
|
-
currentDataSource:
|
|
436
|
+
currentDataSource: K.value,
|
|
437
437
|
pagination: e
|
|
438
|
-
}),
|
|
438
|
+
}), ue();
|
|
439
439
|
}
|
|
440
440
|
});
|
|
441
|
-
function
|
|
441
|
+
function ie(e) {
|
|
442
442
|
return f.enabled.value ? {
|
|
443
443
|
pagination: e ?? f.state.value
|
|
444
444
|
} : {};
|
|
445
445
|
}
|
|
446
|
-
const
|
|
447
|
-
...
|
|
448
|
-
...
|
|
449
|
-
...
|
|
446
|
+
const ht = n(() => ({
|
|
447
|
+
...wl,
|
|
448
|
+
...Ll(E.value, z.value)?.pagination,
|
|
449
|
+
...xe.value[z.value]?.pagination,
|
|
450
450
|
...h?.localeOverrides?.pagination,
|
|
451
451
|
...f.config.value.locale
|
|
452
|
-
})),
|
|
453
|
-
function
|
|
454
|
-
(l.scroll?.scrollToFirstRowOnChange ?? f.enabled.value) &&
|
|
455
|
-
|
|
452
|
+
})), de = D(null);
|
|
453
|
+
function ue() {
|
|
454
|
+
(l.scroll?.scrollToFirstRowOnChange ?? f.enabled.value) && Je(() => {
|
|
455
|
+
I.value ? de.value?.scrollToTop() : N.value && (N.value.scrollTop = 0);
|
|
456
456
|
});
|
|
457
457
|
}
|
|
458
|
-
function
|
|
458
|
+
function Y(e) {
|
|
459
459
|
if (!f.enabled.value || f.state.value.total === 0) return null;
|
|
460
|
-
const
|
|
461
|
-
if (!
|
|
462
|
-
const
|
|
463
|
-
return r(
|
|
460
|
+
const o = (f.config.value.position ?? ["bottomRight"]).find((s) => s !== "none" && s.startsWith(e));
|
|
461
|
+
if (!o) return null;
|
|
462
|
+
const d = o.slice(e.length).toLowerCase();
|
|
463
|
+
return r(Fl, {
|
|
464
464
|
key: e,
|
|
465
465
|
config: f.config.value,
|
|
466
466
|
state: f.state.value,
|
|
467
|
-
locale:
|
|
468
|
-
align:
|
|
469
|
-
position:
|
|
467
|
+
locale: ht.value,
|
|
468
|
+
align: d,
|
|
469
|
+
position: o,
|
|
470
470
|
tableSize: l.size,
|
|
471
|
-
narrow:
|
|
471
|
+
narrow: le.value.has("xs"),
|
|
472
472
|
getPopupContainer: l.getPopupContainer,
|
|
473
473
|
onChange: f.change
|
|
474
|
-
},
|
|
475
|
-
paginationItem:
|
|
474
|
+
}, i.paginationItem ? {
|
|
475
|
+
paginationItem: i.paginationItem
|
|
476
476
|
} : void 0);
|
|
477
477
|
}
|
|
478
|
-
function
|
|
479
|
-
const
|
|
480
|
-
return l.rowKey === void 0 || typeof l.rowKey == "string" && l.rowKey in e,
|
|
478
|
+
function S(e, a) {
|
|
479
|
+
const o = kl(e, a, l.rowKey);
|
|
480
|
+
return l.rowKey === void 0 || typeof l.rowKey == "string" && l.rowKey in e, o;
|
|
481
481
|
}
|
|
482
482
|
const {
|
|
483
|
-
flattenData:
|
|
484
|
-
rowMetaMap:
|
|
485
|
-
isTreeData:
|
|
486
|
-
toggleTreeExpand:
|
|
487
|
-
isTreeExpanded:
|
|
488
|
-
indentSize:
|
|
489
|
-
} =
|
|
490
|
-
data: () =>
|
|
483
|
+
flattenData: se,
|
|
484
|
+
rowMetaMap: Se,
|
|
485
|
+
isTreeData: ce,
|
|
486
|
+
toggleTreeExpand: wt,
|
|
487
|
+
isTreeExpanded: Ct,
|
|
488
|
+
indentSize: xt
|
|
489
|
+
} = Ul({
|
|
490
|
+
data: () => K.value,
|
|
491
491
|
pageData: () => f.pageData.value,
|
|
492
492
|
preserveStateOnDataChange: () => f.enabled.value || !!l.loadData,
|
|
493
493
|
childrenColumnName: () => l.childrenColumnName,
|
|
494
494
|
indentSize: () => l.indentSize,
|
|
495
|
-
getRowKey:
|
|
495
|
+
getRowKey: S,
|
|
496
496
|
hasChildren: C.hasChildren,
|
|
497
497
|
defaultExpandedRowKeys: () => l.defaultExpandedRowKeys,
|
|
498
498
|
expandedRowKeys: () => l.expandedRowKeys,
|
|
@@ -500,179 +500,179 @@ const qa = /* @__PURE__ */ ul({
|
|
|
500
500
|
onExpand: (e, a) => l.onExpand?.(e, a),
|
|
501
501
|
onExpandedRowsChange: (e) => l.onExpandedRowsChange?.(e)
|
|
502
502
|
});
|
|
503
|
-
function
|
|
504
|
-
const
|
|
505
|
-
if (C.getError(
|
|
503
|
+
function bt(e, a) {
|
|
504
|
+
const o = S(e, a);
|
|
505
|
+
if (C.getError(o)) {
|
|
506
506
|
C.load(e, a);
|
|
507
507
|
return;
|
|
508
508
|
}
|
|
509
|
-
|
|
509
|
+
wt(e, a);
|
|
510
510
|
}
|
|
511
|
-
|
|
512
|
-
e?.forEach((a,
|
|
513
|
-
a.expanded && !C.getError(
|
|
511
|
+
L(() => l.loadData ? se.value : void 0, (e) => {
|
|
512
|
+
e?.forEach((a, o) => {
|
|
513
|
+
a.expanded && !C.getError(S(a.record, o)) && C.load(a.record, o);
|
|
514
514
|
});
|
|
515
515
|
}, {
|
|
516
516
|
immediate: !0
|
|
517
517
|
});
|
|
518
518
|
const {
|
|
519
|
-
hoverRange:
|
|
520
|
-
setHoverRange:
|
|
521
|
-
clearHoverRange:
|
|
522
|
-
} =
|
|
519
|
+
hoverRange: St,
|
|
520
|
+
setHoverRange: Dt,
|
|
521
|
+
clearHoverRange: Tt
|
|
522
|
+
} = Xl(100), $ = ql({
|
|
523
523
|
enabled: () => l.rowDraggable === !0,
|
|
524
|
-
getRowKey:
|
|
524
|
+
getRowKey: S,
|
|
525
525
|
dataSource: () => l.dataSource,
|
|
526
526
|
childrenColumnName: () => l.childrenColumnName,
|
|
527
527
|
onDrop(e, a) {
|
|
528
528
|
u("rowDragEnd", e, a);
|
|
529
529
|
}
|
|
530
|
-
}), g =
|
|
530
|
+
}), g = n(() => ce.value ? se.value.map((e) => e.record) : f.pageData.value), {
|
|
531
531
|
isSelected: Et,
|
|
532
|
-
isDisabled:
|
|
533
|
-
getSelectionState:
|
|
534
|
-
toggleRow:
|
|
535
|
-
toggleAll:
|
|
536
|
-
allCheckedState:
|
|
537
|
-
invertSelection:
|
|
532
|
+
isDisabled: Rt,
|
|
533
|
+
getSelectionState: It,
|
|
534
|
+
toggleRow: Lt,
|
|
535
|
+
toggleAll: Ht,
|
|
536
|
+
allCheckedState: Bt,
|
|
537
|
+
invertSelection: Ft,
|
|
538
538
|
clearSelection: Nt,
|
|
539
|
-
getChangeableRowKeys:
|
|
540
|
-
} =
|
|
539
|
+
getChangeableRowKeys: Pt
|
|
540
|
+
} = na({
|
|
541
541
|
rowSelection: () => l.rowSelection,
|
|
542
|
-
getRowKey:
|
|
543
|
-
data: () =>
|
|
542
|
+
getRowKey: S,
|
|
543
|
+
data: () => K.value,
|
|
544
544
|
visibleData: () => g.value,
|
|
545
545
|
paginate: () => f.enabled.value,
|
|
546
546
|
childrenColumnName: () => l.childrenColumnName,
|
|
547
547
|
onSelectionChange() {
|
|
548
|
-
u("change",
|
|
548
|
+
u("change", V(), ne.value, {
|
|
549
549
|
action: "select",
|
|
550
550
|
currentDataSource: g.value,
|
|
551
|
-
...
|
|
551
|
+
...ie()
|
|
552
552
|
});
|
|
553
553
|
}
|
|
554
554
|
}), {
|
|
555
555
|
isExpanded: Ot,
|
|
556
556
|
toggleExpand: _t
|
|
557
|
-
} =
|
|
557
|
+
} = jl({
|
|
558
558
|
expandable: () => l.expandable,
|
|
559
|
-
getRowKey:
|
|
560
|
-
data: () => f.enabled.value ?
|
|
559
|
+
getRowKey: S,
|
|
560
|
+
data: () => f.enabled.value ? K.value : g.value,
|
|
561
561
|
childrenColumnName: () => l.childrenColumnName,
|
|
562
562
|
initializeNewRows: () => f.enabled.value
|
|
563
|
-
}),
|
|
563
|
+
}), De = (e) => {
|
|
564
564
|
const a = l.expandable;
|
|
565
565
|
return a ? a.rowExpandable ? a.rowExpandable(e) : !!a.expandedRowRender : !1;
|
|
566
566
|
}, kt = (e, a) => {
|
|
567
|
-
|
|
568
|
-
},
|
|
569
|
-
const e = l.expandable, a = l.rowSelection,
|
|
567
|
+
De(e) && _t(e, a);
|
|
568
|
+
}, Te = "__vtg_selection__", Ee = "__vtg_expand__", At = n(() => {
|
|
569
|
+
const e = l.expandable, a = l.rowSelection, o = e && e.showExpandColumn !== !1 ? {
|
|
570
570
|
key: Ee,
|
|
571
|
-
title: () =>
|
|
571
|
+
title: () => i.expandColumnTitle?.() ?? e.columnTitle ?? "",
|
|
572
572
|
width: e.columnWidth ?? 48,
|
|
573
573
|
align: "center",
|
|
574
574
|
fixed: e.fixed === !0 ? "left" : e.fixed
|
|
575
|
-
} : null,
|
|
576
|
-
key:
|
|
575
|
+
} : null, d = a ? {
|
|
576
|
+
key: Te,
|
|
577
577
|
title: "",
|
|
578
578
|
width: a.columnWidth ?? 48,
|
|
579
579
|
align: "center",
|
|
580
580
|
fixed: a.fixed === !0 ? "left" : a.fixed || void 0
|
|
581
|
-
} : null, s =
|
|
582
|
-
let
|
|
581
|
+
} : null, s = Nl(be.value), m = [];
|
|
582
|
+
let v = !1, y = !1;
|
|
583
583
|
for (const w of s) {
|
|
584
|
-
if (w ===
|
|
585
|
-
|
|
584
|
+
if (w === Zl) {
|
|
585
|
+
o && !v && (m.push(o), v = !0);
|
|
586
586
|
continue;
|
|
587
587
|
}
|
|
588
|
-
if (w ===
|
|
589
|
-
|
|
588
|
+
if (w === Ql) {
|
|
589
|
+
d && !y && (m.push(d), y = !0);
|
|
590
590
|
continue;
|
|
591
591
|
}
|
|
592
592
|
m.push(w);
|
|
593
593
|
}
|
|
594
|
-
if (
|
|
594
|
+
if (d && !y && m.unshift(d), o && !v) {
|
|
595
595
|
const w = e?.expandIconColumnIndex;
|
|
596
|
-
m.splice(typeof w == "number" && Number.isFinite(w) ? Math.min(m.length, Math.max(0, Math.floor(w)) + (
|
|
596
|
+
m.splice(typeof w == "number" && Number.isFinite(w) ? Math.min(m.length, Math.max(0, Math.floor(w)) + (d ? 1 : 0)) : d ? 1 : 0, 0, o);
|
|
597
597
|
}
|
|
598
|
-
return
|
|
598
|
+
return Pl(m, l.columnOrder, [Te, Ee]);
|
|
599
599
|
}), {
|
|
600
|
-
leafColumns:
|
|
601
|
-
headerRows:
|
|
602
|
-
} =
|
|
603
|
-
columnWidths:
|
|
604
|
-
startResize:
|
|
605
|
-
isResizing:
|
|
606
|
-
} =
|
|
607
|
-
columns: () =>
|
|
600
|
+
leafColumns: p,
|
|
601
|
+
headerRows: fe
|
|
602
|
+
} = at(() => At.value), Wt = n(() => fe.value.length > 1), {
|
|
603
|
+
columnWidths: U,
|
|
604
|
+
startResize: zt,
|
|
605
|
+
isResizing: Kt
|
|
606
|
+
} = Vl({
|
|
607
|
+
columns: () => p.value,
|
|
608
608
|
onResizeColumn(e, a) {
|
|
609
609
|
u("resizeColumn", e, a);
|
|
610
610
|
}
|
|
611
611
|
}), {
|
|
612
|
-
headerWrapRef:
|
|
612
|
+
headerWrapRef: G,
|
|
613
613
|
bodyWrapRef: N,
|
|
614
|
-
scrollState:
|
|
615
|
-
handleBodyScroll:
|
|
616
|
-
fixedOffsets:
|
|
617
|
-
syncHorizontalScroll:
|
|
618
|
-
updateScrollState:
|
|
619
|
-
} =
|
|
620
|
-
displayColumns: () =>
|
|
621
|
-
columnWidths:
|
|
622
|
-
layoutWidths: () =>
|
|
623
|
-
syncElements: () =>
|
|
624
|
-
}),
|
|
614
|
+
scrollState: Re,
|
|
615
|
+
handleBodyScroll: Ie,
|
|
616
|
+
fixedOffsets: Le,
|
|
617
|
+
syncHorizontalScroll: Mt,
|
|
618
|
+
updateScrollState: He
|
|
619
|
+
} = Al({
|
|
620
|
+
displayColumns: () => p.value,
|
|
621
|
+
columnWidths: U,
|
|
622
|
+
layoutWidths: () => R.metrics.value?.widths,
|
|
623
|
+
syncElements: () => J.value ? [J.value] : []
|
|
624
|
+
}), Be = n(() => _l({
|
|
625
625
|
compatClass: W,
|
|
626
|
-
fixedOffsets:
|
|
627
|
-
scrollState:
|
|
626
|
+
fixedOffsets: Le,
|
|
627
|
+
scrollState: Re,
|
|
628
628
|
empty: g.value.length === 0,
|
|
629
629
|
fixedHeader: l.scroll?.y !== void 0,
|
|
630
|
-
fixedColumn:
|
|
631
|
-
horizontalScroll:
|
|
632
|
-
layoutFixed:
|
|
633
|
-
})),
|
|
634
|
-
if (
|
|
630
|
+
fixedColumn: Pe.value && Ne.value,
|
|
631
|
+
horizontalScroll: Pe.value,
|
|
632
|
+
layoutFixed: q.value === "fixed"
|
|
633
|
+
})), X = n(() => l.scroll?.y === "auto"), Fe = n(() => !!l.scroll?.y || l.showHeader !== !1 && !!l.sticky), Ne = n(() => p.value.some((e) => e.fixed === "left" || e.fixed === "right")), Pe = n(() => l.scroll?.x !== void 0 || R.overflow.value || !!l.expandable?.fixed), jt = n(() => j.value.some((e) => Ol(e).enabled)), q = n(() => l.tableLayout ? l.tableLayout : l.scroll?.y || l.scroll?.x || Ne.value || jt.value ? "fixed" : "auto"), Vt = n(() => {
|
|
634
|
+
if (P.value)
|
|
635
635
|
return {
|
|
636
636
|
position: "sticky",
|
|
637
|
-
top: `${
|
|
637
|
+
top: `${P.value.offsetHeader ?? 0}px`,
|
|
638
638
|
zIndex: "4"
|
|
639
639
|
};
|
|
640
|
-
}), Oe =
|
|
641
|
-
columns: () =>
|
|
642
|
-
columnWidths:
|
|
643
|
-
layout: () =>
|
|
644
|
-
split: () =>
|
|
640
|
+
}), Oe = D(null), J = D(null), O = D(null), R = Kl({
|
|
641
|
+
columns: () => p.value,
|
|
642
|
+
columnWidths: U,
|
|
643
|
+
layout: () => q.value,
|
|
644
|
+
split: () => Fe.value,
|
|
645
645
|
root: () => O.value,
|
|
646
|
-
viewport: () => O.value?.contains(N.value) ? N.value :
|
|
646
|
+
viewport: () => O.value?.contains(N.value) ? N.value : G.value ?? O.value,
|
|
647
647
|
scrollX: () => l.scroll?.x,
|
|
648
648
|
onMeasure: () => {
|
|
649
|
-
|
|
649
|
+
I.value || He();
|
|
650
650
|
}
|
|
651
651
|
}), {
|
|
652
652
|
bodyHeight: _e
|
|
653
|
-
} =
|
|
654
|
-
enabled: () =>
|
|
653
|
+
} = Wl({
|
|
654
|
+
enabled: () => X.value,
|
|
655
655
|
wrapperEl: () => Oe.value,
|
|
656
|
-
headerEl: () =>
|
|
657
|
-
summaryEl: () =>
|
|
656
|
+
headerEl: () => G.value,
|
|
657
|
+
summaryEl: () => J.value,
|
|
658
658
|
hasData: () => g.value.length > 0
|
|
659
|
-
}),
|
|
659
|
+
}), Yt = n(() => {
|
|
660
660
|
const e = l.scroll?.y;
|
|
661
661
|
if (e !== void 0)
|
|
662
|
-
return
|
|
662
|
+
return X.value ? _e.value : typeof e == "number" ? Number.isFinite(e) && e > 0 ? e : void 0 : e;
|
|
663
663
|
}), {
|
|
664
|
-
enabled:
|
|
665
|
-
itemHeight:
|
|
666
|
-
listHeight:
|
|
667
|
-
fixedHeight:
|
|
668
|
-
resolvedScrollY:
|
|
669
|
-
} =
|
|
664
|
+
enabled: I,
|
|
665
|
+
itemHeight: $t,
|
|
666
|
+
listHeight: Ut,
|
|
667
|
+
fixedHeight: Gt,
|
|
668
|
+
resolvedScrollY: Xt
|
|
669
|
+
} = Yl({
|
|
670
670
|
virtual: () => l.virtual,
|
|
671
671
|
scrollY: () => l.scroll?.y,
|
|
672
672
|
size: () => l.size,
|
|
673
673
|
rowHeight: () => l.rowHeight,
|
|
674
674
|
measuredHeight: () => _e.value
|
|
675
|
-
}), ke =
|
|
675
|
+
}), ke = n(() => j.value.some((e) => !!e.customCell || !!e.customRender)), me = n(() => !Wt.value || l.bordered ? {
|
|
676
676
|
table: "",
|
|
677
677
|
th: "",
|
|
678
678
|
td: ""
|
|
@@ -680,112 +680,112 @@ const qa = /* @__PURE__ */ ul({
|
|
|
680
680
|
table: t.groupedHeaderTable(),
|
|
681
681
|
th: t.groupedHeaderTh(),
|
|
682
682
|
td: t.groupedHeaderTd()
|
|
683
|
-
}),
|
|
684
|
-
|
|
683
|
+
}), M = n(() => H(t.table(), me.value.table) ?? ""), Ae = n(() => R.enabled.value ? t.widthLayoutCell() : void 0), We = n(() => H(t.th(), me.value.th, Ae.value) ?? ""), pe = n(() => H(t.td(), me.value.td, Ae.value) ?? "");
|
|
684
|
+
L([I, ke], ([e, a]) => {
|
|
685
685
|
}, {
|
|
686
686
|
immediate: !0
|
|
687
|
-
}),
|
|
687
|
+
}), L([() => l.virtual, Xt], ([e, a]) => {
|
|
688
688
|
if (!e) return;
|
|
689
|
-
const
|
|
690
|
-
a.kind === "compat-px" ?
|
|
689
|
+
const o = String(l.scroll?.y);
|
|
690
|
+
a.kind === "compat-px" ? yl("vtable-scroll-y-compat-px", `[VTable] virtual 模式下字符串 scroll.y(${o})按 ${a.value}px 解析,这是兼容行为;请改用数字或 'auto'。`) : a.kind === "invalid-string" || a.kind === "invalid-number" && l.scroll?.y && `${$l}`;
|
|
691
691
|
}, {
|
|
692
692
|
immediate: !0
|
|
693
693
|
});
|
|
694
|
-
const
|
|
695
|
-
|
|
694
|
+
const ze = D(null), Ke = D(null);
|
|
695
|
+
L(() => ze.value?.wrapRef, (e) => {
|
|
696
696
|
e && (N.value = e);
|
|
697
|
-
}),
|
|
697
|
+
}), L(() => Ke.value?.wrapRef, (e) => {
|
|
698
698
|
e && (N.value = e);
|
|
699
699
|
});
|
|
700
700
|
let ve = !1;
|
|
701
|
-
|
|
701
|
+
qe(() => {
|
|
702
702
|
ve = !0;
|
|
703
|
-
}),
|
|
703
|
+
}), he(() => {
|
|
704
704
|
ve = !1;
|
|
705
705
|
});
|
|
706
|
-
async function
|
|
706
|
+
async function qt(e) {
|
|
707
707
|
if (!e || typeof e != "object") return !1;
|
|
708
708
|
for (const s of [e.top, e.left, e.offset])
|
|
709
709
|
if (s !== void 0 && (typeof s != "number" || !Number.isFinite(s)))
|
|
710
710
|
return !1;
|
|
711
|
-
if (e.align !== void 0 && !["top", "bottom", "auto"].includes(e.align) || (await
|
|
711
|
+
if (e.align !== void 0 && !["top", "bottom", "auto"].includes(e.align) || (await Je(), !ve)) return !1;
|
|
712
712
|
let a;
|
|
713
713
|
if (e.key !== void 0) {
|
|
714
|
-
if (a = g.value.findIndex((s, m) =>
|
|
714
|
+
if (a = g.value.findIndex((s, m) => S(s, m) === e.key), a < 0) return !1;
|
|
715
715
|
} else if (e.index !== void 0) {
|
|
716
716
|
if (!Number.isSafeInteger(e.index) || e.index < 0 || (a = e.index, a >= g.value.length)) return !1;
|
|
717
717
|
} else if (e.top === void 0 && e.left === void 0)
|
|
718
718
|
return !1;
|
|
719
|
-
if (
|
|
720
|
-
return await
|
|
719
|
+
if (I.value)
|
|
720
|
+
return await de.value?.scrollTo({
|
|
721
721
|
index: a,
|
|
722
722
|
top: a === void 0 ? e.top : void 0,
|
|
723
723
|
left: e.left,
|
|
724
724
|
align: e.align ?? "top",
|
|
725
725
|
offset: e.offset
|
|
726
726
|
}) ?? !1;
|
|
727
|
-
const
|
|
728
|
-
if (!
|
|
729
|
-
let
|
|
727
|
+
const o = N.value;
|
|
728
|
+
if (!o || !O.value?.contains(o)) return !1;
|
|
729
|
+
let d = e.top;
|
|
730
730
|
if (a !== void 0) {
|
|
731
|
-
const s =
|
|
731
|
+
const s = o.querySelector(`[data-vtg-row-index="${a}"]`);
|
|
732
732
|
if (!s) return !1;
|
|
733
|
-
const m = s.getBoundingClientRect(),
|
|
734
|
-
k === "top" || k === "auto" && y <
|
|
733
|
+
const m = s.getBoundingClientRect(), v = o.getBoundingClientRect(), y = m.top - v.top + o.scrollTop - o.clientTop, w = y + m.height, _ = e.offset ?? 0, k = e.align ?? "top";
|
|
734
|
+
k === "top" || k === "auto" && y < o.scrollTop + _ ? d = y - _ : k === "bottom" || k === "auto" && w > o.scrollTop + o.clientHeight - _ ? d = w - o.clientHeight + _ : d = void 0;
|
|
735
735
|
}
|
|
736
|
-
return
|
|
736
|
+
return d !== void 0 && (o.scrollTop = Math.max(0, Math.min(d, o.scrollHeight - o.clientHeight))), e.left !== void 0 && (o.scrollLeft = Math.max(0, Math.min(e.left, o.scrollWidth - o.clientWidth))), He(), !0;
|
|
737
737
|
}
|
|
738
738
|
c({
|
|
739
|
-
scrollTo:
|
|
739
|
+
scrollTo: qt,
|
|
740
740
|
retryTreeLoad: C.retry,
|
|
741
741
|
getTreeLoadError: C.getError
|
|
742
742
|
});
|
|
743
|
-
const
|
|
744
|
-
|
|
743
|
+
const Jt = n(() => Ml(p.value)), Me = n(() => l.virtualColumn ? I.value ? ke.value ? "列上有 customCell / customRender,可能返回 colSpan / rowSpan;单元格合并会让某个 td 缺席,进而破坏列宽不变量(虚拟模式本就不支持合并)" : Jt.value.contiguous ? null : "固定列必须分列两端:左固定连成前缀、右固定连成后缀,中间夹着的固定列会被窗口跳过" : "它只作用于虚拟表体,需要同时开启 virtual 与 scroll.y" : null), ge = n(() => l.virtualColumn && Me.value === null);
|
|
744
|
+
L(Me, (e) => {
|
|
745
745
|
}, {
|
|
746
746
|
immediate: !0
|
|
747
747
|
});
|
|
748
748
|
const {
|
|
749
|
-
metrics:
|
|
750
|
-
} =
|
|
751
|
-
enabled: () =>
|
|
752
|
-
headerEl: () =>
|
|
753
|
-
columns: () =>
|
|
754
|
-
columnWidths:
|
|
749
|
+
metrics: Zt
|
|
750
|
+
} = zl({
|
|
751
|
+
enabled: () => ge.value && !R.enabled.value,
|
|
752
|
+
headerEl: () => G.value,
|
|
753
|
+
columns: () => p.value,
|
|
754
|
+
columnWidths: U,
|
|
755
755
|
hasHeader: () => l.showHeader !== !1
|
|
756
|
-
}),
|
|
757
|
-
|
|
758
|
-
!e || a || l.showHeader !== !1 ||
|
|
756
|
+
}), je = n(() => R.metrics.value ?? Zt.value);
|
|
757
|
+
L([ge, je], ([e, a]) => {
|
|
758
|
+
!e || a || l.showHeader !== !1 || R.enabled.value;
|
|
759
759
|
}, {
|
|
760
760
|
immediate: !0
|
|
761
761
|
});
|
|
762
|
-
function
|
|
763
|
-
return
|
|
764
|
-
}
|
|
765
|
-
function Qt(e, a) {
|
|
766
|
-
return l.rowClassName ? typeof l.rowClassName == "function" ? l.rowClassName(e, a, Zt(e)) : l.rowClassName : "";
|
|
762
|
+
function Qt(e) {
|
|
763
|
+
return ce.value ? Se.value.get(e)?.level ?? 0 : 0;
|
|
767
764
|
}
|
|
768
765
|
function el(e, a) {
|
|
769
|
-
return l.
|
|
766
|
+
return l.rowClassName ? typeof l.rowClassName == "function" ? l.rowClassName(e, a, Qt(e)) : l.rowClassName : "";
|
|
770
767
|
}
|
|
771
768
|
function tl(e, a) {
|
|
769
|
+
return l.customRow?.(e, a);
|
|
770
|
+
}
|
|
771
|
+
function ll(e, a) {
|
|
772
772
|
return l.customHeaderRow?.(e, a);
|
|
773
773
|
}
|
|
774
|
-
function
|
|
774
|
+
function al(e) {
|
|
775
775
|
if (typeof e.title != "function")
|
|
776
776
|
return e.title ?? "";
|
|
777
|
-
const a = e,
|
|
777
|
+
const a = e, o = mt.value.filter((d) => !!d.column);
|
|
778
778
|
return e.title({
|
|
779
|
-
sortOrder: a.sorter ?
|
|
780
|
-
sortColumn:
|
|
781
|
-
sortColumns:
|
|
782
|
-
filters:
|
|
779
|
+
sortOrder: a.sorter ? oe(a) ?? void 0 : void 0,
|
|
780
|
+
sortColumn: ft.value.column,
|
|
781
|
+
sortColumns: o.length > 0 ? o : void 0,
|
|
782
|
+
filters: V()
|
|
783
783
|
});
|
|
784
784
|
}
|
|
785
|
-
function
|
|
786
|
-
return !!(e.sorter &&
|
|
785
|
+
function ol(e) {
|
|
786
|
+
return !!(e.sorter && oe(e));
|
|
787
787
|
}
|
|
788
|
-
const
|
|
788
|
+
const Ve = {
|
|
789
789
|
width: "100%",
|
|
790
790
|
minWidth: "100%"
|
|
791
791
|
}, nl = {
|
|
@@ -805,6 +805,10 @@ const qa = /* @__PURE__ */ ul({
|
|
|
805
805
|
copyButton: t.copyButton,
|
|
806
806
|
cellStatus: t.cellStatus,
|
|
807
807
|
cellTag: t.cellTag,
|
|
808
|
+
cellProgress: t.cellProgress,
|
|
809
|
+
cellProgressTrack: t.cellProgressTrack,
|
|
810
|
+
cellProgressBar: t.cellProgressBar,
|
|
811
|
+
cellProgressText: t.cellProgressText,
|
|
808
812
|
filterIconWrapper: t.filterIconWrapper,
|
|
809
813
|
filterIcon: t.filterIcon,
|
|
810
814
|
filterDropdown: t.filterDropdown,
|
|
@@ -878,253 +882,275 @@ const qa = /* @__PURE__ */ ul({
|
|
|
878
882
|
trDragging: t.trDragging,
|
|
879
883
|
trDropAbove: t.trDropAbove,
|
|
880
884
|
trDropBelow: t.trDropBelow
|
|
881
|
-
},
|
|
882
|
-
|
|
883
|
-
|
|
885
|
+
}, Ye = n(() => ea(E.value)), $e = D(!1), x = fl({
|
|
886
|
+
bodyCell: i.bodyCell,
|
|
887
|
+
headerCell: i.headerCell,
|
|
888
|
+
empty: i.empty,
|
|
889
|
+
customFilterDropdown: i.customFilterDropdown,
|
|
890
|
+
customFilterIcon: i.customFilterIcon
|
|
891
|
+
});
|
|
892
|
+
return ml(() => {
|
|
893
|
+
x.bodyCell = i.bodyCell, x.headerCell = i.headerCell, x.empty = i.empty, x.customFilterDropdown = i.customFilterDropdown, x.customFilterIcon = i.customFilterIcon;
|
|
894
|
+
}), Xe(Jl, {
|
|
895
|
+
renderers: n(() => l.renderers),
|
|
884
896
|
isTreeLoading: C.isLoading,
|
|
885
897
|
getTreeLoadError: C.getError,
|
|
886
|
-
columnLayout:
|
|
887
|
-
bodyCell
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
898
|
+
columnLayout: R,
|
|
899
|
+
get bodyCell() {
|
|
900
|
+
return x.bodyCell;
|
|
901
|
+
},
|
|
902
|
+
get headerCell() {
|
|
903
|
+
return x.headerCell;
|
|
904
|
+
},
|
|
905
|
+
get empty() {
|
|
906
|
+
return x.empty;
|
|
907
|
+
},
|
|
908
|
+
getSortOrder: oe,
|
|
909
|
+
toggleSortOrder: st,
|
|
910
|
+
isColumnSorted: ol,
|
|
911
|
+
getFilteredValue: pt,
|
|
894
912
|
confirmFilter: vt,
|
|
895
|
-
resetFilter:
|
|
896
|
-
customFilterDropdown
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
913
|
+
resetFilter: gt,
|
|
914
|
+
get customFilterDropdown() {
|
|
915
|
+
return x.customFilterDropdown;
|
|
916
|
+
},
|
|
917
|
+
get customFilterIcon() {
|
|
918
|
+
return x.customFilterIcon;
|
|
919
|
+
},
|
|
920
|
+
showSorterTooltip: n(() => l.showSorterTooltip ?? Ye.value.showSorterTooltip),
|
|
921
|
+
headerEllipsis: n(() => l.headerEllipsis),
|
|
900
922
|
subThemeSlots: nl,
|
|
901
|
-
presetConfig:
|
|
923
|
+
presetConfig: Ye,
|
|
902
924
|
themePreset: E,
|
|
903
|
-
cssMode:
|
|
904
|
-
classPrefix:
|
|
905
|
-
vtgClass: (e) =>
|
|
925
|
+
cssMode: B,
|
|
926
|
+
classPrefix: F,
|
|
927
|
+
vtgClass: (e) => Z(e, B.value, F.value),
|
|
906
928
|
compatClass: W,
|
|
907
|
-
localeName:
|
|
908
|
-
locale:
|
|
929
|
+
localeName: z,
|
|
930
|
+
locale: ut,
|
|
909
931
|
rowSelection: () => l.rowSelection,
|
|
910
932
|
isSelected: Et,
|
|
911
|
-
isDisabledRow:
|
|
912
|
-
getSelectionState:
|
|
913
|
-
toggleRow:
|
|
914
|
-
toggleAll:
|
|
915
|
-
allCheckedState: () =>
|
|
916
|
-
getRowKey:
|
|
917
|
-
invertSelection:
|
|
933
|
+
isDisabledRow: Rt,
|
|
934
|
+
getSelectionState: It,
|
|
935
|
+
toggleRow: Lt,
|
|
936
|
+
toggleAll: Ht,
|
|
937
|
+
allCheckedState: () => Bt.value,
|
|
938
|
+
getRowKey: S,
|
|
939
|
+
invertSelection: Ft,
|
|
918
940
|
clearSelection: Nt,
|
|
919
|
-
getChangeableRowKeys:
|
|
920
|
-
fixedOffsets:
|
|
921
|
-
scrollState:
|
|
922
|
-
leafColumnCount:
|
|
923
|
-
bordered:
|
|
924
|
-
tableLayout:
|
|
925
|
-
sticky:
|
|
926
|
-
getRowProps:
|
|
927
|
-
getRowClassName:
|
|
928
|
-
getHeaderRowProps:
|
|
929
|
-
getColumnTitle:
|
|
930
|
-
getPopupContainer
|
|
931
|
-
|
|
932
|
-
|
|
941
|
+
getChangeableRowKeys: Pt,
|
|
942
|
+
fixedOffsets: Le,
|
|
943
|
+
scrollState: Re,
|
|
944
|
+
leafColumnCount: n(() => p.value.length),
|
|
945
|
+
bordered: n(() => l.bordered),
|
|
946
|
+
tableLayout: q,
|
|
947
|
+
sticky: n(() => l.sticky),
|
|
948
|
+
getRowProps: tl,
|
|
949
|
+
getRowClassName: el,
|
|
950
|
+
getHeaderRowProps: ll,
|
|
951
|
+
getColumnTitle: al,
|
|
952
|
+
get getPopupContainer() {
|
|
953
|
+
return l.getPopupContainer;
|
|
954
|
+
},
|
|
955
|
+
get transformCellText() {
|
|
956
|
+
return l.transformCellText;
|
|
957
|
+
},
|
|
958
|
+
columnEmptyText: n(() => l.columnEmptyText),
|
|
933
959
|
expandable: () => l.expandable,
|
|
934
960
|
isExpanded: Ot,
|
|
935
961
|
toggleExpand: kt,
|
|
936
|
-
isRowExpandable:
|
|
937
|
-
columnWidths:
|
|
938
|
-
startResize:
|
|
939
|
-
isResizing: () =>
|
|
940
|
-
displayColumns:
|
|
962
|
+
isRowExpandable: De,
|
|
963
|
+
columnWidths: U,
|
|
964
|
+
startResize: zt,
|
|
965
|
+
isResizing: () => Kt.value,
|
|
966
|
+
displayColumns: n(() => p.value),
|
|
941
967
|
registerSummaryFixed: (e) => {
|
|
942
|
-
|
|
968
|
+
$e.value = e;
|
|
943
969
|
},
|
|
944
|
-
isTreeData:
|
|
945
|
-
treeIndentColumnIndex:
|
|
946
|
-
const e =
|
|
947
|
-
column:
|
|
948
|
-
index:
|
|
970
|
+
isTreeData: ce,
|
|
971
|
+
treeIndentColumnIndex: n(() => {
|
|
972
|
+
const e = p.value.map((o, d) => ({
|
|
973
|
+
column: o,
|
|
974
|
+
index: d
|
|
949
975
|
})).filter(({
|
|
950
|
-
column:
|
|
951
|
-
}) =>
|
|
976
|
+
column: o
|
|
977
|
+
}) => o.key !== "__vtg_selection__" && o.key !== "__vtg_expand__"), a = l.expandable?.expandIconColumnIndex ?? 0;
|
|
952
978
|
return e[Math.max(0, Math.min(e.length - 1, Math.floor(Number.isFinite(a) ? a : 0)))]?.index ?? -1;
|
|
953
979
|
}),
|
|
954
|
-
treeFlattenData:
|
|
955
|
-
getFlattenRow: (e) =>
|
|
956
|
-
toggleTreeExpand:
|
|
957
|
-
isTreeExpanded:
|
|
958
|
-
treeIndentSize:
|
|
959
|
-
hoverRange:
|
|
960
|
-
setHoverRange:
|
|
961
|
-
clearHoverRange:
|
|
980
|
+
treeFlattenData: se,
|
|
981
|
+
getFlattenRow: (e) => Se.value.get(e),
|
|
982
|
+
toggleTreeExpand: bt,
|
|
983
|
+
isTreeExpanded: Ct,
|
|
984
|
+
treeIndentSize: xt,
|
|
985
|
+
hoverRange: St,
|
|
986
|
+
setHoverRange: Dt,
|
|
987
|
+
clearHoverRange: Tt,
|
|
962
988
|
// 拖拽期间抑制 hover 高亮,避免干扰拖放指示线
|
|
963
|
-
hoverable:
|
|
989
|
+
hoverable: n(() => l.hoverable !== !1 && $.draggingKey.value === null),
|
|
964
990
|
rowDrag: {
|
|
965
|
-
enabled:
|
|
966
|
-
draggingKey:
|
|
967
|
-
dropTarget:
|
|
968
|
-
getBindings: (e, a,
|
|
991
|
+
enabled: n(() => l.rowDraggable === !0),
|
|
992
|
+
draggingKey: $.draggingKey,
|
|
993
|
+
dropTarget: $.dropTarget,
|
|
994
|
+
getBindings: (e, a, o) => $.getBindings(e, a, o)
|
|
969
995
|
}
|
|
970
996
|
}), () => {
|
|
971
997
|
let e;
|
|
972
|
-
const a = l.title ? l.title(g.value) :
|
|
998
|
+
const a = l.title ? l.title(g.value) : i.title ? i.title({
|
|
973
999
|
data: g.value
|
|
974
|
-
}) : null,
|
|
1000
|
+
}) : null, o = l.footer ? l.footer(g.value) : i.footer ? i.footer({
|
|
975
1001
|
data: g.value
|
|
976
|
-
}) : null,
|
|
977
|
-
tableLayout:
|
|
1002
|
+
}) : null, d = i.summary ? i.summary() : null, s = $e.value !== !1, m = l.scroll, v = {
|
|
1003
|
+
tableLayout: q.value
|
|
978
1004
|
};
|
|
979
|
-
m?.x ? (
|
|
980
|
-
const y = l.loading, w =
|
|
1005
|
+
m?.x ? (v.width = typeof m.x == "number" ? `${m.x}px` : m.x, v.minWidth = "100%") : v.width = "100%", Object.assign(v, R.tableStyle.value);
|
|
1006
|
+
const y = l.loading, w = b.value, _ = typeof y == "object" && y !== null ? y.indicator : void 0, k = typeof y == "object" && y !== null ? y.tip : void 0, Ue = w && (i.loading ? r(lt, {
|
|
981
1007
|
loadingClass: t.loading()
|
|
982
|
-
},
|
|
1008
|
+
}, ot(e = i.loading()) ? e : {
|
|
983
1009
|
default: () => [e]
|
|
984
|
-
}) : r(
|
|
1010
|
+
}) : r(lt, {
|
|
985
1011
|
loadingClass: t.loading(),
|
|
986
1012
|
indicator: _,
|
|
987
1013
|
tip: k
|
|
988
1014
|
}, null));
|
|
989
|
-
if (
|
|
990
|
-
const
|
|
991
|
-
ref:
|
|
992
|
-
class:
|
|
993
|
-
style:
|
|
1015
|
+
if (Fe.value) {
|
|
1016
|
+
const rl = l.showHeader !== !1 ? r("div", {
|
|
1017
|
+
ref: G,
|
|
1018
|
+
class: H(t.headerWrapper(), P.value && W?.("sticky-holder")),
|
|
1019
|
+
style: Vt.value
|
|
994
1020
|
}, [r("div", {
|
|
995
|
-
class:
|
|
1021
|
+
class: Z("block w-full min-w-full", B.value, F.value)
|
|
996
1022
|
}, [r("table", {
|
|
997
1023
|
"data-vtg-table": "",
|
|
998
|
-
class:
|
|
999
|
-
style:
|
|
1000
|
-
}, [r(
|
|
1001
|
-
columns:
|
|
1002
|
-
}, null), r(
|
|
1003
|
-
rows:
|
|
1024
|
+
class: M.value,
|
|
1025
|
+
style: v
|
|
1026
|
+
}, [r(ee, {
|
|
1027
|
+
columns: p.value
|
|
1028
|
+
}, null), r(te, null, null), r(et, {
|
|
1029
|
+
rows: fe.value,
|
|
1004
1030
|
theadClass: t.thead(),
|
|
1005
1031
|
rowClass: t.tr(),
|
|
1006
1032
|
thClass: We.value,
|
|
1007
1033
|
headerCellInnerClass: t.headerCellInner()
|
|
1008
|
-
}, null)])])]) : null,
|
|
1009
|
-
ref:
|
|
1034
|
+
}, null)])])]) : null, il = I.value ? r(ta, {
|
|
1035
|
+
ref: de,
|
|
1010
1036
|
dataSource: g.value,
|
|
1011
|
-
columns:
|
|
1037
|
+
columns: p.value,
|
|
1012
1038
|
tbodyClass: t.tbody(),
|
|
1013
1039
|
rowClass: t.tr(),
|
|
1014
|
-
tdClass:
|
|
1040
|
+
tdClass: pe.value,
|
|
1015
1041
|
emptyClass: t.empty(),
|
|
1016
1042
|
bodyCellEllipsisClass: t.bodyCellEllipsis(),
|
|
1017
|
-
tableClass:
|
|
1018
|
-
tableStyle:
|
|
1043
|
+
tableClass: M.value,
|
|
1044
|
+
tableStyle: v,
|
|
1019
1045
|
rowKey: l.rowKey,
|
|
1020
|
-
height:
|
|
1021
|
-
itemHeight:
|
|
1022
|
-
fixedHeight:
|
|
1023
|
-
virtualColumn:
|
|
1024
|
-
columnMetrics:
|
|
1046
|
+
height: Ut.value,
|
|
1047
|
+
itemHeight: $t.value,
|
|
1048
|
+
fixedHeight: Gt.value,
|
|
1049
|
+
virtualColumn: ge.value,
|
|
1050
|
+
columnMetrics: je.value,
|
|
1025
1051
|
showScrollBar: "hover",
|
|
1026
|
-
onVirtualScroll: (
|
|
1027
|
-
|
|
1052
|
+
onVirtualScroll: (Ge) => {
|
|
1053
|
+
Mt(Ge.x, Ge.maxX);
|
|
1028
1054
|
}
|
|
1029
|
-
}, null) : null,
|
|
1030
|
-
ref:
|
|
1031
|
-
maxHeight:
|
|
1055
|
+
}, null) : null, dl = I.value ? null : r(Ze, {
|
|
1056
|
+
ref: ze,
|
|
1057
|
+
maxHeight: Yt.value,
|
|
1032
1058
|
wrapClass: t.bodyWrapper(),
|
|
1033
|
-
viewStyle:
|
|
1034
|
-
onScroll:
|
|
1059
|
+
viewStyle: Ve,
|
|
1060
|
+
onScroll: Ie
|
|
1035
1061
|
}, {
|
|
1036
1062
|
default: () => [r("table", {
|
|
1037
1063
|
"data-vtg-table": "",
|
|
1038
|
-
class:
|
|
1039
|
-
style:
|
|
1040
|
-
}, [r(
|
|
1041
|
-
columns:
|
|
1042
|
-
}, null), r(
|
|
1064
|
+
class: M.value,
|
|
1065
|
+
style: v
|
|
1066
|
+
}, [r(ee, {
|
|
1067
|
+
columns: p.value
|
|
1068
|
+
}, null), r(te, null, null), r(tt, {
|
|
1043
1069
|
dataSource: g.value,
|
|
1044
|
-
columns:
|
|
1070
|
+
columns: p.value,
|
|
1045
1071
|
tbodyClass: t.tbody(),
|
|
1046
1072
|
rowClass: t.tr(),
|
|
1047
|
-
tdClass:
|
|
1073
|
+
tdClass: pe.value,
|
|
1048
1074
|
emptyClass: t.empty(),
|
|
1049
1075
|
bodyCellEllipsisClass: t.bodyCellEllipsis(),
|
|
1050
1076
|
rowKey: l.rowKey
|
|
1051
|
-
}, null),
|
|
1077
|
+
}, null), d && !s && r("tfoot", {
|
|
1052
1078
|
class: t.summary()
|
|
1053
|
-
}, [
|
|
1054
|
-
}),
|
|
1055
|
-
ref:
|
|
1056
|
-
class:
|
|
1079
|
+
}, [d])])]
|
|
1080
|
+
}), ul = d && (s || I.value) ? r("div", {
|
|
1081
|
+
ref: J,
|
|
1082
|
+
class: H(t.headerWrapper(), W?.("summary"), P.value && s && W?.("sticky-holder")),
|
|
1057
1083
|
style: s ? {
|
|
1058
1084
|
position: "sticky",
|
|
1059
|
-
bottom: `${
|
|
1085
|
+
bottom: `${P.value?.offsetSummary ?? 0}px`,
|
|
1060
1086
|
zIndex: "4",
|
|
1061
1087
|
overflow: "hidden"
|
|
1062
1088
|
} : void 0
|
|
1063
1089
|
}, [r("div", {
|
|
1064
|
-
class:
|
|
1090
|
+
class: Z("block w-full min-w-full", B.value, F.value)
|
|
1065
1091
|
}, [r("table", {
|
|
1066
1092
|
"data-vtg-table": "",
|
|
1067
|
-
class:
|
|
1068
|
-
style:
|
|
1069
|
-
}, [r(
|
|
1070
|
-
columns:
|
|
1071
|
-
}, null), r(
|
|
1093
|
+
class: M.value,
|
|
1094
|
+
style: v
|
|
1095
|
+
}, [r(ee, {
|
|
1096
|
+
columns: p.value
|
|
1097
|
+
}, null), r(te, null, null), r("tfoot", {
|
|
1072
1098
|
class: t.summary()
|
|
1073
|
-
}, [
|
|
1099
|
+
}, [d])])])]) : null;
|
|
1074
1100
|
return r("div", {
|
|
1075
1101
|
ref: O,
|
|
1076
|
-
class:
|
|
1077
|
-
}, [
|
|
1102
|
+
class: H(t.root(), X.value && t.rootAutoHeight(), Be.value, Ce.value)
|
|
1103
|
+
}, [Y("top"), a && r("div", {
|
|
1078
1104
|
class: t.title()
|
|
1079
1105
|
}, [a]), r("div", {
|
|
1080
1106
|
ref: Oe,
|
|
1081
|
-
class:
|
|
1082
|
-
}, [
|
|
1107
|
+
class: H(t.wrapper(), X.value && t.wrapperAutoHeight(), P.value && Z("overflow-clip", B.value, F.value))
|
|
1108
|
+
}, [rl, il, dl, ul, Ue]), o && r("div", {
|
|
1083
1109
|
class: t.footer()
|
|
1084
|
-
}, [
|
|
1110
|
+
}, [o]), Y("bottom")]);
|
|
1085
1111
|
}
|
|
1086
|
-
const
|
|
1112
|
+
const ye = r(pl, null, [r("table", {
|
|
1087
1113
|
"data-vtg-table": "",
|
|
1088
|
-
class:
|
|
1089
|
-
style:
|
|
1090
|
-
}, [r(
|
|
1091
|
-
columns:
|
|
1092
|
-
}, null), r(
|
|
1093
|
-
rows:
|
|
1114
|
+
class: M.value,
|
|
1115
|
+
style: v
|
|
1116
|
+
}, [r(ee, {
|
|
1117
|
+
columns: p.value
|
|
1118
|
+
}, null), r(te, null, null), l.showHeader !== !1 && r(et, {
|
|
1119
|
+
rows: fe.value,
|
|
1094
1120
|
theadClass: t.thead(),
|
|
1095
1121
|
rowClass: t.tr(),
|
|
1096
1122
|
thClass: We.value,
|
|
1097
1123
|
headerCellInnerClass: t.headerCellInner()
|
|
1098
|
-
}, null), r(
|
|
1124
|
+
}, null), r(tt, {
|
|
1099
1125
|
dataSource: g.value,
|
|
1100
|
-
columns:
|
|
1126
|
+
columns: p.value,
|
|
1101
1127
|
tbodyClass: t.tbody(),
|
|
1102
1128
|
rowClass: t.tr(),
|
|
1103
|
-
tdClass:
|
|
1129
|
+
tdClass: pe.value,
|
|
1104
1130
|
emptyClass: t.empty(),
|
|
1105
1131
|
bodyCellEllipsisClass: t.bodyCellEllipsis(),
|
|
1106
1132
|
rowKey: l.rowKey
|
|
1107
|
-
}, null),
|
|
1133
|
+
}, null), d && r("tfoot", {
|
|
1108
1134
|
class: t.summary()
|
|
1109
|
-
}, [
|
|
1135
|
+
}, [d])]), Ue]);
|
|
1110
1136
|
return r("div", {
|
|
1111
1137
|
ref: O,
|
|
1112
|
-
class:
|
|
1113
|
-
}, [
|
|
1138
|
+
class: H(t.root(), Be.value, Ce.value)
|
|
1139
|
+
}, [Y("top"), a && r("div", {
|
|
1114
1140
|
class: t.title()
|
|
1115
|
-
}, [a]), r(
|
|
1116
|
-
ref:
|
|
1141
|
+
}, [a]), r(Ze, {
|
|
1142
|
+
ref: Ke,
|
|
1117
1143
|
wrapClass: t.wrapper(),
|
|
1118
|
-
viewStyle:
|
|
1119
|
-
onScroll:
|
|
1120
|
-
},
|
|
1121
|
-
default: () => [
|
|
1122
|
-
}),
|
|
1144
|
+
viewStyle: Ve,
|
|
1145
|
+
onScroll: Ie
|
|
1146
|
+
}, ot(ye) ? ye : {
|
|
1147
|
+
default: () => [ye]
|
|
1148
|
+
}), o && r("div", {
|
|
1123
1149
|
class: t.footer()
|
|
1124
|
-
}, [
|
|
1150
|
+
}, [o]), Y("bottom")]);
|
|
1125
1151
|
};
|
|
1126
1152
|
}
|
|
1127
1153
|
});
|
|
1128
1154
|
export {
|
|
1129
|
-
|
|
1155
|
+
Qa as default
|
|
1130
1156
|
};
|