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