@vtable-guild/vtable-guild 2.2.2 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/src/components/Button.mjs +108 -0
- package/dist/core/src/components/Checkbox.mjs +84 -0
- package/dist/core/src/components/Input.mjs +82 -0
- package/dist/core/src/components/Radio.mjs +69 -0
- package/dist/core/src/components/Scrollbar.mjs +179 -0
- package/dist/core/src/components/ScrollbarBar.mjs +103 -0
- package/dist/core/src/components/Tooltip.mjs +321 -0
- package/dist/core/src/components/VTableGuildConfigProvider.mjs +77 -0
- package/dist/core/src/components/VirtualList/Filler.mjs +55 -0
- package/dist/core/src/components/VirtualList/Item.mjs +29 -0
- package/dist/core/src/components/VirtualList/VirtualList.mjs +373 -0
- package/dist/core/src/components/VirtualList/VirtualScrollBar.mjs +216 -0
- package/dist/core/src/components/VirtualList/hooks/useChildren.mjs +21 -0
- package/dist/core/src/components/VirtualList/hooks/useDiffItem.mjs +16 -0
- package/dist/core/src/components/VirtualList/hooks/useFrameWheel.mjs +48 -0
- package/dist/core/src/components/VirtualList/hooks/useGetSize.mjs +25 -0
- package/dist/core/src/components/VirtualList/hooks/useHeights.mjs +56 -0
- package/dist/core/src/components/VirtualList/hooks/useMobileTouchMove.mjs +40 -0
- package/dist/core/src/components/VirtualList/hooks/useOriginScroll.mjs +17 -0
- package/dist/core/src/components/VirtualList/hooks/useScrollDrag.mjs +41 -0
- package/dist/core/src/components/VirtualList/hooks/useScrollTo.mjs +88 -0
- package/dist/core/src/components/VirtualList/utils/CacheMap.mjs +24 -0
- package/dist/core/src/components/VirtualList/utils/algorithmUtil.mjs +22 -0
- package/dist/core/src/components/VirtualList/utils/isFirefox.mjs +4 -0
- package/dist/core/src/components/VirtualList/utils/scrollbarUtil.mjs +7 -0
- package/dist/core/src/composables/useScrollbar.mjs +55 -0
- package/dist/core/src/composables/useTheme.mjs +92 -0
- package/dist/core/src/index.d.ts +1 -0
- package/dist/core/src/index.d.ts.map +1 -1
- package/dist/core/src/plugin/index.mjs +27 -0
- package/dist/core/src/utils/classPrefix.mjs +100 -0
- package/dist/core/src/utils/devWarn.d.ts +4 -0
- package/dist/core/src/utils/devWarn.d.ts.map +1 -0
- package/dist/core/src/utils/devWarn.mjs +5 -0
- package/dist/core/src/utils/mergeDeep.mjs +20 -0
- package/dist/core/src/utils/props.mjs +33 -0
- package/dist/core/src/utils/tv.mjs +19 -0
- package/dist/icons/src/AntdvEmptyIcon.mjs +37 -0
- package/dist/icons/src/AntdvSpinIndicator.mjs +23 -0
- package/dist/icons/src/CaretDownIcon.d.ts.map +1 -1
- package/dist/icons/src/CaretDownIcon.mjs +9 -0
- package/dist/icons/src/CaretRightIcon.d.ts.map +1 -1
- package/dist/icons/src/CaretUpIcon.d.ts.map +1 -1
- package/dist/icons/src/CaretUpIcon.mjs +9 -0
- package/dist/icons/src/DownOutlinedIcon.d.ts.map +1 -1
- package/dist/icons/src/DownOutlinedIcon.mjs +9 -0
- package/dist/icons/src/ElArrowDownIcon.d.ts.map +1 -1
- package/dist/icons/src/ElArrowDownIcon.mjs +9 -0
- package/dist/icons/src/ElCaretBottomIcon.d.ts.map +1 -1
- package/dist/icons/src/ElCaretBottomIcon.mjs +9 -0
- package/dist/icons/src/ElCaretTopIcon.d.ts.map +1 -1
- package/dist/icons/src/ElCaretTopIcon.mjs +9 -0
- package/dist/icons/src/ElFilterIcon.d.ts.map +1 -1
- package/dist/icons/src/ElLoadingIcon.mjs +28 -0
- package/dist/icons/src/FilterFilledIcon.d.ts.map +1 -1
- package/dist/icons/src/FilterFilledIcon.mjs +9 -0
- package/dist/icons/src/SearchIcon.d.ts.map +1 -1
- package/dist/icons/src/SearchIcon.mjs +9 -0
- package/dist/icons/src/createSvgIcon.d.ts +13 -0
- package/dist/icons/src/createSvgIcon.d.ts.map +1 -0
- package/dist/icons/src/createSvgIcon.mjs +23 -0
- package/dist/index.full.mjs +10127 -0
- package/dist/index.mjs +82 -10196
- package/dist/table/src/components/ColGroup.mjs +25 -0
- package/dist/table/src/components/ExpandIcon.mjs +60 -0
- package/dist/table/src/components/FilterDropdown.d.ts.map +1 -1
- package/dist/table/src/components/FilterDropdown.mjs +324 -0
- package/dist/table/src/components/FilterIcon.mjs +30 -0
- package/dist/table/src/components/ResizeHandle.mjs +28 -0
- package/dist/table/src/components/SelectionCheckbox.mjs +33 -0
- package/dist/table/src/components/SelectionDropdown.d.ts.map +1 -1
- package/dist/table/src/components/SelectionDropdown.mjs +73 -0
- package/dist/table/src/components/SelectionRadio.mjs +28 -0
- package/dist/table/src/components/SortButton.mjs +30 -0
- package/dist/table/src/components/Table.d.ts.map +1 -1
- package/dist/table/src/components/Table.mjs +781 -0
- package/dist/table/src/components/TableBody.mjs +124 -0
- package/dist/table/src/components/TableCell.d.ts.map +1 -1
- package/dist/table/src/components/TableCell.mjs +222 -0
- package/dist/table/src/components/TableEmpty.mjs +38 -0
- package/dist/table/src/components/TableHeader.mjs +51 -0
- package/dist/table/src/components/TableHeaderCell.d.ts.map +1 -1
- package/dist/table/src/components/TableHeaderCell.mjs +391 -0
- package/dist/table/src/components/TableLoading.mjs +46 -0
- package/dist/table/src/components/TableRow.mjs +34 -0
- package/dist/table/src/components/VTable.vue.d.ts.map +1 -1
- package/dist/table/src/components/VTable.vue.mjs +155 -0
- package/dist/table/src/components/VTable.vue2.mjs +4 -0
- package/dist/table/src/components/VTableSummary.mjs +29 -0
- package/dist/table/src/components/VTableSummaryCell.d.ts.map +1 -1
- package/dist/table/src/components/VTableSummaryCell.mjs +68 -0
- package/dist/table/src/components/VTableSummaryRow.mjs +19 -0
- package/dist/table/src/components/VirtualTableBody.d.ts.map +1 -1
- package/dist/table/src/components/VirtualTableBody.mjs +172 -0
- package/dist/table/src/composables/index.d.ts +2 -1
- package/dist/table/src/composables/index.d.ts.map +1 -1
- package/dist/table/src/composables/useColumns.d.ts +6 -1
- package/dist/table/src/composables/useColumns.d.ts.map +1 -1
- package/dist/table/src/composables/useColumns.mjs +81 -0
- package/dist/table/src/composables/useControlledColumnState.d.ts +24 -0
- package/dist/table/src/composables/useControlledColumnState.d.ts.map +1 -0
- package/dist/table/src/composables/useControlledColumnState.mjs +23 -0
- package/dist/table/src/composables/useExpand.mjs +37 -0
- package/dist/table/src/composables/useFilter.d.ts.map +1 -1
- package/dist/table/src/composables/useFilter.mjs +68 -0
- package/dist/table/src/composables/useFixedColumnStyle.d.ts +18 -0
- package/dist/table/src/composables/useFixedColumnStyle.d.ts.map +1 -0
- package/dist/table/src/composables/useFixedColumnStyle.mjs +21 -0
- package/dist/table/src/composables/useHoverState.mjs +26 -0
- package/dist/table/src/composables/useResize.mjs +42 -0
- package/dist/table/src/composables/useScroll.d.ts +5 -4
- package/dist/table/src/composables/useScroll.d.ts.map +1 -1
- package/dist/table/src/composables/useScroll.mjs +68 -0
- package/dist/table/src/composables/useSelection.d.ts.map +1 -1
- package/dist/table/src/composables/useSelection.mjs +246 -0
- package/dist/table/src/composables/useSorter.d.ts +1 -5
- package/dist/table/src/composables/useSorter.d.ts.map +1 -1
- package/dist/table/src/composables/useSorter.mjs +161 -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 +92 -0
- package/dist/table/src/composables/useVirtual.mjs +19 -0
- package/dist/table/src/constants.mjs +8 -0
- package/dist/table/src/context.d.ts +90 -85
- package/dist/table/src/context.d.ts.map +1 -1
- package/dist/table/src/context.mjs +4 -0
- package/dist/table/src/index.d.ts.map +1 -1
- package/dist/table/src/index.mjs +23 -0
- package/dist/table/src/preset-config.mjs +35 -0
- package/dist/table/src/utils/cell.mjs +79 -0
- package/dist/table/src/utils/popupPosition.d.ts +20 -0
- package/dist/table/src/utils/popupPosition.d.ts.map +1 -0
- package/dist/table/src/utils/popupPosition.mjs +24 -0
- package/dist/table/src/utils/popupPosition.test.d.ts +2 -0
- package/dist/table/src/utils/popupPosition.test.d.ts.map +1 -0
- package/dist/table/src/utils/vnode.mjs +10 -0
- package/dist/theme/src/presets/antdv/button.mjs +70 -0
- package/dist/theme/src/presets/antdv/checkbox.mjs +51 -0
- package/dist/theme/src/presets/antdv/input.mjs +40 -0
- package/dist/theme/src/presets/antdv/radio.mjs +34 -0
- package/dist/theme/src/presets/antdv/scrollbar.mjs +22 -0
- package/dist/theme/src/presets/antdv/table-locale.mjs +55 -0
- package/dist/theme/src/presets/antdv/table.mjs +285 -0
- package/dist/theme/src/presets/antdv/tooltip.mjs +20 -0
- package/dist/theme/src/presets/element-plus/button.mjs +70 -0
- package/dist/theme/src/presets/element-plus/checkbox.mjs +65 -0
- package/dist/theme/src/presets/element-plus/input.mjs +39 -0
- package/dist/theme/src/presets/element-plus/radio.mjs +34 -0
- package/dist/theme/src/presets/element-plus/scrollbar.mjs +22 -0
- package/dist/theme/src/presets/element-plus/table-locale.mjs +56 -0
- package/dist/theme/src/presets/element-plus/table.mjs +235 -0
- package/dist/theme/src/presets/element-plus/tooltip.mjs +21 -0
- package/dist/theme/src/presets/index.mjs +92 -0
- package/package.json +10 -2
- package/dist/index.cjs +0 -1
|
@@ -0,0 +1,781 @@
|
|
|
1
|
+
import { defineComponent as Et, inject as Rt, computed as n, provide as de, ref as E, onMounted as It, onBeforeUnmount as Tt, watch as j, createVNode as a, Fragment as Lt, isVNode as Ht } from "vue";
|
|
2
|
+
import "../../../core/src/utils/tv.mjs";
|
|
3
|
+
import { prefixVtgClassNames as R } from "../../../core/src/utils/classPrefix.mjs";
|
|
4
|
+
import { mergeThemeConfigs as C, useTheme as Nt } from "../../../core/src/composables/useTheme.mjs";
|
|
5
|
+
import { mergeDeep as I } from "../../../core/src/utils/mergeDeep.mjs";
|
|
6
|
+
import ie from "../../../core/src/components/Scrollbar.mjs";
|
|
7
|
+
import { VTABLE_GUILD_INJECTION_KEY as se } from "../../../core/src/plugin/index.mjs";
|
|
8
|
+
import { resolveTooltipThemePreset as Bt, resolveScrollbarThemePreset as Ot, resolveRadioThemePreset as Pt, resolveInputThemePreset as zt, resolveCheckboxThemePreset as At, resolveButtonThemePreset as Ft, resolveTableThemePreset as Kt, resolveTableLocalePreset as Wt, resolveBuiltInTableLocale as _t } from "../../../theme/src/presets/index.mjs";
|
|
9
|
+
import { getEllipsisConfig as kt } from "../utils/cell.mjs";
|
|
10
|
+
import { useScroll as jt } from "../composables/useScroll.mjs";
|
|
11
|
+
import { useExpand as Mt } from "../composables/useExpand.mjs";
|
|
12
|
+
import { useResize as Vt } from "../composables/useResize.mjs";
|
|
13
|
+
import { useVirtual as Ut } from "../composables/useVirtual.mjs";
|
|
14
|
+
import { useTreeData as Gt } from "../composables/useTreeData.mjs";
|
|
15
|
+
import { useHoverState as Yt } from "../composables/useHoverState.mjs";
|
|
16
|
+
import { TABLE_CONTEXT_KEY as Xt } from "../context.mjs";
|
|
17
|
+
import { EXPAND_COLUMN as $t, SELECTION_COLUMN as Jt } from "../constants.mjs";
|
|
18
|
+
import { resolveTablePresetConfig as qt } from "../preset-config.mjs";
|
|
19
|
+
import ue from "./TableHeader.mjs";
|
|
20
|
+
import ce from "./TableBody.mjs";
|
|
21
|
+
import Qt from "./VirtualTableBody.mjs";
|
|
22
|
+
import fe from "./TableLoading.mjs";
|
|
23
|
+
import T from "./ColGroup.mjs";
|
|
24
|
+
import { antdvTableTheme as Zt } from "../../../theme/src/presets/antdv/table.mjs";
|
|
25
|
+
import { useColumns as pe } from "../composables/useColumns.mjs";
|
|
26
|
+
import { useSorter as el } from "../composables/useSorter.mjs";
|
|
27
|
+
import { useFilter as tl } from "../composables/useFilter.mjs";
|
|
28
|
+
import { useSelection as ll } from "../composables/useSelection.mjs";
|
|
29
|
+
import { cn as L } from "tailwind-variants";
|
|
30
|
+
function me(l) {
|
|
31
|
+
return typeof l == "function" || Object.prototype.toString.call(l) === "[object Object]" && !Ht(l);
|
|
32
|
+
}
|
|
33
|
+
const ol = [["xxxl", 2e3], ["xxl", 1600], ["xl", 1200], ["lg", 992], ["md", 768], ["sm", 576], ["xs", 0]];
|
|
34
|
+
function we() {
|
|
35
|
+
if (typeof window > "u")
|
|
36
|
+
return /* @__PURE__ */ new Set(["md", "sm", "xs"]);
|
|
37
|
+
const l = window.innerWidth, d = /* @__PURE__ */ new Set();
|
|
38
|
+
return ol.forEach(([i, r]) => {
|
|
39
|
+
if (i === "xs") {
|
|
40
|
+
l < 576 && d.add("xs");
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
l >= r && d.add(i);
|
|
44
|
+
}), d;
|
|
45
|
+
}
|
|
46
|
+
function ye(l, d) {
|
|
47
|
+
return l.reduce((i, r) => {
|
|
48
|
+
if (typeof r == "symbol")
|
|
49
|
+
return i.push(r), i;
|
|
50
|
+
if (r.responsive?.length && !r.responsive.some((w) => d.has(w)))
|
|
51
|
+
return i;
|
|
52
|
+
const m = r.fixed === !0 ? "left" : r.fixed;
|
|
53
|
+
if ("children" in r && Array.isArray(r.children)) {
|
|
54
|
+
const w = ye(r.children, d);
|
|
55
|
+
return w.length === 0 || i.push({
|
|
56
|
+
...r,
|
|
57
|
+
fixed: m,
|
|
58
|
+
children: w
|
|
59
|
+
}), i;
|
|
60
|
+
}
|
|
61
|
+
return i.push(m === r.fixed ? r : {
|
|
62
|
+
...r,
|
|
63
|
+
fixed: m
|
|
64
|
+
}), i;
|
|
65
|
+
}, []);
|
|
66
|
+
}
|
|
67
|
+
const Ol = /* @__PURE__ */ Et({
|
|
68
|
+
name: "VTable",
|
|
69
|
+
props: {
|
|
70
|
+
dataSource: {
|
|
71
|
+
type: Array,
|
|
72
|
+
default: () => []
|
|
73
|
+
},
|
|
74
|
+
columns: {
|
|
75
|
+
type: Array,
|
|
76
|
+
default: () => []
|
|
77
|
+
},
|
|
78
|
+
rowKey: {
|
|
79
|
+
type: [String, Function],
|
|
80
|
+
default: "key"
|
|
81
|
+
},
|
|
82
|
+
loading: {
|
|
83
|
+
type: [Boolean, Object],
|
|
84
|
+
default: !1
|
|
85
|
+
},
|
|
86
|
+
size: {
|
|
87
|
+
type: String,
|
|
88
|
+
default: void 0
|
|
89
|
+
},
|
|
90
|
+
bordered: {
|
|
91
|
+
type: Boolean,
|
|
92
|
+
default: !1
|
|
93
|
+
},
|
|
94
|
+
striped: {
|
|
95
|
+
type: Boolean,
|
|
96
|
+
default: !1
|
|
97
|
+
},
|
|
98
|
+
hoverable: {
|
|
99
|
+
type: Boolean,
|
|
100
|
+
default: !0
|
|
101
|
+
},
|
|
102
|
+
tableLayout: {
|
|
103
|
+
type: String,
|
|
104
|
+
default: void 0
|
|
105
|
+
},
|
|
106
|
+
showHeader: {
|
|
107
|
+
type: Boolean,
|
|
108
|
+
default: !0
|
|
109
|
+
},
|
|
110
|
+
headerEllipsis: {
|
|
111
|
+
type: Boolean,
|
|
112
|
+
default: !1
|
|
113
|
+
},
|
|
114
|
+
rowClassName: {
|
|
115
|
+
type: [String, Function],
|
|
116
|
+
default: void 0
|
|
117
|
+
},
|
|
118
|
+
customRow: {
|
|
119
|
+
type: Function,
|
|
120
|
+
default: void 0
|
|
121
|
+
},
|
|
122
|
+
customHeaderRow: {
|
|
123
|
+
type: Function,
|
|
124
|
+
default: void 0
|
|
125
|
+
},
|
|
126
|
+
ui: {
|
|
127
|
+
type: Object,
|
|
128
|
+
default: void 0
|
|
129
|
+
},
|
|
130
|
+
class: {
|
|
131
|
+
type: String,
|
|
132
|
+
default: void 0
|
|
133
|
+
},
|
|
134
|
+
showSorterTooltip: {
|
|
135
|
+
type: Boolean,
|
|
136
|
+
default: void 0
|
|
137
|
+
},
|
|
138
|
+
sortDirections: {
|
|
139
|
+
type: Array,
|
|
140
|
+
default: void 0
|
|
141
|
+
},
|
|
142
|
+
locale: {
|
|
143
|
+
type: String,
|
|
144
|
+
default: void 0
|
|
145
|
+
},
|
|
146
|
+
locales: {
|
|
147
|
+
type: Object,
|
|
148
|
+
default: void 0
|
|
149
|
+
},
|
|
150
|
+
localeOverrides: {
|
|
151
|
+
type: Object,
|
|
152
|
+
default: void 0
|
|
153
|
+
},
|
|
154
|
+
sticky: {
|
|
155
|
+
type: [Boolean, Object],
|
|
156
|
+
default: void 0
|
|
157
|
+
},
|
|
158
|
+
getPopupContainer: {
|
|
159
|
+
type: Function,
|
|
160
|
+
default: void 0
|
|
161
|
+
},
|
|
162
|
+
transformCellText: {
|
|
163
|
+
type: Function,
|
|
164
|
+
default: void 0
|
|
165
|
+
},
|
|
166
|
+
rowSelection: {
|
|
167
|
+
type: Object,
|
|
168
|
+
default: void 0
|
|
169
|
+
},
|
|
170
|
+
title: {
|
|
171
|
+
type: Function,
|
|
172
|
+
default: void 0
|
|
173
|
+
},
|
|
174
|
+
footer: {
|
|
175
|
+
type: Function,
|
|
176
|
+
default: void 0
|
|
177
|
+
},
|
|
178
|
+
scroll: {
|
|
179
|
+
type: Object,
|
|
180
|
+
default: void 0
|
|
181
|
+
},
|
|
182
|
+
expandable: {
|
|
183
|
+
type: Object,
|
|
184
|
+
default: void 0
|
|
185
|
+
},
|
|
186
|
+
virtual: {
|
|
187
|
+
type: Boolean,
|
|
188
|
+
default: !1
|
|
189
|
+
},
|
|
190
|
+
childrenColumnName: {
|
|
191
|
+
type: String,
|
|
192
|
+
default: void 0
|
|
193
|
+
},
|
|
194
|
+
indentSize: {
|
|
195
|
+
type: Number,
|
|
196
|
+
default: void 0
|
|
197
|
+
},
|
|
198
|
+
expandedRowKeys: {
|
|
199
|
+
type: Array,
|
|
200
|
+
default: void 0
|
|
201
|
+
},
|
|
202
|
+
defaultExpandedRowKeys: {
|
|
203
|
+
type: Array,
|
|
204
|
+
default: void 0
|
|
205
|
+
},
|
|
206
|
+
defaultExpandAllRows: {
|
|
207
|
+
type: Boolean,
|
|
208
|
+
default: !1
|
|
209
|
+
},
|
|
210
|
+
onExpand: {
|
|
211
|
+
type: Function,
|
|
212
|
+
default: void 0
|
|
213
|
+
},
|
|
214
|
+
onExpandedRowsChange: {
|
|
215
|
+
type: Function,
|
|
216
|
+
default: void 0
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
emits: {
|
|
220
|
+
change: (l, d, i) => !0,
|
|
221
|
+
resizeColumn: (l, d) => !0
|
|
222
|
+
},
|
|
223
|
+
slots: Object,
|
|
224
|
+
setup(l, {
|
|
225
|
+
slots: d,
|
|
226
|
+
emit: i
|
|
227
|
+
}) {
|
|
228
|
+
const r = Rt(se, null), m = n(() => r?.themePreset ?? "antdv"), w = n(() => r?.cssMode ?? "prebuilt"), x = n(() => r?.classPrefix ?? "vtg"), ve = n(() => {
|
|
229
|
+
const t = r?.theme ?? {}, o = m.value;
|
|
230
|
+
return {
|
|
231
|
+
...t,
|
|
232
|
+
button: C(Ft(o), t.button),
|
|
233
|
+
checkbox: C(At(o), t.checkbox),
|
|
234
|
+
input: C(zt(o), t.input),
|
|
235
|
+
radio: C(Pt(o), t.radio),
|
|
236
|
+
scrollbar: C(Ot(o), t.scrollbar),
|
|
237
|
+
tooltip: C(Bt(o), t.tooltip)
|
|
238
|
+
};
|
|
239
|
+
});
|
|
240
|
+
de(se, {
|
|
241
|
+
get themePreset() {
|
|
242
|
+
return m.value;
|
|
243
|
+
},
|
|
244
|
+
get cssMode() {
|
|
245
|
+
return w.value;
|
|
246
|
+
},
|
|
247
|
+
get classPrefix() {
|
|
248
|
+
return x.value;
|
|
249
|
+
},
|
|
250
|
+
get theme() {
|
|
251
|
+
return ve.value;
|
|
252
|
+
},
|
|
253
|
+
get locale() {
|
|
254
|
+
return r?.locale ?? "zh-CN";
|
|
255
|
+
},
|
|
256
|
+
get locales() {
|
|
257
|
+
return r?.locales ?? {};
|
|
258
|
+
},
|
|
259
|
+
get localeOverrides() {
|
|
260
|
+
return r?.localeOverrides ?? {};
|
|
261
|
+
}
|
|
262
|
+
});
|
|
263
|
+
const he = n(() => Kt(m.value) ?? Zt), {
|
|
264
|
+
slots: e
|
|
265
|
+
} = Nt("table", he, l), H = n(() => l.locale ?? r?.locale ?? "zh-CN"), xe = n(() => ({
|
|
266
|
+
...r?.locales ?? {},
|
|
267
|
+
...l.locales ?? {}
|
|
268
|
+
})), Ce = n(() => {
|
|
269
|
+
const t = Wt(m.value), o = _t(m.value, H.value), u = xe.value[H.value]?.table, s = I(I(t, o), u);
|
|
270
|
+
return I(s, I(r?.localeOverrides?.table ?? {}, l.localeOverrides));
|
|
271
|
+
}), M = E(we());
|
|
272
|
+
function N() {
|
|
273
|
+
M.value = we();
|
|
274
|
+
}
|
|
275
|
+
It(() => {
|
|
276
|
+
N(), window.addEventListener("resize", N);
|
|
277
|
+
}), Tt(() => {
|
|
278
|
+
window.removeEventListener("resize", N);
|
|
279
|
+
});
|
|
280
|
+
const V = n(() => ye(l.columns, M.value)), g = n(() => l.sticky === !0 ? {} : typeof l.sticky == "object" ? l.sticky : void 0), {
|
|
281
|
+
leafColumns: b
|
|
282
|
+
} = pe(() => V.value), {
|
|
283
|
+
getSortOrder: B,
|
|
284
|
+
toggleSortOrder: Se,
|
|
285
|
+
sortData: ge,
|
|
286
|
+
sorterState: be,
|
|
287
|
+
sorterResult: U,
|
|
288
|
+
sortColumns: De
|
|
289
|
+
} = el({
|
|
290
|
+
columns: () => b.value,
|
|
291
|
+
tableSortDirections: () => l.sortDirections,
|
|
292
|
+
onSorterChange(t) {
|
|
293
|
+
const o = P();
|
|
294
|
+
i("change", O(), t, {
|
|
295
|
+
action: "sort",
|
|
296
|
+
currentDataSource: o
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
}), {
|
|
300
|
+
getFilteredValue: Ee,
|
|
301
|
+
confirmFilter: Re,
|
|
302
|
+
resetFilter: Ie,
|
|
303
|
+
getAllFilters: O,
|
|
304
|
+
filterData: Te
|
|
305
|
+
} = tl({
|
|
306
|
+
columns: () => b.value,
|
|
307
|
+
onFilterChange(t) {
|
|
308
|
+
const o = P();
|
|
309
|
+
i("change", t, U.value, {
|
|
310
|
+
action: "filter",
|
|
311
|
+
currentDataSource: o
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
});
|
|
315
|
+
function P() {
|
|
316
|
+
let t = l.dataSource;
|
|
317
|
+
return t = Te(t), t = ge(t), t;
|
|
318
|
+
}
|
|
319
|
+
const z = n(() => P());
|
|
320
|
+
function D(t, o) {
|
|
321
|
+
return typeof l.rowKey == "function" ? l.rowKey(t) : typeof l.rowKey == "string" && l.rowKey in t ? t[l.rowKey] : o;
|
|
322
|
+
}
|
|
323
|
+
const {
|
|
324
|
+
flattenData: G,
|
|
325
|
+
rowMetaMap: Y,
|
|
326
|
+
isTreeData: A,
|
|
327
|
+
toggleTreeExpand: Le,
|
|
328
|
+
isTreeExpanded: He,
|
|
329
|
+
indentSize: Ne
|
|
330
|
+
} = Gt({
|
|
331
|
+
data: () => z.value,
|
|
332
|
+
childrenColumnName: () => l.childrenColumnName,
|
|
333
|
+
indentSize: () => l.indentSize,
|
|
334
|
+
getRowKey: D,
|
|
335
|
+
defaultExpandedRowKeys: () => l.defaultExpandedRowKeys,
|
|
336
|
+
expandedRowKeys: () => l.expandedRowKeys,
|
|
337
|
+
defaultExpandAllRows: () => l.defaultExpandAllRows,
|
|
338
|
+
onExpand: l.onExpand,
|
|
339
|
+
onExpandedRowsChange: l.onExpandedRowsChange
|
|
340
|
+
}), {
|
|
341
|
+
hoverRange: Be,
|
|
342
|
+
setHoverRange: Oe,
|
|
343
|
+
clearHoverRange: Pe
|
|
344
|
+
} = Yt(100), v = n(() => A.value ? G.value.map((t) => t.record) : z.value), {
|
|
345
|
+
isSelected: ze,
|
|
346
|
+
isDisabled: Ae,
|
|
347
|
+
getSelectionState: Fe,
|
|
348
|
+
toggleRow: Ke,
|
|
349
|
+
toggleAll: We,
|
|
350
|
+
allCheckedState: _e,
|
|
351
|
+
invertSelection: ke,
|
|
352
|
+
clearSelection: je,
|
|
353
|
+
getChangeableRowKeys: Me
|
|
354
|
+
} = ll({
|
|
355
|
+
rowSelection: () => l.rowSelection,
|
|
356
|
+
getRowKey: D,
|
|
357
|
+
data: () => z.value,
|
|
358
|
+
visibleData: () => v.value,
|
|
359
|
+
childrenColumnName: () => l.childrenColumnName,
|
|
360
|
+
onSelectionChange() {
|
|
361
|
+
i("change", O(), U.value, {
|
|
362
|
+
action: "select",
|
|
363
|
+
currentDataSource: v.value
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
}), {
|
|
367
|
+
isExpanded: Ve,
|
|
368
|
+
toggleExpand: Ue
|
|
369
|
+
} = Mt({
|
|
370
|
+
expandable: () => l.expandable,
|
|
371
|
+
getRowKey: D,
|
|
372
|
+
data: () => v.value
|
|
373
|
+
}), X = (t) => {
|
|
374
|
+
const o = l.expandable;
|
|
375
|
+
return o ? o.rowExpandable ? o.rowExpandable(t) : !!o.expandedRowRender : !1;
|
|
376
|
+
}, Ge = (t, o) => {
|
|
377
|
+
X(t) && Ue(t, o);
|
|
378
|
+
}, Ye = "__vtg_selection__", Xe = "__vtg_expand__", $e = n(() => {
|
|
379
|
+
const t = l.expandable, o = l.rowSelection, u = t && t.showExpandColumn !== !1 ? {
|
|
380
|
+
key: Xe,
|
|
381
|
+
title: "",
|
|
382
|
+
width: t.columnWidth ?? 48,
|
|
383
|
+
align: "center",
|
|
384
|
+
fixed: t.fixed === !0 ? "left" : t.fixed
|
|
385
|
+
} : null, s = o ? {
|
|
386
|
+
key: Ye,
|
|
387
|
+
title: "",
|
|
388
|
+
width: o.columnWidth ?? 48,
|
|
389
|
+
align: "center",
|
|
390
|
+
fixed: o.fixed === !0 ? "left" : o.fixed || void 0
|
|
391
|
+
} : null, h = [];
|
|
392
|
+
let f = !1, p = !1;
|
|
393
|
+
for (const c of V.value) {
|
|
394
|
+
if (c === $t) {
|
|
395
|
+
u && !f && (h.push(u), f = !0);
|
|
396
|
+
continue;
|
|
397
|
+
}
|
|
398
|
+
if (c === Jt) {
|
|
399
|
+
s && !p && (h.push(s), p = !0);
|
|
400
|
+
continue;
|
|
401
|
+
}
|
|
402
|
+
h.push(c);
|
|
403
|
+
}
|
|
404
|
+
return u && !f && h.unshift(u), s && !p && h.unshift(s), h;
|
|
405
|
+
}), {
|
|
406
|
+
leafColumns: y,
|
|
407
|
+
headerRows: F
|
|
408
|
+
} = pe(() => $e.value), Je = n(() => F.value.length > 1), {
|
|
409
|
+
headerWrapRef: qe,
|
|
410
|
+
bodyWrapRef: $,
|
|
411
|
+
scrollState: Qe,
|
|
412
|
+
handleBodyScroll: J,
|
|
413
|
+
fixedOffsets: Ze,
|
|
414
|
+
syncHorizontalScroll: et
|
|
415
|
+
} = jt({
|
|
416
|
+
displayColumns: () => y.value
|
|
417
|
+
}), tt = n(() => l.showHeader !== !1 && (!!l.scroll?.y || !!l.sticky)), q = n(() => y.value.some((t) => t.fixed === "left" || t.fixed === "right")), lt = n(() => b.value.some((t) => kt(t).enabled)), ot = n(() => l.scroll?.x !== void 0 || q.value), Q = n(() => l.tableLayout ? l.tableLayout : l.scroll?.y || l.scroll?.x || q.value || lt.value ? "fixed" : "auto"), nt = n(() => {
|
|
418
|
+
if (g.value)
|
|
419
|
+
return {
|
|
420
|
+
position: "sticky",
|
|
421
|
+
top: `${g.value.offsetHeader ?? 0}px`,
|
|
422
|
+
zIndex: "4"
|
|
423
|
+
};
|
|
424
|
+
}), {
|
|
425
|
+
enabled: K,
|
|
426
|
+
itemHeight: at,
|
|
427
|
+
listHeight: rt
|
|
428
|
+
} = Ut({
|
|
429
|
+
virtual: () => l.virtual,
|
|
430
|
+
scrollY: () => l.scroll?.y,
|
|
431
|
+
size: () => l.size
|
|
432
|
+
}), dt = n(() => b.value.some((t) => !!t.customCell || !!t.customRender)), W = n(() => !Je.value || l.bordered ? {
|
|
433
|
+
table: "",
|
|
434
|
+
th: "",
|
|
435
|
+
td: ""
|
|
436
|
+
} : {
|
|
437
|
+
table: e.groupedHeaderTable(),
|
|
438
|
+
th: e.groupedHeaderTh(),
|
|
439
|
+
td: e.groupedHeaderTd()
|
|
440
|
+
}), S = n(() => L(e.table(), W.value.table) ?? ""), Z = n(() => L(e.th(), W.value.th) ?? ""), _ = n(() => L(e.td(), W.value.td) ?? "");
|
|
441
|
+
j([K, dt], ([t, o]) => {
|
|
442
|
+
}, {
|
|
443
|
+
immediate: !0
|
|
444
|
+
});
|
|
445
|
+
const ee = E(null), te = E(null);
|
|
446
|
+
j(() => ee.value?.wrapRef, (t) => {
|
|
447
|
+
t && ($.value = t);
|
|
448
|
+
}), j(() => te.value?.wrapRef, (t) => {
|
|
449
|
+
t && ($.value = t);
|
|
450
|
+
});
|
|
451
|
+
const {
|
|
452
|
+
columnWidths: it,
|
|
453
|
+
startResize: st,
|
|
454
|
+
isResizing: ut
|
|
455
|
+
} = Vt({
|
|
456
|
+
onResizeColumn(t, o) {
|
|
457
|
+
i("resizeColumn", t, o);
|
|
458
|
+
}
|
|
459
|
+
});
|
|
460
|
+
function ct(t) {
|
|
461
|
+
return A.value ? Y.value.get(t)?.level ?? 0 : 0;
|
|
462
|
+
}
|
|
463
|
+
function ft(t, o) {
|
|
464
|
+
return l.rowClassName ? typeof l.rowClassName == "function" ? l.rowClassName(t, o, ct(t)) : l.rowClassName : "";
|
|
465
|
+
}
|
|
466
|
+
function pt(t, o) {
|
|
467
|
+
return l.customRow?.(t, o);
|
|
468
|
+
}
|
|
469
|
+
function mt(t, o) {
|
|
470
|
+
return l.customHeaderRow?.(t, o);
|
|
471
|
+
}
|
|
472
|
+
function wt(t) {
|
|
473
|
+
if (typeof t.title != "function")
|
|
474
|
+
return t.title ?? "";
|
|
475
|
+
const o = t, u = De.value.filter((s) => !!s.column);
|
|
476
|
+
return t.title({
|
|
477
|
+
sortOrder: o.sorter ? B(o) ?? void 0 : void 0,
|
|
478
|
+
sortColumn: be.value.column,
|
|
479
|
+
sortColumns: u.length > 0 ? u : void 0,
|
|
480
|
+
filters: O()
|
|
481
|
+
});
|
|
482
|
+
}
|
|
483
|
+
function yt(t) {
|
|
484
|
+
return !!(t.sorter && B(t));
|
|
485
|
+
}
|
|
486
|
+
const le = {
|
|
487
|
+
width: "100%",
|
|
488
|
+
minWidth: "100%"
|
|
489
|
+
}, vt = {
|
|
490
|
+
thSortable: e.thSortable,
|
|
491
|
+
thSorted: e.thSorted,
|
|
492
|
+
tdSorted: e.tdSorted,
|
|
493
|
+
sortButton: e.sortButton,
|
|
494
|
+
sortIconDown: e.sortIconDown,
|
|
495
|
+
sortAreaOuter: e.sortAreaOuter,
|
|
496
|
+
sortAreaWrapper: e.sortAreaWrapper,
|
|
497
|
+
sortAreaTitle: e.sortAreaTitle,
|
|
498
|
+
filterIconWrapper: e.filterIconWrapper,
|
|
499
|
+
filterIcon: e.filterIcon,
|
|
500
|
+
filterDropdown: e.filterDropdown,
|
|
501
|
+
filterDropdownList: e.filterDropdownList,
|
|
502
|
+
filterDropdownItem: e.filterDropdownItem,
|
|
503
|
+
filterDropdownItemSelected: e.filterDropdownItemSelected,
|
|
504
|
+
filterDropdownItemSelectedSingle: e.filterDropdownItemSelectedSingle,
|
|
505
|
+
filterDropdownItemHover: e.filterDropdownItemHover,
|
|
506
|
+
filterDropdownActions: e.filterDropdownActions,
|
|
507
|
+
filterDropdownResetButton: e.filterDropdownResetButton,
|
|
508
|
+
filterDropdownConfirmButton: e.filterDropdownConfirmButton,
|
|
509
|
+
filterDropdownSearch: e.filterDropdownSearch,
|
|
510
|
+
filterDropdownSearchField: e.filterDropdownSearchField,
|
|
511
|
+
filterDropdownSearchIcon: e.filterDropdownSearchIcon,
|
|
512
|
+
filterDropdownSearchInput: e.filterDropdownSearchInput,
|
|
513
|
+
filterDropdownListEmpty: e.filterDropdownListEmpty,
|
|
514
|
+
filterDropdownSwitcher: e.filterDropdownSwitcher,
|
|
515
|
+
filterDropdownSwitcherExpanded: e.filterDropdownSwitcherExpanded,
|
|
516
|
+
filterDropdownSwitcherCollapsed: e.filterDropdownSwitcherCollapsed,
|
|
517
|
+
filterDropdownSwitcherNoop: e.filterDropdownSwitcherNoop,
|
|
518
|
+
filterDropdownContentWrapper: e.filterDropdownContentWrapper,
|
|
519
|
+
filterDropdownTreeWrapper: e.filterDropdownTreeWrapper,
|
|
520
|
+
filterDropdownTreeList: e.filterDropdownTreeList,
|
|
521
|
+
filterDropdownTreeItem: e.filterDropdownTreeItem,
|
|
522
|
+
filterDropdownTreeContentWrapper: e.filterDropdownTreeContentWrapper,
|
|
523
|
+
filterDropdownTreeItemSelected: e.filterDropdownTreeItemSelected,
|
|
524
|
+
filterDropdownTreeItemMatched: e.filterDropdownTreeItemMatched,
|
|
525
|
+
filterDropdownTreeCheckAll: e.filterDropdownTreeCheckAll,
|
|
526
|
+
emptyWrapper: e.emptyWrapper,
|
|
527
|
+
emptyIcon: e.emptyIcon,
|
|
528
|
+
emptyText: e.emptyText,
|
|
529
|
+
loadingSpinner: e.loadingSpinner,
|
|
530
|
+
tdSelected: e.tdSelected,
|
|
531
|
+
selectionDropdown: e.selectionDropdown,
|
|
532
|
+
selectionDropdownItem: e.selectionDropdownItem,
|
|
533
|
+
selectionExtra: e.selectionExtra,
|
|
534
|
+
summaryRow: e.summaryRow,
|
|
535
|
+
summaryCell: e.summaryCell,
|
|
536
|
+
headerWrapper: e.headerWrapper,
|
|
537
|
+
bodyWrapper: e.bodyWrapper,
|
|
538
|
+
fixedCell: e.fixedCell,
|
|
539
|
+
fixedDividerLeft: e.fixedDividerLeft,
|
|
540
|
+
fixedDividerRight: e.fixedDividerRight,
|
|
541
|
+
fixedShadowLeft: e.fixedShadowLeft,
|
|
542
|
+
fixedShadowRight: e.fixedShadowRight,
|
|
543
|
+
fixedShadowLeftHidden: e.fixedShadowLeftHidden,
|
|
544
|
+
fixedShadowRightHidden: e.fixedShadowRightHidden,
|
|
545
|
+
expandIcon: e.expandIcon,
|
|
546
|
+
expandIconExpanded: e.expandIconExpanded,
|
|
547
|
+
expandIconCollapsed: e.expandIconCollapsed,
|
|
548
|
+
expandIconSpaced: e.expandIconSpaced,
|
|
549
|
+
expandIconDisabled: e.expandIconDisabled,
|
|
550
|
+
expandIconSymbol: e.expandIconSymbol,
|
|
551
|
+
expandIconSymbolExpanded: e.expandIconSymbolExpanded,
|
|
552
|
+
expandIconSymbolCollapsed: e.expandIconSymbolCollapsed,
|
|
553
|
+
treeExpandIcon: e.treeExpandIcon,
|
|
554
|
+
treeExpandIconExpanded: e.treeExpandIconExpanded,
|
|
555
|
+
treeExpandIconCollapsed: e.treeExpandIconCollapsed,
|
|
556
|
+
treeExpandIconSpaced: e.treeExpandIconSpaced,
|
|
557
|
+
treeExpandIconDisabled: e.treeExpandIconDisabled,
|
|
558
|
+
treeExpandIconSymbol: e.treeExpandIconSymbol,
|
|
559
|
+
treeExpandIconSymbolExpanded: e.treeExpandIconSymbolExpanded,
|
|
560
|
+
treeExpandIconSymbolCollapsed: e.treeExpandIconSymbolCollapsed,
|
|
561
|
+
expandedRow: e.expandedRow,
|
|
562
|
+
expandedRowCell: e.expandedRowCell,
|
|
563
|
+
resizeHandle: e.resizeHandle,
|
|
564
|
+
tdRowHover: e.tdRowHover,
|
|
565
|
+
tdRowSelectedHover: e.tdRowSelectedHover
|
|
566
|
+
}, oe = n(() => qt(m.value)), ne = E(!1);
|
|
567
|
+
return de(Xt, {
|
|
568
|
+
bodyCell: d.bodyCell,
|
|
569
|
+
headerCell: d.headerCell,
|
|
570
|
+
empty: d.empty,
|
|
571
|
+
getSortOrder: B,
|
|
572
|
+
toggleSortOrder: Se,
|
|
573
|
+
isColumnSorted: yt,
|
|
574
|
+
getFilteredValue: Ee,
|
|
575
|
+
confirmFilter: Re,
|
|
576
|
+
resetFilter: Ie,
|
|
577
|
+
customFilterDropdown: d.customFilterDropdown,
|
|
578
|
+
customFilterIcon: d.customFilterIcon,
|
|
579
|
+
showSorterTooltip: n(() => l.showSorterTooltip ?? oe.value.showSorterTooltip),
|
|
580
|
+
headerEllipsis: n(() => l.headerEllipsis),
|
|
581
|
+
subThemeSlots: vt,
|
|
582
|
+
presetConfig: oe,
|
|
583
|
+
themePreset: m,
|
|
584
|
+
cssMode: w,
|
|
585
|
+
classPrefix: x,
|
|
586
|
+
vtgClass: (t) => R(t, w.value, x.value),
|
|
587
|
+
localeName: H,
|
|
588
|
+
locale: Ce,
|
|
589
|
+
rowSelection: () => l.rowSelection,
|
|
590
|
+
isSelected: ze,
|
|
591
|
+
isDisabledRow: Ae,
|
|
592
|
+
getSelectionState: Fe,
|
|
593
|
+
toggleRow: Ke,
|
|
594
|
+
toggleAll: We,
|
|
595
|
+
allCheckedState: () => _e.value,
|
|
596
|
+
getRowKey: D,
|
|
597
|
+
invertSelection: ke,
|
|
598
|
+
clearSelection: je,
|
|
599
|
+
getChangeableRowKeys: Me,
|
|
600
|
+
fixedOffsets: Ze,
|
|
601
|
+
scrollState: Qe,
|
|
602
|
+
leafColumnCount: n(() => y.value.length),
|
|
603
|
+
bordered: n(() => l.bordered),
|
|
604
|
+
tableLayout: Q,
|
|
605
|
+
sticky: n(() => l.sticky),
|
|
606
|
+
getRowProps: pt,
|
|
607
|
+
getRowClassName: ft,
|
|
608
|
+
getHeaderRowProps: mt,
|
|
609
|
+
getColumnTitle: wt,
|
|
610
|
+
getPopupContainer: l.getPopupContainer,
|
|
611
|
+
transformCellText: l.transformCellText,
|
|
612
|
+
expandable: () => l.expandable,
|
|
613
|
+
isExpanded: Ve,
|
|
614
|
+
toggleExpand: Ge,
|
|
615
|
+
isRowExpandable: X,
|
|
616
|
+
columnWidths: it,
|
|
617
|
+
startResize: st,
|
|
618
|
+
isResizing: () => ut.value,
|
|
619
|
+
displayColumns: n(() => y.value),
|
|
620
|
+
registerSummaryFixed: (t) => {
|
|
621
|
+
ne.value = t;
|
|
622
|
+
},
|
|
623
|
+
isTreeData: A,
|
|
624
|
+
treeFlattenData: G,
|
|
625
|
+
getFlattenRow: (t) => Y.value.get(t),
|
|
626
|
+
toggleTreeExpand: Le,
|
|
627
|
+
isTreeExpanded: He,
|
|
628
|
+
treeIndentSize: Ne,
|
|
629
|
+
hoverRange: Be,
|
|
630
|
+
setHoverRange: Oe,
|
|
631
|
+
clearHoverRange: Pe,
|
|
632
|
+
hoverable: n(() => l.hoverable !== !1)
|
|
633
|
+
}), () => {
|
|
634
|
+
let t;
|
|
635
|
+
const o = l.title ? l.title(v.value) : d.title ? d.title({
|
|
636
|
+
data: v.value
|
|
637
|
+
}) : null, u = l.footer ? l.footer(v.value) : d.footer ? d.footer({
|
|
638
|
+
data: v.value
|
|
639
|
+
}) : null, s = d.summary ? d.summary() : null, h = ne.value !== !1, f = l.scroll, p = {
|
|
640
|
+
tableLayout: Q.value
|
|
641
|
+
};
|
|
642
|
+
f?.x ? (p.width = typeof f.x == "number" ? `${f.x}px` : f.x, p.minWidth = "100%") : p.width = ot.value ? "max-content" : "100%";
|
|
643
|
+
const c = l.loading, ht = c === !0 || typeof c == "object" && c !== null && c.spinning !== !1, xt = typeof c == "object" && c !== null ? c.indicator : void 0, Ct = typeof c == "object" && c !== null ? c.tip : void 0, ae = ht && (d.loading ? a(fe, {
|
|
644
|
+
loadingClass: e.loading()
|
|
645
|
+
}, me(t = d.loading()) ? t : {
|
|
646
|
+
default: () => [t]
|
|
647
|
+
}) : a(fe, {
|
|
648
|
+
loadingClass: e.loading(),
|
|
649
|
+
indicator: xt,
|
|
650
|
+
tip: Ct
|
|
651
|
+
}, null));
|
|
652
|
+
if (tt.value) {
|
|
653
|
+
const St = l.showHeader !== !1 ? a("div", {
|
|
654
|
+
ref: qe,
|
|
655
|
+
class: e.headerWrapper(),
|
|
656
|
+
style: nt.value
|
|
657
|
+
}, [a("div", {
|
|
658
|
+
class: R("block w-full min-w-full", w.value, x.value)
|
|
659
|
+
}, [a("table", {
|
|
660
|
+
class: S.value,
|
|
661
|
+
style: p
|
|
662
|
+
}, [a(T, {
|
|
663
|
+
columns: y.value
|
|
664
|
+
}, null), a(ue, {
|
|
665
|
+
rows: F.value,
|
|
666
|
+
theadClass: e.thead(),
|
|
667
|
+
rowClass: e.tr(),
|
|
668
|
+
thClass: Z.value,
|
|
669
|
+
headerCellInnerClass: e.headerCellInner()
|
|
670
|
+
}, null)])])]) : null, gt = K.value ? a(Qt, {
|
|
671
|
+
dataSource: v.value,
|
|
672
|
+
columns: y.value,
|
|
673
|
+
tbodyClass: e.tbody(),
|
|
674
|
+
rowClass: e.tr(),
|
|
675
|
+
tdClass: _.value,
|
|
676
|
+
emptyClass: e.empty(),
|
|
677
|
+
bodyCellEllipsisClass: e.bodyCellEllipsis(),
|
|
678
|
+
tableClass: S.value,
|
|
679
|
+
tableStyle: p,
|
|
680
|
+
rowKey: l.rowKey,
|
|
681
|
+
height: rt.value,
|
|
682
|
+
itemHeight: at.value,
|
|
683
|
+
showScrollBar: "hover",
|
|
684
|
+
onVirtualScroll: (re) => {
|
|
685
|
+
et(re.x, re.maxX);
|
|
686
|
+
}
|
|
687
|
+
}, null) : null, bt = K.value ? null : a(ie, {
|
|
688
|
+
ref: ee,
|
|
689
|
+
maxHeight: f?.y !== void 0 ? typeof f.y == "number" ? f.y : String(f.y) : void 0,
|
|
690
|
+
wrapClass: e.bodyWrapper(),
|
|
691
|
+
viewStyle: le,
|
|
692
|
+
onScroll: J
|
|
693
|
+
}, {
|
|
694
|
+
default: () => [a("table", {
|
|
695
|
+
class: S.value,
|
|
696
|
+
style: p
|
|
697
|
+
}, [a(T, {
|
|
698
|
+
columns: y.value
|
|
699
|
+
}, null), a(ce, {
|
|
700
|
+
dataSource: v.value,
|
|
701
|
+
columns: y.value,
|
|
702
|
+
tbodyClass: e.tbody(),
|
|
703
|
+
rowClass: e.tr(),
|
|
704
|
+
tdClass: _.value,
|
|
705
|
+
emptyClass: e.empty(),
|
|
706
|
+
bodyCellEllipsisClass: e.bodyCellEllipsis(),
|
|
707
|
+
rowKey: l.rowKey
|
|
708
|
+
}, null), s && !h && a("tfoot", {
|
|
709
|
+
class: e.summary()
|
|
710
|
+
}, [s])])]
|
|
711
|
+
}), Dt = s && h ? a("div", {
|
|
712
|
+
class: e.headerWrapper(),
|
|
713
|
+
style: {
|
|
714
|
+
position: "sticky",
|
|
715
|
+
bottom: `${g.value?.offsetSummary ?? 0}px`,
|
|
716
|
+
zIndex: "4",
|
|
717
|
+
overflow: "hidden"
|
|
718
|
+
}
|
|
719
|
+
}, [a("div", {
|
|
720
|
+
class: R("block w-full min-w-full", w.value, x.value)
|
|
721
|
+
}, [a("table", {
|
|
722
|
+
class: S.value,
|
|
723
|
+
style: p
|
|
724
|
+
}, [a(T, {
|
|
725
|
+
columns: y.value
|
|
726
|
+
}, null), a("tfoot", {
|
|
727
|
+
class: e.summary()
|
|
728
|
+
}, [s])])])]) : null;
|
|
729
|
+
return a("div", {
|
|
730
|
+
class: e.root()
|
|
731
|
+
}, [o && a("div", {
|
|
732
|
+
class: e.title()
|
|
733
|
+
}, [o]), a("div", {
|
|
734
|
+
class: L(e.wrapper(), g.value && R("overflow-clip", w.value, x.value))
|
|
735
|
+
}, [St, gt, bt, Dt, ae]), u && a("div", {
|
|
736
|
+
class: e.footer()
|
|
737
|
+
}, [u])]);
|
|
738
|
+
}
|
|
739
|
+
const k = a(Lt, null, [a("table", {
|
|
740
|
+
class: S.value,
|
|
741
|
+
style: p
|
|
742
|
+
}, [a(T, {
|
|
743
|
+
columns: y.value
|
|
744
|
+
}, null), l.showHeader !== !1 && a(ue, {
|
|
745
|
+
rows: F.value,
|
|
746
|
+
theadClass: e.thead(),
|
|
747
|
+
rowClass: e.tr(),
|
|
748
|
+
thClass: Z.value,
|
|
749
|
+
headerCellInnerClass: e.headerCellInner()
|
|
750
|
+
}, null), a(ce, {
|
|
751
|
+
dataSource: v.value,
|
|
752
|
+
columns: y.value,
|
|
753
|
+
tbodyClass: e.tbody(),
|
|
754
|
+
rowClass: e.tr(),
|
|
755
|
+
tdClass: _.value,
|
|
756
|
+
emptyClass: e.empty(),
|
|
757
|
+
bodyCellEllipsisClass: e.bodyCellEllipsis(),
|
|
758
|
+
rowKey: l.rowKey
|
|
759
|
+
}, null), s && a("tfoot", {
|
|
760
|
+
class: e.summary()
|
|
761
|
+
}, [s])]), ae]);
|
|
762
|
+
return a("div", {
|
|
763
|
+
class: e.root()
|
|
764
|
+
}, [o && a("div", {
|
|
765
|
+
class: e.title()
|
|
766
|
+
}, [o]), a(ie, {
|
|
767
|
+
ref: te,
|
|
768
|
+
wrapClass: e.wrapper(),
|
|
769
|
+
viewStyle: le,
|
|
770
|
+
onScroll: J
|
|
771
|
+
}, me(k) ? k : {
|
|
772
|
+
default: () => [k]
|
|
773
|
+
}), u && a("div", {
|
|
774
|
+
class: e.footer()
|
|
775
|
+
}, [u])]);
|
|
776
|
+
};
|
|
777
|
+
}
|
|
778
|
+
});
|
|
779
|
+
export {
|
|
780
|
+
Ol as default
|
|
781
|
+
};
|