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