@dazhicheng/ui 1.5.265 → 1.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.
Files changed (104) hide show
  1. package/dist/components/tt-area/TtArea.vue.js +1 -1
  2. package/dist/components/tt-drawer/src/components/DrawerHeader.vue.js +2 -2
  3. package/dist/components/tt-drawer/src/hooks/useResizable.js +2 -2
  4. package/dist/components/tt-form/src/components/FormElInput.vue.js +51 -38
  5. package/dist/components/tt-form/src/form-render/FormField.vue2.js +36 -36
  6. package/dist/components/tt-form/src/form-render/array-register/FormArrayRegister.d.ts +3 -3
  7. package/dist/components/tt-form/src/form-render/array-register/FormArrayRegister.js +3 -1
  8. package/dist/components/tt-icon/index.vue.js +2 -2
  9. package/dist/components/tt-loading/src/loading.vue.js +2 -2
  10. package/dist/components/tt-modal-form/index.vue.js +13 -12
  11. package/dist/components/tt-panel-select/src/components/PanelMiddle.vue.d.ts +2 -2
  12. package/dist/components/tt-panel-select/src/hooks/usePanelData.js +93 -86
  13. package/dist/components/tt-panel-select/src/index.vue.js +1 -0
  14. package/dist/components/tt-select/src/Select.vue.d.ts +4 -4
  15. package/dist/components/tt-select/src/components/Table.vue.d.ts +4 -4
  16. package/dist/components/tt-table/index.d.ts +523 -358
  17. package/dist/components/tt-table/index.js +7 -4
  18. package/dist/components/tt-table/src/Table.vue.d.ts +306 -216
  19. package/dist/components/tt-table/src/Table.vue.js +405 -618
  20. package/dist/components/tt-table/src/TableForm.vue.d.ts +384 -19
  21. package/dist/components/tt-table/src/TableForm.vue.js +219 -228
  22. package/dist/components/tt-table/src/components/TableAction.vue.js +108 -131
  23. package/dist/components/tt-table/src/components/TableButtons.js +25 -25
  24. package/dist/components/tt-table/src/components/TableColumnModal.vue2.js +88 -85
  25. package/dist/components/tt-table/src/components/TableToolbarTools.vue.d.ts +80 -0
  26. package/dist/components/tt-table/src/components/{TableToobalTools.vue.js → TableToolbarTools.vue.js} +29 -31
  27. package/dist/components/tt-table/src/components/TableToolbarTools.vue2.js +4 -0
  28. package/dist/components/tt-table/src/emits.js +2 -1
  29. package/dist/components/tt-table/src/hooks/useColumnPersistence.d.ts +19 -0
  30. package/dist/components/tt-table/src/hooks/useColumnPersistence.js +63 -0
  31. package/dist/components/tt-table/src/hooks/useColumns.d.ts +505 -21
  32. package/dist/components/tt-table/src/hooks/useColumns.js +100 -245
  33. package/dist/components/tt-table/src/hooks/useGridProps.d.ts +36 -0
  34. package/dist/components/tt-table/src/hooks/useGridProps.js +121 -0
  35. package/dist/components/tt-table/src/hooks/useKeyboardNav.d.ts +11 -0
  36. package/dist/components/tt-table/src/hooks/useKeyboardNav.js +97 -0
  37. package/dist/components/tt-table/src/hooks/usePagination.d.ts +14 -8
  38. package/dist/components/tt-table/src/hooks/usePagination.js +29 -33
  39. package/dist/components/tt-table/src/hooks/useQuery.d.ts +41 -0
  40. package/dist/components/tt-table/src/hooks/useQuery.js +147 -0
  41. package/dist/components/tt-table/src/hooks/useRowIdentity.d.ts +22 -0
  42. package/dist/components/tt-table/src/hooks/useRowIdentity.js +96 -0
  43. package/dist/components/tt-table/src/hooks/useRowSelection.d.ts +23 -7
  44. package/dist/components/tt-table/src/hooks/useRowSelection.js +95 -71
  45. package/dist/components/tt-table/src/hooks/{useLeftRightSlot.d.ts → useSideSlot.d.ts} +25 -17
  46. package/dist/components/tt-table/src/hooks/useSideSlot.js +77 -0
  47. package/dist/components/tt-table/src/hooks/useSyncProps.d.ts +12 -0
  48. package/dist/components/tt-table/src/hooks/useSyncProps.js +55 -0
  49. package/dist/components/tt-table/src/hooks/useTableData.d.ts +71 -0
  50. package/dist/components/tt-table/src/hooks/useTableData.js +307 -0
  51. package/dist/components/tt-table/src/hooks/useTableFooter.d.ts +15 -0
  52. package/dist/components/tt-table/src/hooks/useTableFooter.js +46 -0
  53. package/dist/components/tt-table/src/hooks/useTableForm.d.ts +10 -5
  54. package/dist/components/tt-table/src/hooks/useTableForm.js +55 -48
  55. package/dist/components/tt-table/src/hooks/useTableMethods.d.ts +165 -0
  56. package/dist/components/tt-table/src/hooks/useTableMethods.js +183 -0
  57. package/dist/components/tt-table/src/hooks/useTableRender.d.ts +24 -55
  58. package/dist/components/tt-table/src/props.d.ts +318 -151
  59. package/dist/components/tt-table/src/props.js +117 -270
  60. package/dist/components/tt-table/src/table-defaults.d.ts +25 -0
  61. package/dist/components/tt-table/src/table-defaults.js +71 -0
  62. package/dist/components/tt-table/src/table-mutation-events.d.ts +43 -0
  63. package/dist/components/tt-table/src/table-mutation-events.js +70 -0
  64. package/dist/components/tt-table/src/types/table.d.ts +207 -88
  65. package/dist/components/tt-table/src/types/tableAction.d.ts +23 -0
  66. package/dist/components/tt-table/src/types/tableForm.d.ts +15 -26
  67. package/dist/components/tt-table/src/utils/action-tab-index.d.ts +2 -0
  68. package/dist/components/tt-table/src/utils/action-tab-index.js +50 -0
  69. package/dist/components/tt-table/src/utils/context.js +25 -12
  70. package/dist/components/tt-table/src/utils/table-api.d.ts +136 -58
  71. package/dist/components/tt-table/src/utils/table-api.js +198 -165
  72. package/dist/components/tt-table/src/utils/table-form-api.d.ts +11 -11
  73. package/dist/components/tt-table/src/utils/table-form-api.js +41 -31
  74. package/dist/components/types.d.ts +0 -20
  75. package/dist/hooks/useSetup.js +0 -3
  76. package/dist/index.d.ts +1 -0
  77. package/dist/index.js +105 -101
  78. package/dist/packages/hooks/src/useDebounce.js +6 -6
  79. package/dist/packages/utils/src/is.js +20 -18
  80. package/dist/packages/utils/src/tool.js +76 -149
  81. package/dist/style.css +1 -1
  82. package/dist/utils/uppercaseInput.d.ts +29 -0
  83. package/dist/utils/uppercaseInput.js +16 -0
  84. package/package.json +3 -3
  85. package/dist/components/tt-table/src/components/TableToobalTools.vue.d.ts +0 -576
  86. package/dist/components/tt-table/src/components/TableToobalTools.vue2.js +0 -4
  87. package/dist/components/tt-table/src/enum.d.ts +0 -2
  88. package/dist/components/tt-table/src/hooks/useCellArea.d.ts +0 -15
  89. package/dist/components/tt-table/src/hooks/useCellArea.js +0 -15
  90. package/dist/components/tt-table/src/hooks/useCustomColumns.d.ts +0 -20
  91. package/dist/components/tt-table/src/hooks/useCustomColumns.js +0 -65
  92. package/dist/components/tt-table/src/hooks/useDataSource.d.ts +0 -29
  93. package/dist/components/tt-table/src/hooks/useDataSource.js +0 -232
  94. package/dist/components/tt-table/src/hooks/useLeftRightSlot.js +0 -64
  95. package/dist/components/tt-table/src/hooks/useTable.d.ts +0 -7
  96. package/dist/components/tt-table/src/hooks/useTableEvent.d.ts +0 -101
  97. package/dist/components/tt-table/src/hooks/useTableEvent.js +0 -197
  98. package/dist/components/tt-table/src/hooks/useTableFormEvent.d.ts +0 -10
  99. package/dist/components/tt-table/src/hooks/useTableHeight.d.ts +0 -15
  100. package/dist/components/tt-table/src/hooks/useTableSlot.d.ts +0 -11
  101. package/dist/components/tt-table/src/hooks/useTableSlot.js +0 -17
  102. package/dist/components/tt-table/src/utils/filters.d.ts +0 -109
  103. package/dist/components/tt-table/src/utils/vxeTable.d.ts +0 -28
  104. package/dist/packages/utils/src/check.js +0 -10
@@ -1,714 +1,501 @@
1
- import { defineComponent as Pt, useAttrs as Rt, useSlots as $t, ref as _, getCurrentInstance as Et, computed as T, provide as $e, reactive as Ot, toValue as K, toRaw as I, unref as t, watch as J, nextTick as B, onMounted as _t, onUnmounted as It, createElementBlock as y, openBlock as p, normalizeClass as A, createVNode as F, mergeProps as re, toHandlers as Dt, createSlots as Nt, withCtx as m, renderSlot as S, createBlock as ne, createCommentVNode as H, normalizeStyle as $, createElementVNode as P, normalizeProps as j, guardReactiveProps as X, Fragment as Ee, toDisplayString as M, renderList as se, withModifiers as zt, createTextVNode as le } from "vue";
2
- import { useLoading as Bt } from "../../../hooks/useLoading.js";
1
+ import { defineComponent as vt, mergeModels as he, useModel as It, useAttrs as Vt, useSlots as Et, getCurrentInstance as _t, ref as q, shallowReactive as zt, onScopeDispose as ye, computed as m, provide as be, unref as e, toRaw as Se, nextTick as J, onMounted as Dt, createElementBlock as g, openBlock as c, normalizeClass as z, createVNode as D, mergeProps as Q, toHandlers as Mt, createSlots as Kt, withCtx as n, renderSlot as d, createBlock as X, createCommentVNode as M, normalizeStyle as y, createElementVNode as f, normalizeProps as P, guardReactiveProps as K, Fragment as At, toDisplayString as Y, renderList as Z, createTextVNode as Ce, toValue as Ft } from "vue";
2
+ import { TtErrorTooltip as Lt } from "../../tt-form-item-error-tooltip/index.js";
3
+ import { useLoading as Nt } from "../../../hooks/useLoading.js";
3
4
  import "../../../node_modules/.pnpm/vue-types@5.1.3_vue@3.5.21_typescript@5.9.3_/node_modules/vue-types/shim/index.modern.js";
4
- import { useDesign as Ft } from "../../../packages/hooks/src/useDesign.js";
5
- import { kebabToCamelCase as Ht } from "../../../packages/utils/src/string.js";
5
+ import { useDesign as Ot } from "../../../packages/hooks/src/useDesign.js";
6
6
  import "axios";
7
- import { ElScrollbar as Oe } from "element-plus";
8
- import { isBoolean as Vt, isString as Lt } from "../../../packages/utils/src/is.js";
9
- import { extractResourceFromApi as Kt, generateTestId as _e } from "../../../packages/utils/src/testid-helper.js";
10
- import { getDifference as At } from "../../../packages/utils/src/tool.js";
7
+ import { ElScrollbar as we } from "element-plus";
8
+ import "dayjs";
9
+ import { extractResourceFromApi as Ht, generateTestId as xe } from "../../../packages/utils/src/testid-helper.js";
10
+ import "xe-utils";
11
+ import "dayjs/plugin/utc";
12
+ import "dayjs/plugin/timezone";
11
13
  import "../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
12
14
  import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
13
15
  import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
14
16
  import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
15
17
  import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
16
- import { checkVersion as jt } from "../../../packages/utils/src/check.js";
17
- import { omit as G, cloneDeep as Mt } from "lodash-es";
18
+ import { omit as $e } from "lodash-es";
18
19
  import "vue-router";
19
- import { TtErrorTooltip as Gt } from "../../tt-form-item-error-tooltip/index.js";
20
- import { useStore as Ut } from "@tanstack/vue-store";
21
- import { VxeUI as Wt, VxePager as qt } from "vxe-pc-ui";
22
- import { VxeGrid as Yt } from "vxe-table";
23
- import { tableProps as Jt } from "vxe-table/es/table/src/props";
24
- import Xt from "xe-utils";
25
- import Qt from "../../../assets/svg/paixu-jiangxu.svg.js";
26
- import Zt from "../../../assets/svg/paixu-moren.svg.js";
27
- import eo from "../../../assets/svg/paixu-shengxu.svg.js";
28
- import { TtImage as Ie } from "../../tt-image/index.js";
29
- import { TtText as to } from "../../tt-text/index.js";
30
- import { RowContext as oo } from "./components/RowContext.js";
31
- import { basicTableEmits as De } from "./emits.js";
32
- import { useCellArea as ro } from "./hooks/useCellArea.js";
33
- import { useColumns as no } from "./hooks/useColumns.js";
34
- import { useDataSource as so } from "./hooks/useDataSource.js";
35
- import { useLeftRightSlot as lo } from "./hooks/useLeftRightSlot.js";
36
- import { usePagination as ao } from "./hooks/usePagination.js";
37
- import { useRowSelection as io } from "./hooks/useRowSelection.js";
38
- import { createTableContext as co } from "./hooks/useTableContext.js";
39
- import { useTableEvents as uo } from "./hooks/useTableEvent.js";
40
- import { tableOtherProps as fo, tableProps as Ne } from "./props.js";
41
- import { TableApi as po } from "./utils/table-api.js";
42
- const mo = ["data-testid", "data-table-columns"], go = ["onClick"], bo = {
43
- class: "mr-4px flex-1 overflow-hidden"
44
- }, ho = ["src"], yo = ["src"], So = ["src"], xo = {
20
+ import { useStore as Bt } from "@tanstack/vue-store";
21
+ import { VxePager as Gt } from "vxe-pc-ui";
22
+ import { VxeGrid as jt } from "vxe-table";
23
+ import { tableProps as Wt } from "vxe-table/es/table/src/props";
24
+ import Ut from "../../../assets/svg/paixu-jiangxu.svg.js";
25
+ import qt from "../../../assets/svg/paixu-moren.svg.js";
26
+ import Jt from "../../../assets/svg/paixu-shengxu.svg.js";
27
+ import { TtImage as Qt } from "../../tt-image/index.js";
28
+ import { RowContext as Xt } from "./components/RowContext.js";
29
+ import { basicTableEmits as Yt } from "./emits.js";
30
+ import { useColumns as Zt } from "./hooks/useColumns.js";
31
+ import { useGridProps as eo } from "./hooks/useGridProps.js";
32
+ import { useKeyboardNav as to } from "./hooks/useKeyboardNav.js";
33
+ import { usePagination as oo } from "./hooks/usePagination.js";
34
+ import { useQuery as ro } from "./hooks/useQuery.js";
35
+ import { useRowIdentity as so } from "./hooks/useRowIdentity.js";
36
+ import { useRowSelection as lo } from "./hooks/useRowSelection.js";
37
+ import { useSideSlot as ao } from "./hooks/useSideSlot.js";
38
+ import { useSyncProps as no } from "./hooks/useSyncProps.js";
39
+ import { createTableContext as io } from "./hooks/useTableContext.js";
40
+ import { useTableData as co } from "./hooks/useTableData.js";
41
+ import { useTableFooter as po } from "./hooks/useTableFooter.js";
42
+ import { useTableMethods as mo } from "./hooks/useTableMethods.js";
43
+ import { tableOtherProps as uo, tableProps as go } from "./props.js";
44
+ import { forwardedEventEntries as fo, isDisplayOnlyEvent as ho, isRowDataMutationEvent as yo, getMutationCommitSource as bo } from "./table-mutation-events.js";
45
+ import { TableApi as So } from "./utils/table-api.js";
46
+ const Co = ["data-testid"], wo = ["src"], xo = ["src"], $o = ["src"], To = {
45
47
  style: {
46
48
  color: "#009ffa"
47
49
  }
48
- }, vo = {
50
+ }, Ro = {
49
51
  key: 0
50
- }, Co = {
51
- key: 0
52
- }, U = 'button:not([disabled]):not([tabindex="-1"]),input:not([disabled]),select:not([disabled]),textarea:not([disabled])', ur = /* @__PURE__ */ Pt({
52
+ }, ko = {
53
+ key: 1
54
+ }, br = /* @__PURE__ */ vt({
53
55
  name: "TtTable",
54
56
  __name: "Table",
55
- props: {
56
- ...Jt,
57
- ...Ne,
58
- ...fo
59
- },
60
- emits: ["register", "fetch-success", "fetch-error", "selection-change", "update:modelValue", ...De],
61
- setup(ze, {
62
- expose: Be,
63
- emit: Fe
57
+ props: /* @__PURE__ */ he({
58
+ ...Wt,
59
+ ...go,
60
+ ...uo
61
+ }, {
62
+ modelValue: {},
63
+ modelModifiers: {}
64
+ }),
65
+ emits: /* @__PURE__ */ he(["register", "fetch-success", "fetch-error", "selection-change", ...Yt], ["update:modelValue"]),
66
+ setup(ee, {
67
+ expose: Te,
68
+ emit: Re
64
69
  }) {
65
- var Re;
66
- const v = ze, f = Fe, ae = Rt(), D = $t(), {
67
- prefixCls: E
68
- } = Ft("table"), ie = _(), He = _({}), k = _(null), b = _(), ce = _([]), ue = {};
69
- function Q(e = k.value) {
70
- const o = e == null ? void 0 : e.querySelector(".vxe-table");
71
- return o ? Array.from(o.querySelectorAll(U)).filter((n) => {
72
- const s = window.getComputedStyle(n);
73
- return s.display !== "none" && s.visibility !== "hidden" && !!n.offsetParent;
74
- }).filter((n, s, l) => {
75
- const a = n.closest('[class*="table-action"]');
76
- if (!a) return !0;
77
- const c = a.getBoundingClientRect();
78
- return !l.some((u) => {
79
- const g = u.closest('[class*="table-action"]');
80
- if (!g || g === a) return !1;
81
- const w = g.getBoundingClientRect();
82
- return Math.abs(w.top - c.top) <= 2 && w.left > c.left;
83
- });
84
- }).sort((n, s) => {
85
- const l = n.closest(".vxe-body--column") || n, a = s.closest(".vxe-body--column") || s, c = l.getBoundingClientRect(), u = a.getBoundingClientRect();
86
- return Math.abs(c.top - u.top) > 2 ? c.top - u.top : Math.abs(c.left - u.left) > 2 ? c.left - u.left : n.getBoundingClientRect().top - s.getBoundingClientRect().top;
87
- }) : [];
88
- }
89
- function Ve(e) {
90
- const o = k.value;
91
- if (o)
92
- return Array.from(document.querySelectorAll(U)).find((r) => {
93
- const n = window.getComputedStyle(r);
94
- if (n.display === "none" || n.visibility === "hidden" || !r.offsetParent || o.contains(r) || r.closest(".tt-table"))
95
- return !1;
96
- const s = o.compareDocumentPosition(r);
97
- return e ? !!(s & Node.DOCUMENT_POSITION_FOLLOWING) : !!(s & Node.DOCUMENT_POSITION_PRECEDING);
98
- });
99
- }
100
- function Le(e) {
101
- const o = k.value;
102
- if (!o) return;
103
- const r = Array.from(document.querySelectorAll(".tt-table")), n = r.indexOf(o), s = r[n + (e ? 1 : -1)], l = s ? Q(s) : [];
104
- if (!(!s || !l.length))
105
- return e ? l[0] : l[l.length - 1];
106
- }
107
- function Ke() {
108
- const e = k.value;
109
- return e ? Array.from(e.querySelectorAll(U)).filter((o) => {
110
- const r = window.getComputedStyle(o);
111
- return !o.closest(".vxe-table") && r.display !== "none" && r.visibility !== "hidden" && !!o.offsetParent;
112
- }) : [];
113
- }
114
- function de(e) {
115
- if (e.key !== "Tab") return;
116
- const o = e.target;
117
- if (!(o instanceof HTMLElement)) return;
118
- const r = Q(), n = o.closest(U), s = n ? r.indexOf(n) : -1;
119
- if (s < 0) return;
120
- const l = !e.shiftKey, a = Ve(l), c = Le(l), u = a && c ? a.compareDocumentPosition(c) & Node.DOCUMENT_POSITION_FOLLOWING ? a : c : a || c, g = r[s + (e.shiftKey ? -1 : 1)] || u;
121
- g && (e.preventDefault(), e.stopPropagation(), B(() => {
122
- g.focus();
123
- }));
124
- }
125
- function fe(e) {
126
- if (e.key !== "Tab") return;
127
- const o = e.target, r = k.value;
128
- if (!(o instanceof HTMLElement) || !r) return;
129
- const n = o.closest(".tt-table");
130
- if (n && n !== r) return;
131
- if (r.contains(o)) {
132
- de(e);
133
- return;
134
- }
135
- const s = Q(), l = Ke(), a = l.length ? l : s, c = e.shiftKey ? a[a.length - 1] : a[0];
136
- if (!c) return;
137
- const u = Array.from(document.querySelectorAll(U)).filter((h) => {
138
- const Y = window.getComputedStyle(h);
139
- return !h.closest('[class*="table-action"]') && Y.display !== "none" && Y.visibility !== "hidden" && !!h.offsetParent;
140
- }), g = u.indexOf(o);
141
- if (g < 0) return;
142
- const w = u[g + (e.shiftKey ? -1 : 1)];
143
- !w || !r.contains(w) || (e.preventDefault(), e.stopPropagation(), c.focus());
144
- }
145
- const pe = _({}), x = Et();
146
- let i = v.tableApi;
147
- if (!i) {
148
- i = new po(v);
149
- const e = i;
150
- e.useStore = (o) => Ut(i.store, o), i = e;
70
+ var ue, ge;
71
+ const h = ee, ke = It(ee, "modelValue"), i = Re, te = Vt(), A = Et(), w = _t(), {
72
+ prefixCls: b
73
+ } = Ot("table"), Pe = Object.hasOwn(((ue = w == null ? void 0 : w.vnode) == null ? void 0 : ue.props) || {}, "data"), v = q(null), p = q(), F = q({});
74
+ let s = h.tableApi;
75
+ s || (s = new So($e(h, ["modelValue"])), s.useStore = (t) => Bt(s.store, t));
76
+ const I = zt({});
77
+ function oe() {
78
+ Object.assign(I, Se(s.store.state) || {});
151
79
  }
152
- const V = (Re = i == null ? void 0 : i.useStore) == null ? void 0 : Re.call(i), Z = T(() => v.testId ? v.testId : v.api ? Kt(v.api) : "table"), Ae = T(() => _e(Z.value, "table"));
153
- $e("tableIdContext", Z);
154
- const R = Ot({
155
- emptyText: K(V).emptyText,
156
- noSearchText: K(V).noSearchText,
157
- isFirstLoad: !0,
158
- emptyImageStatus: K(V).emptyImageStatus
159
- }), me = _({}), d = T(() => {
160
- const {
161
- toolTipErrorPlacement: e,
162
- ...o
163
- } = I(K(V)) || {};
164
- return {
165
- ...o,
166
- toolTipErrorPlacement: e
167
- };
168
- });
169
- $e(`${E}-props`, d);
80
+ oe(), ye(s.store.subscribe(oe));
81
+ const l = m(() => I), ve = Pe ? () => Ft(h.data) : () => I.data, Ie = () => I.api;
82
+ be(`${b}-props`, l);
83
+ const L = m(() => h.testId || (h.api ? Ht(h.api) : "table")), Ve = m(() => xe(e(L), "table")), Ee = m(() => xe(e(L), "table-toolbar"));
84
+ be("tableIdContext", L);
170
85
  const {
171
- getLoading: W,
172
- setLoading: ge
173
- } = Bt(T(() => t(d).loading || !1)), {
174
- configRef: L,
175
- getPaginationInfo: N,
176
- getPagination: je,
177
- setPagination: ee,
178
- handlePageChange: Me
179
- } = ao(d, f), {
180
- selectedKeys: te,
181
- selectedRows: be,
182
- getCheckboxSelectedKeys: Ge,
183
- onCheckboxChange: Ue,
184
- onCheckboxAll: We,
185
- getSelectRowKeys: qe,
186
- getSelectRows: Ye,
187
- clearSelectedRowKeys: oe,
188
- setSelectedRowKeys: Je,
189
- onCellAreaSelectionEndSetCheckbox: Xe,
190
- onCheckboxRangeChange: he,
191
- onRadioChange: Qe
192
- } = io(d, f, b), {
193
- handleLeftRightSlotInit: Ze,
194
- handleLeftRightSlotScroll: et,
195
- leftRightSlotRows: ye,
196
- tableBodyWrapHeight: z,
197
- tableHeaderHight: Se,
198
- tableBodyScrollHeight: xe,
199
- tableBodyHeight: q,
200
- leftSlotScrollbarRef: tt,
201
- rightSlotScrollbarRef: ot,
202
- tableBodyScrollTop: ve
203
- } = lo(d, b, ce), {
204
- reload: rt,
205
- reloadFilter: Ce,
206
- getDataSource: nt,
207
- dataSource: st,
208
- isloaded: lt
209
- } = so(d, {
210
- xGrid: b,
211
- tableData: ce,
212
- paginationRef: L,
213
- getPaginationInfo: N,
214
- setLoading: ge,
215
- setPagination: ee,
216
- clearSelectedRowKeys: oe,
217
- getIsTableEvent: i.getIsTableEvent
218
- }, f), {
219
- titleSolts: at,
220
- validSolts: it,
221
- // httpFieldSolts,
222
- // httpFieldEditSolts,
223
- setTableColumns: ct,
224
- getTableColumns: we,
225
- // setCacheColumns,
226
- onResizableChange: ut,
227
- onColumnDragend: dt
228
- } = no(d, {
229
- xGrid: b,
230
- tableWidth: T(() => t(k).offsetWidth)
231
- }, f), C = T(() => {
232
- const {
233
- tableRowId: e,
234
- checkboxConfig: o,
235
- rowConfig: r,
236
- columnConfig: n,
237
- scrollY: s = {},
238
- showToolbar: l,
239
- toolbarConfig: a = {},
240
- showPager: c,
241
- autoHeight: u,
242
- virtualYConfig: g = {},
243
- expandConfig: w = {}
244
- } = t(d), h = {}, Y = G(t(d), ["data", "columns"]);
245
- return l && (h.toolbarConfig = {
246
- slots: D.toolbar_tools || D.toolbar_buttons ? {
247
- tools: D.toolbar_tools ? "toolbar_tools" : void 0,
248
- buttons: D.toolbar_buttons ? "toolbar_buttons" : void 0
249
- } : void 0,
250
- ...a
251
- }), c || (h.pagerConfig = void 0), u && (h.height = "auto", h.autoResize = !0, h.syncResize = !0), jt(Wt.tableVersion, 4, 16) ? h.virtualYConfig = {
252
- enabled: !0,
253
- mode: "wheel",
254
- ...g
255
- } : h.scrollY = {
256
- enabled: !0,
257
- mode: "wheel",
258
- ...s
259
- }, {
260
- ...Y,
261
- ...h,
262
- columnConfig: {
263
- useKey: !0,
264
- resizable: !1,
265
- ...n
266
- },
267
- showHeaderOverflow: !1,
268
- rowConfig: {
269
- useKey: !0,
270
- keyField: e,
271
- isHover: !0,
272
- isCurrent: !1,
273
- ...r
274
- },
275
- resizableConfig: {
276
- showDragTip: !0
277
- },
278
- checkboxConfig: {
279
- // checkField: 'checked',
280
- highlight: !1,
281
- ...o
282
- },
283
- expandConfig: {
284
- padding: !0,
285
- iconClose: "vxe-icon-caret-down",
286
- iconOpen: "vxe-icon-caret-up",
287
- ...w
288
- },
289
- // data: unref(dataSource),
290
- // height: unref(tableHeight),
291
- // stripe: true,
292
- round: !0,
293
- loading: !1
294
- };
295
- }), ft = T(() => Vt(t(C).showHeaderOverflow) ? t(C).showHeaderOverflow : Lt(t(C).showHeaderOverflow) ? t(C).showHeaderOverflow === "tooltip" : !1), {
296
- onCellAreaSelectionEnd: pt
297
- } = ro(C, f, b, {
298
- onCellAreaSelectionEndSetCheckbox: Xe,
299
- onCheckboxRangeChange: he
300
- }), Te = uo(b, R, f, i, d, {
301
- clearSelectedRowKeys: oe
302
- });
303
- J(() => C.value, (e, o) => {
304
- const r = Object.keys(Ne), n = At(e, o || {}, {
305
- exclude: r
306
- });
307
- if (Object.keys(n).length) {
308
- const s = {
309
- ...ae,
310
- ...t(C)
311
- }, l = G(s, [...r, "showFullscreen", "data", "columns"]);
312
- pe.value = l, Te.setEmptyText(e.emptyText || "");
313
- }
86
+ getLoading: x,
87
+ setLoading: re
88
+ } = Nt(m(() => e(l).loading || !1)), {
89
+ pagination: $,
90
+ paginationInfo: S,
91
+ getPagination: _e,
92
+ setPagination: N,
93
+ onPageChange: ze
94
+ } = oo(l, i), {
95
+ getRowKey: De,
96
+ prepareRows: O,
97
+ toVxeRowConfig: Me
98
+ } = so(l), {
99
+ selectedKeys: H,
100
+ selectedRows: B,
101
+ selectedKeyList: Ke,
102
+ getSelectRowKeys: Ae,
103
+ getSelectRows: Fe,
104
+ syncSelection: Le,
105
+ setSelectedRowKeys: Ne,
106
+ clearSelectedRowKeys: se,
107
+ resetSelectionAfterFetch: Oe,
108
+ onCheckboxChange: He,
109
+ onCheckboxAll: Be,
110
+ onCheckboxRangeChange: Ge,
111
+ onRadioChange: je,
112
+ onCellAreaSelectionEnd: We
113
+ } = lo(l, p, i, {
114
+ getRowKey: De
115
+ }), {
116
+ rows: V,
117
+ applyRows: Ue,
118
+ getDataSource: qe,
119
+ runDataOperation: Je,
120
+ scheduleRowsCommit: G,
121
+ cancelRowsCommit: Qe,
122
+ onDataChange: Xe,
123
+ createTableInstanceFacade: Ye,
124
+ isActive: Ze
125
+ } = co(l, p, ke, i, {
126
+ data: ve,
127
+ api: Ie,
128
+ prepareRows: O,
129
+ onSelectionMutated: Le
130
+ }), {
131
+ refresh: et,
132
+ syncScroll: tt,
133
+ rowNodes: le,
134
+ headerHeight: ae,
135
+ bodyHeight: E,
136
+ bodyWrapperHeight: C,
137
+ bodyOffsetTop: ne,
138
+ bodyScrollHeight: ie,
139
+ leftScrollbarRef: ot,
140
+ rightScrollbarRef: rt
141
+ } = ao(l, p, V), {
142
+ reload: st,
143
+ reloadFilter: de,
144
+ isLoaded: ce
145
+ } = ro(l, {
146
+ grid: p,
147
+ pagination: $,
148
+ paginationInfo: S,
149
+ setPagination: N,
150
+ setLoading: re,
151
+ resetSelectionAfterFetch: Oe,
152
+ rows: V,
153
+ applyRows: Ue
154
+ }, i), {
155
+ gridColumns: lt,
156
+ hasExpandColumn: at,
157
+ sortIconSlots: nt,
158
+ validSlots: it,
159
+ setTableColumns: dt,
160
+ getTableColumns: ct,
161
+ onColumnDragend: pt
162
+ } = Zt(l, p, i), {
163
+ footerSummaryMethod: mt
164
+ } = po(lt), {
165
+ bindValues: j,
166
+ gridProps: ut
167
+ } = eo(l, {
168
+ attrs: te,
169
+ slots: A
314
170
  }, {
315
- deep: !0,
316
- immediate: !0
171
+ hasExpandColumn: at,
172
+ footerSummaryMethod: mt,
173
+ onTreeLoadResolved: G,
174
+ prepareRows: O,
175
+ toVxeRowConfig: Me
176
+ }), {
177
+ onTableKeydown: pe
178
+ } = to(v), gt = m(U), ft = mo(l, p, s, {
179
+ runDataOperation: Je,
180
+ clearSelectedRowKeys: se,
181
+ getTableInstance: U,
182
+ isActive: Ze,
183
+ prepareRows: O
317
184
  });
318
- const ke = T(() => {
185
+ no(h, s.setState, ["tableApi", "formApi", "modelValue"]);
186
+ const ht = m(() => ({
187
+ ...e(l).emptyImageStyle
188
+ })), W = m(() => {
319
189
  const {
320
- emptyImageStyle: e
321
- } = K(V);
322
- return {
323
- ...e
190
+ api: t,
191
+ emptyText: o,
192
+ noSearchText: r
193
+ } = e(l);
194
+ return e(ce) || !t ? o : r;
195
+ }), u = {};
196
+ fo.forEach(([t, o]) => {
197
+ u[o] = (...r) => {
198
+ t === "data-change" && Xe(), ho(t) && Qe(), yo(t, r, () => e(B)) && G(bo(t)), i(t, ...r);
324
199
  };
325
200
  });
326
- De.forEach((e) => {
327
- const o = Xt.camelCase(e);
328
- ue[o] = (...r) => f(e, ...r);
329
- });
330
- const mt = T(() => ({
331
- ...ue,
332
- radioChange: Qe,
333
- checkboxChange: Ue,
334
- checkboxAll: We,
335
- resizableChange: ut,
336
- cellAreaSelectionEnd: pt,
337
- scroll: yt,
338
- toggleRowExpand: xt,
339
- checkboxRangeChange: he,
340
- columnDragend: dt,
341
- // columnResizableChange: onColumnResizableChange,
342
- scrollBoundary: St,
343
- editClosed: (e) => {
344
- const {
345
- fullData: o = []
346
- } = e.$grid.getTableData(), {
347
- isDataCloneDeep: r
348
- } = t(d);
349
- f("update:modelValue", r ? Mt(o) : o), f("edit-closed", e);
350
- }
201
+ const yt = m(() => ({
202
+ ...u,
203
+ headerCellClick: Ct,
204
+ sortChange: wt,
205
+ radioChange: je,
206
+ checkboxChange: He,
207
+ checkboxAll: Be,
208
+ checkboxRangeChange: Ge,
209
+ cellAreaSelectionEnd: We,
210
+ columnDragend: pt,
211
+ scroll: xt,
212
+ scrollBoundary: $t,
213
+ toggleRowExpand: Tt,
214
+ editClosed: Rt
351
215
  }));
352
- async function gt(e) {
353
- i.setState(e);
216
+ async function bt(t) {
217
+ s.setState(t);
354
218
  }
355
- function Pe() {
356
- B(() => {
357
- var e;
358
- (e = t(b)) == null || e.recalculate(!0);
219
+ function me() {
220
+ J(() => {
221
+ var t;
222
+ return (t = e(p)) == null ? void 0 : t.recalculate(!0);
359
223
  });
360
224
  }
361
- function bt(e, o) {
362
- e && (me.value[o] = e);
363
- }
364
- async function ht(e) {
365
- if (!e.sortable) {
366
- f("sort-change", {
367
- order: I(e).order || "desc",
368
- originOrder: I(e).order,
369
- ...G(I(e), ["order"])
370
- });
225
+ function St(t, o) {
226
+ if (t) {
227
+ F.value[o] = t;
371
228
  return;
372
229
  }
373
- const o = b.value;
374
- switch (e.order) {
375
- case "desc":
376
- await (o == null ? void 0 : o.sort(e.field, "asc"));
377
- break;
378
- case "asc":
379
- await (o == null ? void 0 : o.clearSort(e.field));
380
- break;
381
- default:
382
- await (o == null ? void 0 : o.sort(e.field, "desc"));
383
- }
384
- f("sort-change", {
385
- order: I(e).order || "desc",
386
- originOrder: I(e).order,
387
- ...G(I(e), ["order"])
388
- }), Ce();
389
- }
390
- function yt(e) {
391
- f("scroll", e), ((e == null ? void 0 : e.type) === "body" || (e == null ? void 0 : e.type) === "table") && et(e == null ? void 0 : e.scrollTop);
230
+ delete F.value[o];
392
231
  }
393
- function St(e) {
232
+ function Ct(t) {
394
233
  var a;
395
- f("scroll-boundary", e);
396
- const {
397
- isScrollFetch: o
398
- } = t(d), {
399
- isBottom: r
400
- } = e;
401
- if (!o || !r || W.value) return;
234
+ (a = u.headerCellClick) == null || a.call(u, t);
402
235
  const {
403
- currentPage: n = 0,
404
- total: s = 0
405
- } = t(N), {
406
- fullData: l = []
407
- } = ((a = t(b)) == null ? void 0 : a.getTableData()) || {};
408
- s <= l.length || ee({
409
- currentPage: n + 1
236
+ column: o
237
+ } = t;
238
+ if (o.sortable) return;
239
+ const r = Se(o);
240
+ i("sort-change", {
241
+ order: r.order || "desc",
242
+ originOrder: r.order,
243
+ ...$e(r, ["order"])
410
244
  });
411
245
  }
412
- function xt(e) {
413
- f("toggle-row-expand", e), setTimeout(() => {
414
- Ze(!1);
415
- }, 30);
246
+ function wt(t) {
247
+ var o;
248
+ (o = u.sortChange) == null || o.call(u, t), de("sort");
249
+ }
250
+ function xt(t) {
251
+ i("scroll", t), ((t == null ? void 0 : t.type) === "body" || (t == null ? void 0 : t.type) === "table") && tt(t == null ? void 0 : t.scrollTop);
416
252
  }
417
- const vt = (e) => {
418
- var s;
253
+ function $t(t) {
254
+ i("scroll-boundary", t);
419
255
  const {
420
- visible: o,
421
- column: r
422
- } = e, {
423
- filterExclude: n = []
424
- } = r.filterRender.props || {};
425
- o && ((s = t(ie)) == null || s.hidePopper(), B(() => {
426
- var c, u, g, w;
427
- const l = (c = e == null ? void 0 : e.$event) == null ? void 0 : c.target, a = (g = (u = l == null ? void 0 : l.parentNode) == null ? void 0 : u.parentNode) == null ? void 0 : g.parentNode;
428
- (w = t(ie)) == null || w.showPopper(a), Object.assign(He.value, {
429
- column: e.column,
430
- $event: e.$event,
431
- $table: e.$table,
432
- $grid: e.$grid,
433
- filterExclude: n
434
- });
435
- })), f("filter-visible", e);
436
- };
437
- B(() => {
256
+ isScrollFetch: o
257
+ } = e(l);
258
+ if (!o || !t.isBottom || e(x)) return;
438
259
  const {
439
- autoHeight: e
440
- } = t(d);
441
- e && Pe();
442
- });
443
- const O = {
444
- reload: rt,
445
- setProps: gt,
446
- setTableColumns: ct,
447
- setPagination: ee,
448
- setLoading: ge,
449
- redoHeight: Pe,
450
- getDataSource: nt,
451
- getPagination: je,
452
- getSelectRowKeys: qe,
453
- getSelectRows: Ye,
454
- getTableInstance: () => t(b),
455
- getLoading: W,
456
- getTableColumns: we,
457
- setSelectedRowKeys: Je,
458
- clearSelectedRowKeys: oe,
459
- selectedKeys: te,
460
- selectedRows: be,
461
- ...Te
462
- };
463
- co({
464
- ...O,
465
- wrapRef: k,
466
- getBindValues: C
467
- }), Be({
468
- ...O,
469
- xGrid: b
470
- }), x && f("register", O, `${x == null ? void 0 : x.uid}`), J(() => W.value, (e) => {
471
- i.setProxyState({
472
- loading: e
473
- }), B(() => {
474
- var o;
475
- x && ((o = O.emitLoading) == null || o.call(O, e, x == null ? void 0 : x.uid));
260
+ currentPage: r = 0,
261
+ total: a = 0
262
+ } = e(S) || {};
263
+ a <= e(V).length || N({
264
+ currentPage: r + 1
476
265
  });
477
- });
478
- function Ct(e) {
479
- return Object.fromEntries(Object.entries(e).filter(([o]) => !o.startsWith("on")));
480
266
  }
481
- function wt(e, o) {
482
- return Object.fromEntries(Object.keys(e).map((r) => [r, o[r]]));
267
+ function Tt(t) {
268
+ i("toggle-row-expand", t), et(!1);
483
269
  }
484
- function Tt(e) {
485
- return e.column.slots.title;
270
+ function Rt(t) {
271
+ G(), i("edit-closed", t);
486
272
  }
487
- J(() => G(v, ["tableApi", "formApi"]), () => {
488
- var l;
489
- const e = {}, o = ((l = x == null ? void 0 : x.vnode) == null ? void 0 : l.props) || {}, r = new Set(Object.keys(v));
490
- for (const [a, c] of Object.entries(o)) {
491
- const u = Ht(a);
492
- r.has(u) && (e[u] = c);
493
- }
494
- const n = Ct(e), s = wt(n, v);
495
- i.setState(s);
496
- }, {
497
- deep: !0
498
- }), J(() => te.value, (e) => {
499
- i.setProxyState({
500
- selectedKeys: e,
501
- selectedRows: t(be)
502
- });
503
- });
504
- const kt = T(() => _e(Z.value, "table-toolbar"));
505
- return _t(() => {
506
- var e;
507
- i.setState({
508
- modelValue: v.modelValue
509
- }), (e = i.mount) == null || e.call(i, b.value, O), document.addEventListener("keydown", fe, !0), B(() => {
510
- var r;
511
- const o = (r = k.value) == null ? void 0 : r.querySelector(".vxe-toolbar");
512
- o && o.setAttribute("data-testid", t(kt));
273
+ function U() {
274
+ return Ye(e(p));
275
+ }
276
+ function kt(t) {
277
+ return Object.keys(t).filter((o) => o !== "empty");
278
+ }
279
+ const _ = {
280
+ reload: st,
281
+ setProps: bt,
282
+ setTableColumns: dt,
283
+ setPagination: N,
284
+ setLoading: re,
285
+ redoHeight: me,
286
+ getDataSource: qe,
287
+ getPagination: _e,
288
+ getSelectRowKeys: Ae,
289
+ getSelectRows: Fe,
290
+ getTableInstance: U,
291
+ getLoading: x,
292
+ getTableColumns: ct,
293
+ setSelectedRowKeys: Ne,
294
+ clearSelectedRowKeys: se,
295
+ selectedKeys: H,
296
+ selectedRows: B,
297
+ ...ft
298
+ };
299
+ return io({
300
+ ..._,
301
+ wrapRef: v,
302
+ getBindValues: j
303
+ }), Te({
304
+ ..._,
305
+ xGrid: gt
306
+ }), (ge = s.bindState) == null || ge.call(s, {
307
+ loading: x,
308
+ selectedKeys: H,
309
+ selectedRows: B
310
+ }), w && i("register", _, `${w.uid}`), J(() => {
311
+ e(l).autoHeight && me();
312
+ }), Dt(() => {
313
+ var t;
314
+ (t = s.mount) == null || t.call(s, e(p), _), J(() => {
315
+ var o, r;
316
+ return (r = (o = e(v)) == null ? void 0 : o.querySelector(".vxe-toolbar")) == null ? void 0 : r.setAttribute("data-testid", e(Ee));
513
317
  });
514
- }), It(() => {
515
- var e;
516
- document.removeEventListener("keydown", fe, !0), (e = i == null ? void 0 : i.unmount) == null || e.call(i);
517
- }), (e, o) => (p(), y("div", {
318
+ }), ye(() => {
319
+ var t;
320
+ (t = s == null ? void 0 : s.unmount) == null || t.call(s);
321
+ }), (t, o) => (c(), g("div", {
518
322
  ref_key: "wrapRef",
519
- ref: k,
520
- class: A([t(E), t(ae).class]),
521
- "data-testid": Ae.value,
522
- "data-table-columns": JSON.stringify(t(we)().map((r) => ({
523
- title: r.title,
524
- field: r.field
525
- }))),
526
- onKeydownCapture: de
527
- }, [F(t(Yt), re({
323
+ ref: v,
324
+ class: z([e(b), e(te).class]),
325
+ "data-testid": Ve.value,
326
+ onKeydownCapture: o[3] || (o[3] = //@ts-ignore
327
+ (...r) => e(pe) && e(pe)(...r))
328
+ }, [D(e(jt), Q({
528
329
  ref_key: "xGrid",
529
- ref: b
530
- }, pe.value, {
531
- onFilterChange: o[2] || (o[2] = (r) => t(Ce)())
532
- }, Dt(mt.value), {
533
- onFilterVisible: vt
534
- }), Nt({
535
- empty: m(() => [t(W) ? (p(), y("div", {
536
- key: 1,
537
- class: A(`${t(E)}-empty-image`)
538
- }, [P("span", null, M(R.emptyText || ""), 1)], 2)) : (p(), y("div", {
539
- key: 0,
540
- class: A(`${t(E)}-empty-image`)
541
- }, [t(lt) || !d.value.api ? (p(), y(Ee, {
330
+ ref: p
331
+ }, e(ut), Mt(yt.value), {
332
+ onFilterChange: o[2] || (o[2] = (r) => e(de)())
333
+ }), Kt({
334
+ empty: n(() => [d(t.$slots, "empty", P(K({
335
+ isLoaded: e(ce),
336
+ loading: e(x),
337
+ emptyTip: W.value
338
+ })), () => [f("div", {
339
+ class: z(`${e(b)}-empty-image`)
340
+ }, [e(x) ? (c(), g("span", ko, Y(l.value.emptyText || ""), 1)) : (c(), g(At, {
542
341
  key: 0
543
- }, [F(t(Ie), {
544
- style: $(ke.value),
545
- status: R.emptyImageStatus
546
- }, null, 8, ["style", "status"]), R.emptyText ? (p(), y("span", vo, M(R.emptyText), 1)) : H("", !0)], 64)) : (p(), y(Ee, {
547
- key: 1
548
- }, [F(t(Ie), {
549
- style: $(ke.value),
550
- status: R.emptyImageStatus
551
- }, null, 8, ["style", "status"]), R.noSearchText ? (p(), y("span", Co, M(R.noSearchText), 1)) : H("", !0)], 64))], 2))]),
552
- left: m(() => [S(e.$slots, "left", {}, () => [t(z) ? (p(), ne(t(Oe), {
342
+ }, [D(e(Qt), {
343
+ style: y(ht.value),
344
+ status: l.value.emptyImageStatus
345
+ }, null, 8, ["style", "status"]), W.value ? (c(), g("span", Ro, Y(W.value), 1)) : M("", !0)], 64))], 2)])]),
346
+ left: n(() => [d(t.$slots, "left", {}, () => [e(C) ? (c(), X(e(we), {
553
347
  key: 0,
554
- ref_key: "leftSlotScrollbarRef",
555
- ref: tt,
348
+ ref_key: "leftScrollbarRef",
349
+ ref: ot,
556
350
  "wrap-class": "overflow-hidden",
557
351
  class: "tt-table-left-right-scroll",
558
- height: `${t(z)}px`,
559
- style: $({
560
- width: `${d.value.leftSlotWidth}px`,
561
- height: `${t(z)}px`,
562
- marginTop: `${t(Se)}px`
352
+ height: `${e(C)}px`,
353
+ style: y({
354
+ width: `${l.value.leftSlotWidth}px`,
355
+ height: `${e(C)}px`,
356
+ marginTop: `${e(ae)}px`
563
357
  })
564
358
  }, {
565
- default: m(() => [P("div", {
359
+ default: n(() => [f("div", {
566
360
  class: "float-left w-0",
567
- style: $({
568
- height: `${t(xe)}px`
361
+ style: y({
362
+ height: `${e(ie)}px`
569
363
  })
570
- }, null, 4), P("div", {
571
- style: $({
364
+ }, null, 4), f("div", {
365
+ class: "relative",
366
+ style: y({
572
367
  width: "100%",
573
- height: `${t(q)}px`,
574
- marginTop: `${t(ve)}`
575
- }),
576
- class: "relative"
577
- }, [S(e.$slots, "tableLeft", j(X({
578
- rowNodes: t(ye),
579
- height: t(q)
368
+ height: `${e(E)}px`,
369
+ marginTop: `${e(ne)}px`
370
+ })
371
+ }, [d(t.$slots, "tableLeft", P(K({
372
+ rowNodes: e(le),
373
+ height: e(E)
580
374
  })))], 4)]),
581
375
  _: 3
582
- }, 8, ["height", "style"])) : H("", !0)])]),
583
- right: m(() => [S(e.$slots, "right", {}, () => [t(z) ? (p(), ne(t(Oe), {
376
+ }, 8, ["height", "style"])) : M("", !0)])]),
377
+ right: n(() => [d(t.$slots, "right", {}, () => [e(C) ? (c(), X(e(we), {
584
378
  key: 0,
585
- ref_key: "rightSlotScrollbarRef",
586
- ref: ot,
379
+ ref_key: "rightScrollbarRef",
380
+ ref: rt,
587
381
  "wrap-class": "overflow-hidden",
588
382
  class: "tt-table-left-right-scroll",
589
383
  always: "",
590
- height: `${t(z)}px`,
591
- style: $({
592
- width: `${d.value.rightSlotWidth}px`,
593
- height: `${t(z)}px`,
594
- marginTop: `${t(Se)}px`
384
+ height: `${e(C)}px`,
385
+ style: y({
386
+ width: `${l.value.rightSlotWidth}px`,
387
+ height: `${e(C)}px`,
388
+ marginTop: `${e(ae)}px`
595
389
  })
596
390
  }, {
597
- default: m(() => [P("div", {
391
+ default: n(() => [f("div", {
598
392
  class: "float-left w-0",
599
- style: $({
600
- height: `${t(xe)}px`
393
+ style: y({
394
+ height: `${e(ie)}px`
601
395
  })
602
- }, null, 4), P("div", {
603
- style: $({
396
+ }, null, 4), f("div", {
397
+ class: "relative",
398
+ style: y({
604
399
  width: "100%",
605
- height: `${t(q)}px`,
606
- marginTop: `${t(ve)}`
607
- }),
608
- class: "relative"
609
- }, [S(e.$slots, "tableRight", j(X({
610
- rowNodes: t(ye),
611
- height: t(q)
400
+ height: `${e(E)}px`,
401
+ marginTop: `${e(ne)}px`
402
+ })
403
+ }, [d(t.$slots, "tableRight", P(K({
404
+ rowNodes: e(le),
405
+ height: e(E)
612
406
  })))], 4)]),
613
407
  _: 3
614
- }, 8, ["height", "style"])) : H("", !0)])]),
408
+ }, 8, ["height", "style"])) : M("", !0)])]),
615
409
  _: 2
616
- }, [se(t(at), (r) => ({
410
+ }, [Z(e(nt), (r) => ({
617
411
  name: r,
618
- fn: m((n) => [P("div", {
619
- class: "flex items-center",
620
- onClick: zt((s) => ht(n.column), ["stop"])
621
- }, [P("div", bo, [S(e.$slots, Tt(n), j(X(n)), () => [F(t(to), {
622
- "tool-tip": ft.value
623
- }, {
624
- default: m(() => [le(M(n.column.title), 1)]),
625
- _: 2
626
- }, 1032, ["tool-tip"])])]), n.column.sortable ? (p(), y("div", {
627
- key: 0,
628
- class: A(["flex-x", {
629
- "is-order": n.column.order,
630
- [`${t(E)}-custom-sort`]: !0
412
+ fn: n(({
413
+ column: a
414
+ }) => [f("div", {
415
+ class: z(["flex-x", {
416
+ "is-order": a.order,
417
+ [`${e(b)}-custom-sort`]: !0
631
418
  }])
632
- }, [n.column.order === "asc" ? (p(), y("img", {
419
+ }, [a.order === "asc" ? (c(), g("img", {
633
420
  key: 0,
634
- src: t(eo)
635
- }, null, 8, ho)) : n.column.order === "desc" ? (p(), y("img", {
421
+ src: e(Jt)
422
+ }, null, 8, wo)) : a.order === "desc" ? (c(), g("img", {
636
423
  key: 1,
637
- src: t(Qt)
638
- }, null, 8, yo)) : (p(), y("img", {
424
+ src: e(Ut)
425
+ }, null, 8, xo)) : (c(), g("img", {
639
426
  key: 2,
640
- src: t(Zt)
641
- }, null, 8, So))], 2)) : H("", !0)], 8, go)])
642
- })), se(Object.keys(e.$slots), (r) => ({
427
+ src: e(qt)
428
+ }, null, 8, $o))], 2)])
429
+ })), Z(kt(t.$slots), (r) => ({
643
430
  name: r,
644
- fn: m((n) => [r.includes("action") ? (p(), ne(t(oo), {
431
+ fn: n((a) => [r.includes("action") ? (c(), X(e(Xt), {
645
432
  key: 0,
646
- "row-index": n.$rowIndex
433
+ "row-index": a.$rowIndex
647
434
  }, {
648
- default: m(() => [S(e.$slots, r, re(n, {
649
- rowIndex: n.$rowIndex
435
+ default: n(() => [d(t.$slots, r, Q(a, {
436
+ rowIndex: a.$rowIndex
650
437
  }))]),
651
438
  _: 2
652
- }, 1032, ["row-index"])) : S(e.$slots, r, j(re({
439
+ }, 1032, ["row-index"])) : d(t.$slots, r, P(Q({
653
440
  key: 1
654
- }, n)))])
655
- })), C.value.showTableAlert ? {
441
+ }, a)))])
442
+ })), e(j).showTableAlert ? {
656
443
  name: "top",
657
- fn: m(() => [P("div", {
658
- class: A(`${t(E)}-top-alert`)
659
- }, [o[3] || (o[3] = le(" 已选中 ", -1)), P("span", xo, M(t(Ge).length), 1), o[4] || (o[4] = le(" 条 ", -1)), S(e.$slots, "top_title")], 2)]),
444
+ fn: n(() => [f("div", {
445
+ class: z(`${e(b)}-top-alert`)
446
+ }, [o[4] || (o[4] = Ce(" 已选中 ", -1)), f("span", To, Y(e(Ke).length), 1), o[5] || (o[5] = Ce(" 条 ", -1)), d(t.$slots, "top_title")], 2)]),
660
447
  key: "0"
661
- } : void 0, t(D).toolbar_buttons ? {
448
+ } : void 0, e(A).toolbar_buttons ? {
662
449
  name: "toolbar_buttons",
663
- fn: m(() => [S(e.$slots, "toolbar_buttons")]),
450
+ fn: n(() => [d(t.$slots, "toolbar_buttons")]),
664
451
  key: "1"
665
- } : void 0, t(D).toolbar_tools ? {
452
+ } : void 0, e(A).toolbar_tools ? {
666
453
  name: "toolbar_tools",
667
- fn: m(() => [S(e.$slots, "toolbar_tools")]),
454
+ fn: n(() => [d(t.$slots, "toolbar_tools")]),
668
455
  key: "2"
669
- } : void 0, se(t(it), (r) => ({
456
+ } : void 0, Z(e(it), (r) => ({
670
457
  name: r,
671
- fn: m(({
672
- content: n,
673
- rowIndex: s,
674
- columnIndex: l,
675
- column: a,
676
- fixed: c
677
- }) => [!c || c === a.fixed ? (p(), y("div", {
458
+ fn: n(({
459
+ content: a,
460
+ rowIndex: T,
461
+ columnIndex: R,
462
+ column: k,
463
+ fixed: fe
464
+ }) => [!fe || fe === k.fixed ? (c(), g("div", {
678
465
  key: 0,
679
- ref: (u) => bt(u, `valid_${s}_${l}`),
466
+ ref: (Pt) => St(Pt, `valid_${T}_${R}`),
680
467
  class: "h-full w-full"
681
- }, [F(t(Gt), {
682
- placement: d.value.toolTipErrorPlacement,
683
- "err-msg": n,
684
- "ref-dom": me.value[`valid_${s}_${l}`]
685
- }, null, 8, ["placement", "err-msg", "ref-dom"])], 512)) : H("", !0)])
686
- })), C.value.showPager ? {
468
+ }, [D(e(Lt), {
469
+ placement: l.value.toolTipErrorPlacement,
470
+ "err-msg": a,
471
+ "ref-dom": F.value[`valid_${T}_${R}`]
472
+ }, null, 8, ["placement", "err-msg", "ref-dom"])], 512)) : M("", !0)])
473
+ })), e(j).showPager ? {
687
474
  name: "pager",
688
- fn: m(() => {
689
- var r, n, s, l;
690
- return [F(t(qt), {
691
- "current-page": t(L).currentPage,
692
- "onUpdate:currentPage": o[0] || (o[0] = (a) => t(L).currentPage = a),
693
- "page-size": t(L).pageSize,
694
- "onUpdate:pageSize": o[1] || (o[1] = (a) => t(L).pageSize = a),
695
- "page-sizes": (r = t(N)) == null ? void 0 : r.pageSizes,
696
- layouts: (n = t(N)) == null ? void 0 : n.layouts,
697
- total: ((s = t(N)) == null ? void 0 : s.total) || t(st).length,
698
- size: (l = t(N)) == null ? void 0 : l.size,
699
- "class-name": `${t(E)}-vxe-pager`,
700
- onPageChange: t(Me)
475
+ fn: n(() => {
476
+ var r, a, T, R;
477
+ return [D(e(Gt), {
478
+ "current-page": e($).currentPage,
479
+ "onUpdate:currentPage": o[0] || (o[0] = (k) => e($).currentPage = k),
480
+ "page-size": e($).pageSize,
481
+ "onUpdate:pageSize": o[1] || (o[1] = (k) => e($).pageSize = k),
482
+ "page-sizes": (r = e(S)) == null ? void 0 : r.pageSizes,
483
+ layouts: (a = e(S)) == null ? void 0 : a.layouts,
484
+ total: ((T = e(S)) == null ? void 0 : T.total) || e(V).length,
485
+ size: (R = e(S)) == null ? void 0 : R.size,
486
+ "class-name": `${e(b)}-vxe-pager`,
487
+ onPageChange: e(ze)
701
488
  }, {
702
- left: m(() => [S(e.$slots, "pager_left", j(X({
703
- selectedKeys: t(te)
704
- }))), S(e.$slots, "buttom_left")]),
489
+ left: n(() => [d(t.$slots, "pager_left", P(K({
490
+ selectedKeys: e(H)
491
+ }))), d(t.$slots, "buttom_left")]),
705
492
  _: 3
706
493
  }, 8, ["current-page", "page-size", "page-sizes", "layouts", "total", "size", "class-name", "onPageChange"])];
707
494
  }),
708
495
  key: "3"
709
- } : void 0]), 1040)], 42, mo));
496
+ } : void 0]), 1040)], 42, Co));
710
497
  }
711
498
  });
712
499
  export {
713
- ur as default
500
+ br as default
714
501
  };