@vtable-guild/vtable-guild 2.4.1 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/style.css +12 -0
- package/css/tailwind3-utilities.css +12 -0
- package/dist/core/src/components/VTableGuildConfigProvider.d.ts.map +1 -1
- package/dist/core/src/components/VTableGuildConfigProvider.mjs +17 -12
- package/dist/core/src/components/VirtualList/VirtualList.d.ts +21 -0
- package/dist/core/src/components/VirtualList/VirtualList.d.ts.map +1 -1
- package/dist/core/src/components/VirtualList/VirtualList.mjs +201 -216
- package/dist/core/src/components/VirtualList/hooks/useHeights.d.ts +7 -1
- package/dist/core/src/components/VirtualList/hooks/useHeights.d.ts.map +1 -1
- package/dist/core/src/components/VirtualList/hooks/useHeights.mjs +29 -27
- package/dist/core/src/components/VirtualList/hooks/useScrollTo.d.ts +3 -1
- package/dist/core/src/components/VirtualList/hooks/useScrollTo.d.ts.map +1 -1
- package/dist/core/src/components/VirtualList/hooks/useScrollTo.mjs +57 -50
- package/dist/core/src/components/VirtualList/index.d.ts +1 -0
- package/dist/core/src/components/VirtualList/index.d.ts.map +1 -1
- package/dist/core/src/components/VirtualList/utils/PrefixSums.d.ts +50 -0
- package/dist/core/src/components/VirtualList/utils/PrefixSums.d.ts.map +1 -0
- package/dist/core/src/components/VirtualList/utils/PrefixSums.mjs +54 -0
- package/dist/core/src/components/VirtualList/utils/PrefixSums.test.d.ts +2 -0
- package/dist/core/src/components/VirtualList/utils/PrefixSums.test.d.ts.map +1 -0
- package/dist/core/src/composables/useTheme.d.ts +9 -1
- package/dist/core/src/composables/useTheme.d.ts.map +1 -1
- package/dist/core/src/composables/useTheme.mjs +83 -60
- package/dist/core/src/index.d.ts +9 -0
- package/dist/core/src/index.d.ts.map +1 -1
- package/dist/core/src/plugin/index.d.ts.map +1 -1
- package/dist/core/src/plugin/index.mjs +4 -3
- package/dist/core/src/utils/types.d.ts +3 -0
- package/dist/core/src/utils/types.d.ts.map +1 -1
- package/dist/css/style.css +12 -0
- package/dist/css/tailwind3-utilities.css +12 -0
- package/dist/index.full.mjs +3450 -3006
- package/dist/index.mjs +41 -37
- package/dist/table/src/components/ColGroup.d.ts.map +1 -1
- package/dist/table/src/components/ColGroup.mjs +11 -8
- package/dist/table/src/components/Table.d.ts +68 -6
- package/dist/table/src/components/Table.d.ts.map +1 -1
- package/dist/table/src/components/Table.mjs +361 -297
- package/dist/table/src/components/TableBody.d.ts.map +1 -1
- package/dist/table/src/components/TableBody.mjs +38 -37
- package/dist/table/src/components/TableCell.d.ts +23 -0
- package/dist/table/src/components/TableCell.d.ts.map +1 -1
- package/dist/table/src/components/TableCell.mjs +85 -60
- package/dist/table/src/components/TableHeaderCell.d.ts.map +1 -1
- package/dist/table/src/components/TableHeaderCell.mjs +177 -174
- package/dist/table/src/components/VTable.vue.mjs +10 -8
- package/dist/table/src/components/VTableCompatClass.test.d.ts +2 -0
- package/dist/table/src/components/VTableCompatClass.test.d.ts.map +1 -0
- package/dist/table/src/components/VirtualTableBody.d.ts +40 -0
- package/dist/table/src/components/VirtualTableBody.d.ts.map +1 -1
- package/dist/table/src/components/VirtualTableBody.mjs +158 -67
- package/dist/table/src/composables/index.d.ts +4 -0
- package/dist/table/src/composables/index.d.ts.map +1 -1
- package/dist/table/src/composables/useColumnMetrics.d.ts +39 -0
- package/dist/table/src/composables/useColumnMetrics.d.ts.map +1 -0
- package/dist/table/src/composables/useColumnMetrics.mjs +88 -0
- package/dist/table/src/composables/useColumnWindow.d.ts +90 -0
- package/dist/table/src/composables/useColumnWindow.d.ts.map +1 -0
- package/dist/table/src/composables/useColumnWindow.mjs +62 -0
- package/dist/table/src/composables/useColumnWindow.test.d.ts +2 -0
- package/dist/table/src/composables/useColumnWindow.test.d.ts.map +1 -0
- package/dist/table/src/composables/useColumns.d.ts +8 -0
- package/dist/table/src/composables/useColumns.d.ts.map +1 -1
- package/dist/table/src/composables/useColumns.mjs +46 -43
- package/dist/table/src/composables/useFixedColumnStyle.d.ts.map +1 -1
- package/dist/table/src/composables/useFixedColumnStyle.mjs +12 -11
- package/dist/table/src/composables/useSelection.d.ts.map +1 -1
- package/dist/table/src/composables/useSelection.mjs +93 -94
- package/dist/table/src/composables/useVirtual.d.ts +10 -0
- package/dist/table/src/composables/useVirtual.d.ts.map +1 -1
- package/dist/table/src/composables/useVirtual.mjs +15 -11
- package/dist/table/src/context.d.ts +7 -0
- package/dist/table/src/context.d.ts.map +1 -1
- package/dist/table/src/index.d.ts +2 -0
- package/dist/table/src/index.d.ts.map +1 -1
- package/dist/table/src/types/table.d.ts +25 -0
- package/dist/table/src/types/table.d.ts.map +1 -1
- package/dist/table/src/utils/compat.d.ts +9 -0
- package/dist/table/src/utils/compat.d.ts.map +1 -0
- package/dist/table/src/utils/compat.mjs +28 -0
- package/dist/theme/src/compat/antdv-table.d.ts +4 -0
- package/dist/theme/src/compat/antdv-table.d.ts.map +1 -0
- package/dist/theme/src/compat/antdv-table.mjs +51 -0
- package/dist/theme/src/index.d.ts +2 -0
- package/dist/theme/src/index.d.ts.map +1 -1
- package/dist/theme/src/presets/antdv/table.d.ts +3 -0
- package/dist/theme/src/presets/antdv/table.d.ts.map +1 -1
- package/dist/theme/src/presets/antdv/table.mjs +4 -1
- package/package.json +1 -1
- package/dist/core/src/components/VirtualList/hooks/useDiffItem.d.ts +0 -4
- package/dist/core/src/components/VirtualList/hooks/useDiffItem.d.ts.map +0 -1
- package/dist/core/src/components/VirtualList/hooks/useDiffItem.mjs +0 -16
- package/dist/core/src/components/VirtualList/utils/algorithmUtil.d.ts +0 -7
- package/dist/core/src/components/VirtualList/utils/algorithmUtil.d.ts.map +0 -1
- package/dist/core/src/components/VirtualList/utils/algorithmUtil.mjs +0 -22
|
@@ -1,41 +1,45 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as Nt, inject as Ft, computed as n, provide as ye, ref as T, onMounted as Ot, onBeforeUnmount as Pt, watch as b, createVNode as a, Fragment as zt, isVNode as At } from "vue";
|
|
2
2
|
import "../../../core/src/utils/tv.mjs";
|
|
3
|
-
import { prefixVtgClassNames as
|
|
4
|
-
import { mergeThemeConfigs as
|
|
5
|
-
import { mergeDeep as
|
|
6
|
-
import
|
|
7
|
-
import { VTABLE_GUILD_INJECTION_KEY as
|
|
8
|
-
import { resolveTooltipThemePreset as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
|
|
31
|
-
|
|
3
|
+
import { prefixVtgClassNames as H } from "../../../core/src/utils/classPrefix.mjs";
|
|
4
|
+
import { mergeThemeConfigs as x, useTheme as Kt } from "../../../core/src/composables/useTheme.mjs";
|
|
5
|
+
import { mergeDeep as L } from "../../../core/src/utils/mergeDeep.mjs";
|
|
6
|
+
import he from "../../../core/src/components/Scrollbar.mjs";
|
|
7
|
+
import { VTABLE_GUILD_INJECTION_KEY as Ce } from "../../../core/src/plugin/index.mjs";
|
|
8
|
+
import { resolveTooltipThemePreset as Wt, resolveScrollbarThemePreset as kt, resolveRadioThemePreset as _t, resolveInputThemePreset as Mt, resolveCheckboxThemePreset as jt, resolveButtonThemePreset as Vt, resolveTableThemePreset as Ut, resolveTableLocalePreset as Gt, resolveBuiltInTableLocale as Yt } from "../../../theme/src/presets/index.mjs";
|
|
9
|
+
import { antdvTableCompatClasses as Xt } from "../../../theme/src/compat/antdv-table.mjs";
|
|
10
|
+
import { getEllipsisConfig as $t } from "../utils/cell.mjs";
|
|
11
|
+
import { getRootCompatClass as Jt } from "../utils/compat.mjs";
|
|
12
|
+
import { useScroll as qt } from "../composables/useScroll.mjs";
|
|
13
|
+
import { useColumnMetrics as Qt } from "../composables/useColumnMetrics.mjs";
|
|
14
|
+
import { resolveFixedColumnRanges as Zt } from "../composables/useColumnWindow.mjs";
|
|
15
|
+
import { useExpand as el } from "../composables/useExpand.mjs";
|
|
16
|
+
import { useResize as tl } from "../composables/useResize.mjs";
|
|
17
|
+
import { useVirtual as ll } from "../composables/useVirtual.mjs";
|
|
18
|
+
import { useTreeData as ol } from "../composables/useTreeData.mjs";
|
|
19
|
+
import { useHoverState as nl } from "../composables/useHoverState.mjs";
|
|
20
|
+
import { TABLE_CONTEXT_KEY as al } from "../context.mjs";
|
|
21
|
+
import { EXPAND_COLUMN as rl, SELECTION_COLUMN as dl } from "../constants.mjs";
|
|
22
|
+
import { resolveTablePresetConfig as il } from "../preset-config.mjs";
|
|
23
|
+
import xe from "./TableHeader.mjs";
|
|
24
|
+
import ge from "./TableBody.mjs";
|
|
25
|
+
import sl from "./VirtualTableBody.mjs";
|
|
26
|
+
import Se from "./TableLoading.mjs";
|
|
27
|
+
import B from "./ColGroup.mjs";
|
|
28
|
+
import { antdvTableTheme as ul } from "../../../theme/src/presets/antdv/table.mjs";
|
|
29
|
+
import { useColumns as be } from "../composables/useColumns.mjs";
|
|
30
|
+
import { useSorter as cl } from "../composables/useSorter.mjs";
|
|
31
|
+
import { useFilter as fl } from "../composables/useFilter.mjs";
|
|
32
|
+
import { useSelection as ml } from "../composables/useSelection.mjs";
|
|
33
|
+
import { cn as g } from "tailwind-variants";
|
|
34
|
+
function Re(l) {
|
|
35
|
+
return typeof l == "function" || Object.prototype.toString.call(l) === "[object Object]" && !At(l);
|
|
32
36
|
}
|
|
33
|
-
const
|
|
34
|
-
function
|
|
37
|
+
const pl = [["xxxl", 2e3], ["xxl", 1600], ["xl", 1200], ["lg", 992], ["md", 768], ["sm", 576], ["xs", 0]];
|
|
38
|
+
function De() {
|
|
35
39
|
if (typeof window > "u")
|
|
36
40
|
return /* @__PURE__ */ new Set(["md", "sm", "xs"]);
|
|
37
41
|
const l = window.innerWidth, d = /* @__PURE__ */ new Set();
|
|
38
|
-
return
|
|
42
|
+
return pl.forEach(([i, r]) => {
|
|
39
43
|
if (i === "xs") {
|
|
40
44
|
l < 576 && d.add("xs");
|
|
41
45
|
return;
|
|
@@ -43,28 +47,28 @@ function we() {
|
|
|
43
47
|
l >= r && d.add(i);
|
|
44
48
|
}), d;
|
|
45
49
|
}
|
|
46
|
-
function
|
|
50
|
+
function Ee(l, d) {
|
|
47
51
|
return l.reduce((i, r) => {
|
|
48
52
|
if (typeof r == "symbol")
|
|
49
53
|
return i.push(r), i;
|
|
50
54
|
if (r.responsive?.length && !r.responsive.some((w) => d.has(w)))
|
|
51
55
|
return i;
|
|
52
|
-
const
|
|
56
|
+
const v = r.fixed === !0 ? "left" : r.fixed;
|
|
53
57
|
if ("children" in r && Array.isArray(r.children)) {
|
|
54
|
-
const w =
|
|
58
|
+
const w = Ee(r.children, d);
|
|
55
59
|
return w.length === 0 || i.push({
|
|
56
60
|
...r,
|
|
57
|
-
fixed:
|
|
61
|
+
fixed: v,
|
|
58
62
|
children: w
|
|
59
63
|
}), i;
|
|
60
64
|
}
|
|
61
|
-
return i.push(
|
|
65
|
+
return i.push(v === r.fixed ? r : {
|
|
62
66
|
...r,
|
|
63
|
-
fixed:
|
|
67
|
+
fixed: v
|
|
64
68
|
}), i;
|
|
65
69
|
}, []);
|
|
66
70
|
}
|
|
67
|
-
const
|
|
71
|
+
const $l = /* @__PURE__ */ Nt({
|
|
68
72
|
name: "VTable",
|
|
69
73
|
props: {
|
|
70
74
|
dataSource: {
|
|
@@ -187,6 +191,36 @@ const Ol = /* @__PURE__ */ Et({
|
|
|
187
191
|
type: Boolean,
|
|
188
192
|
default: !1
|
|
189
193
|
},
|
|
194
|
+
/**
|
|
195
|
+
* 固定行高(px),仅在 `virtual` 下生效。
|
|
196
|
+
*
|
|
197
|
+
* 声明后表格进入**定高快路径**:跳过全部行高测量,可视区计算恒为 O(1),
|
|
198
|
+
* 挂载与滚动不再随总行数增长。前提是每行实际高度确实等于该值——
|
|
199
|
+
* 若行内有换行文本、`ellipsis: false` 的长内容或自定义高度渲染,请**不要**传,
|
|
200
|
+
* 交给默认的实测路径。dev 构建会实测首行并在不符时告警。
|
|
201
|
+
*/
|
|
202
|
+
rowHeight: {
|
|
203
|
+
type: Number,
|
|
204
|
+
default: void 0
|
|
205
|
+
},
|
|
206
|
+
/**
|
|
207
|
+
* 横向虚拟化:只渲染视口内的列,仅在 `virtual` 下生效,默认关闭。
|
|
208
|
+
*
|
|
209
|
+
* 开启后可见单元格数从「行 × 总列数」降到「行 × 可视列数」。列数很多
|
|
210
|
+
* (百列量级)时这是唯一能真正降低耗时的手段——`TableCell` 的组件实例数
|
|
211
|
+
* 就是宽表的瓶颈本身。列数不多时收益为零,还多一次表头测量,所以默认关闭。
|
|
212
|
+
*
|
|
213
|
+
* 以下情况会被忽略(dev 构建给出告警),表体回落到渲染全部列:
|
|
214
|
+
* - 未开启 `virtual`
|
|
215
|
+
* - 列上有 `customCell` / `customRender`(可能返回 colSpan / rowSpan,
|
|
216
|
+
* 单元格合并会破坏列宽不变量,虚拟模式本就不支持)
|
|
217
|
+
* - 固定列没有分别待在两端
|
|
218
|
+
* - `showHeader: false` 且存在非数字列宽(没有表头可量,也算不出来)
|
|
219
|
+
*/
|
|
220
|
+
virtualColumn: {
|
|
221
|
+
type: Boolean,
|
|
222
|
+
default: !1
|
|
223
|
+
},
|
|
190
224
|
childrenColumnName: {
|
|
191
225
|
type: String,
|
|
192
226
|
default: void 0
|
|
@@ -225,30 +259,30 @@ const Ol = /* @__PURE__ */ Et({
|
|
|
225
259
|
slots: d,
|
|
226
260
|
emit: i
|
|
227
261
|
}) {
|
|
228
|
-
const r =
|
|
229
|
-
const t = r?.theme ?? {}, o =
|
|
262
|
+
const r = Ft(Ce, null), v = n(() => r?.themePreset ?? "antdv"), w = n(() => r?.cssMode ?? "prebuilt"), C = n(() => r?.classPrefix ?? "vtg"), Ie = n(() => {
|
|
263
|
+
const t = r?.theme ?? {}, o = v.value;
|
|
230
264
|
return {
|
|
231
265
|
...t,
|
|
232
|
-
button:
|
|
233
|
-
checkbox:
|
|
234
|
-
input:
|
|
235
|
-
radio:
|
|
236
|
-
scrollbar:
|
|
237
|
-
tooltip:
|
|
266
|
+
button: x(Vt(o), t.button),
|
|
267
|
+
checkbox: x(jt(o), t.checkbox),
|
|
268
|
+
input: x(Mt(o), t.input),
|
|
269
|
+
radio: x(_t(o), t.radio),
|
|
270
|
+
scrollbar: x(kt(o), t.scrollbar),
|
|
271
|
+
tooltip: x(Wt(o), t.tooltip)
|
|
238
272
|
};
|
|
239
273
|
});
|
|
240
|
-
|
|
274
|
+
ye(Ce, {
|
|
241
275
|
get themePreset() {
|
|
242
|
-
return
|
|
276
|
+
return v.value;
|
|
243
277
|
},
|
|
244
278
|
get cssMode() {
|
|
245
279
|
return w.value;
|
|
246
280
|
},
|
|
247
281
|
get classPrefix() {
|
|
248
|
-
return
|
|
282
|
+
return C.value;
|
|
249
283
|
},
|
|
250
284
|
get theme() {
|
|
251
|
-
return
|
|
285
|
+
return Ie.value;
|
|
252
286
|
},
|
|
253
287
|
get locale() {
|
|
254
288
|
return r?.locale ?? "zh-CN";
|
|
@@ -260,176 +294,184 @@ const Ol = /* @__PURE__ */ Et({
|
|
|
260
294
|
return r?.localeOverrides ?? {};
|
|
261
295
|
}
|
|
262
296
|
});
|
|
263
|
-
const
|
|
297
|
+
const Te = n(() => Ut(v.value) ?? ul), {
|
|
264
298
|
slots: e
|
|
265
|
-
} =
|
|
299
|
+
} = Kt("table", Te, l, {
|
|
300
|
+
compatClasses: Xt
|
|
301
|
+
}), V = r?.compatClass === !0 ? (t) => `ant-table-${t}` : void 0, N = n(() => l.locale ?? r?.locale ?? "zh-CN"), He = n(() => ({
|
|
266
302
|
...r?.locales ?? {},
|
|
267
303
|
...l.locales ?? {}
|
|
268
|
-
})),
|
|
269
|
-
const t =
|
|
270
|
-
return
|
|
271
|
-
}),
|
|
272
|
-
function
|
|
273
|
-
|
|
304
|
+
})), Le = n(() => {
|
|
305
|
+
const t = Gt(v.value), o = Yt(v.value, N.value), u = He.value[N.value]?.table, s = L(L(t, o), u);
|
|
306
|
+
return L(s, L(r?.localeOverrides?.table ?? {}, l.localeOverrides));
|
|
307
|
+
}), U = T(De());
|
|
308
|
+
function F() {
|
|
309
|
+
U.value = De();
|
|
274
310
|
}
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
}),
|
|
278
|
-
window.removeEventListener("resize",
|
|
311
|
+
Ot(() => {
|
|
312
|
+
F(), window.addEventListener("resize", F);
|
|
313
|
+
}), Pt(() => {
|
|
314
|
+
window.removeEventListener("resize", F);
|
|
279
315
|
});
|
|
280
|
-
const
|
|
281
|
-
leafColumns:
|
|
282
|
-
} =
|
|
283
|
-
getSortOrder:
|
|
284
|
-
toggleSortOrder:
|
|
285
|
-
sortData:
|
|
286
|
-
sorterState:
|
|
287
|
-
sorterResult:
|
|
288
|
-
sortColumns:
|
|
289
|
-
} =
|
|
290
|
-
columns: () =>
|
|
316
|
+
const G = n(() => Ee(l.columns, U.value)), R = n(() => l.sticky === !0 ? {} : typeof l.sticky == "object" ? l.sticky : void 0), {
|
|
317
|
+
leafColumns: D
|
|
318
|
+
} = be(() => G.value), {
|
|
319
|
+
getSortOrder: O,
|
|
320
|
+
toggleSortOrder: Be,
|
|
321
|
+
sortData: Ne,
|
|
322
|
+
sorterState: Fe,
|
|
323
|
+
sorterResult: Y,
|
|
324
|
+
sortColumns: Oe
|
|
325
|
+
} = cl({
|
|
326
|
+
columns: () => D.value,
|
|
291
327
|
tableSortDirections: () => l.sortDirections,
|
|
292
328
|
onSorterChange(t) {
|
|
293
|
-
const o =
|
|
294
|
-
i("change",
|
|
329
|
+
const o = z();
|
|
330
|
+
i("change", P(), t, {
|
|
295
331
|
action: "sort",
|
|
296
332
|
currentDataSource: o
|
|
297
333
|
});
|
|
298
334
|
}
|
|
299
335
|
}), {
|
|
300
|
-
getFilteredValue:
|
|
301
|
-
confirmFilter:
|
|
302
|
-
resetFilter:
|
|
303
|
-
getAllFilters:
|
|
304
|
-
filterData:
|
|
305
|
-
} =
|
|
306
|
-
columns: () =>
|
|
336
|
+
getFilteredValue: Pe,
|
|
337
|
+
confirmFilter: ze,
|
|
338
|
+
resetFilter: Ae,
|
|
339
|
+
getAllFilters: P,
|
|
340
|
+
filterData: Ke
|
|
341
|
+
} = fl({
|
|
342
|
+
columns: () => D.value,
|
|
307
343
|
onFilterChange(t) {
|
|
308
|
-
const o =
|
|
309
|
-
i("change", t,
|
|
344
|
+
const o = z();
|
|
345
|
+
i("change", t, Y.value, {
|
|
310
346
|
action: "filter",
|
|
311
347
|
currentDataSource: o
|
|
312
348
|
});
|
|
313
349
|
}
|
|
314
350
|
});
|
|
315
|
-
function
|
|
351
|
+
function z() {
|
|
316
352
|
let t = l.dataSource;
|
|
317
|
-
return t =
|
|
353
|
+
return t = Ke(t), t = Ne(t), t;
|
|
318
354
|
}
|
|
319
|
-
const
|
|
320
|
-
function
|
|
355
|
+
const A = n(() => z());
|
|
356
|
+
function E(t, o) {
|
|
321
357
|
return typeof l.rowKey == "function" ? l.rowKey(t) : typeof l.rowKey == "string" && l.rowKey in t ? t[l.rowKey] : o;
|
|
322
358
|
}
|
|
323
359
|
const {
|
|
324
|
-
flattenData:
|
|
325
|
-
rowMetaMap:
|
|
326
|
-
isTreeData:
|
|
327
|
-
toggleTreeExpand:
|
|
328
|
-
isTreeExpanded:
|
|
329
|
-
indentSize:
|
|
330
|
-
} =
|
|
331
|
-
data: () =>
|
|
360
|
+
flattenData: X,
|
|
361
|
+
rowMetaMap: $,
|
|
362
|
+
isTreeData: K,
|
|
363
|
+
toggleTreeExpand: We,
|
|
364
|
+
isTreeExpanded: ke,
|
|
365
|
+
indentSize: _e
|
|
366
|
+
} = ol({
|
|
367
|
+
data: () => A.value,
|
|
332
368
|
childrenColumnName: () => l.childrenColumnName,
|
|
333
369
|
indentSize: () => l.indentSize,
|
|
334
|
-
getRowKey:
|
|
370
|
+
getRowKey: E,
|
|
335
371
|
defaultExpandedRowKeys: () => l.defaultExpandedRowKeys,
|
|
336
372
|
expandedRowKeys: () => l.expandedRowKeys,
|
|
337
373
|
defaultExpandAllRows: () => l.defaultExpandAllRows,
|
|
338
374
|
onExpand: l.onExpand,
|
|
339
375
|
onExpandedRowsChange: l.onExpandedRowsChange
|
|
340
376
|
}), {
|
|
341
|
-
hoverRange:
|
|
342
|
-
setHoverRange:
|
|
343
|
-
clearHoverRange:
|
|
344
|
-
} =
|
|
345
|
-
isSelected:
|
|
346
|
-
isDisabled:
|
|
347
|
-
getSelectionState:
|
|
348
|
-
toggleRow:
|
|
349
|
-
toggleAll:
|
|
350
|
-
allCheckedState:
|
|
351
|
-
invertSelection:
|
|
352
|
-
clearSelection:
|
|
353
|
-
getChangeableRowKeys:
|
|
354
|
-
} =
|
|
377
|
+
hoverRange: Me,
|
|
378
|
+
setHoverRange: je,
|
|
379
|
+
clearHoverRange: Ve
|
|
380
|
+
} = nl(100), y = n(() => K.value ? X.value.map((t) => t.record) : A.value), {
|
|
381
|
+
isSelected: Ue,
|
|
382
|
+
isDisabled: Ge,
|
|
383
|
+
getSelectionState: Ye,
|
|
384
|
+
toggleRow: Xe,
|
|
385
|
+
toggleAll: $e,
|
|
386
|
+
allCheckedState: Je,
|
|
387
|
+
invertSelection: qe,
|
|
388
|
+
clearSelection: Qe,
|
|
389
|
+
getChangeableRowKeys: Ze
|
|
390
|
+
} = ml({
|
|
355
391
|
rowSelection: () => l.rowSelection,
|
|
356
|
-
getRowKey:
|
|
357
|
-
data: () =>
|
|
358
|
-
visibleData: () =>
|
|
392
|
+
getRowKey: E,
|
|
393
|
+
data: () => A.value,
|
|
394
|
+
visibleData: () => y.value,
|
|
359
395
|
childrenColumnName: () => l.childrenColumnName,
|
|
360
396
|
onSelectionChange() {
|
|
361
|
-
i("change",
|
|
397
|
+
i("change", P(), Y.value, {
|
|
362
398
|
action: "select",
|
|
363
|
-
currentDataSource:
|
|
399
|
+
currentDataSource: y.value
|
|
364
400
|
});
|
|
365
401
|
}
|
|
366
402
|
}), {
|
|
367
|
-
isExpanded:
|
|
368
|
-
toggleExpand:
|
|
369
|
-
} =
|
|
403
|
+
isExpanded: et,
|
|
404
|
+
toggleExpand: tt
|
|
405
|
+
} = el({
|
|
370
406
|
expandable: () => l.expandable,
|
|
371
|
-
getRowKey:
|
|
372
|
-
data: () =>
|
|
373
|
-
}),
|
|
407
|
+
getRowKey: E,
|
|
408
|
+
data: () => y.value
|
|
409
|
+
}), J = (t) => {
|
|
374
410
|
const o = l.expandable;
|
|
375
411
|
return o ? o.rowExpandable ? o.rowExpandable(t) : !!o.expandedRowRender : !1;
|
|
376
|
-
},
|
|
377
|
-
|
|
378
|
-
},
|
|
412
|
+
}, lt = (t, o) => {
|
|
413
|
+
J(t) && tt(t, o);
|
|
414
|
+
}, ot = "__vtg_selection__", nt = "__vtg_expand__", at = n(() => {
|
|
379
415
|
const t = l.expandable, o = l.rowSelection, u = t && t.showExpandColumn !== !1 ? {
|
|
380
|
-
key:
|
|
416
|
+
key: nt,
|
|
381
417
|
title: "",
|
|
382
418
|
width: t.columnWidth ?? 48,
|
|
383
419
|
align: "center",
|
|
384
420
|
fixed: t.fixed === !0 ? "left" : t.fixed
|
|
385
421
|
} : null, s = o ? {
|
|
386
|
-
key:
|
|
422
|
+
key: ot,
|
|
387
423
|
title: "",
|
|
388
424
|
width: o.columnWidth ?? 48,
|
|
389
425
|
align: "center",
|
|
390
426
|
fixed: o.fixed === !0 ? "left" : o.fixed || void 0
|
|
391
427
|
} : null, h = [];
|
|
392
|
-
let
|
|
393
|
-
for (const c of
|
|
394
|
-
if (c ===
|
|
395
|
-
u && !
|
|
428
|
+
let m = !1, p = !1;
|
|
429
|
+
for (const c of G.value) {
|
|
430
|
+
if (c === rl) {
|
|
431
|
+
u && !m && (h.push(u), m = !0);
|
|
396
432
|
continue;
|
|
397
433
|
}
|
|
398
|
-
if (c ===
|
|
434
|
+
if (c === dl) {
|
|
399
435
|
s && !p && (h.push(s), p = !0);
|
|
400
436
|
continue;
|
|
401
437
|
}
|
|
402
438
|
h.push(c);
|
|
403
439
|
}
|
|
404
|
-
return u && !
|
|
440
|
+
return u && !m && h.unshift(u), s && !p && h.unshift(s), h;
|
|
405
441
|
}), {
|
|
406
|
-
leafColumns:
|
|
407
|
-
headerRows:
|
|
408
|
-
} =
|
|
409
|
-
headerWrapRef:
|
|
410
|
-
bodyWrapRef:
|
|
411
|
-
scrollState:
|
|
412
|
-
handleBodyScroll:
|
|
413
|
-
fixedOffsets:
|
|
414
|
-
syncHorizontalScroll:
|
|
415
|
-
} =
|
|
416
|
-
displayColumns: () =>
|
|
417
|
-
}),
|
|
418
|
-
|
|
442
|
+
leafColumns: f,
|
|
443
|
+
headerRows: W
|
|
444
|
+
} = be(() => at.value), rt = n(() => W.value.length > 1), {
|
|
445
|
+
headerWrapRef: q,
|
|
446
|
+
bodyWrapRef: Q,
|
|
447
|
+
scrollState: Z,
|
|
448
|
+
handleBodyScroll: ee,
|
|
449
|
+
fixedOffsets: te,
|
|
450
|
+
syncHorizontalScroll: dt
|
|
451
|
+
} = qt({
|
|
452
|
+
displayColumns: () => f.value
|
|
453
|
+
}), le = n(() => Jt({
|
|
454
|
+
compatClass: V,
|
|
455
|
+
fixedOffsets: te,
|
|
456
|
+
scrollState: Z
|
|
457
|
+
})), it = n(() => l.showHeader !== !1 && (!!l.scroll?.y || !!l.sticky)), oe = n(() => f.value.some((t) => t.fixed === "left" || t.fixed === "right")), st = n(() => D.value.some((t) => $t(t).enabled)), ut = n(() => l.scroll?.x !== void 0 || oe.value), ne = n(() => l.tableLayout ? l.tableLayout : l.scroll?.y || l.scroll?.x || oe.value || st.value ? "fixed" : "auto"), ct = n(() => {
|
|
458
|
+
if (R.value)
|
|
419
459
|
return {
|
|
420
460
|
position: "sticky",
|
|
421
|
-
top: `${
|
|
461
|
+
top: `${R.value.offsetHeader ?? 0}px`,
|
|
422
462
|
zIndex: "4"
|
|
423
463
|
};
|
|
424
464
|
}), {
|
|
425
|
-
enabled:
|
|
426
|
-
itemHeight:
|
|
427
|
-
listHeight:
|
|
428
|
-
|
|
465
|
+
enabled: I,
|
|
466
|
+
itemHeight: ft,
|
|
467
|
+
listHeight: mt,
|
|
468
|
+
fixedHeight: pt
|
|
469
|
+
} = ll({
|
|
429
470
|
virtual: () => l.virtual,
|
|
430
471
|
scrollY: () => l.scroll?.y,
|
|
431
|
-
size: () => l.size
|
|
432
|
-
|
|
472
|
+
size: () => l.size,
|
|
473
|
+
rowHeight: () => l.rowHeight
|
|
474
|
+
}), ae = n(() => D.value.some((t) => !!t.customCell || !!t.customRender)), k = n(() => !rt.value || l.bordered ? {
|
|
433
475
|
table: "",
|
|
434
476
|
th: "",
|
|
435
477
|
td: ""
|
|
@@ -437,56 +479,74 @@ const Ol = /* @__PURE__ */ Et({
|
|
|
437
479
|
table: e.groupedHeaderTable(),
|
|
438
480
|
th: e.groupedHeaderTh(),
|
|
439
481
|
td: e.groupedHeaderTd()
|
|
440
|
-
}), S = n(() =>
|
|
441
|
-
|
|
482
|
+
}), S = n(() => g(e.table(), k.value.table) ?? ""), re = n(() => g(e.th(), k.value.th) ?? ""), _ = n(() => g(e.td(), k.value.td) ?? "");
|
|
483
|
+
b([I, ae], ([t, o]) => {
|
|
442
484
|
}, {
|
|
443
485
|
immediate: !0
|
|
444
486
|
});
|
|
445
|
-
const
|
|
446
|
-
|
|
447
|
-
t && (
|
|
448
|
-
}),
|
|
449
|
-
t && (
|
|
487
|
+
const de = T(null), ie = T(null);
|
|
488
|
+
b(() => de.value?.wrapRef, (t) => {
|
|
489
|
+
t && (Q.value = t);
|
|
490
|
+
}), b(() => ie.value?.wrapRef, (t) => {
|
|
491
|
+
t && (Q.value = t);
|
|
450
492
|
});
|
|
451
493
|
const {
|
|
452
|
-
columnWidths:
|
|
453
|
-
startResize:
|
|
454
|
-
isResizing:
|
|
455
|
-
} =
|
|
494
|
+
columnWidths: se,
|
|
495
|
+
startResize: vt,
|
|
496
|
+
isResizing: wt
|
|
497
|
+
} = tl({
|
|
456
498
|
onResizeColumn(t, o) {
|
|
457
499
|
i("resizeColumn", t, o);
|
|
458
500
|
}
|
|
501
|
+
}), yt = n(() => Zt(f.value)), ue = n(() => l.virtualColumn ? I.value ? ae.value ? "列上有 customCell / customRender,可能返回 colSpan / rowSpan;单元格合并会让某个 td 缺席,进而破坏列宽不变量(虚拟模式本就不支持合并)" : yt.value.contiguous ? null : "固定列必须分列两端:左固定连成前缀、右固定连成后缀,中间夹着的固定列会被窗口跳过" : "它只作用于虚拟表体,需要同时开启 virtual 与 scroll.y" : null), M = n(() => l.virtualColumn && ue.value === null);
|
|
502
|
+
b(ue, (t) => {
|
|
503
|
+
}, {
|
|
504
|
+
immediate: !0
|
|
505
|
+
});
|
|
506
|
+
const {
|
|
507
|
+
metrics: ce
|
|
508
|
+
} = Qt({
|
|
509
|
+
enabled: () => M.value,
|
|
510
|
+
headerEl: () => q.value,
|
|
511
|
+
columns: () => f.value,
|
|
512
|
+
columnWidths: se,
|
|
513
|
+
hasHeader: () => l.showHeader !== !1
|
|
514
|
+
});
|
|
515
|
+
b([M, ce], ([t, o]) => {
|
|
516
|
+
!t || o || l.showHeader;
|
|
517
|
+
}, {
|
|
518
|
+
immediate: !0
|
|
459
519
|
});
|
|
460
|
-
function
|
|
461
|
-
return
|
|
520
|
+
function ht(t) {
|
|
521
|
+
return K.value ? $.value.get(t)?.level ?? 0 : 0;
|
|
462
522
|
}
|
|
463
|
-
function
|
|
464
|
-
return l.rowClassName ? typeof l.rowClassName == "function" ? l.rowClassName(t, o,
|
|
523
|
+
function Ct(t, o) {
|
|
524
|
+
return l.rowClassName ? typeof l.rowClassName == "function" ? l.rowClassName(t, o, ht(t)) : l.rowClassName : "";
|
|
465
525
|
}
|
|
466
|
-
function
|
|
526
|
+
function xt(t, o) {
|
|
467
527
|
return l.customRow?.(t, o);
|
|
468
528
|
}
|
|
469
|
-
function
|
|
529
|
+
function gt(t, o) {
|
|
470
530
|
return l.customHeaderRow?.(t, o);
|
|
471
531
|
}
|
|
472
|
-
function
|
|
532
|
+
function St(t) {
|
|
473
533
|
if (typeof t.title != "function")
|
|
474
534
|
return t.title ?? "";
|
|
475
|
-
const o = t, u =
|
|
535
|
+
const o = t, u = Oe.value.filter((s) => !!s.column);
|
|
476
536
|
return t.title({
|
|
477
|
-
sortOrder: o.sorter ?
|
|
478
|
-
sortColumn:
|
|
537
|
+
sortOrder: o.sorter ? O(o) ?? void 0 : void 0,
|
|
538
|
+
sortColumn: Fe.value.column,
|
|
479
539
|
sortColumns: u.length > 0 ? u : void 0,
|
|
480
|
-
filters:
|
|
540
|
+
filters: P()
|
|
481
541
|
});
|
|
482
542
|
}
|
|
483
|
-
function
|
|
484
|
-
return !!(t.sorter &&
|
|
543
|
+
function bt(t) {
|
|
544
|
+
return !!(t.sorter && O(t));
|
|
485
545
|
}
|
|
486
|
-
const
|
|
546
|
+
const fe = {
|
|
487
547
|
width: "100%",
|
|
488
548
|
minWidth: "100%"
|
|
489
|
-
},
|
|
549
|
+
}, Rt = {
|
|
490
550
|
thSortable: e.thSortable,
|
|
491
551
|
thSorted: e.thSorted,
|
|
492
552
|
tdSorted: e.tdSorted,
|
|
@@ -563,113 +623,114 @@ const Ol = /* @__PURE__ */ Et({
|
|
|
563
623
|
resizeHandle: e.resizeHandle,
|
|
564
624
|
tdRowHover: e.tdRowHover,
|
|
565
625
|
tdRowSelectedHover: e.tdRowSelectedHover
|
|
566
|
-
},
|
|
567
|
-
return
|
|
626
|
+
}, me = n(() => il(v.value)), pe = T(!1);
|
|
627
|
+
return ye(al, {
|
|
568
628
|
bodyCell: d.bodyCell,
|
|
569
629
|
headerCell: d.headerCell,
|
|
570
630
|
empty: d.empty,
|
|
571
|
-
getSortOrder:
|
|
572
|
-
toggleSortOrder:
|
|
573
|
-
isColumnSorted:
|
|
574
|
-
getFilteredValue:
|
|
575
|
-
confirmFilter:
|
|
576
|
-
resetFilter:
|
|
631
|
+
getSortOrder: O,
|
|
632
|
+
toggleSortOrder: Be,
|
|
633
|
+
isColumnSorted: bt,
|
|
634
|
+
getFilteredValue: Pe,
|
|
635
|
+
confirmFilter: ze,
|
|
636
|
+
resetFilter: Ae,
|
|
577
637
|
customFilterDropdown: d.customFilterDropdown,
|
|
578
638
|
customFilterIcon: d.customFilterIcon,
|
|
579
|
-
showSorterTooltip: n(() => l.showSorterTooltip ??
|
|
639
|
+
showSorterTooltip: n(() => l.showSorterTooltip ?? me.value.showSorterTooltip),
|
|
580
640
|
headerEllipsis: n(() => l.headerEllipsis),
|
|
581
|
-
subThemeSlots:
|
|
582
|
-
presetConfig:
|
|
583
|
-
themePreset:
|
|
641
|
+
subThemeSlots: Rt,
|
|
642
|
+
presetConfig: me,
|
|
643
|
+
themePreset: v,
|
|
584
644
|
cssMode: w,
|
|
585
|
-
classPrefix:
|
|
586
|
-
vtgClass: (t) =>
|
|
587
|
-
|
|
588
|
-
|
|
645
|
+
classPrefix: C,
|
|
646
|
+
vtgClass: (t) => H(t, w.value, C.value),
|
|
647
|
+
compatClass: V,
|
|
648
|
+
localeName: N,
|
|
649
|
+
locale: Le,
|
|
589
650
|
rowSelection: () => l.rowSelection,
|
|
590
|
-
isSelected:
|
|
591
|
-
isDisabledRow:
|
|
592
|
-
getSelectionState:
|
|
593
|
-
toggleRow:
|
|
594
|
-
toggleAll:
|
|
595
|
-
allCheckedState: () =>
|
|
596
|
-
getRowKey:
|
|
597
|
-
invertSelection:
|
|
598
|
-
clearSelection:
|
|
599
|
-
getChangeableRowKeys:
|
|
600
|
-
fixedOffsets:
|
|
601
|
-
scrollState:
|
|
602
|
-
leafColumnCount: n(() =>
|
|
651
|
+
isSelected: Ue,
|
|
652
|
+
isDisabledRow: Ge,
|
|
653
|
+
getSelectionState: Ye,
|
|
654
|
+
toggleRow: Xe,
|
|
655
|
+
toggleAll: $e,
|
|
656
|
+
allCheckedState: () => Je.value,
|
|
657
|
+
getRowKey: E,
|
|
658
|
+
invertSelection: qe,
|
|
659
|
+
clearSelection: Qe,
|
|
660
|
+
getChangeableRowKeys: Ze,
|
|
661
|
+
fixedOffsets: te,
|
|
662
|
+
scrollState: Z,
|
|
663
|
+
leafColumnCount: n(() => f.value.length),
|
|
603
664
|
bordered: n(() => l.bordered),
|
|
604
|
-
tableLayout:
|
|
665
|
+
tableLayout: ne,
|
|
605
666
|
sticky: n(() => l.sticky),
|
|
606
|
-
getRowProps:
|
|
607
|
-
getRowClassName:
|
|
608
|
-
getHeaderRowProps:
|
|
609
|
-
getColumnTitle:
|
|
667
|
+
getRowProps: xt,
|
|
668
|
+
getRowClassName: Ct,
|
|
669
|
+
getHeaderRowProps: gt,
|
|
670
|
+
getColumnTitle: St,
|
|
610
671
|
getPopupContainer: l.getPopupContainer,
|
|
611
672
|
transformCellText: l.transformCellText,
|
|
612
673
|
expandable: () => l.expandable,
|
|
613
|
-
isExpanded:
|
|
614
|
-
toggleExpand:
|
|
615
|
-
isRowExpandable:
|
|
616
|
-
columnWidths:
|
|
617
|
-
startResize:
|
|
618
|
-
isResizing: () =>
|
|
619
|
-
displayColumns: n(() =>
|
|
674
|
+
isExpanded: et,
|
|
675
|
+
toggleExpand: lt,
|
|
676
|
+
isRowExpandable: J,
|
|
677
|
+
columnWidths: se,
|
|
678
|
+
startResize: vt,
|
|
679
|
+
isResizing: () => wt.value,
|
|
680
|
+
displayColumns: n(() => f.value),
|
|
620
681
|
registerSummaryFixed: (t) => {
|
|
621
|
-
|
|
682
|
+
pe.value = t;
|
|
622
683
|
},
|
|
623
|
-
isTreeData:
|
|
624
|
-
treeFlattenData:
|
|
625
|
-
getFlattenRow: (t) =>
|
|
626
|
-
toggleTreeExpand:
|
|
627
|
-
isTreeExpanded:
|
|
628
|
-
treeIndentSize:
|
|
629
|
-
hoverRange:
|
|
630
|
-
setHoverRange:
|
|
631
|
-
clearHoverRange:
|
|
684
|
+
isTreeData: K,
|
|
685
|
+
treeFlattenData: X,
|
|
686
|
+
getFlattenRow: (t) => $.value.get(t),
|
|
687
|
+
toggleTreeExpand: We,
|
|
688
|
+
isTreeExpanded: ke,
|
|
689
|
+
treeIndentSize: _e,
|
|
690
|
+
hoverRange: Me,
|
|
691
|
+
setHoverRange: je,
|
|
692
|
+
clearHoverRange: Ve,
|
|
632
693
|
hoverable: n(() => l.hoverable !== !1)
|
|
633
694
|
}), () => {
|
|
634
695
|
let t;
|
|
635
|
-
const o = l.title ? l.title(
|
|
636
|
-
data:
|
|
637
|
-
}) : null, u = l.footer ? l.footer(
|
|
638
|
-
data:
|
|
639
|
-
}) : null, s = d.summary ? d.summary() : null, h =
|
|
640
|
-
tableLayout:
|
|
696
|
+
const o = l.title ? l.title(y.value) : d.title ? d.title({
|
|
697
|
+
data: y.value
|
|
698
|
+
}) : null, u = l.footer ? l.footer(y.value) : d.footer ? d.footer({
|
|
699
|
+
data: y.value
|
|
700
|
+
}) : null, s = d.summary ? d.summary() : null, h = pe.value !== !1, m = l.scroll, p = {
|
|
701
|
+
tableLayout: ne.value
|
|
641
702
|
};
|
|
642
|
-
|
|
643
|
-
const c = l.loading,
|
|
703
|
+
m?.x ? (p.width = typeof m.x == "number" ? `${m.x}px` : m.x, p.minWidth = "100%") : p.width = ut.value ? "max-content" : "100%";
|
|
704
|
+
const c = l.loading, Dt = c === !0 || typeof c == "object" && c !== null && c.spinning !== !1, Et = typeof c == "object" && c !== null ? c.indicator : void 0, It = typeof c == "object" && c !== null ? c.tip : void 0, ve = Dt && (d.loading ? a(Se, {
|
|
644
705
|
loadingClass: e.loading()
|
|
645
|
-
},
|
|
706
|
+
}, Re(t = d.loading()) ? t : {
|
|
646
707
|
default: () => [t]
|
|
647
|
-
}) : a(
|
|
708
|
+
}) : a(Se, {
|
|
648
709
|
loadingClass: e.loading(),
|
|
649
|
-
indicator:
|
|
650
|
-
tip:
|
|
710
|
+
indicator: Et,
|
|
711
|
+
tip: It
|
|
651
712
|
}, null));
|
|
652
|
-
if (
|
|
653
|
-
const
|
|
654
|
-
ref:
|
|
713
|
+
if (it.value) {
|
|
714
|
+
const Tt = l.showHeader !== !1 ? a("div", {
|
|
715
|
+
ref: q,
|
|
655
716
|
class: e.headerWrapper(),
|
|
656
|
-
style:
|
|
717
|
+
style: ct.value
|
|
657
718
|
}, [a("div", {
|
|
658
|
-
class:
|
|
719
|
+
class: H("block w-full min-w-full", w.value, C.value)
|
|
659
720
|
}, [a("table", {
|
|
660
721
|
class: S.value,
|
|
661
722
|
style: p
|
|
662
|
-
}, [a(
|
|
663
|
-
columns:
|
|
664
|
-
}, null), a(
|
|
665
|
-
rows:
|
|
723
|
+
}, [a(B, {
|
|
724
|
+
columns: f.value
|
|
725
|
+
}, null), a(xe, {
|
|
726
|
+
rows: W.value,
|
|
666
727
|
theadClass: e.thead(),
|
|
667
728
|
rowClass: e.tr(),
|
|
668
|
-
thClass:
|
|
729
|
+
thClass: re.value,
|
|
669
730
|
headerCellInnerClass: e.headerCellInner()
|
|
670
|
-
}, null)])])]) : null,
|
|
671
|
-
dataSource:
|
|
672
|
-
columns:
|
|
731
|
+
}, null)])])]) : null, Ht = I.value ? a(sl, {
|
|
732
|
+
dataSource: y.value,
|
|
733
|
+
columns: f.value,
|
|
673
734
|
tbodyClass: e.tbody(),
|
|
674
735
|
rowClass: e.tr(),
|
|
675
736
|
tdClass: _.value,
|
|
@@ -678,27 +739,30 @@ const Ol = /* @__PURE__ */ Et({
|
|
|
678
739
|
tableClass: S.value,
|
|
679
740
|
tableStyle: p,
|
|
680
741
|
rowKey: l.rowKey,
|
|
681
|
-
height:
|
|
682
|
-
itemHeight:
|
|
742
|
+
height: mt.value,
|
|
743
|
+
itemHeight: ft.value,
|
|
744
|
+
fixedHeight: pt.value,
|
|
745
|
+
virtualColumn: M.value,
|
|
746
|
+
columnMetrics: ce.value,
|
|
683
747
|
showScrollBar: "hover",
|
|
684
|
-
onVirtualScroll: (
|
|
685
|
-
|
|
748
|
+
onVirtualScroll: (we) => {
|
|
749
|
+
dt(we.x, we.maxX);
|
|
686
750
|
}
|
|
687
|
-
}, null) : null,
|
|
688
|
-
ref:
|
|
689
|
-
maxHeight:
|
|
751
|
+
}, null) : null, Lt = I.value ? null : a(he, {
|
|
752
|
+
ref: de,
|
|
753
|
+
maxHeight: m?.y !== void 0 ? typeof m.y == "number" ? m.y : String(m.y) : void 0,
|
|
690
754
|
wrapClass: e.bodyWrapper(),
|
|
691
|
-
viewStyle:
|
|
692
|
-
onScroll:
|
|
755
|
+
viewStyle: fe,
|
|
756
|
+
onScroll: ee
|
|
693
757
|
}, {
|
|
694
758
|
default: () => [a("table", {
|
|
695
759
|
class: S.value,
|
|
696
760
|
style: p
|
|
697
|
-
}, [a(
|
|
698
|
-
columns:
|
|
699
|
-
}, null), a(
|
|
700
|
-
dataSource:
|
|
701
|
-
columns:
|
|
761
|
+
}, [a(B, {
|
|
762
|
+
columns: f.value
|
|
763
|
+
}, null), a(ge, {
|
|
764
|
+
dataSource: y.value,
|
|
765
|
+
columns: f.value,
|
|
702
766
|
tbodyClass: e.tbody(),
|
|
703
767
|
rowClass: e.tr(),
|
|
704
768
|
tdClass: _.value,
|
|
@@ -708,48 +772,48 @@ const Ol = /* @__PURE__ */ Et({
|
|
|
708
772
|
}, null), s && !h && a("tfoot", {
|
|
709
773
|
class: e.summary()
|
|
710
774
|
}, [s])])]
|
|
711
|
-
}),
|
|
775
|
+
}), Bt = s && h ? a("div", {
|
|
712
776
|
class: e.headerWrapper(),
|
|
713
777
|
style: {
|
|
714
778
|
position: "sticky",
|
|
715
|
-
bottom: `${
|
|
779
|
+
bottom: `${R.value?.offsetSummary ?? 0}px`,
|
|
716
780
|
zIndex: "4",
|
|
717
781
|
overflow: "hidden"
|
|
718
782
|
}
|
|
719
783
|
}, [a("div", {
|
|
720
|
-
class:
|
|
784
|
+
class: H("block w-full min-w-full", w.value, C.value)
|
|
721
785
|
}, [a("table", {
|
|
722
786
|
class: S.value,
|
|
723
787
|
style: p
|
|
724
|
-
}, [a(
|
|
725
|
-
columns:
|
|
788
|
+
}, [a(B, {
|
|
789
|
+
columns: f.value
|
|
726
790
|
}, null), a("tfoot", {
|
|
727
791
|
class: e.summary()
|
|
728
792
|
}, [s])])])]) : null;
|
|
729
793
|
return a("div", {
|
|
730
|
-
class: e.root()
|
|
794
|
+
class: g(e.root(), le.value)
|
|
731
795
|
}, [o && a("div", {
|
|
732
796
|
class: e.title()
|
|
733
797
|
}, [o]), a("div", {
|
|
734
|
-
class:
|
|
735
|
-
}, [
|
|
798
|
+
class: g(e.wrapper(), R.value && H("overflow-clip", w.value, C.value))
|
|
799
|
+
}, [Tt, Ht, Lt, Bt, ve]), u && a("div", {
|
|
736
800
|
class: e.footer()
|
|
737
801
|
}, [u])]);
|
|
738
802
|
}
|
|
739
|
-
const
|
|
803
|
+
const j = a(zt, null, [a("table", {
|
|
740
804
|
class: S.value,
|
|
741
805
|
style: p
|
|
742
|
-
}, [a(
|
|
743
|
-
columns:
|
|
744
|
-
}, null), l.showHeader !== !1 && a(
|
|
745
|
-
rows:
|
|
806
|
+
}, [a(B, {
|
|
807
|
+
columns: f.value
|
|
808
|
+
}, null), l.showHeader !== !1 && a(xe, {
|
|
809
|
+
rows: W.value,
|
|
746
810
|
theadClass: e.thead(),
|
|
747
811
|
rowClass: e.tr(),
|
|
748
|
-
thClass:
|
|
812
|
+
thClass: re.value,
|
|
749
813
|
headerCellInnerClass: e.headerCellInner()
|
|
750
|
-
}, null), a(
|
|
751
|
-
dataSource:
|
|
752
|
-
columns:
|
|
814
|
+
}, null), a(ge, {
|
|
815
|
+
dataSource: y.value,
|
|
816
|
+
columns: f.value,
|
|
753
817
|
tbodyClass: e.tbody(),
|
|
754
818
|
rowClass: e.tr(),
|
|
755
819
|
tdClass: _.value,
|
|
@@ -758,18 +822,18 @@ const Ol = /* @__PURE__ */ Et({
|
|
|
758
822
|
rowKey: l.rowKey
|
|
759
823
|
}, null), s && a("tfoot", {
|
|
760
824
|
class: e.summary()
|
|
761
|
-
}, [s])]),
|
|
825
|
+
}, [s])]), ve]);
|
|
762
826
|
return a("div", {
|
|
763
|
-
class: e.root()
|
|
827
|
+
class: g(e.root(), le.value)
|
|
764
828
|
}, [o && a("div", {
|
|
765
829
|
class: e.title()
|
|
766
|
-
}, [o]), a(
|
|
767
|
-
ref:
|
|
830
|
+
}, [o]), a(he, {
|
|
831
|
+
ref: ie,
|
|
768
832
|
wrapClass: e.wrapper(),
|
|
769
|
-
viewStyle:
|
|
770
|
-
onScroll:
|
|
771
|
-
},
|
|
772
|
-
default: () => [
|
|
833
|
+
viewStyle: fe,
|
|
834
|
+
onScroll: ee
|
|
835
|
+
}, Re(j) ? j : {
|
|
836
|
+
default: () => [j]
|
|
773
837
|
}), u && a("div", {
|
|
774
838
|
class: e.footer()
|
|
775
839
|
}, [u])]);
|
|
@@ -777,5 +841,5 @@ const Ol = /* @__PURE__ */ Et({
|
|
|
777
841
|
}
|
|
778
842
|
});
|
|
779
843
|
export {
|
|
780
|
-
|
|
844
|
+
$l as default
|
|
781
845
|
};
|