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