@vtable-guild/vtable-guild 2.9.0-alpha.1 → 2.9.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/presets/antdv.css +10 -0
- package/css/presets/element-plus.css +10 -0
- package/css/style.css +138 -0
- package/css/tailwind3-utilities.css +118 -0
- package/css/tailwind3.css +20 -0
- package/css/tailwind4.css +20 -0
- package/dist/core/src/components/Button.d.ts +9 -0
- package/dist/core/src/components/Button.d.ts.map +1 -1
- package/dist/core/src/components/Button.mjs +11 -6
- package/dist/css/presets/antdv.css +10 -0
- package/dist/css/presets/element-plus.css +10 -0
- package/dist/css/style.css +138 -0
- package/dist/css/tailwind3-utilities.css +118 -0
- package/dist/css/tailwind3.css +20 -0
- package/dist/css/tailwind4.css +20 -0
- package/dist/icons/src/CheckCircleFilledIcon.d.ts +3 -0
- package/dist/icons/src/CheckCircleFilledIcon.d.ts.map +1 -0
- package/dist/icons/src/CheckCircleFilledIcon.mjs +9 -0
- package/dist/icons/src/CloseCircleFilledIcon.d.ts +3 -0
- package/dist/icons/src/CloseCircleFilledIcon.d.ts.map +1 -0
- package/dist/icons/src/CloseCircleFilledIcon.mjs +9 -0
- package/dist/icons/src/index.d.ts +2 -0
- package/dist/icons/src/index.d.ts.map +1 -1
- package/dist/index.full.mjs +6479 -5272
- package/dist/index.mjs +118 -98
- package/dist/table/src/components/Table.d.ts +3 -3
- package/dist/table/src/components/Table.d.ts.map +1 -1
- package/dist/table/src/components/Table.mjs +153 -149
- package/dist/table/src/components/TableCell.d.ts.map +1 -1
- package/dist/table/src/components/TableCell.mjs +109 -86
- package/dist/table/src/components/TableEditableCell.d.ts +29 -0
- package/dist/table/src/components/TableEditableCell.d.ts.map +1 -0
- package/dist/table/src/components/TableEditableCell.mjs +39 -0
- package/dist/table/src/components/TableEditableCell.test.d.ts +2 -0
- package/dist/table/src/components/TableEditableCell.test.d.ts.map +1 -0
- package/dist/table/src/components/TableQuery.d.ts +108 -0
- package/dist/table/src/components/TableQuery.d.ts.map +1 -0
- package/dist/table/src/components/TableQuery.mjs +244 -0
- package/dist/table/src/components/TableQuery.test.d.ts +2 -0
- package/dist/table/src/components/TableQuery.test.d.ts.map +1 -0
- package/dist/table/src/components/VTableEditCell.vue.d.ts +19 -0
- package/dist/table/src/components/VTableEditCell.vue.d.ts.map +1 -0
- package/dist/table/src/components/VTableEditCell.vue.mjs +21 -0
- package/dist/table/src/components/VTableEditCell.vue2.mjs +4 -0
- package/dist/table/src/components/VTableQuery.vue.d.ts +18 -0
- package/dist/table/src/components/VTableQuery.vue.d.ts.map +1 -0
- package/dist/table/src/components/VTableQuery.vue.mjs +64 -0
- package/dist/table/src/components/VTableQuery.vue2.mjs +4 -0
- package/dist/table/src/composables/useTableDictionary.d.ts +5 -0
- package/dist/table/src/composables/useTableDictionary.d.ts.map +1 -0
- package/dist/table/src/composables/useTableDictionary.mjs +168 -0
- package/dist/table/src/composables/useTableDictionary.test.d.ts +2 -0
- package/dist/table/src/composables/useTableDictionary.test.d.ts.map +1 -0
- package/dist/table/src/composables/useTableEdit.d.ts.map +1 -1
- package/dist/table/src/composables/useTableEdit.mjs +352 -135
- package/dist/table/src/composables/useTableEditable.d.ts +4 -0
- package/dist/table/src/composables/useTableEditable.d.ts.map +1 -0
- package/dist/table/src/composables/useTableEditable.mjs +125 -0
- package/dist/table/src/composables/useTableEditable.test.d.ts +2 -0
- package/dist/table/src/composables/useTableEditable.test.d.ts.map +1 -0
- package/dist/table/src/composables/useTableQuery.d.ts.map +1 -1
- package/dist/table/src/composables/useTableQuery.mjs +33 -33
- package/dist/table/src/composables/useTableRequest.d.ts.map +1 -1
- package/dist/table/src/composables/useTableRequest.mjs +138 -97
- package/dist/table/src/composables/useTableRequest.polling.test.d.ts +2 -0
- package/dist/table/src/composables/useTableRequest.polling.test.d.ts.map +1 -0
- package/dist/table/src/context.d.ts +4 -0
- package/dist/table/src/context.d.ts.map +1 -1
- package/dist/table/src/controls.d.ts +4 -0
- package/dist/table/src/controls.d.ts.map +1 -0
- package/dist/table/src/controls.mjs +97 -0
- package/dist/table/src/controls.test.d.ts +2 -0
- package/dist/table/src/controls.test.d.ts.map +1 -0
- package/dist/table/src/index.d.ts +10 -0
- package/dist/table/src/index.d.ts.map +1 -1
- package/dist/table/src/renderers.d.ts.map +1 -1
- package/dist/table/src/renderers.mjs +88 -23
- package/dist/table/src/review-current.repro.test.d.ts +2 -0
- package/dist/table/src/review-current.repro.test.d.ts.map +1 -0
- package/dist/table/src/types/column.d.ts +4 -1
- package/dist/table/src/types/column.d.ts.map +1 -1
- package/dist/table/src/types/controls.d.ts +31 -0
- package/dist/table/src/types/controls.d.ts.map +1 -0
- package/dist/table/src/types/dictionary.d.ts +71 -0
- package/dist/table/src/types/dictionary.d.ts.map +1 -0
- package/dist/table/src/types/dictionary.typecheck.d.ts +6 -0
- package/dist/table/src/types/dictionary.typecheck.d.ts.map +1 -0
- package/dist/table/src/types/editable.d.ts +49 -0
- package/dist/table/src/types/editable.d.ts.map +1 -0
- package/dist/table/src/types/editable.typecheck.d.ts +15 -0
- package/dist/table/src/types/editable.typecheck.d.ts.map +1 -0
- package/dist/table/src/types/editing.d.ts +41 -4
- package/dist/table/src/types/editing.d.ts.map +1 -1
- package/dist/table/src/types/editing.typecheck.d.ts.map +1 -1
- package/dist/table/src/types/index.d.ts +4 -0
- package/dist/table/src/types/index.d.ts.map +1 -1
- package/dist/table/src/types/query-form.d.ts +90 -0
- package/dist/table/src/types/query-form.d.ts.map +1 -0
- package/dist/table/src/types/query-form.typecheck.d.ts +10 -0
- package/dist/table/src/types/query-form.typecheck.d.ts.map +1 -0
- package/dist/table/src/types/query.d.ts +6 -2
- package/dist/table/src/types/query.d.ts.map +1 -1
- package/dist/table/src/types/renderers.d.ts +15 -3
- package/dist/table/src/types/renderers.d.ts.map +1 -1
- package/dist/table/src/types/request.d.ts +20 -2
- package/dist/table/src/types/request.d.ts.map +1 -1
- package/dist/table/src/types/request.typecheck.d.ts.map +1 -1
- package/dist/table/src/utils/cell.d.ts +3 -2
- package/dist/table/src/utils/cell.d.ts.map +1 -1
- package/dist/table/src/utils/cell.mjs +45 -44
- package/dist/table/src/utils/fieldPath.d.ts +6 -0
- package/dist/table/src/utils/fieldPath.d.ts.map +1 -0
- package/dist/table/src/utils/fieldPath.mjs +29 -0
- package/dist/table/src/utils/queryFields.d.ts +4 -0
- package/dist/table/src/utils/queryFields.d.ts.map +1 -0
- package/dist/table/src/utils/queryFields.mjs +31 -0
- package/dist/table/src/utils/queryFields.test.d.ts +2 -0
- package/dist/table/src/utils/queryFields.test.d.ts.map +1 -0
- package/dist/table/src/utils/stateEqual.d.ts +3 -0
- package/dist/table/src/utils/stateEqual.d.ts.map +1 -0
- package/dist/table/src/utils/stateEqual.mjs +15 -0
- package/dist/theme/src/index.d.ts +4 -0
- package/dist/theme/src/index.d.ts.map +1 -1
- package/dist/theme/src/presets/antdv/table.d.ts +7 -0
- package/dist/theme/src/presets/antdv/table.d.ts.map +1 -1
- package/dist/theme/src/presets/antdv/table.mjs +7 -0
- package/dist/theme/src/presets/element-plus/table.d.ts +7 -0
- package/dist/theme/src/presets/element-plus/table.d.ts.map +1 -1
- package/dist/theme/src/presets/element-plus/table.mjs +7 -0
- package/dist/theme/src/query.d.ts +128 -0
- package/dist/theme/src/query.d.ts.map +1 -0
- package/dist/theme/src/query.mjs +56 -0
- package/dist/vtable-guild/src/augment.d.ts +2 -1
- package/dist/vtable-guild/src/augment.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { defineComponent as ul, ref as S, watch as I, onBeforeUnmount as ye, computed as
|
|
1
|
+
import { defineComponent as ul, ref as S, watch as I, onBeforeUnmount as ye, computed as n, inject as sl, provide as Ge, onMounted as Xe, createVNode as r, Fragment as cl, nextTick as qe, isVNode as fl } from "vue";
|
|
2
2
|
import { isManual as he } from "../utils/manual.mjs";
|
|
3
3
|
import "../../../core/src/utils/tv.mjs";
|
|
4
4
|
import { prefixThemeConfig as ml, prefixVtgClassNames as J } from "../../../core/src/utils/classPrefix.mjs";
|
|
5
5
|
import { devWarn as vl } from "../../../core/src/utils/devWarn.mjs";
|
|
6
|
-
import { mergeThemeConfigs as
|
|
6
|
+
import { mergeThemeConfigs as k, useTheme as pl } from "../../../core/src/composables/useTheme.mjs";
|
|
7
7
|
import { mergeDeep as Z } from "../../../core/src/utils/mergeDeep.mjs";
|
|
8
8
|
import Je from "../../../core/src/components/Scrollbar.mjs";
|
|
9
9
|
import { VTABLE_GUILD_INJECTION_KEY as Ze } from "../../../core/src/plugin/index.mjs";
|
|
10
10
|
import { paginationZhCN as gl } from "../../../theme/src/pagination.mjs";
|
|
11
|
-
import { resolveTooltipThemePreset as yl, resolveScrollbarThemePreset as hl, resolveRadioThemePreset as wl, resolveInputThemePreset as Cl, resolveCheckboxThemePreset as xl, resolveButtonThemePreset as bl, resolveTableThemePreset as Sl, resolveTableLocalePreset as Dl, resolveBuiltInTableLocale as
|
|
11
|
+
import { resolveTooltipThemePreset as yl, resolveScrollbarThemePreset as hl, resolveRadioThemePreset as wl, resolveInputThemePreset as Cl, resolveCheckboxThemePreset as xl, resolveButtonThemePreset as bl, resolveTableThemePreset as Sl, resolveTableLocalePreset as Dl, resolveBuiltInTableLocale as Tl, resolveBuiltInLocale as El } from "../../../theme/src/presets/index.mjs";
|
|
12
12
|
import { antdvTableCompatClasses as Rl } from "../../../theme/src/compat/antdv-table.mjs";
|
|
13
13
|
import { usePagination as Il } from "../composables/usePagination.mjs";
|
|
14
14
|
import Ll from "./TablePagination.mjs";
|
|
15
15
|
import { filterVisibleColumns as Hl, applyColumnOrder as Bl } from "../composables/useColumnDisplay.mjs";
|
|
16
16
|
import { getEllipsisConfig as Nl } from "../utils/cell.mjs";
|
|
17
17
|
import { getRootCompatClass as Fl } from "../utils/compat.mjs";
|
|
18
|
-
import { resolveRowKey as
|
|
19
|
-
import { useScroll as
|
|
20
|
-
import { useAutoHeight as
|
|
21
|
-
import { useColumnMetrics as
|
|
22
|
-
import { useColumnLayout as
|
|
23
|
-
import { resolveFixedColumnRanges as
|
|
18
|
+
import { resolveRowKey as Pl } from "../utils/rowKey.mjs";
|
|
19
|
+
import { useScroll as Ol } from "../composables/useScroll.mjs";
|
|
20
|
+
import { useAutoHeight as _l } from "../composables/useAutoHeight.mjs";
|
|
21
|
+
import { useColumnMetrics as kl } from "../composables/useColumnMetrics.mjs";
|
|
22
|
+
import { useColumnLayout as Al } from "../composables/useColumnLayout.mjs";
|
|
23
|
+
import { resolveFixedColumnRanges as Wl } from "../composables/useColumnWindow.mjs";
|
|
24
24
|
import { useExpand as zl } from "../composables/useExpand.mjs";
|
|
25
25
|
import { useResize as Kl } from "../composables/useResize.mjs";
|
|
26
26
|
import { useVirtual as Ml, INVALID_SCROLL_Y_FALLBACK as jl } from "../composables/useVirtual.mjs";
|
|
@@ -47,7 +47,7 @@ function at(l) {
|
|
|
47
47
|
return typeof l == "function" || Object.prototype.toString.call(l) === "[object Object]" && !fl(l);
|
|
48
48
|
}
|
|
49
49
|
const aa = [["xxxl", 2e3], ["xxl", 1600], ["xl", 1200], ["lg", 992], ["md", 768], ["sm", 576], ["xs", 0]];
|
|
50
|
-
function
|
|
50
|
+
function ot() {
|
|
51
51
|
if (typeof window > "u")
|
|
52
52
|
return /* @__PURE__ */ new Set(["md", "sm", "xs"]);
|
|
53
53
|
const l = window.innerWidth, d = /* @__PURE__ */ new Set();
|
|
@@ -59,7 +59,7 @@ function nt() {
|
|
|
59
59
|
l >= c && d.add(u);
|
|
60
60
|
}), d;
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function nt(l, d) {
|
|
63
63
|
return l.reduce((u, c) => {
|
|
64
64
|
if (typeof c == "symbol")
|
|
65
65
|
return u.push(c), u;
|
|
@@ -67,7 +67,7 @@ function ot(l, d) {
|
|
|
67
67
|
return u;
|
|
68
68
|
const x = c.fixed === !0 ? "left" : c.fixed;
|
|
69
69
|
if ("children" in c && Array.isArray(c.children)) {
|
|
70
|
-
const D =
|
|
70
|
+
const D = nt(c.children, d);
|
|
71
71
|
return D.length === 0 || u.push({
|
|
72
72
|
...c,
|
|
73
73
|
fixed: x,
|
|
@@ -321,21 +321,21 @@ const qa = /* @__PURE__ */ ul({
|
|
|
321
321
|
}, {
|
|
322
322
|
immediate: !0
|
|
323
323
|
}), ye(() => clearTimeout(D));
|
|
324
|
-
const we =
|
|
325
|
-
const e = h?.theme ?? {}, a =
|
|
324
|
+
const we = n(() => typeof l.loading == "object" ? l.loading?.wrapperClassName : void 0), h = sl(Ze, null), T = n(() => h?.themePreset ?? "antdv"), H = n(() => h?.cssMode ?? "prebuilt"), B = n(() => h?.classPrefix ?? "vtg"), rt = n(() => {
|
|
325
|
+
const e = h?.theme ?? {}, a = T.value, o = (i) => ml(i, H.value, B.value);
|
|
326
326
|
return {
|
|
327
327
|
...e,
|
|
328
|
-
button:
|
|
329
|
-
checkbox:
|
|
330
|
-
input:
|
|
331
|
-
radio:
|
|
332
|
-
scrollbar:
|
|
333
|
-
tooltip:
|
|
328
|
+
button: k(o(bl(a)), e.button),
|
|
329
|
+
checkbox: k(o(xl(a)), e.checkbox),
|
|
330
|
+
input: k(o(Cl(a)), e.input),
|
|
331
|
+
radio: k(o(wl(a)), e.radio),
|
|
332
|
+
scrollbar: k(o(hl(a)), e.scrollbar),
|
|
333
|
+
tooltip: k(o(yl(a)), e.tooltip)
|
|
334
334
|
};
|
|
335
335
|
});
|
|
336
336
|
Ge(Ze, {
|
|
337
337
|
get themePreset() {
|
|
338
|
-
return
|
|
338
|
+
return T.value;
|
|
339
339
|
},
|
|
340
340
|
get cssMode() {
|
|
341
341
|
return H.value;
|
|
@@ -359,39 +359,39 @@ const qa = /* @__PURE__ */ ul({
|
|
|
359
359
|
return h?.compatClass;
|
|
360
360
|
}
|
|
361
361
|
});
|
|
362
|
-
const it =
|
|
362
|
+
const it = n(() => Sl(T.value) ?? Ql), {
|
|
363
363
|
slots: t
|
|
364
364
|
} = pl("table", it, l, {
|
|
365
365
|
compatClasses: Rl
|
|
366
|
-
}),
|
|
366
|
+
}), A = h?.compatClass === !0 ? (e) => `ant-table-${e}` : void 0, W = n(() => l.locale ?? h?.locale ?? "zh-CN"), Ce = n(() => ({
|
|
367
367
|
...h?.locales ?? {},
|
|
368
368
|
...l.locales ?? {}
|
|
369
|
-
})), dt =
|
|
370
|
-
const e = Dl(
|
|
369
|
+
})), dt = n(() => {
|
|
370
|
+
const e = Dl(T.value), a = Tl(T.value, W.value), o = Ce.value[W.value]?.table, i = Z(Z(e, a), o);
|
|
371
371
|
return Z(i, Z(h?.localeOverrides?.table ?? {}, l.localeOverrides));
|
|
372
|
-
}), te = S(
|
|
372
|
+
}), te = S(ot());
|
|
373
373
|
function le() {
|
|
374
|
-
te.value =
|
|
374
|
+
te.value = ot();
|
|
375
375
|
}
|
|
376
376
|
Xe(() => {
|
|
377
377
|
le(), window.addEventListener("resize", le);
|
|
378
378
|
}), ye(() => {
|
|
379
379
|
window.removeEventListener("resize", le);
|
|
380
380
|
});
|
|
381
|
-
const xe =
|
|
381
|
+
const xe = n(() => nt(l.columns, te.value)), F = n(() => l.sticky === !0 ? {} : typeof l.sticky == "object" ? l.sticky : void 0), {
|
|
382
382
|
leafColumns: M
|
|
383
383
|
} = lt(() => xe.value), {
|
|
384
384
|
getSortOrder: ae,
|
|
385
385
|
toggleSortOrder: ut,
|
|
386
386
|
sortData: st,
|
|
387
387
|
sorterState: ct,
|
|
388
|
-
sorterResult:
|
|
388
|
+
sorterResult: oe,
|
|
389
389
|
sortColumns: ft
|
|
390
390
|
} = ea({
|
|
391
391
|
columns: () => M.value,
|
|
392
392
|
tableSortDirections: () => l.sortDirections,
|
|
393
393
|
onSorterChange(e) {
|
|
394
|
-
const a =
|
|
394
|
+
const a = ne();
|
|
395
395
|
u("change", j(), e, {
|
|
396
396
|
action: "sort",
|
|
397
397
|
currentDataSource: a,
|
|
@@ -407,11 +407,11 @@ const qa = /* @__PURE__ */ ul({
|
|
|
407
407
|
} = ta({
|
|
408
408
|
columns: () => M.value,
|
|
409
409
|
onFilterChange(e) {
|
|
410
|
-
const a =
|
|
411
|
-
u("change", e,
|
|
410
|
+
const a = ne(), o = f.resetForFilter();
|
|
411
|
+
u("change", e, oe.value, {
|
|
412
412
|
action: "filter",
|
|
413
413
|
currentDataSource: a,
|
|
414
|
-
...re(
|
|
414
|
+
...re(o)
|
|
415
415
|
}), de();
|
|
416
416
|
}
|
|
417
417
|
}), C = Yl({
|
|
@@ -422,16 +422,16 @@ const qa = /* @__PURE__ */ ul({
|
|
|
422
422
|
getRowKey: b,
|
|
423
423
|
onLoadError: (e, a) => l.onTreeLoadError?.(e, a)
|
|
424
424
|
});
|
|
425
|
-
function
|
|
425
|
+
function ne() {
|
|
426
426
|
let e = C.data.value;
|
|
427
427
|
return he(l.manual, "filter") || (e = gt(e)), he(l.manual, "sort") || (e = st(e)), e;
|
|
428
428
|
}
|
|
429
|
-
const z =
|
|
429
|
+
const z = n(() => ne()), f = Il({
|
|
430
430
|
manual: () => he(l.manual, "pagination"),
|
|
431
431
|
pagination: () => l.pagination,
|
|
432
432
|
data: () => z.value,
|
|
433
433
|
onChange(e) {
|
|
434
|
-
u("change", j(),
|
|
434
|
+
u("change", j(), oe.value, {
|
|
435
435
|
action: "paginate",
|
|
436
436
|
currentDataSource: z.value,
|
|
437
437
|
pagination: e
|
|
@@ -443,10 +443,10 @@ const qa = /* @__PURE__ */ ul({
|
|
|
443
443
|
pagination: e ?? f.state.value
|
|
444
444
|
} : {};
|
|
445
445
|
}
|
|
446
|
-
const yt =
|
|
446
|
+
const yt = n(() => ({
|
|
447
447
|
...gl,
|
|
448
|
-
...
|
|
449
|
-
...Ce.value[
|
|
448
|
+
...El(T.value, W.value)?.pagination,
|
|
449
|
+
...Ce.value[W.value]?.pagination,
|
|
450
450
|
...h?.localeOverrides?.pagination,
|
|
451
451
|
...f.config.value.locale
|
|
452
452
|
})), ie = S(null);
|
|
@@ -457,16 +457,16 @@ const qa = /* @__PURE__ */ ul({
|
|
|
457
457
|
}
|
|
458
458
|
function V(e) {
|
|
459
459
|
if (!f.enabled.value || f.state.value.total === 0) return null;
|
|
460
|
-
const
|
|
461
|
-
if (!
|
|
462
|
-
const i =
|
|
460
|
+
const o = (f.config.value.position ?? ["bottomRight"]).find((s) => s !== "none" && s.startsWith(e));
|
|
461
|
+
if (!o) return null;
|
|
462
|
+
const i = o.slice(e.length).toLowerCase();
|
|
463
463
|
return r(Ll, {
|
|
464
464
|
key: e,
|
|
465
465
|
config: f.config.value,
|
|
466
466
|
state: f.state.value,
|
|
467
467
|
locale: yt.value,
|
|
468
468
|
align: i,
|
|
469
|
-
position:
|
|
469
|
+
position: o,
|
|
470
470
|
tableSize: l.size,
|
|
471
471
|
narrow: te.value.has("xs"),
|
|
472
472
|
getPopupContainer: l.getPopupContainer,
|
|
@@ -476,8 +476,8 @@ const qa = /* @__PURE__ */ ul({
|
|
|
476
476
|
} : void 0);
|
|
477
477
|
}
|
|
478
478
|
function b(e, a) {
|
|
479
|
-
const
|
|
480
|
-
return l.rowKey === void 0 || typeof l.rowKey == "string" && l.rowKey in e,
|
|
479
|
+
const o = Pl(e, a, l.rowKey);
|
|
480
|
+
return l.rowKey === void 0 || typeof l.rowKey == "string" && l.rowKey in e, o;
|
|
481
481
|
}
|
|
482
482
|
const {
|
|
483
483
|
flattenData: ue,
|
|
@@ -501,16 +501,16 @@ const qa = /* @__PURE__ */ ul({
|
|
|
501
501
|
onExpandedRowsChange: (e) => l.onExpandedRowsChange?.(e)
|
|
502
502
|
});
|
|
503
503
|
function xt(e, a) {
|
|
504
|
-
const
|
|
505
|
-
if (C.getError(
|
|
504
|
+
const o = b(e, a);
|
|
505
|
+
if (C.getError(o)) {
|
|
506
506
|
C.load(e, a);
|
|
507
507
|
return;
|
|
508
508
|
}
|
|
509
509
|
ht(e, a);
|
|
510
510
|
}
|
|
511
511
|
I(() => l.loadData ? ue.value : void 0, (e) => {
|
|
512
|
-
e?.forEach((a,
|
|
513
|
-
a.expanded && !C.getError(b(a.record,
|
|
512
|
+
e?.forEach((a, o) => {
|
|
513
|
+
a.expanded && !C.getError(b(a.record, o)) && C.load(a.record, o);
|
|
514
514
|
});
|
|
515
515
|
}, {
|
|
516
516
|
immediate: !0
|
|
@@ -527,9 +527,9 @@ const qa = /* @__PURE__ */ ul({
|
|
|
527
527
|
onDrop(e, a) {
|
|
528
528
|
u("rowDragEnd", e, a);
|
|
529
529
|
}
|
|
530
|
-
}), g =
|
|
531
|
-
isSelected:
|
|
532
|
-
isDisabled:
|
|
530
|
+
}), g = n(() => se.value ? ue.value.map((e) => e.record) : f.pageData.value), {
|
|
531
|
+
isSelected: Tt,
|
|
532
|
+
isDisabled: Et,
|
|
533
533
|
getSelectionState: Rt,
|
|
534
534
|
toggleRow: It,
|
|
535
535
|
toggleAll: Lt,
|
|
@@ -545,15 +545,15 @@ const qa = /* @__PURE__ */ ul({
|
|
|
545
545
|
paginate: () => f.enabled.value,
|
|
546
546
|
childrenColumnName: () => l.childrenColumnName,
|
|
547
547
|
onSelectionChange() {
|
|
548
|
-
u("change", j(),
|
|
548
|
+
u("change", j(), oe.value, {
|
|
549
549
|
action: "select",
|
|
550
550
|
currentDataSource: g.value,
|
|
551
551
|
...re()
|
|
552
552
|
});
|
|
553
553
|
}
|
|
554
554
|
}), {
|
|
555
|
-
isExpanded:
|
|
556
|
-
toggleExpand:
|
|
555
|
+
isExpanded: Pt,
|
|
556
|
+
toggleExpand: Ot
|
|
557
557
|
} = zl({
|
|
558
558
|
expandable: () => l.expandable,
|
|
559
559
|
getRowKey: b,
|
|
@@ -563,11 +563,11 @@ const qa = /* @__PURE__ */ ul({
|
|
|
563
563
|
}), Se = (e) => {
|
|
564
564
|
const a = l.expandable;
|
|
565
565
|
return a ? a.rowExpandable ? a.rowExpandable(e) : !!a.expandedRowRender : !1;
|
|
566
|
-
},
|
|
567
|
-
Se(e) &&
|
|
568
|
-
}, De = "__vtg_selection__",
|
|
569
|
-
const e = l.expandable, a = l.rowSelection,
|
|
570
|
-
key:
|
|
566
|
+
}, _t = (e, a) => {
|
|
567
|
+
Se(e) && Ot(e, a);
|
|
568
|
+
}, De = "__vtg_selection__", Te = "__vtg_expand__", kt = n(() => {
|
|
569
|
+
const e = l.expandable, a = l.rowSelection, o = e && e.showExpandColumn !== !1 ? {
|
|
570
|
+
key: Te,
|
|
571
571
|
title: () => d.expandColumnTitle?.() ?? e.columnTitle ?? "",
|
|
572
572
|
width: e.columnWidth ?? 48,
|
|
573
573
|
align: "center",
|
|
@@ -582,7 +582,7 @@ const qa = /* @__PURE__ */ ul({
|
|
|
582
582
|
let p = !1, y = !1;
|
|
583
583
|
for (const w of s) {
|
|
584
584
|
if (w === Xl) {
|
|
585
|
-
|
|
585
|
+
o && !p && (m.push(o), p = !0);
|
|
586
586
|
continue;
|
|
587
587
|
}
|
|
588
588
|
if (w === ql) {
|
|
@@ -591,17 +591,17 @@ const qa = /* @__PURE__ */ ul({
|
|
|
591
591
|
}
|
|
592
592
|
m.push(w);
|
|
593
593
|
}
|
|
594
|
-
if (i && !y && m.unshift(i),
|
|
594
|
+
if (i && !y && m.unshift(i), o && !p) {
|
|
595
595
|
const w = e?.expandIconColumnIndex;
|
|
596
|
-
m.splice(typeof w == "number" && Number.isFinite(w) ? Math.min(m.length, Math.max(0, Math.floor(w)) + (i ? 1 : 0)) : i ? 1 : 0, 0,
|
|
596
|
+
m.splice(typeof w == "number" && Number.isFinite(w) ? Math.min(m.length, Math.max(0, Math.floor(w)) + (i ? 1 : 0)) : i ? 1 : 0, 0, o);
|
|
597
597
|
}
|
|
598
|
-
return Bl(m, l.columnOrder, [De,
|
|
598
|
+
return Bl(m, l.columnOrder, [De, Te]);
|
|
599
599
|
}), {
|
|
600
600
|
leafColumns: v,
|
|
601
601
|
headerRows: ce
|
|
602
|
-
} = lt(() =>
|
|
602
|
+
} = lt(() => kt.value), At = n(() => ce.value.length > 1), {
|
|
603
603
|
columnWidths: $,
|
|
604
|
-
startResize:
|
|
604
|
+
startResize: Wt,
|
|
605
605
|
isResizing: zt
|
|
606
606
|
} = Kl({
|
|
607
607
|
columns: () => v.value,
|
|
@@ -611,55 +611,55 @@ const qa = /* @__PURE__ */ ul({
|
|
|
611
611
|
}), {
|
|
612
612
|
headerWrapRef: U,
|
|
613
613
|
bodyWrapRef: N,
|
|
614
|
-
scrollState:
|
|
614
|
+
scrollState: Ee,
|
|
615
615
|
handleBodyScroll: Re,
|
|
616
616
|
fixedOffsets: Ie,
|
|
617
617
|
syncHorizontalScroll: Kt,
|
|
618
618
|
updateScrollState: Le
|
|
619
|
-
} =
|
|
619
|
+
} = Ol({
|
|
620
620
|
displayColumns: () => v.value,
|
|
621
621
|
columnWidths: $,
|
|
622
|
-
layoutWidths: () =>
|
|
622
|
+
layoutWidths: () => E.metrics.value?.widths,
|
|
623
623
|
syncElements: () => q.value ? [q.value] : []
|
|
624
|
-
}), He =
|
|
625
|
-
compatClass:
|
|
624
|
+
}), He = n(() => Fl({
|
|
625
|
+
compatClass: A,
|
|
626
626
|
fixedOffsets: Ie,
|
|
627
|
-
scrollState:
|
|
627
|
+
scrollState: Ee,
|
|
628
628
|
empty: g.value.length === 0,
|
|
629
629
|
fixedHeader: l.scroll?.y !== void 0,
|
|
630
630
|
fixedColumn: Fe.value && Ne.value,
|
|
631
631
|
horizontalScroll: Fe.value,
|
|
632
632
|
layoutFixed: X.value === "fixed"
|
|
633
|
-
})), G =
|
|
633
|
+
})), G = n(() => l.scroll?.y === "auto"), Be = n(() => !!l.scroll?.y || l.showHeader !== !1 && !!l.sticky), Ne = n(() => v.value.some((e) => e.fixed === "left" || e.fixed === "right")), Fe = n(() => l.scroll?.x !== void 0 || E.overflow.value || !!l.expandable?.fixed), Mt = n(() => M.value.some((e) => Nl(e).enabled)), X = n(() => l.tableLayout ? l.tableLayout : l.scroll?.y || l.scroll?.x || Ne.value || Mt.value ? "fixed" : "auto"), jt = n(() => {
|
|
634
634
|
if (F.value)
|
|
635
635
|
return {
|
|
636
636
|
position: "sticky",
|
|
637
637
|
top: `${F.value.offsetHeader ?? 0}px`,
|
|
638
638
|
zIndex: "4"
|
|
639
639
|
};
|
|
640
|
-
}),
|
|
640
|
+
}), Pe = S(null), q = S(null), P = S(null), E = Al({
|
|
641
641
|
columns: () => v.value,
|
|
642
642
|
columnWidths: $,
|
|
643
643
|
layout: () => X.value,
|
|
644
644
|
split: () => Be.value,
|
|
645
|
-
root: () =>
|
|
646
|
-
viewport: () =>
|
|
645
|
+
root: () => P.value,
|
|
646
|
+
viewport: () => P.value?.contains(N.value) ? N.value : U.value ?? P.value,
|
|
647
647
|
scrollX: () => l.scroll?.x,
|
|
648
648
|
onMeasure: () => {
|
|
649
649
|
R.value || Le();
|
|
650
650
|
}
|
|
651
651
|
}), {
|
|
652
|
-
bodyHeight:
|
|
653
|
-
} =
|
|
652
|
+
bodyHeight: Oe
|
|
653
|
+
} = _l({
|
|
654
654
|
enabled: () => G.value,
|
|
655
|
-
wrapperEl: () =>
|
|
655
|
+
wrapperEl: () => Pe.value,
|
|
656
656
|
headerEl: () => U.value,
|
|
657
657
|
summaryEl: () => q.value,
|
|
658
658
|
hasData: () => g.value.length > 0
|
|
659
|
-
}), Vt =
|
|
659
|
+
}), Vt = n(() => {
|
|
660
660
|
const e = l.scroll?.y;
|
|
661
661
|
if (e !== void 0)
|
|
662
|
-
return G.value ?
|
|
662
|
+
return G.value ? Oe.value : typeof e == "number" ? Number.isFinite(e) && e > 0 ? e : void 0 : e;
|
|
663
663
|
}), {
|
|
664
664
|
enabled: R,
|
|
665
665
|
itemHeight: Yt,
|
|
@@ -671,8 +671,8 @@ const qa = /* @__PURE__ */ ul({
|
|
|
671
671
|
scrollY: () => l.scroll?.y,
|
|
672
672
|
size: () => l.size,
|
|
673
673
|
rowHeight: () => l.rowHeight,
|
|
674
|
-
measuredHeight: () =>
|
|
675
|
-
}),
|
|
674
|
+
measuredHeight: () => Oe.value
|
|
675
|
+
}), _e = n(() => M.value.some((e) => !!e.customCell || !!e.customRender)), fe = n(() => !At.value || l.bordered ? {
|
|
676
676
|
table: "",
|
|
677
677
|
th: "",
|
|
678
678
|
td: ""
|
|
@@ -680,19 +680,19 @@ const qa = /* @__PURE__ */ ul({
|
|
|
680
680
|
table: t.groupedHeaderTable(),
|
|
681
681
|
th: t.groupedHeaderTh(),
|
|
682
682
|
td: t.groupedHeaderTd()
|
|
683
|
-
}), K =
|
|
684
|
-
I([R,
|
|
683
|
+
}), K = n(() => L(t.table(), fe.value.table) ?? ""), ke = n(() => E.enabled.value ? t.widthLayoutCell() : void 0), Ae = n(() => L(t.th(), fe.value.th, ke.value) ?? ""), me = n(() => L(t.td(), fe.value.td, ke.value) ?? "");
|
|
684
|
+
I([R, _e], ([e, a]) => {
|
|
685
685
|
}, {
|
|
686
686
|
immediate: !0
|
|
687
687
|
}), I([() => l.virtual, Gt], ([e, a]) => {
|
|
688
688
|
if (!e) return;
|
|
689
|
-
const
|
|
690
|
-
a.kind === "compat-px" ? vl("vtable-scroll-y-compat-px", `[VTable] virtual 模式下字符串 scroll.y(${
|
|
689
|
+
const o = String(l.scroll?.y);
|
|
690
|
+
a.kind === "compat-px" ? vl("vtable-scroll-y-compat-px", `[VTable] virtual 模式下字符串 scroll.y(${o})按 ${a.value}px 解析,这是兼容行为;请改用数字或 'auto'。`) : a.kind === "invalid-string" || a.kind === "invalid-number" && l.scroll?.y && `${jl}`;
|
|
691
691
|
}, {
|
|
692
692
|
immediate: !0
|
|
693
693
|
});
|
|
694
|
-
const
|
|
695
|
-
I(() =>
|
|
694
|
+
const We = S(null), ze = S(null);
|
|
695
|
+
I(() => We.value?.wrapRef, (e) => {
|
|
696
696
|
e && (N.value = e);
|
|
697
697
|
}), I(() => ze.value?.wrapRef, (e) => {
|
|
698
698
|
e && (N.value = e);
|
|
@@ -724,38 +724,38 @@ const qa = /* @__PURE__ */ ul({
|
|
|
724
724
|
align: e.align ?? "top",
|
|
725
725
|
offset: e.offset
|
|
726
726
|
}) ?? !1;
|
|
727
|
-
const
|
|
728
|
-
if (!
|
|
727
|
+
const o = N.value;
|
|
728
|
+
if (!o || !P.value?.contains(o)) return !1;
|
|
729
729
|
let i = e.top;
|
|
730
730
|
if (a !== void 0) {
|
|
731
|
-
const s =
|
|
731
|
+
const s = o.querySelector(`[data-vtg-row-index="${a}"]`);
|
|
732
732
|
if (!s) return !1;
|
|
733
|
-
const m = s.getBoundingClientRect(), p =
|
|
734
|
-
|
|
733
|
+
const m = s.getBoundingClientRect(), p = o.getBoundingClientRect(), y = m.top - p.top + o.scrollTop - o.clientTop, w = y + m.height, O = e.offset ?? 0, _ = e.align ?? "top";
|
|
734
|
+
_ === "top" || _ === "auto" && y < o.scrollTop + O ? i = y - O : _ === "bottom" || _ === "auto" && w > o.scrollTop + o.clientHeight - O ? i = w - o.clientHeight + O : i = void 0;
|
|
735
735
|
}
|
|
736
|
-
return i !== void 0 && (
|
|
736
|
+
return i !== void 0 && (o.scrollTop = Math.max(0, Math.min(i, o.scrollHeight - o.clientHeight))), e.left !== void 0 && (o.scrollLeft = Math.max(0, Math.min(e.left, o.scrollWidth - o.clientWidth))), Le(), !0;
|
|
737
737
|
}
|
|
738
738
|
c({
|
|
739
739
|
scrollTo: Xt,
|
|
740
740
|
retryTreeLoad: C.retry,
|
|
741
741
|
getTreeLoadError: C.getError
|
|
742
742
|
});
|
|
743
|
-
const qt =
|
|
743
|
+
const qt = n(() => Wl(v.value)), Ke = n(() => l.virtualColumn ? R.value ? _e.value ? "列上有 customCell / customRender,可能返回 colSpan / rowSpan;单元格合并会让某个 td 缺席,进而破坏列宽不变量(虚拟模式本就不支持合并)" : qt.value.contiguous ? null : "固定列必须分列两端:左固定连成前缀、右固定连成后缀,中间夹着的固定列会被窗口跳过" : "它只作用于虚拟表体,需要同时开启 virtual 与 scroll.y" : null), pe = n(() => l.virtualColumn && Ke.value === null);
|
|
744
744
|
I(Ke, (e) => {
|
|
745
745
|
}, {
|
|
746
746
|
immediate: !0
|
|
747
747
|
});
|
|
748
748
|
const {
|
|
749
749
|
metrics: Jt
|
|
750
|
-
} =
|
|
751
|
-
enabled: () => pe.value && !
|
|
750
|
+
} = kl({
|
|
751
|
+
enabled: () => pe.value && !E.enabled.value,
|
|
752
752
|
headerEl: () => U.value,
|
|
753
753
|
columns: () => v.value,
|
|
754
754
|
columnWidths: $,
|
|
755
755
|
hasHeader: () => l.showHeader !== !1
|
|
756
|
-
}), Me =
|
|
756
|
+
}), Me = n(() => E.metrics.value ?? Jt.value);
|
|
757
757
|
I([pe, Me], ([e, a]) => {
|
|
758
|
-
!e || a || l.showHeader !== !1 ||
|
|
758
|
+
!e || a || l.showHeader !== !1 || E.enabled.value;
|
|
759
759
|
}, {
|
|
760
760
|
immediate: !0
|
|
761
761
|
});
|
|
@@ -774,11 +774,11 @@ const qa = /* @__PURE__ */ ul({
|
|
|
774
774
|
function ll(e) {
|
|
775
775
|
if (typeof e.title != "function")
|
|
776
776
|
return e.title ?? "";
|
|
777
|
-
const a = e,
|
|
777
|
+
const a = e, o = ft.value.filter((i) => !!i.column);
|
|
778
778
|
return e.title({
|
|
779
779
|
sortOrder: a.sorter ? ae(a) ?? void 0 : void 0,
|
|
780
780
|
sortColumn: ct.value.column,
|
|
781
|
-
sortColumns:
|
|
781
|
+
sortColumns: o.length > 0 ? o : void 0,
|
|
782
782
|
filters: j()
|
|
783
783
|
});
|
|
784
784
|
}
|
|
@@ -788,7 +788,7 @@ const qa = /* @__PURE__ */ ul({
|
|
|
788
788
|
const je = {
|
|
789
789
|
width: "100%",
|
|
790
790
|
minWidth: "100%"
|
|
791
|
-
},
|
|
791
|
+
}, ol = {
|
|
792
792
|
widthConstraintCell: t.widthConstraintCell,
|
|
793
793
|
widthConstraintInner: t.widthConstraintInner,
|
|
794
794
|
widthLayoutCell: t.widthLayoutCell,
|
|
@@ -805,6 +805,10 @@ const qa = /* @__PURE__ */ ul({
|
|
|
805
805
|
copyButton: t.copyButton,
|
|
806
806
|
cellStatus: t.cellStatus,
|
|
807
807
|
cellTag: t.cellTag,
|
|
808
|
+
cellProgress: t.cellProgress,
|
|
809
|
+
cellProgressTrack: t.cellProgressTrack,
|
|
810
|
+
cellProgressBar: t.cellProgressBar,
|
|
811
|
+
cellProgressText: t.cellProgressText,
|
|
808
812
|
filterIconWrapper: t.filterIconWrapper,
|
|
809
813
|
filterIcon: t.filterIcon,
|
|
810
814
|
filterDropdown: t.filterDropdown,
|
|
@@ -878,12 +882,12 @@ const qa = /* @__PURE__ */ ul({
|
|
|
878
882
|
trDragging: t.trDragging,
|
|
879
883
|
trDropAbove: t.trDropAbove,
|
|
880
884
|
trDropBelow: t.trDropBelow
|
|
881
|
-
}, Ve =
|
|
885
|
+
}, Ve = n(() => Jl(T.value)), Ye = S(!1);
|
|
882
886
|
return Ge(Gl, {
|
|
883
|
-
renderers:
|
|
887
|
+
renderers: n(() => l.renderers),
|
|
884
888
|
isTreeLoading: C.isLoading,
|
|
885
889
|
getTreeLoadError: C.getError,
|
|
886
|
-
columnLayout:
|
|
890
|
+
columnLayout: E,
|
|
887
891
|
bodyCell: d.bodyCell,
|
|
888
892
|
headerCell: d.headerCell,
|
|
889
893
|
empty: d.empty,
|
|
@@ -895,20 +899,20 @@ const qa = /* @__PURE__ */ ul({
|
|
|
895
899
|
resetFilter: pt,
|
|
896
900
|
customFilterDropdown: d.customFilterDropdown,
|
|
897
901
|
customFilterIcon: d.customFilterIcon,
|
|
898
|
-
showSorterTooltip:
|
|
899
|
-
headerEllipsis:
|
|
900
|
-
subThemeSlots:
|
|
902
|
+
showSorterTooltip: n(() => l.showSorterTooltip ?? Ve.value.showSorterTooltip),
|
|
903
|
+
headerEllipsis: n(() => l.headerEllipsis),
|
|
904
|
+
subThemeSlots: ol,
|
|
901
905
|
presetConfig: Ve,
|
|
902
|
-
themePreset:
|
|
906
|
+
themePreset: T,
|
|
903
907
|
cssMode: H,
|
|
904
908
|
classPrefix: B,
|
|
905
909
|
vtgClass: (e) => J(e, H.value, B.value),
|
|
906
|
-
compatClass:
|
|
907
|
-
localeName:
|
|
910
|
+
compatClass: A,
|
|
911
|
+
localeName: W,
|
|
908
912
|
locale: dt,
|
|
909
913
|
rowSelection: () => l.rowSelection,
|
|
910
|
-
isSelected:
|
|
911
|
-
isDisabledRow:
|
|
914
|
+
isSelected: Tt,
|
|
915
|
+
isDisabledRow: Et,
|
|
912
916
|
getSelectionState: Rt,
|
|
913
917
|
toggleRow: It,
|
|
914
918
|
toggleAll: Lt,
|
|
@@ -918,37 +922,37 @@ const qa = /* @__PURE__ */ ul({
|
|
|
918
922
|
clearSelection: Nt,
|
|
919
923
|
getChangeableRowKeys: Ft,
|
|
920
924
|
fixedOffsets: Ie,
|
|
921
|
-
scrollState:
|
|
922
|
-
leafColumnCount:
|
|
923
|
-
bordered:
|
|
925
|
+
scrollState: Ee,
|
|
926
|
+
leafColumnCount: n(() => v.value.length),
|
|
927
|
+
bordered: n(() => l.bordered),
|
|
924
928
|
tableLayout: X,
|
|
925
|
-
sticky:
|
|
929
|
+
sticky: n(() => l.sticky),
|
|
926
930
|
getRowProps: el,
|
|
927
931
|
getRowClassName: Qt,
|
|
928
932
|
getHeaderRowProps: tl,
|
|
929
933
|
getColumnTitle: ll,
|
|
930
934
|
getPopupContainer: l.getPopupContainer,
|
|
931
935
|
transformCellText: l.transformCellText,
|
|
932
|
-
columnEmptyText:
|
|
936
|
+
columnEmptyText: n(() => l.columnEmptyText),
|
|
933
937
|
expandable: () => l.expandable,
|
|
934
|
-
isExpanded:
|
|
935
|
-
toggleExpand:
|
|
938
|
+
isExpanded: Pt,
|
|
939
|
+
toggleExpand: _t,
|
|
936
940
|
isRowExpandable: Se,
|
|
937
941
|
columnWidths: $,
|
|
938
|
-
startResize:
|
|
942
|
+
startResize: Wt,
|
|
939
943
|
isResizing: () => zt.value,
|
|
940
|
-
displayColumns:
|
|
944
|
+
displayColumns: n(() => v.value),
|
|
941
945
|
registerSummaryFixed: (e) => {
|
|
942
946
|
Ye.value = e;
|
|
943
947
|
},
|
|
944
948
|
isTreeData: se,
|
|
945
|
-
treeIndentColumnIndex:
|
|
946
|
-
const e = v.value.map((
|
|
947
|
-
column:
|
|
949
|
+
treeIndentColumnIndex: n(() => {
|
|
950
|
+
const e = v.value.map((o, i) => ({
|
|
951
|
+
column: o,
|
|
948
952
|
index: i
|
|
949
953
|
})).filter(({
|
|
950
|
-
column:
|
|
951
|
-
}) =>
|
|
954
|
+
column: o
|
|
955
|
+
}) => o.key !== "__vtg_selection__" && o.key !== "__vtg_expand__"), a = l.expandable?.expandIconColumnIndex ?? 0;
|
|
952
956
|
return e[Math.max(0, Math.min(e.length - 1, Math.floor(Number.isFinite(a) ? a : 0)))]?.index ?? -1;
|
|
953
957
|
}),
|
|
954
958
|
treeFlattenData: ue,
|
|
@@ -960,36 +964,36 @@ const qa = /* @__PURE__ */ ul({
|
|
|
960
964
|
setHoverRange: St,
|
|
961
965
|
clearHoverRange: Dt,
|
|
962
966
|
// 拖拽期间抑制 hover 高亮,避免干扰拖放指示线
|
|
963
|
-
hoverable:
|
|
967
|
+
hoverable: n(() => l.hoverable !== !1 && Y.draggingKey.value === null),
|
|
964
968
|
rowDrag: {
|
|
965
|
-
enabled:
|
|
969
|
+
enabled: n(() => l.rowDraggable === !0),
|
|
966
970
|
draggingKey: Y.draggingKey,
|
|
967
971
|
dropTarget: Y.dropTarget,
|
|
968
|
-
getBindings: (e, a,
|
|
972
|
+
getBindings: (e, a, o) => Y.getBindings(e, a, o)
|
|
969
973
|
}
|
|
970
974
|
}), () => {
|
|
971
975
|
let e;
|
|
972
976
|
const a = l.title ? l.title(g.value) : d.title ? d.title({
|
|
973
977
|
data: g.value
|
|
974
|
-
}) : null,
|
|
978
|
+
}) : null, o = l.footer ? l.footer(g.value) : d.footer ? d.footer({
|
|
975
979
|
data: g.value
|
|
976
980
|
}) : null, i = d.summary ? d.summary() : null, s = Ye.value !== !1, m = l.scroll, p = {
|
|
977
981
|
tableLayout: X.value
|
|
978
982
|
};
|
|
979
|
-
m?.x ? (p.width = typeof m.x == "number" ? `${m.x}px` : m.x, p.minWidth = "100%") : p.width = "100%", Object.assign(p,
|
|
980
|
-
const y = l.loading, w = x.value,
|
|
983
|
+
m?.x ? (p.width = typeof m.x == "number" ? `${m.x}px` : m.x, p.minWidth = "100%") : p.width = "100%", Object.assign(p, E.tableStyle.value);
|
|
984
|
+
const y = l.loading, w = x.value, O = typeof y == "object" && y !== null ? y.indicator : void 0, _ = typeof y == "object" && y !== null ? y.tip : void 0, $e = w && (d.loading ? r(tt, {
|
|
981
985
|
loadingClass: t.loading()
|
|
982
986
|
}, at(e = d.loading()) ? e : {
|
|
983
987
|
default: () => [e]
|
|
984
988
|
}) : r(tt, {
|
|
985
989
|
loadingClass: t.loading(),
|
|
986
|
-
indicator:
|
|
987
|
-
tip:
|
|
990
|
+
indicator: O,
|
|
991
|
+
tip: _
|
|
988
992
|
}, null));
|
|
989
993
|
if (Be.value) {
|
|
990
|
-
const
|
|
994
|
+
const nl = l.showHeader !== !1 ? r("div", {
|
|
991
995
|
ref: U,
|
|
992
|
-
class: L(t.headerWrapper(), F.value &&
|
|
996
|
+
class: L(t.headerWrapper(), F.value && A?.("sticky-holder")),
|
|
993
997
|
style: jt.value
|
|
994
998
|
}, [r("div", {
|
|
995
999
|
class: J("block w-full min-w-full", H.value, B.value)
|
|
@@ -1003,7 +1007,7 @@ const qa = /* @__PURE__ */ ul({
|
|
|
1003
1007
|
rows: ce.value,
|
|
1004
1008
|
theadClass: t.thead(),
|
|
1005
1009
|
rowClass: t.tr(),
|
|
1006
|
-
thClass:
|
|
1010
|
+
thClass: Ae.value,
|
|
1007
1011
|
headerCellInnerClass: t.headerCellInner()
|
|
1008
1012
|
}, null)])])]) : null, rl = R.value ? r(Zl, {
|
|
1009
1013
|
ref: ie,
|
|
@@ -1027,7 +1031,7 @@ const qa = /* @__PURE__ */ ul({
|
|
|
1027
1031
|
Kt(Ue.x, Ue.maxX);
|
|
1028
1032
|
}
|
|
1029
1033
|
}, null) : null, il = R.value ? null : r(Je, {
|
|
1030
|
-
ref:
|
|
1034
|
+
ref: We,
|
|
1031
1035
|
maxHeight: Vt.value,
|
|
1032
1036
|
wrapClass: t.bodyWrapper(),
|
|
1033
1037
|
viewStyle: je,
|
|
@@ -1053,7 +1057,7 @@ const qa = /* @__PURE__ */ ul({
|
|
|
1053
1057
|
}, [i])])]
|
|
1054
1058
|
}), dl = i && (s || R.value) ? r("div", {
|
|
1055
1059
|
ref: q,
|
|
1056
|
-
class: L(t.headerWrapper(),
|
|
1060
|
+
class: L(t.headerWrapper(), A?.("summary"), F.value && s && A?.("sticky-holder")),
|
|
1057
1061
|
style: s ? {
|
|
1058
1062
|
position: "sticky",
|
|
1059
1063
|
bottom: `${F.value?.offsetSummary ?? 0}px`,
|
|
@@ -1072,16 +1076,16 @@ const qa = /* @__PURE__ */ ul({
|
|
|
1072
1076
|
class: t.summary()
|
|
1073
1077
|
}, [i])])])]) : null;
|
|
1074
1078
|
return r("div", {
|
|
1075
|
-
ref:
|
|
1079
|
+
ref: P,
|
|
1076
1080
|
class: L(t.root(), G.value && t.rootAutoHeight(), He.value, we.value)
|
|
1077
1081
|
}, [V("top"), a && r("div", {
|
|
1078
1082
|
class: t.title()
|
|
1079
1083
|
}, [a]), r("div", {
|
|
1080
|
-
ref:
|
|
1084
|
+
ref: Pe,
|
|
1081
1085
|
class: L(t.wrapper(), G.value && t.wrapperAutoHeight(), F.value && J("overflow-clip", H.value, B.value))
|
|
1082
|
-
}, [
|
|
1086
|
+
}, [nl, rl, il, dl, $e]), o && r("div", {
|
|
1083
1087
|
class: t.footer()
|
|
1084
|
-
}, [
|
|
1088
|
+
}, [o]), V("bottom")]);
|
|
1085
1089
|
}
|
|
1086
1090
|
const ge = r(cl, null, [r("table", {
|
|
1087
1091
|
"data-vtg-table": "",
|
|
@@ -1093,7 +1097,7 @@ const qa = /* @__PURE__ */ ul({
|
|
|
1093
1097
|
rows: ce.value,
|
|
1094
1098
|
theadClass: t.thead(),
|
|
1095
1099
|
rowClass: t.tr(),
|
|
1096
|
-
thClass:
|
|
1100
|
+
thClass: Ae.value,
|
|
1097
1101
|
headerCellInnerClass: t.headerCellInner()
|
|
1098
1102
|
}, null), r(et, {
|
|
1099
1103
|
dataSource: g.value,
|
|
@@ -1108,7 +1112,7 @@ const qa = /* @__PURE__ */ ul({
|
|
|
1108
1112
|
class: t.summary()
|
|
1109
1113
|
}, [i])]), $e]);
|
|
1110
1114
|
return r("div", {
|
|
1111
|
-
ref:
|
|
1115
|
+
ref: P,
|
|
1112
1116
|
class: L(t.root(), He.value, we.value)
|
|
1113
1117
|
}, [V("top"), a && r("div", {
|
|
1114
1118
|
class: t.title()
|
|
@@ -1119,9 +1123,9 @@ const qa = /* @__PURE__ */ ul({
|
|
|
1119
1123
|
onScroll: Re
|
|
1120
1124
|
}, at(ge) ? ge : {
|
|
1121
1125
|
default: () => [ge]
|
|
1122
|
-
}),
|
|
1126
|
+
}), o && r("div", {
|
|
1123
1127
|
class: t.footer()
|
|
1124
|
-
}, [
|
|
1128
|
+
}, [o]), V("bottom")]);
|
|
1125
1129
|
};
|
|
1126
1130
|
}
|
|
1127
1131
|
});
|