@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,11 +1,13 @@
1
- import { defineComponent as oe, useAttrs as ne, ref as I, inject as M, computed as p, unref as r, toRaw as W, h as re, onMounted as ie, nextTick as le, createElementBlock as u, openBlock as l, normalizeClass as B, createVNode as T, createBlock as b, createCommentVNode as f, withCtx as m, Fragment as v, renderList as P, renderSlot as se, withDirectives as z, mergeProps as ae, normalizeStyle as D, toDisplayString as j, createElementVNode as de, withModifiers as ue, createSlots as pe, createTextVNode as ce } from "vue";
2
- import { propTypes as y } from "../../../../packages/hooks/src/propTypes.js";
3
- import { useDesign as fe } from "../../../../packages/hooks/src/useDesign.js";
1
+ import { defineComponent as q, useAttrs as G, ref as x, inject as A, computed as d, unref as r, h as J, onMounted as Q, createElementBlock as s, openBlock as i, normalizeClass as w, createVNode as k, createBlock as c, createCommentVNode as p, withCtx as u, Fragment as m, renderList as S, renderSlot as Z, withDirectives as F, mergeProps as ee, normalizeStyle as W, toDisplayString as E, createElementVNode as te, withModifiers as oe, createSlots as re, createTextVNode as ne } from "vue";
2
+ import { propTypes as v } from "../../../../packages/hooks/src/propTypes.js";
3
+ import { useDesign as ie } from "../../../../packages/hooks/src/useDesign.js";
4
4
  import "axios";
5
- import { ElDivider as me, ElSpace as be, ElPopover as ve } from "element-plus";
6
- import { isBoolean as ge, isFunction as ye, isArray as xe, isObject as he } from "../../../../packages/utils/src/is.js";
7
- import { generateTestId as V, toKebabCase as O } from "../../../../packages/utils/src/testid-helper.js";
8
- import { calcWordsWidth as we } from "../../../../packages/utils/src/tool.js";
5
+ import { ElDivider as le, ElSpace as se, ElPopover as ae } from "element-plus";
6
+ import { isNullOrUnDef as f, isBoolean as de, isFunction as pe, isArray as ue, isObject as ce } from "../../../../packages/utils/src/is.js";
7
+ import "dayjs";
8
+ import "numeral";
9
+ import { generateTestId as M, toKebabCase as D } from "../../../../packages/utils/src/testid-helper.js";
10
+ import { calcWordsWidth as me } from "../../../../packages/utils/src/tool.js";
9
11
  import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
10
12
  import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
11
13
  import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
@@ -13,12 +15,13 @@ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mo
13
15
  import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
14
16
  import "lodash-es";
15
17
  import "vue-router";
16
- import { TtButton as A } from "../../../tt-button/index.js";
17
- import { TtIcon as E } from "../../../tt-icon/index.js";
18
- import K from "../../../../directives/disabled-tip/index.js";
19
- import Ce from "../../../../assets/svg/action_more.svg.js";
20
- import { ROW_INDEX_KEY as ke } from "./RowContext.js";
21
- const Ie = { key: 1 }, Be = ["onClick"], qe = /* @__PURE__ */ oe({
18
+ import { TtButton as C } from "../../../tt-button/index.js";
19
+ import { TtIcon as I } from "../../../tt-icon/index.js";
20
+ import P from "../../../../directives/disabled-tip/index.js";
21
+ import fe from "../../../../assets/svg/action_more.svg.js";
22
+ import { ROW_INDEX_KEY as be } from "./RowContext.js";
23
+ import { scheduleNormalizeActionTabIndex as ve } from "../utils/action-tab-index.js";
24
+ const ye = { key: 1 }, ge = ["onClick"], Ve = /* @__PURE__ */ q({
22
25
  name: "TtTableAction",
23
26
  __name: "TableAction",
24
27
  props: {
@@ -40,223 +43,199 @@ const Ie = { key: 1 }, Be = ["onClick"], qe = /* @__PURE__ */ oe({
40
43
  /** 是否分割线 */
41
44
  // divider: propTypes.bool.def(true),
42
45
  /** 是否清除冒泡 */
43
- stopButtonPropagation: y.bool.def(!1),
46
+ stopButtonPropagation: v.bool.def(!1),
44
47
  /** 显示buttton的个数 默认是2 */
45
- showBtnNums: y.number.def(100),
48
+ showBtnNums: v.number.def(100),
46
49
  /** 弹出框的宽度 */
47
- popoverWidth: y.number.def(27),
50
+ popoverWidth: v.number.def(27),
48
51
  /** 是否自动换行 */
49
- wrap: y.bool.def(!0)
52
+ wrap: v.bool.def(!0)
50
53
  },
51
- setup(S) {
52
- const i = S, x = ne(), { prefixCls: $ } = fe("table-action"), g = I(!1), L = M(
54
+ setup(T) {
55
+ const l = T, B = G(), { prefixCls: N } = ie("table-action"), b = x(!1), z = A(
53
56
  "tableIdContext",
54
- p(() => "")
55
- ), U = M(ke, void 0), q = p(() => {
56
- if (i.rowIndex !== void 0 && i.rowIndex !== null)
57
- return i.rowIndex;
58
- const t = r(U);
59
- if (t != null)
57
+ d(() => "")
58
+ ), R = A(be, void 0), j = d(() => {
59
+ var o;
60
+ if (!f(l.rowIndex))
61
+ return l.rowIndex;
62
+ const t = r(R);
63
+ if (!f(t))
60
64
  return t;
61
- if (i.slotContext && i.slotContext.$rowIndex !== void 0)
62
- return i.slotContext.$rowIndex;
63
- if (x.$rowIndex !== void 0 && x.$rowIndex !== null)
64
- return x.$rowIndex;
65
+ if (!f((o = l.slotContext) == null ? void 0 : o.$rowIndex))
66
+ return l.slotContext.$rowIndex;
67
+ if (!f(B.$rowIndex))
68
+ return B.$rowIndex;
65
69
  });
66
- function h(t) {
67
- const o = r(L), e = q.value;
68
- return e != null ? V(o, "action", `row${e}`, O(t)) : V(o, "action", O(t));
70
+ function y(t) {
71
+ const o = r(z), e = j.value;
72
+ return f(e) ? M(o, "action", D(t)) : M(o, "action", `row${e}`, D(t));
69
73
  }
70
- function F(t) {
74
+ function _(t) {
71
75
  const o = t.ifShow;
72
76
  let e = !0;
73
- return ge(o) && (e = o), ye(o) && (e = o(t)), e;
77
+ return de(o) && (e = o), pe(o) && (e = o(t)), e;
74
78
  }
75
- const G = p(() => (W(i.actions) || []).filter((t) => F(t)).slice(0, i.showBtnNums)), w = p(() => (W(i.actions) || []).filter((t) => F(t)).slice(i.showBtnNums)), H = p(() => r(w).length > 0), X = p(() => "left flex items-center"), Y = p(() => {
76
- const t = document.getElementsByTagName("body")[0], o = window.getComputedStyle(t).fontFamily, e = w.value.map((s) => we(s.label, "12px", o) + 22), n = Math.max(...e);
77
- return n > i.popoverWidth ? n : i.popoverWidth;
79
+ const O = d(() => (l.actions || []).filter((t) => _(t)).slice(0, l.showBtnNums)), g = d(() => (l.actions || []).filter((t) => _(t)).slice(l.showBtnNums)), V = d(() => r(g).length > 0), U = d(() => "left flex items-center"), K = d(() => {
80
+ const t = document.getElementsByTagName("body")[0], o = window.getComputedStyle(t).fontFamily, e = g.value.map((a) => me(a.label, "12px", o) + 22), n = Math.max(...e);
81
+ return n > l.popoverWidth ? n : l.popoverWidth;
78
82
  });
79
- function N(t, o) {
83
+ function $(t, o) {
80
84
  const e = t;
81
- return xe(e) && e.length > 0 ? e.some((n) => !!(n != null && n.condition)) : he(e) ? !!e.condition : !!o;
85
+ return ue(e) && e.length > 0 ? e.some((n) => !!(n != null && n.condition)) : ce(e) ? !!e.condition : !!o;
82
86
  }
83
- function J(t) {
84
- if (!i.stopButtonPropagation) return;
87
+ function H(t) {
88
+ if (!l.stopButtonPropagation) return;
85
89
  t.composedPath().find((n) => {
86
- var s;
87
- return ((s = n.tagName) == null ? void 0 : s.toUpperCase()) === "BUTTON";
90
+ var a;
91
+ return ((a = n.tagName) == null ? void 0 : a.toUpperCase()) === "BUTTON";
88
92
  }) && t.stopPropagation();
89
93
  }
90
- const Q = re(me, {
94
+ const L = J(le, {
91
95
  direction: "vertical",
92
96
  style: { fontSize: "12px", margin: "0 6px" }
93
97
  });
94
- function Z(t) {
95
- g.value = !0, C.value = t.target && t.target.getBoundingClientRect();
98
+ function X(t) {
99
+ b.value = !0, h.value = t.target && t.target.getBoundingClientRect();
96
100
  }
97
- const C = I({
101
+ const h = x({
98
102
  top: 0,
99
103
  left: 0,
100
104
  bottom: 0,
101
105
  right: 0
102
106
  });
103
- function ee() {
104
- const t = Array.from(document.querySelectorAll('[class*="table-action"]')), o = /* @__PURE__ */ new Map();
105
- t.forEach((e) => {
106
- const n = e.closest(".vxe-table");
107
- if (!n) return;
108
- const s = e.getBoundingClientRect(), a = Math.round(s.top), d = o.get(n) || /* @__PURE__ */ new Map(), c = d.get(a) || [];
109
- c.push(e), d.set(a, c), o.set(n, d);
110
- }), o.forEach((e) => {
111
- e.forEach((n) => {
112
- const s = n.sort((a, d) => {
113
- const c = a.closest(".vxe-table"), k = d.closest(".vxe-table"), R = c != null && c.classList.contains("is--fixed-right") ? 1 : 0, _ = k != null && k.classList.contains("is--fixed-right") ? 1 : 0;
114
- return R !== _ ? _ - R : d.getBoundingClientRect().left - a.getBoundingClientRect().left;
115
- })[0];
116
- n.forEach((a) => {
117
- a.querySelectorAll("[data-table-action-button]").forEach((d) => {
118
- d.tabIndex = a === s ? 0 : -1;
119
- });
120
- });
121
- });
122
- });
123
- }
124
- ie(() => {
125
- le(() => {
126
- window.setTimeout(ee, 80);
127
- });
128
- });
129
- const te = I({
107
+ Q(() => ve());
108
+ const Y = x({
130
109
  getBoundingClientRect() {
131
- return C.value;
110
+ return h.value;
132
111
  }
133
112
  });
134
- return (t, o) => (l(), u("div", {
135
- class: B([r($), X.value]),
113
+ return (t, o) => (i(), s("div", {
114
+ class: w([r(N), U.value]),
136
115
  tabindex: "-1",
137
- onClick: J
116
+ onClick: H
138
117
  }, [
139
- T(r(be), {
118
+ k(r(se), {
140
119
  size: 0,
141
- spacer: r(Q),
142
- wrap: S.wrap
120
+ spacer: r(L),
121
+ wrap: T.wrap
143
122
  }, {
144
- default: m(() => [
145
- (l(!0), u(v, null, P(G.value, (e, n) => (l(), u(v, {
123
+ default: u(() => [
124
+ (i(!0), s(m, null, S(O.value, (e, n) => (i(), s(m, {
146
125
  key: `${n}-${e.label}`
147
126
  }, [
148
- e.slot ? se(t.$slots, e.slot, ae({
127
+ e.slot ? Z(t.$slots, e.slot, ee({
149
128
  key: 0,
150
129
  ref_for: !0
151
- }, e)) : z((l(), b(r(A), {
130
+ }, e)) : F((i(), c(r(C), {
152
131
  key: 1,
153
132
  link: "",
154
133
  type: e.type || "primary",
155
- disabled: N(e.disabledTip, e.disabled),
156
- style: D({ color: e.color, visibility: e.isTextHide ? "hidden" : "visible" }),
134
+ disabled: $(e.disabledTip, e.disabled),
135
+ style: W({ color: e.color, visibility: e.isTextHide ? "hidden" : "visible" }),
157
136
  loading: e.loading,
158
137
  "data-index": n,
159
138
  "data-table-action-button": "",
160
- "data-testid": h(e.label || ""),
139
+ "data-testid": y(e.label || ""),
161
140
  onClick: e.onClick
162
141
  }, {
163
- default: m(() => [
164
- e.iconFont ? (l(), u(v, { key: 0 }, [
165
- e.iconFont ? (l(), b(r(E), {
142
+ default: u(() => [
143
+ e.iconFont ? (i(), s(m, { key: 0 }, [
144
+ e.iconFont ? (i(), c(r(I), {
166
145
  key: 0,
167
146
  "icon-font": e.iconFont,
168
- class: B({ "mr-1": !!e.label })
169
- }, null, 8, ["icon-font", "class"])) : f("", !0)
170
- ], 64)) : f("", !0),
171
- e.label ? (l(), u("span", Ie, j(e.label), 1)) : f("", !0)
147
+ class: w({ "mr-1": !!e.label })
148
+ }, null, 8, ["icon-font", "class"])) : p("", !0)
149
+ ], 64)) : p("", !0),
150
+ e.label ? (i(), s("span", ye, E(e.label), 1)) : p("", !0)
172
151
  ]),
173
152
  _: 2
174
153
  }, 1032, ["type", "disabled", "style", "loading", "data-index", "data-testid", "onClick"])), [
175
- [r(K), e.disabledTip]
154
+ [r(P), e.disabledTip]
176
155
  ])
177
156
  ], 64))), 128)),
178
- H.value ? (l(), b(r(A), {
157
+ V.value ? (i(), c(r(C), {
179
158
  key: 0,
180
159
  link: "",
181
160
  type: "primary",
182
- "data-testid": h("more")
161
+ "data-testid": y("more")
183
162
  }, {
184
- default: m(() => [
185
- de("span", {
186
- onMouseover: ue(Z, ["stop"]),
187
- onMouseleave: o[0] || (o[0] = (e) => g.value = !1)
163
+ default: u(() => [
164
+ te("span", {
165
+ onMouseover: oe(X, ["stop"]),
166
+ onMouseleave: o[0] || (o[0] = (e) => b.value = !1)
188
167
  }, [
189
- T(r(E), {
190
- icon: r(Ce),
168
+ k(r(I), {
169
+ icon: r(fe),
191
170
  "is-custom-svg": "",
192
171
  size: 14
193
172
  }, null, 8, ["icon"])
194
173
  ], 32)
195
174
  ]),
196
175
  _: 1
197
- }, 8, ["data-testid"])) : f("", !0)
176
+ }, 8, ["data-testid"])) : p("", !0)
198
177
  ]),
199
178
  _: 3
200
179
  }, 8, ["spacer", "wrap"]),
201
- C.value.left ? (l(), b(r(ve), {
180
+ h.value.left ? (i(), c(r(ae), {
202
181
  key: 0,
203
- visible: g.value,
204
- "onUpdate:visible": o[1] || (o[1] = (e) => g.value = e),
182
+ visible: b.value,
183
+ "onUpdate:visible": o[1] || (o[1] = (e) => b.value = e),
205
184
  trigger: "hover",
206
185
  placement: "bottom",
207
- width: Y.value,
186
+ width: K.value,
208
187
  offset: 8,
209
188
  "hide-after": 0,
210
- "virtual-ref": te.value,
189
+ "virtual-ref": Y.value,
211
190
  "virtual-triggering": "",
212
- "popper-class": `${r($)}-popover-class`,
191
+ "popper-class": `${r(N)}-popover-class`,
213
192
  "popper-style": {
214
193
  padding: "6px 0px",
215
194
  minWidth: "60px"
216
195
  }
217
196
  }, {
218
- default: m(() => [
219
- (l(!0), u(v, null, P(w.value, (e, n) => (l(), u("div", {
197
+ default: u(() => [
198
+ (i(!0), s(m, null, S(g.value, (e, n) => (i(), s("div", {
220
199
  key: `${n}-${e.label}`,
221
200
  onClick: () => {
222
- var s;
223
- !e.disabled && ((s = e.onClick) == null || s.call(e));
201
+ var a;
202
+ !e.disabled && ((a = e.onClick) == null || a.call(e));
224
203
  }
225
204
  }, [
226
- z((l(), b(r(A), {
205
+ F((i(), c(r(C), {
227
206
  link: "",
228
- disabled: N(e.disabledTip, e.disabled),
207
+ disabled: $(e.disabledTip, e.disabled),
229
208
  type: e.type || "primary",
230
- style: D({ color: e.color }),
231
- "data-testid": h(e.label || "")
232
- }, pe({
233
- default: m(() => [
234
- e.label ? (l(), u(v, { key: 0 }, [
235
- ce(j(e.label), 1)
236
- ], 64)) : f("", !0)
209
+ style: W({ color: e.color }),
210
+ "data-testid": y(e.label || "")
211
+ }, re({
212
+ default: u(() => [
213
+ e.label ? (i(), s(m, { key: 0 }, [
214
+ ne(E(e.label), 1)
215
+ ], 64)) : p("", !0)
237
216
  ]),
238
217
  _: 2
239
218
  }, [
240
219
  e.iconFont ? {
241
220
  name: "icon",
242
- fn: m(() => [
243
- T(r(E), {
221
+ fn: u(() => [
222
+ k(r(I), {
244
223
  "icon-font": e.iconFont,
245
- class: B({ "mr-1": !!e.label })
224
+ class: w({ "mr-1": !!e.label })
246
225
  }, null, 8, ["icon-font", "class"])
247
226
  ]),
248
227
  key: "0"
249
228
  } : void 0
250
229
  ]), 1032, ["disabled", "type", "style", "data-testid"])), [
251
- [r(K), e.disabledTip]
230
+ [r(P), e.disabledTip]
252
231
  ])
253
- ], 8, Be))), 128))
232
+ ], 8, ge))), 128))
254
233
  ]),
255
234
  _: 1
256
- }, 8, ["visible", "width", "virtual-ref", "popper-class"])) : f("", !0)
235
+ }, 8, ["visible", "width", "virtual-ref", "popper-class"])) : p("", !0)
257
236
  ], 2));
258
237
  }
259
238
  });
260
239
  export {
261
- qe as default
240
+ Ve as default
262
241
  };
@@ -1,12 +1,13 @@
1
- import { defineComponent as I, inject as S, computed as f, toRaw as k, createVNode as n, resolveComponent as P, unref as d, isVNode as j, mergeProps as c, withDirectives as F, resolveDirective as $ } from "vue";
2
- import { propTypes as a } from "../../../../packages/hooks/src/propTypes.js";
3
- import { useDesign as x } from "../../../../packages/hooks/src/useDesign.js";
1
+ import { defineComponent as w, inject as S, computed as f, createVNode as n, unref as d, isVNode as k, mergeProps as c, withDirectives as P, resolveDirective as j } from "vue";
2
+ import { propTypes as m } from "../../../../packages/hooks/src/propTypes.js";
3
+ import { useDesign as F } from "../../../../packages/hooks/src/useDesign.js";
4
4
  import "axios";
5
- import { ElPopover as z } from "element-plus";
6
- import { isBoolean as D, isFunction as m, isArray as N, isObject as O } from "../../../../packages/utils/src/is.js";
7
- import { generateTestId as A, toKebabCase as R } from "../../../../packages/utils/src/testid-helper.js";
8
- import "xe-utils";
5
+ import { ElSpace as $, ElPopover as x } from "element-plus";
6
+ import { isBoolean as z, isFunction as a, isArray as D, isObject as N } from "../../../../packages/utils/src/is.js";
9
7
  import "dayjs";
8
+ import "numeral";
9
+ import { generateTestId as O, toKebabCase as A } from "../../../../packages/utils/src/testid-helper.js";
10
+ import "xe-utils";
10
11
  import "dayjs/plugin/utc";
11
12
  import "dayjs/plugin/timezone";
12
13
  import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
@@ -16,18 +17,18 @@ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mo
16
17
  import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
17
18
  import "lodash-es";
18
19
  import "vue-router";
19
- import { TtButton as U } from "../../../tt-button/index.js";
20
+ import { TtButton as E } from "../../../tt-button/index.js";
20
21
  import { TtIcon as b } from "../../../tt-icon/index.js";
21
- import V from "../../../../directives/disabled-tip/index.js";
22
- import { componentMap as _ } from "../componentMap.js";
22
+ import U from "../../../../directives/disabled-tip/index.js";
23
+ import { componentMap as V } from "../componentMap.js";
23
24
  /* empty css */
24
- function E(i) {
25
- return typeof i == "function" || Object.prototype.toString.call(i) === "[object Object]" && !j(i);
25
+ function _(i) {
26
+ return typeof i == "function" || Object.prototype.toString.call(i) === "[object Object]" && !k(i);
26
27
  }
27
- const dt = /* @__PURE__ */ I({
28
+ const dt = /* @__PURE__ */ w({
28
29
  name: "TtTableButton",
29
30
  directives: {
30
- disabledTip: V
31
+ disabledTip: U
31
32
  },
32
33
  props: {
33
34
  /** 按钮acitons */
@@ -36,20 +37,20 @@ const dt = /* @__PURE__ */ I({
36
37
  default: () => []
37
38
  },
38
39
  /** 分割线 */
39
- divider: a.bool.def(!0),
40
+ divider: m.bool.def(!0),
40
41
  /** 是否阻止默认行为 */
41
- stopButtonPropagation: a.bool.def(!0)
42
+ stopButtonPropagation: m.bool.def(!0)
42
43
  },
43
44
  setup(i, {
44
45
  slots: g
45
46
  }) {
46
47
  const {
47
48
  prefixCls: l
48
- } = x("table-buttons"), h = S("tableIdContext", f(() => "")), T = (t) => A(d(h), "toolbar-btn", R(t)), C = (t) => {
49
+ } = F("table-buttons"), h = S("tableIdContext", f(() => "")), T = (t) => O(d(h), "toolbar-btn", A(t)), C = (t) => {
49
50
  const e = t.ifShow;
50
51
  let o = !0;
51
- return D(e) && (o = e), m(e) && (o = e(t)), o;
52
- }, v = f(() => (k(i.actions) || []).filter((t) => C(t))), y = (t) => {
52
+ return z(e) && (o = e), a(e) && (o = e(t)), o;
53
+ }, v = f(() => (i.actions || []).filter((t) => C(t))), y = (t) => {
53
54
  if (!i.stopButtonPropagation) return;
54
55
  t.composedPath().find((r) => {
55
56
  var s;
@@ -58,15 +59,15 @@ const dt = /* @__PURE__ */ I({
58
59
  };
59
60
  function B(t, e) {
60
61
  const o = t;
61
- return N(o) && o.length > 0 ? o.some((r) => !!(r != null && r.condition)) : O(o) ? !!o.condition : !!e;
62
+ return D(o) && o.length > 0 ? o.some((r) => !!(r != null && r.condition)) : N(o) ? !!o.condition : !!e;
62
63
  }
63
- function w(t, e = "default", o) {
64
- if (!t || !Reflect.has(t, e) || !m(t[e]))
64
+ function I(t, e = "default", o) {
65
+ if (!t || !Reflect.has(t, e) || !a(t[e]))
65
66
  return null;
66
67
  const r = t[e];
67
68
  return r ? r(o) : null;
68
69
  }
69
- const p = (t, e) => F(n(U, c({
70
+ const p = (t, e) => P(n(E, c({
70
71
  disabled: B(t.disabledTip, t.disabled),
71
72
  key: e,
72
73
  style: {
@@ -89,13 +90,13 @@ const dt = /* @__PURE__ */ I({
89
90
  size: 14
90
91
  }, null)
91
92
  }
92
- }), [[$("disabled-tip"), t.disabledTip]]), u = (t) => t.map((e, o) => {
93
- const r = _.get(e.component);
93
+ }), [[j("disabled-tip"), t.disabledTip]]), u = (t) => t.map((e, o) => {
94
+ const r = V.get(e.component);
94
95
  if (e.children && e.children.length > 0) {
95
96
  const s = {
96
97
  reference: () => p(e, o)
97
98
  };
98
- return e.disabled ? p(e, o) : n(z, {
99
+ return e.disabled ? p(e, o) : n(x, {
99
100
  placement: "bottom",
100
101
  width: "auto",
101
102
  trigger: "hover",
@@ -109,7 +110,7 @@ const dt = /* @__PURE__ */ I({
109
110
  ...s
110
111
  });
111
112
  }
112
- return e.slot ? w(g, e.slot, e) : e.component ? n(r, c({
113
+ return e.slot ? I(g, e.slot, e) : e.component ? n(r, c({
113
114
  key: o
114
115
  }, e), null) : p(e, o);
115
116
  });
@@ -118,9 +119,9 @@ const dt = /* @__PURE__ */ I({
118
119
  return n("div", {
119
120
  class: `${l} flex`,
120
121
  onClick: y
121
- }, [n(P("el-space"), {
122
+ }, [n($, {
122
123
  size: 8
123
- }, E(t = u(d(v))) ? t : {
124
+ }, _(t = u(d(v))) ? t : {
124
125
  default: () => [t]
125
126
  })]);
126
127
  };