@dazhicheng/ui 1.5.266 → 1.6.1

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 (182) hide show
  1. package/dist/components/tt-api-component/index.js +4 -3
  2. package/dist/components/tt-api-component/index.vue2.js +4 -3
  3. package/dist/components/tt-area/TtArea.vue.js +1 -1
  4. package/dist/components/tt-area/TtArea.vue3.js +8 -7
  5. package/dist/components/tt-button/index.js +5 -4
  6. package/dist/components/tt-button/index.vue2.js +4 -3
  7. package/dist/components/tt-checkbox/index.js +4 -3
  8. package/dist/components/tt-checkbox/index.vue.js +4 -3
  9. package/dist/components/tt-drawer/index.js +4 -3
  10. package/dist/components/tt-drawer/src/RenderDrawer.vue.js +4 -3
  11. package/dist/components/tt-drawer/src/components/DrawerFooter.vue.js +8 -7
  12. package/dist/components/tt-drawer/src/components/DrawerHeader.vue.js +2 -2
  13. package/dist/components/tt-drawer/src/components/DrawerHeader.vue2.js +3 -2
  14. package/dist/components/tt-drawer/src/hooks/useResizable.js +2 -2
  15. package/dist/components/tt-drawer/src/props.js +3 -2
  16. package/dist/components/tt-drawer/src/utils/drawer-api.js +4 -2
  17. package/dist/components/tt-empty/index.js +9 -8
  18. package/dist/components/tt-form/index.js +10 -9
  19. package/dist/components/tt-form/src/components/ExpandableArrow.vue2.js +3 -2
  20. package/dist/components/tt-form/src/components/FormActions.vue2.js +4 -2
  21. package/dist/components/tt-form/src/form/FormDescription.vue.js +3 -2
  22. package/dist/components/tt-form/src/form/FormItem.vue.js +6 -5
  23. package/dist/components/tt-form/src/form/FormLabel.vue.js +8 -7
  24. package/dist/components/tt-form/src/form/RenderContent.vue.js +4 -3
  25. package/dist/components/tt-form/src/form-render/FormField.vue2.js +30 -28
  26. package/dist/components/tt-form/src/form-render/FormLabel.vue2.js +4 -2
  27. package/dist/components/tt-form/src/form-render/array-register/FormArrayRegister.d.ts +3 -3
  28. package/dist/components/tt-form/src/form-render/array-register/FormArrayRegister.js +1 -0
  29. package/dist/components/tt-form/src/form-render/array-register/utils.js +6 -4
  30. package/dist/components/tt-form/src/form-render/dependencies.js +19 -18
  31. package/dist/components/tt-form/src/form-render/form.vue2.js +4 -2
  32. package/dist/components/tt-form/src/form-render/helper.js +15 -14
  33. package/dist/components/tt-form/src/form-render/rootWrapperClass.js +3 -2
  34. package/dist/components/tt-form/src/formApi.js +3 -2
  35. package/dist/components/tt-form/src/group-form/GroupForm.vue2.js +4 -3
  36. package/dist/components/tt-form/src/group-form/GroupSection.vue2.js +2 -0
  37. package/dist/components/tt-form/src/group-form/LazyFormField.vue.js +4 -2
  38. package/dist/components/tt-form/src/group-form/groupFormApi.js +4 -3
  39. package/dist/components/tt-form/src/hooks/useForwardPriorityValues.js +3 -2
  40. package/dist/components/tt-form/src/hooks/useSelectCollapse.js +28 -27
  41. package/dist/components/tt-form/src/index.vue2.js +3 -2
  42. package/dist/components/tt-form/src/useFormContext.js +11 -10
  43. package/dist/components/tt-form-item-error-tooltip/index.js +5 -4
  44. package/dist/components/tt-form-item-error-tooltip/index.vue.js +4 -3
  45. package/dist/components/tt-icon/index.js +6 -5
  46. package/dist/components/tt-icon/index.vue.js +2 -2
  47. package/dist/components/tt-image/index.js +6 -5
  48. package/dist/components/tt-image/src/components/ImageViewer.js +7 -6
  49. package/dist/components/tt-loading/index.js +4 -3
  50. package/dist/components/tt-loading/src/directive.js +24 -23
  51. package/dist/components/tt-loading/src/loading.vue.js +2 -2
  52. package/dist/components/tt-log/index.js +4 -3
  53. package/dist/components/tt-log/index.vue.js +3 -2
  54. package/dist/components/tt-modal/index.js +3 -2
  55. package/dist/components/tt-modal/src/RenderModal.vue.js +3 -2
  56. package/dist/components/tt-modal/src/components/ModalFooter.vue2.js +3 -2
  57. package/dist/components/tt-modal/src/components/ModalHeader.vue2.js +3 -2
  58. package/dist/components/tt-modal/src/components/ModalWrapper.vue.js +15 -14
  59. package/dist/components/tt-modal/src/props.js +3 -2
  60. package/dist/components/tt-modal/src/utils/modal-api.js +4 -2
  61. package/dist/components/tt-modal-form/index.vue.js +4 -3
  62. package/dist/components/tt-nav-anchor/index.js +4 -3
  63. package/dist/components/tt-nav-anchor/src/TtNavAnchor.vue.js +15 -14
  64. package/dist/components/tt-panel-select/index.js +4 -3
  65. package/dist/components/tt-panel-select/src/components/PanelMiddle.vue.d.ts +2 -2
  66. package/dist/components/tt-panel-select/src/hooks/usePanelData.js +95 -87
  67. package/dist/components/tt-panel-select/src/index.vue.js +4 -2
  68. package/dist/components/tt-radio-group/index.js +4 -3
  69. package/dist/components/tt-radio-group/index.vue.js +7 -6
  70. package/dist/components/tt-select/index.js +4 -3
  71. package/dist/components/tt-select/src/Select.vue.d.ts +12 -12
  72. package/dist/components/tt-select/src/Select.vue.js +4 -3
  73. package/dist/components/tt-select/src/components/SelectTable.vue.d.ts +116 -7
  74. package/dist/components/tt-select/src/components/SelectTable.vue.js +3 -2
  75. package/dist/components/tt-select/src/components/Table.vue.d.ts +8 -8
  76. package/dist/components/tt-select/src/components/Table.vue.js +3 -2
  77. package/dist/components/tt-select/src/hooks/useDataSource.js +4 -3
  78. package/dist/components/tt-select/src/hooks/useKeyboard.d.ts +7 -1
  79. package/dist/components/tt-select/src/hooks/useSelect.js +3 -2
  80. package/dist/components/tt-select/src/hooks/useSelectTableEvent.d.ts +1 -1
  81. package/dist/components/tt-select/src/hooks/useSelectTableEvent.js +28 -27
  82. package/dist/components/tt-select/src/props.d.ts +2 -2
  83. package/dist/components/tt-table/index.d.ts +526 -361
  84. package/dist/components/tt-table/index.js +7 -5
  85. package/dist/components/tt-table/src/Table.vue.d.ts +308 -218
  86. package/dist/components/tt-table/src/Table.vue.js +406 -618
  87. package/dist/components/tt-table/src/TableForm.vue.d.ts +384 -19
  88. package/dist/components/tt-table/src/TableForm.vue.js +219 -229
  89. package/dist/components/tt-table/src/components/TableAction.vue.js +110 -131
  90. package/dist/components/tt-table/src/components/TableButtons.js +30 -29
  91. package/dist/components/tt-table/src/components/TableColumnModal.vue2.js +88 -84
  92. package/dist/components/tt-table/src/components/TableToolbarTools.vue.d.ts +80 -0
  93. package/dist/components/tt-table/src/components/{TableToobalTools.vue.js → TableToolbarTools.vue.js} +34 -35
  94. package/dist/components/tt-table/src/components/TableToolbarTools.vue2.js +4 -0
  95. package/dist/components/tt-table/src/emits.d.ts +10 -1
  96. package/dist/components/tt-table/src/emits.js +2 -1
  97. package/dist/components/tt-table/src/hooks/useColumnPersistence.d.ts +19 -0
  98. package/dist/components/tt-table/src/hooks/useColumnPersistence.js +64 -0
  99. package/dist/components/tt-table/src/hooks/useColumns.d.ts +505 -21
  100. package/dist/components/tt-table/src/hooks/useColumns.js +101 -245
  101. package/dist/components/tt-table/src/hooks/useGridProps.d.ts +36 -0
  102. package/dist/components/tt-table/src/hooks/useGridProps.js +121 -0
  103. package/dist/components/tt-table/src/hooks/useKeyboardNav.d.ts +11 -0
  104. package/dist/components/tt-table/src/hooks/useKeyboardNav.js +98 -0
  105. package/dist/components/tt-table/src/hooks/usePagination.d.ts +14 -8
  106. package/dist/components/tt-table/src/hooks/usePagination.js +30 -33
  107. package/dist/components/tt-table/src/hooks/useQuery.d.ts +41 -0
  108. package/dist/components/tt-table/src/hooks/useQuery.js +148 -0
  109. package/dist/components/tt-table/src/hooks/useRowIdentity.d.ts +22 -0
  110. package/dist/components/tt-table/src/hooks/useRowIdentity.js +97 -0
  111. package/dist/components/tt-table/src/hooks/useRowSelection.d.ts +24 -12
  112. package/dist/components/tt-table/src/hooks/useRowSelection.js +95 -70
  113. package/dist/components/tt-table/src/hooks/{useLeftRightSlot.d.ts → useSideSlot.d.ts} +25 -17
  114. package/dist/components/tt-table/src/hooks/useSideSlot.js +78 -0
  115. package/dist/components/tt-table/src/hooks/useSyncProps.d.ts +12 -0
  116. package/dist/components/tt-table/src/hooks/useSyncProps.js +56 -0
  117. package/dist/components/tt-table/src/hooks/useTableData.d.ts +71 -0
  118. package/dist/components/tt-table/src/hooks/useTableData.js +308 -0
  119. package/dist/components/tt-table/src/hooks/useTableFooter.d.ts +15 -0
  120. package/dist/components/tt-table/src/hooks/useTableFooter.js +47 -0
  121. package/dist/components/tt-table/src/hooks/useTableForm.d.ts +10 -5
  122. package/dist/components/tt-table/src/hooks/useTableForm.js +56 -48
  123. package/dist/components/tt-table/src/hooks/useTableMethods.d.ts +165 -0
  124. package/dist/components/tt-table/src/hooks/useTableMethods.js +183 -0
  125. package/dist/components/tt-table/src/hooks/useTableRender.d.ts +57 -55
  126. package/dist/components/tt-table/src/props.d.ts +326 -153
  127. package/dist/components/tt-table/src/props.js +125 -271
  128. package/dist/components/tt-table/src/table-defaults.d.ts +25 -0
  129. package/dist/components/tt-table/src/table-defaults.js +71 -0
  130. package/dist/components/tt-table/src/table-mutation-events.d.ts +43 -0
  131. package/dist/components/tt-table/src/table-mutation-events.js +71 -0
  132. package/dist/components/tt-table/src/types/table.d.ts +223 -88
  133. package/dist/components/tt-table/src/types/tableAction.d.ts +23 -0
  134. package/dist/components/tt-table/src/types/tableForm.d.ts +15 -26
  135. package/dist/components/tt-table/src/utils/action-tab-index.d.ts +2 -0
  136. package/dist/components/tt-table/src/utils/action-tab-index.js +51 -0
  137. package/dist/components/tt-table/src/utils/context.js +26 -12
  138. package/dist/components/tt-table/src/utils/table-api.d.ts +136 -58
  139. package/dist/components/tt-table/src/utils/table-api.js +200 -165
  140. package/dist/components/tt-table/src/utils/table-form-api.d.ts +11 -11
  141. package/dist/components/tt-table/src/utils/table-form-api.js +35 -23
  142. package/dist/components/tt-text/index.js +4 -3
  143. package/dist/components/tt-upload/index.js +6 -5
  144. package/dist/components/tt-upload/src/TtUpload.vue.js +4 -3
  145. package/dist/components/types.d.ts +0 -20
  146. package/dist/directives/disabled-tip/index.js +9 -8
  147. package/dist/hooks/useFormSchemasLink.js +4 -3
  148. package/dist/hooks/useFormat.d.ts +35 -71
  149. package/dist/hooks/useFormat.js +28 -39
  150. package/dist/hooks/usePanelSelectSchemas.js +4 -3
  151. package/dist/hooks/useScreenshotOss.js +16 -15
  152. package/dist/hooks/useSetup.js +0 -3
  153. package/dist/packages/hooks/src/useDebounce.js +6 -5
  154. package/dist/packages/hooks/src/useElementScreenshot.js +4 -3
  155. package/dist/packages/hooks/src/usePriorityValue.js +5 -4
  156. package/dist/packages/utils/src/format.js +48 -0
  157. package/dist/packages/utils/src/is.js +20 -18
  158. package/dist/packages/utils/src/tool.js +76 -149
  159. package/dist/plugins/default/renderCellContent.js +4 -3
  160. package/dist/plugins/vxeTable/switchStatus.js +14 -13
  161. package/dist/style.css +1 -1
  162. package/package.json +3 -3
  163. package/dist/components/tt-table/src/components/TableToobalTools.vue.d.ts +0 -576
  164. package/dist/components/tt-table/src/components/TableToobalTools.vue2.js +0 -4
  165. package/dist/components/tt-table/src/enum.d.ts +0 -2
  166. package/dist/components/tt-table/src/hooks/useCellArea.d.ts +0 -15
  167. package/dist/components/tt-table/src/hooks/useCellArea.js +0 -15
  168. package/dist/components/tt-table/src/hooks/useCustomColumns.d.ts +0 -20
  169. package/dist/components/tt-table/src/hooks/useCustomColumns.js +0 -65
  170. package/dist/components/tt-table/src/hooks/useDataSource.d.ts +0 -29
  171. package/dist/components/tt-table/src/hooks/useDataSource.js +0 -232
  172. package/dist/components/tt-table/src/hooks/useLeftRightSlot.js +0 -64
  173. package/dist/components/tt-table/src/hooks/useTable.d.ts +0 -7
  174. package/dist/components/tt-table/src/hooks/useTableEvent.d.ts +0 -101
  175. package/dist/components/tt-table/src/hooks/useTableEvent.js +0 -197
  176. package/dist/components/tt-table/src/hooks/useTableFormEvent.d.ts +0 -10
  177. package/dist/components/tt-table/src/hooks/useTableHeight.d.ts +0 -15
  178. package/dist/components/tt-table/src/hooks/useTableSlot.d.ts +0 -11
  179. package/dist/components/tt-table/src/hooks/useTableSlot.js +0 -17
  180. package/dist/components/tt-table/src/utils/filters.d.ts +0 -109
  181. package/dist/components/tt-table/src/utils/vxeTable.d.ts +0 -28
  182. package/dist/packages/utils/src/check.js +0 -10
@@ -1,714 +1,502 @@
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 "numeral";
10
+ import { extractResourceFromApi as Ht, generateTestId as xe } from "../../../packages/utils/src/testid-helper.js";
11
+ import "xe-utils";
12
+ import "dayjs/plugin/utc";
13
+ import "dayjs/plugin/timezone";
11
14
  import "../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
12
15
  import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
13
16
  import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
14
17
  import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
15
18
  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";
19
+ import { omit as $e } from "lodash-es";
18
20
  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 = {
21
+ import { useStore as Bt } from "@tanstack/vue-store";
22
+ import { VxePager as Gt } from "vxe-pc-ui";
23
+ import { VxeGrid as jt } from "vxe-table";
24
+ import { tableProps as Wt } from "vxe-table/es/table/src/props";
25
+ import Ut from "../../../assets/svg/paixu-jiangxu.svg.js";
26
+ import qt from "../../../assets/svg/paixu-moren.svg.js";
27
+ import Jt from "../../../assets/svg/paixu-shengxu.svg.js";
28
+ import { TtImage as Qt } from "../../tt-image/index.js";
29
+ import { RowContext as Xt } from "./components/RowContext.js";
30
+ import { basicTableEmits as Yt } from "./emits.js";
31
+ import { useColumns as Zt } from "./hooks/useColumns.js";
32
+ import { useGridProps as eo } from "./hooks/useGridProps.js";
33
+ import { useKeyboardNav as to } from "./hooks/useKeyboardNav.js";
34
+ import { usePagination as oo } from "./hooks/usePagination.js";
35
+ import { useQuery as ro } from "./hooks/useQuery.js";
36
+ import { useRowIdentity as so } from "./hooks/useRowIdentity.js";
37
+ import { useRowSelection as lo } from "./hooks/useRowSelection.js";
38
+ import { useSideSlot as ao } from "./hooks/useSideSlot.js";
39
+ import { useSyncProps as no } from "./hooks/useSyncProps.js";
40
+ import { createTableContext as io } from "./hooks/useTableContext.js";
41
+ import { useTableData as co } from "./hooks/useTableData.js";
42
+ import { useTableFooter as po } from "./hooks/useTableFooter.js";
43
+ import { useTableMethods as mo } from "./hooks/useTableMethods.js";
44
+ import { tableOtherProps as uo, tableProps as go } from "./props.js";
45
+ import { forwardedEventEntries as fo, isDisplayOnlyEvent as ho, isRowDataMutationEvent as yo, getMutationCommitSource as bo } from "./table-mutation-events.js";
46
+ import { TableApi as So } from "./utils/table-api.js";
47
+ const Co = ["data-testid"], wo = ["src"], xo = ["src"], $o = ["src"], To = {
45
48
  style: {
46
49
  color: "#009ffa"
47
50
  }
48
- }, vo = {
51
+ }, Ro = {
49
52
  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({
53
+ }, ko = {
54
+ key: 1
55
+ }, Sr = /* @__PURE__ */ vt({
53
56
  name: "TtTable",
54
57
  __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
58
+ props: /* @__PURE__ */ he({
59
+ ...Wt,
60
+ ...go,
61
+ ...uo
62
+ }, {
63
+ modelValue: {},
64
+ modelModifiers: {}
65
+ }),
66
+ emits: /* @__PURE__ */ he(["register", "fetch-success", "fetch-error", "selection-change", ...Yt], ["update:modelValue"]),
67
+ setup(ee, {
68
+ expose: Te,
69
+ emit: Re
64
70
  }) {
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;
71
+ var ue, ge;
72
+ const h = ee, ke = It(ee, "modelValue"), i = Re, te = Vt(), A = Et(), w = _t(), {
73
+ prefixCls: b
74
+ } = 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({});
75
+ let s = h.tableApi;
76
+ s || (s = new So($e(h, ["modelValue"])), s.useStore = (t) => Bt(s.store, t));
77
+ const I = zt({});
78
+ function oe() {
79
+ Object.assign(I, Se(s.store.state) || {});
151
80
  }
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);
81
+ oe(), ye(s.store.subscribe(oe));
82
+ const l = m(() => I), ve = Pe ? () => Ft(h.data) : () => I.data, Ie = () => I.api;
83
+ be(`${b}-props`, l);
84
+ const L = m(() => h.testId || (h.api ? Ht(h.api) : "table")), Ve = m(() => xe(e(L), "table")), Ee = m(() => xe(e(L), "table-toolbar"));
85
+ be("tableIdContext", L);
170
86
  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
- }
87
+ getLoading: x,
88
+ setLoading: re
89
+ } = Nt(m(() => e(l).loading || !1)), {
90
+ pagination: $,
91
+ paginationInfo: S,
92
+ getPagination: _e,
93
+ setPagination: N,
94
+ onPageChange: ze
95
+ } = oo(l, i), {
96
+ getRowKey: De,
97
+ prepareRows: O,
98
+ toVxeRowConfig: Me
99
+ } = so(l), {
100
+ selectedKeys: H,
101
+ selectedRows: B,
102
+ selectedKeyList: Ke,
103
+ getSelectRowKeys: Ae,
104
+ getSelectRows: Fe,
105
+ syncSelection: Le,
106
+ setSelectedRowKeys: Ne,
107
+ clearSelectedRowKeys: se,
108
+ resetSelectionAfterFetch: Oe,
109
+ onCheckboxChange: He,
110
+ onCheckboxAll: Be,
111
+ onCheckboxRangeChange: Ge,
112
+ onRadioChange: je,
113
+ onCellAreaSelectionEnd: We
114
+ } = lo(l, p, i, {
115
+ getRowKey: De
116
+ }), {
117
+ rows: V,
118
+ applyRows: Ue,
119
+ getDataSource: qe,
120
+ runDataOperation: Je,
121
+ scheduleRowsCommit: G,
122
+ cancelRowsCommit: Qe,
123
+ onDataChange: Xe,
124
+ createTableInstanceFacade: Ye,
125
+ isActive: Ze
126
+ } = co(l, p, ke, i, {
127
+ data: ve,
128
+ api: Ie,
129
+ prepareRows: O,
130
+ onSelectionMutated: Le
131
+ }), {
132
+ refresh: et,
133
+ syncScroll: tt,
134
+ rowNodes: le,
135
+ headerHeight: ae,
136
+ bodyHeight: E,
137
+ bodyWrapperHeight: C,
138
+ bodyOffsetTop: ne,
139
+ bodyScrollHeight: ie,
140
+ leftScrollbarRef: ot,
141
+ rightScrollbarRef: rt
142
+ } = ao(l, p, V), {
143
+ reload: st,
144
+ reloadFilter: de,
145
+ isLoaded: ce
146
+ } = ro(l, {
147
+ grid: p,
148
+ pagination: $,
149
+ paginationInfo: S,
150
+ setPagination: N,
151
+ setLoading: re,
152
+ resetSelectionAfterFetch: Oe,
153
+ rows: V,
154
+ applyRows: Ue
155
+ }, i), {
156
+ gridColumns: lt,
157
+ hasExpandColumn: at,
158
+ sortIconSlots: nt,
159
+ validSlots: it,
160
+ setTableColumns: dt,
161
+ getTableColumns: ct,
162
+ onColumnDragend: pt
163
+ } = Zt(l, p, i), {
164
+ footerSummaryMethod: mt
165
+ } = po(lt), {
166
+ bindValues: j,
167
+ gridProps: ut
168
+ } = eo(l, {
169
+ attrs: te,
170
+ slots: A
314
171
  }, {
315
- deep: !0,
316
- immediate: !0
172
+ hasExpandColumn: at,
173
+ footerSummaryMethod: mt,
174
+ onTreeLoadResolved: G,
175
+ prepareRows: O,
176
+ toVxeRowConfig: Me
177
+ }), {
178
+ onTableKeydown: pe
179
+ } = to(v), gt = m(U), ft = mo(l, p, s, {
180
+ runDataOperation: Je,
181
+ clearSelectedRowKeys: se,
182
+ getTableInstance: U,
183
+ isActive: Ze,
184
+ prepareRows: O
317
185
  });
318
- const ke = T(() => {
186
+ no(h, s.setState, ["tableApi", "formApi", "modelValue"]);
187
+ const ht = m(() => ({
188
+ ...e(l).emptyImageStyle
189
+ })), W = m(() => {
319
190
  const {
320
- emptyImageStyle: e
321
- } = K(V);
322
- return {
323
- ...e
191
+ api: t,
192
+ emptyText: o,
193
+ noSearchText: r
194
+ } = e(l);
195
+ return e(ce) || !t ? o : r;
196
+ }), u = {};
197
+ fo.forEach(([t, o]) => {
198
+ u[o] = (...r) => {
199
+ t === "data-change" && Xe(), ho(t) && Qe(), yo(t, r, () => e(B)) && G(bo(t)), i(t, ...r);
324
200
  };
325
201
  });
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
- }
202
+ const yt = m(() => ({
203
+ ...u,
204
+ headerCellClick: Ct,
205
+ sortChange: wt,
206
+ radioChange: je,
207
+ checkboxChange: He,
208
+ checkboxAll: Be,
209
+ checkboxRangeChange: Ge,
210
+ cellAreaSelectionEnd: We,
211
+ columnDragend: pt,
212
+ scroll: xt,
213
+ scrollBoundary: $t,
214
+ toggleRowExpand: Tt,
215
+ editClosed: Rt
351
216
  }));
352
- async function gt(e) {
353
- i.setState(e);
217
+ async function bt(t) {
218
+ s.setState(t);
354
219
  }
355
- function Pe() {
356
- B(() => {
357
- var e;
358
- (e = t(b)) == null || e.recalculate(!0);
220
+ function me() {
221
+ J(() => {
222
+ var t;
223
+ return (t = e(p)) == null ? void 0 : t.recalculate(!0);
359
224
  });
360
225
  }
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
- });
226
+ function St(t, o) {
227
+ if (t) {
228
+ F.value[o] = t;
371
229
  return;
372
230
  }
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);
231
+ delete F.value[o];
392
232
  }
393
- function St(e) {
233
+ function Ct(t) {
394
234
  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;
235
+ (a = u.headerCellClick) == null || a.call(u, t);
402
236
  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
237
+ column: o
238
+ } = t;
239
+ if (o.sortable) return;
240
+ const r = Se(o);
241
+ i("sort-change", {
242
+ order: r.order || "desc",
243
+ originOrder: r.order,
244
+ ...$e(r, ["order"])
410
245
  });
411
246
  }
412
- function xt(e) {
413
- f("toggle-row-expand", e), setTimeout(() => {
414
- Ze(!1);
415
- }, 30);
247
+ function wt(t) {
248
+ var o;
249
+ (o = u.sortChange) == null || o.call(u, t), de("sort");
250
+ }
251
+ function xt(t) {
252
+ 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
253
  }
417
- const vt = (e) => {
418
- var s;
254
+ function $t(t) {
255
+ i("scroll-boundary", t);
419
256
  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(() => {
257
+ isScrollFetch: o
258
+ } = e(l);
259
+ if (!o || !t.isBottom || e(x)) return;
438
260
  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));
261
+ currentPage: r = 0,
262
+ total: a = 0
263
+ } = e(S) || {};
264
+ a <= e(V).length || N({
265
+ currentPage: r + 1
476
266
  });
477
- });
478
- function Ct(e) {
479
- return Object.fromEntries(Object.entries(e).filter(([o]) => !o.startsWith("on")));
480
267
  }
481
- function wt(e, o) {
482
- return Object.fromEntries(Object.keys(e).map((r) => [r, o[r]]));
268
+ function Tt(t) {
269
+ i("toggle-row-expand", t), et(!1);
483
270
  }
484
- function Tt(e) {
485
- return e.column.slots.title;
271
+ function Rt(t) {
272
+ G(), i("edit-closed", t);
486
273
  }
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));
274
+ function U() {
275
+ return Ye(e(p));
276
+ }
277
+ function kt(t) {
278
+ return Object.keys(t).filter((o) => o !== "empty");
279
+ }
280
+ const _ = {
281
+ reload: st,
282
+ setProps: bt,
283
+ setTableColumns: dt,
284
+ setPagination: N,
285
+ setLoading: re,
286
+ redoHeight: me,
287
+ getDataSource: qe,
288
+ getPagination: _e,
289
+ getSelectRowKeys: Ae,
290
+ getSelectRows: Fe,
291
+ getTableInstance: U,
292
+ getLoading: x,
293
+ getTableColumns: ct,
294
+ setSelectedRowKeys: Ne,
295
+ clearSelectedRowKeys: se,
296
+ selectedKeys: H,
297
+ selectedRows: B,
298
+ ...ft
299
+ };
300
+ return io({
301
+ ..._,
302
+ wrapRef: v,
303
+ getBindValues: j
304
+ }), Te({
305
+ ..._,
306
+ xGrid: gt
307
+ }), (ge = s.bindState) == null || ge.call(s, {
308
+ loading: x,
309
+ selectedKeys: H,
310
+ selectedRows: B
311
+ }), w && i("register", _, `${w.uid}`), J(() => {
312
+ e(l).autoHeight && me();
313
+ }), Dt(() => {
314
+ var t;
315
+ (t = s.mount) == null || t.call(s, e(p), _), J(() => {
316
+ var o, r;
317
+ return (r = (o = e(v)) == null ? void 0 : o.querySelector(".vxe-toolbar")) == null ? void 0 : r.setAttribute("data-testid", e(Ee));
513
318
  });
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", {
319
+ }), ye(() => {
320
+ var t;
321
+ (t = s == null ? void 0 : s.unmount) == null || t.call(s);
322
+ }), (t, o) => (c(), g("div", {
518
323
  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({
324
+ ref: v,
325
+ class: z([e(b), e(te).class]),
326
+ "data-testid": Ve.value,
327
+ onKeydownCapture: o[3] || (o[3] = //@ts-ignore
328
+ (...r) => e(pe) && e(pe)(...r))
329
+ }, [D(e(jt), Q({
528
330
  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, {
331
+ ref: p
332
+ }, e(ut), Mt(yt.value), {
333
+ onFilterChange: o[2] || (o[2] = (r) => e(de)())
334
+ }), Kt({
335
+ empty: n(() => [d(t.$slots, "empty", P(K({
336
+ isLoaded: e(ce),
337
+ loading: e(x),
338
+ emptyTip: W.value
339
+ })), () => [f("div", {
340
+ class: z(`${e(b)}-empty-image`)
341
+ }, [e(x) ? (c(), g("span", ko, Y(l.value.emptyText || ""), 1)) : (c(), g(At, {
542
342
  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), {
343
+ }, [D(e(Qt), {
344
+ style: y(ht.value),
345
+ status: l.value.emptyImageStatus
346
+ }, null, 8, ["style", "status"]), W.value ? (c(), g("span", Ro, Y(W.value), 1)) : M("", !0)], 64))], 2)])]),
347
+ left: n(() => [d(t.$slots, "left", {}, () => [e(C) ? (c(), X(e(we), {
553
348
  key: 0,
554
- ref_key: "leftSlotScrollbarRef",
555
- ref: tt,
349
+ ref_key: "leftScrollbarRef",
350
+ ref: ot,
556
351
  "wrap-class": "overflow-hidden",
557
352
  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`
353
+ height: `${e(C)}px`,
354
+ style: y({
355
+ width: `${l.value.leftSlotWidth}px`,
356
+ height: `${e(C)}px`,
357
+ marginTop: `${e(ae)}px`
563
358
  })
564
359
  }, {
565
- default: m(() => [P("div", {
360
+ default: n(() => [f("div", {
566
361
  class: "float-left w-0",
567
- style: $({
568
- height: `${t(xe)}px`
362
+ style: y({
363
+ height: `${e(ie)}px`
569
364
  })
570
- }, null, 4), P("div", {
571
- style: $({
365
+ }, null, 4), f("div", {
366
+ class: "relative",
367
+ style: y({
572
368
  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)
369
+ height: `${e(E)}px`,
370
+ marginTop: `${e(ne)}px`
371
+ })
372
+ }, [d(t.$slots, "tableLeft", P(K({
373
+ rowNodes: e(le),
374
+ height: e(E)
580
375
  })))], 4)]),
581
376
  _: 3
582
- }, 8, ["height", "style"])) : H("", !0)])]),
583
- right: m(() => [S(e.$slots, "right", {}, () => [t(z) ? (p(), ne(t(Oe), {
377
+ }, 8, ["height", "style"])) : M("", !0)])]),
378
+ right: n(() => [d(t.$slots, "right", {}, () => [e(C) ? (c(), X(e(we), {
584
379
  key: 0,
585
- ref_key: "rightSlotScrollbarRef",
586
- ref: ot,
380
+ ref_key: "rightScrollbarRef",
381
+ ref: rt,
587
382
  "wrap-class": "overflow-hidden",
588
383
  class: "tt-table-left-right-scroll",
589
384
  always: "",
590
- height: `${t(z)}px`,
591
- style: $({
592
- width: `${d.value.rightSlotWidth}px`,
593
- height: `${t(z)}px`,
594
- marginTop: `${t(Se)}px`
385
+ height: `${e(C)}px`,
386
+ style: y({
387
+ width: `${l.value.rightSlotWidth}px`,
388
+ height: `${e(C)}px`,
389
+ marginTop: `${e(ae)}px`
595
390
  })
596
391
  }, {
597
- default: m(() => [P("div", {
392
+ default: n(() => [f("div", {
598
393
  class: "float-left w-0",
599
- style: $({
600
- height: `${t(xe)}px`
394
+ style: y({
395
+ height: `${e(ie)}px`
601
396
  })
602
- }, null, 4), P("div", {
603
- style: $({
397
+ }, null, 4), f("div", {
398
+ class: "relative",
399
+ style: y({
604
400
  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)
401
+ height: `${e(E)}px`,
402
+ marginTop: `${e(ne)}px`
403
+ })
404
+ }, [d(t.$slots, "tableRight", P(K({
405
+ rowNodes: e(le),
406
+ height: e(E)
612
407
  })))], 4)]),
613
408
  _: 3
614
- }, 8, ["height", "style"])) : H("", !0)])]),
409
+ }, 8, ["height", "style"])) : M("", !0)])]),
615
410
  _: 2
616
- }, [se(t(at), (r) => ({
411
+ }, [Z(e(nt), (r) => ({
617
412
  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
413
+ fn: n(({
414
+ column: a
415
+ }) => [f("div", {
416
+ class: z(["flex-x", {
417
+ "is-order": a.order,
418
+ [`${e(b)}-custom-sort`]: !0
631
419
  }])
632
- }, [n.column.order === "asc" ? (p(), y("img", {
420
+ }, [a.order === "asc" ? (c(), g("img", {
633
421
  key: 0,
634
- src: t(eo)
635
- }, null, 8, ho)) : n.column.order === "desc" ? (p(), y("img", {
422
+ src: e(Jt)
423
+ }, null, 8, wo)) : a.order === "desc" ? (c(), g("img", {
636
424
  key: 1,
637
- src: t(Qt)
638
- }, null, 8, yo)) : (p(), y("img", {
425
+ src: e(Ut)
426
+ }, null, 8, xo)) : (c(), g("img", {
639
427
  key: 2,
640
- src: t(Zt)
641
- }, null, 8, So))], 2)) : H("", !0)], 8, go)])
642
- })), se(Object.keys(e.$slots), (r) => ({
428
+ src: e(qt)
429
+ }, null, 8, $o))], 2)])
430
+ })), Z(kt(t.$slots), (r) => ({
643
431
  name: r,
644
- fn: m((n) => [r.includes("action") ? (p(), ne(t(oo), {
432
+ fn: n((a) => [r.includes("action") ? (c(), X(e(Xt), {
645
433
  key: 0,
646
- "row-index": n.$rowIndex
434
+ "row-index": a.$rowIndex
647
435
  }, {
648
- default: m(() => [S(e.$slots, r, re(n, {
649
- rowIndex: n.$rowIndex
436
+ default: n(() => [d(t.$slots, r, Q(a, {
437
+ rowIndex: a.$rowIndex
650
438
  }))]),
651
439
  _: 2
652
- }, 1032, ["row-index"])) : S(e.$slots, r, j(re({
440
+ }, 1032, ["row-index"])) : d(t.$slots, r, P(Q({
653
441
  key: 1
654
- }, n)))])
655
- })), C.value.showTableAlert ? {
442
+ }, a)))])
443
+ })), e(j).showTableAlert ? {
656
444
  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)]),
445
+ fn: n(() => [f("div", {
446
+ class: z(`${e(b)}-top-alert`)
447
+ }, [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
448
  key: "0"
661
- } : void 0, t(D).toolbar_buttons ? {
449
+ } : void 0, e(A).toolbar_buttons ? {
662
450
  name: "toolbar_buttons",
663
- fn: m(() => [S(e.$slots, "toolbar_buttons")]),
451
+ fn: n(() => [d(t.$slots, "toolbar_buttons")]),
664
452
  key: "1"
665
- } : void 0, t(D).toolbar_tools ? {
453
+ } : void 0, e(A).toolbar_tools ? {
666
454
  name: "toolbar_tools",
667
- fn: m(() => [S(e.$slots, "toolbar_tools")]),
455
+ fn: n(() => [d(t.$slots, "toolbar_tools")]),
668
456
  key: "2"
669
- } : void 0, se(t(it), (r) => ({
457
+ } : void 0, Z(e(it), (r) => ({
670
458
  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", {
459
+ fn: n(({
460
+ content: a,
461
+ rowIndex: T,
462
+ columnIndex: R,
463
+ column: k,
464
+ fixed: fe
465
+ }) => [!fe || fe === k.fixed ? (c(), g("div", {
678
466
  key: 0,
679
- ref: (u) => bt(u, `valid_${s}_${l}`),
467
+ ref: (Pt) => St(Pt, `valid_${T}_${R}`),
680
468
  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 ? {
469
+ }, [D(e(Lt), {
470
+ placement: l.value.toolTipErrorPlacement,
471
+ "err-msg": a,
472
+ "ref-dom": F.value[`valid_${T}_${R}`]
473
+ }, null, 8, ["placement", "err-msg", "ref-dom"])], 512)) : M("", !0)])
474
+ })), e(j).showPager ? {
687
475
  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)
476
+ fn: n(() => {
477
+ var r, a, T, R;
478
+ return [D(e(Gt), {
479
+ "current-page": e($).currentPage,
480
+ "onUpdate:currentPage": o[0] || (o[0] = (k) => e($).currentPage = k),
481
+ "page-size": e($).pageSize,
482
+ "onUpdate:pageSize": o[1] || (o[1] = (k) => e($).pageSize = k),
483
+ "page-sizes": (r = e(S)) == null ? void 0 : r.pageSizes,
484
+ layouts: (a = e(S)) == null ? void 0 : a.layouts,
485
+ total: ((T = e(S)) == null ? void 0 : T.total) || e(V).length,
486
+ size: (R = e(S)) == null ? void 0 : R.size,
487
+ "class-name": `${e(b)}-vxe-pager`,
488
+ onPageChange: e(ze)
701
489
  }, {
702
- left: m(() => [S(e.$slots, "pager_left", j(X({
703
- selectedKeys: t(te)
704
- }))), S(e.$slots, "buttom_left")]),
490
+ left: n(() => [d(t.$slots, "pager_left", P(K({
491
+ selectedKeys: e(H)
492
+ }))), d(t.$slots, "buttom_left")]),
705
493
  _: 3
706
494
  }, 8, ["current-page", "page-size", "page-sizes", "layouts", "total", "size", "class-name", "onPageChange"])];
707
495
  }),
708
496
  key: "3"
709
- } : void 0]), 1040)], 42, mo));
497
+ } : void 0]), 1040)], 42, Co));
710
498
  }
711
499
  });
712
500
  export {
713
- ur as default
501
+ Sr as default
714
502
  };