@dazhicheng/ui 1.6.50 → 1.6.51

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 (31) hide show
  1. package/dist/components/tt-custom-export-modal/src/TtCustomExportModal.vue.d.ts +36 -25
  2. package/dist/components/tt-custom-export-modal/src/TtCustomExportModal.vue.js +54 -296
  3. package/dist/components/tt-custom-export-panel/index.d.ts +8 -0
  4. package/dist/components/tt-custom-export-panel/index.js +21 -0
  5. package/dist/components/tt-custom-export-panel/src/TtCustomExportPanel.vue.d.ts +19 -0
  6. package/dist/components/tt-custom-export-panel/src/TtCustomExportPanel.vue.js +289 -0
  7. package/dist/components/tt-custom-export-panel/src/TtCustomExportPanel.vue2.js +4 -0
  8. package/dist/components/tt-custom-export-panel/src/types/index.d.ts +6 -0
  9. package/dist/components/tt-form/src/form-render/array-register/FormArrayRegister.d.ts +2 -2
  10. package/dist/components/tt-panel-select/src/components/PanelMiddle.vue.d.ts +1 -0
  11. package/dist/components/tt-panel-select/src/components/PanelMiddle.vue.js +8 -7
  12. package/dist/components/tt-panel-select/src/components/PanelRight.vue.js +1 -1
  13. package/dist/components/tt-panel-select/src/index.vue.d.ts +3 -0
  14. package/dist/components/tt-panel-select/src/index.vue.js +17 -14
  15. package/dist/components/tt-panel-select/src/types.d.ts +4 -0
  16. package/dist/components/tt-table/index.d.ts +27 -0
  17. package/dist/components/tt-table/index.js +8 -5
  18. package/dist/components/tt-table/src/Table.vue.d.ts +9 -0
  19. package/dist/components/tt-table/src/TableForm.vue.d.ts +74 -90
  20. package/dist/components/tt-table/src/TableForm.vue.js +179 -175
  21. package/dist/components/tt-table/src/components/TableExportButton.vue.d.ts +12 -0
  22. package/dist/components/tt-table/src/components/TableExportButton.vue.js +44 -0
  23. package/dist/components/tt-table/src/components/TableExportButton.vue2.js +4 -0
  24. package/dist/components/tt-table/src/components/TableToolbarTools.vue.js +36 -42
  25. package/dist/components/tt-table/src/props.d.ts +6 -0
  26. package/dist/components/tt-table/src/props.js +5 -0
  27. package/dist/components/tt-table/src/types/table.d.ts +2 -0
  28. package/dist/index.d.ts +1 -0
  29. package/dist/index.js +111 -107
  30. package/dist/style.css +1 -1
  31. package/package.json +1 -1
@@ -1,13 +1,13 @@
1
- import { defineComponent as je, useSlots as Ne, getCurrentInstance as We, ref as ie, shallowReactive as Ge, onScopeDispose as se, computed as g, unref as o, shallowRef as Je, toRaw as O, watch as C, toValue as h, onMounted as qe, nextTick as ne, createElementBlock as le, openBlock as B, normalizeClass as H, createCommentVNode as me, createElementVNode as Qe, createBlock as Ue, createVNode as R, renderSlot as c, createSlots as L, renderList as ue, withCtx as w, normalizeProps as pe, guardReactiveProps as ce, mergeProps as z, toHandlers as Xe, isRef as Ye } from "vue";
1
+ import { defineComponent as je, useSlots as Ne, getCurrentInstance as We, ref as se, shallowReactive as Ge, onScopeDispose as ie, computed as b, unref as o, shallowRef as Je, toRaw as A, watch as C, toValue as g, onMounted as qe, nextTick as ne, createElementBlock as le, openBlock as x, normalizeClass as k, createCommentVNode as me, createElementVNode as Qe, createBlock as Ue, createVNode as E, renderSlot as p, createSlots as B, renderList as ue, withCtx as h, normalizeProps as ce, guardReactiveProps as pe, mergeProps as H, toHandlers as Xe, isRef as Ye } from "vue";
2
2
  import "../../tt-button/index.js";
3
3
  import "../../tt-checkbox/index.js";
4
4
  import "../../tt-empty/index.js";
5
5
  import "axios";
6
6
  import { ElMessage as Ze } from "element-plus";
7
- import { isFunction as j, isObject as et } from "../../../packages/utils/src/is.js";
7
+ import { isFunction as L, isObject as et } from "../../../packages/utils/src/is.js";
8
8
  import "dayjs";
9
9
  import "numeral";
10
- import { extractResourceFromApi as tt, generateTestId as D } from "../../../packages/utils/src/testid-helper.js";
10
+ import { extractResourceFromApi as tt, generateTestId as O } from "../../../packages/utils/src/testid-helper.js";
11
11
  import "xe-utils";
12
12
  import "dayjs/plugin/utc";
13
13
  import "dayjs/plugin/timezone";
@@ -34,8 +34,8 @@ import "es-toolkit/compat";
34
34
  import "../../tt-form/src/shared/zod-defaults.js";
35
35
  import "../../tt-nav-anchor/index.js";
36
36
  import "../../../node_modules/.pnpm/vue-types@5.1.3_vue@3.5.34_typescript@5.9.3_/node_modules/vue-types/shim/index.modern.js";
37
- import { useDesign as it } from "../../../packages/hooks/src/useDesign.js";
38
- import { useDebounceFn as A } from "../../../packages/hooks/src/useDebounce.js";
37
+ import { useDesign as st } from "../../../packages/hooks/src/useDesign.js";
38
+ import { useDebounceFn as F } from "../../../packages/hooks/src/useDebounce.js";
39
39
  import "vue-router";
40
40
  import "../../tt-icon/index.js";
41
41
  import "../../tt-form/src/components/Slot.js";
@@ -53,7 +53,8 @@ import "../../tt-text/index.js";
53
53
  import "../../../directives/disabled-tip/index.js";
54
54
  import { GlobalConfig as fe } from "../../../hooks/useSetup.js";
55
55
  import "../../tt-log/index.js";
56
- import { TtCustomExportModal as st } from "../../tt-custom-export-modal/index.js";
56
+ import { TtCustomExportModal as it } from "../../tt-custom-export-modal/index.js";
57
+ import "../../tt-custom-export-panel/index.js";
57
58
  /* empty css */
58
59
  /* empty css */
59
60
  /* empty css */
@@ -69,8 +70,8 @@ import nt from "./components/TableColumnModal.vue2.js";
69
70
  import lt from "./components/TableToolbarTools.vue.js";
70
71
  import { basicTableEmits as mt } from "./emits.js";
71
72
  import { useColumnPersistence as ut } from "./hooks/useColumnPersistence.js";
72
- import { createTableFormContext as pt } from "./hooks/useTableContext.js";
73
- import { useTableForm as ct } from "./hooks/useTableForm.js";
73
+ import { createTableFormContext as ct } from "./hooks/useTableContext.js";
74
+ import { useTableForm as pt } from "./hooks/useTableForm.js";
74
75
  import { useSyncProps as ft } from "./hooks/useSyncProps.js";
75
76
  import { tableFormProps as dt } from "./props.js";
76
77
  import bt from "./Table.vue.js";
@@ -78,7 +79,7 @@ import bt from "./Table.vue.js";
78
79
  import { forwardedEventEntries as gt } from "./table-mutation-events.js";
79
80
  import { TableFormApi as ht } from "./utils/table-form-api.js";
80
81
  import { provideFormActionTestIds as wt } from "./utils/context.js";
81
- const St = ["data-testid"], Ct = ["data-testid"], qo = /* @__PURE__ */ je({
82
+ const St = ["data-testid"], Ct = ["data-testid"], Qo = /* @__PURE__ */ je({
82
83
  name: "TtTableForm",
83
84
  __name: "TableForm",
84
85
  props: dt,
@@ -92,337 +93,340 @@ const St = ["data-testid"], Ct = ["data-testid"], qo = /* @__PURE__ */ je({
92
93
  ...mt
93
94
  ],
94
95
  setup(be, { expose: ge, emit: he }) {
95
- var oe, re, ae;
96
- const n = be, M = he, _ = Ne(), S = We(), { prefixCls: $ } = it("table-form");
97
- function N() {
96
+ var te, oe, re;
97
+ const l = be, v = he, R = Ne(), w = We(), { prefixCls: D } = st("table-form");
98
+ function z() {
98
99
  var e;
99
- return Object.hasOwn(((e = S == null ? void 0 : S.vnode) == null ? void 0 : e.props) || {}, "table");
100
+ return Object.hasOwn(((e = w == null ? void 0 : w.vnode) == null ? void 0 : e.props) || {}, "table");
100
101
  }
101
- const I = ie(), W = ie();
102
- let r = n.tableFormApi;
103
- r || (r = new ht(n), r.useStore = (e) => at(r.store, e));
104
- const G = Ge({});
105
- function J() {
106
- Object.assign(G, O(r.store.state) || {});
102
+ const _ = se(), j = se();
103
+ let r = l.tableFormApi;
104
+ r || (r = new ht(l), r.useStore = (e) => at(r.store, e));
105
+ const N = Ge({});
106
+ function W() {
107
+ Object.assign(N, A(r.store.state) || {});
107
108
  }
108
- J(), se(r.store.subscribe(J));
109
- const f = g(() => G), y = g(() => {
109
+ W(), ie(r.store.subscribe(W));
110
+ const f = b(() => N), y = b(() => {
110
111
  var t;
111
- if (n.testId) return n.testId;
112
+ if (l.testId) return l.testId;
112
113
  const e = (t = o(f).table) == null ? void 0 : t.api;
113
114
  return e ? tt(e) : "table";
114
- }), we = g(() => D(o(y), "tableform")), Se = g(() => D(o(y), "search-form-header"));
115
+ }), we = b(() => O(o(y), "tableform")), Se = b(() => O(o(y), "search-form-header"));
115
116
  wt(
116
- g(() => ({
117
- submit: D(o(y), "search-btn-query"),
118
- reset: D(o(y), "search-btn-reset")
117
+ b(() => ({
118
+ submit: O(o(y), "search-btn-query"),
119
+ reset: O(o(y), "search-btn-reset")
119
120
  }))
120
121
  );
121
- const { getSlotKeys: Ce, replaceSlotKey: ye } = de("form-"), { getSlotKeys: Te, replaceSlotKey: ve } = de("t-"), { getFormProps: V, getTableProps: l, getTableToolProps: q, submitSearchQuery: Q } = ct(
122
+ const { getSlotKeys: Ce, replaceSlotKey: ye } = de("form-"), { getSlotKeys: Te, replaceSlotKey: Fe } = de("t-"), { getFormProps: $, getTableProps: m, getTableToolProps: G, submitSearchQuery: J } = pt(
122
123
  f,
123
124
  r.tableApi.reload,
124
125
  r.tableApi.getLoading,
125
126
  r.tableApi.getPagination
126
- ), U = Je([]), Fe = g(() => (n.table, !N() || !n.table ? !1 : (n.table.data, Object.hasOwn(O(n.table), "data"))));
127
- let x = () => {
127
+ ), q = Je([]), ve = b(() => (l.table, !z() || !l.table ? !1 : (l.table.data, Object.hasOwn(A(l.table), "data"))));
128
+ let K = () => {
128
129
  };
129
- function Ae(e) {
130
- x(), x = C(
131
- () => h(e),
130
+ function Me(e) {
131
+ K(), K = C(
132
+ () => g(e),
132
133
  (t) => {
133
- U.value = t || [];
134
+ q.value = t || [];
134
135
  },
135
136
  { immediate: !0, deep: Ye(e) ? !1 : 1 }
136
137
  );
137
138
  }
138
- function Me() {
139
- if (n.table)
140
- return n.table.data, O(n.table).data;
139
+ function Pe() {
140
+ if (l.table)
141
+ return l.table.data, A(l.table).data;
141
142
  }
142
- C(Me, (e) => Ae(e), { immediate: !0 });
143
- async function Pe() {
143
+ C(Pe, (e) => Me(e), { immediate: !0 });
144
+ async function Ae() {
144
145
  await r.tableApi.reloadData([]), r.tableApi.setPagination({ total: 0 });
145
146
  }
146
147
  async function Ee() {
147
148
  return !o(f).useSearchForm || !a.isMounted ? {} : await a.getValues();
148
149
  }
149
- let K = !1;
150
- async function P(e, t) {
151
- const { tableSearchBefore: i } = o(f);
152
- if (!j(i)) return !0;
153
- if (K) return !1;
154
- K = !0;
155
- let s;
150
+ let I = !1;
151
+ async function M(e, t) {
152
+ const { tableSearchBefore: s } = o(f);
153
+ if (!L(s)) return !0;
154
+ if (I) return !1;
155
+ I = !0;
156
+ let i;
156
157
  try {
157
- s = await i(t || await Ee(), e);
158
+ i = await s(t || await Ee(), e);
158
159
  } catch {
159
160
  return !1;
160
161
  } finally {
161
- K = !1;
162
+ I = !1;
162
163
  }
163
- if (b) return !1;
164
- const { canSearch: m, clearData: d } = et(s) ? s : { canSearch: s, clearData: !1 };
165
- return d && await Pe(), m !== !1;
164
+ if (d) return !1;
165
+ const { canSearch: n, clearData: u } = et(i) ? i : { canSearch: i, clearData: !1 };
166
+ return u && await Ae(), n !== !1;
166
167
  }
167
168
  async function Oe() {
168
- return await P("page");
169
+ return await M("page");
169
170
  }
170
- const { run: Re } = A(
171
+ const { run: Re } = F(
171
172
  async () => {
172
173
  const e = await a.getValues();
173
174
  await a.resetForm(e, { force: !0 });
174
175
  const t = await a.getValues();
175
- a.setLatestSubmissionValues(t), (await a.validate()).valid && await P("reset", t) && await Q(t);
176
+ a.setLatestSubmissionValues(t), (await a.validate()).valid && await M("reset", t) && await J(t);
176
177
  },
177
178
  200,
178
179
  { leading: !0 }
179
- ), { run: De } = A(
180
+ ), { run: De } = F(
180
181
  async (e) => {
181
182
  const t = e;
182
- await P("submit", t) && (await r.grid.clearFilter(), await Q(t));
183
+ await M("submit", t) && (await r.grid.clearFilter(), await J(t));
183
184
  },
184
185
  200,
185
186
  { leading: !0 }
186
187
  ), [_e, a] = rt({
187
- ...h(V),
188
+ ...g($),
188
189
  handleSubmit: De,
189
190
  handleReset: Re,
190
191
  submitOnEnter: !0,
191
192
  submitButtonOptions: {
192
- content: (oe = fe.form) == null ? void 0 : oe.submitTitle
193
+ content: (te = fe.form) == null ? void 0 : te.submitTitle
193
194
  },
194
195
  showCollapseButton: !0,
195
196
  collapsed: !0,
196
197
  collapseTriggerResize: !0,
197
198
  collapsedRows: 3
198
- }), { restoreColumns: $e, saveColumns: X } = ut({
199
- getTableProps: l,
199
+ }), { restoreColumns: $e, saveColumns: Q } = ut({
200
+ getTableProps: m,
200
201
  getProps: f,
201
202
  tableMethods: r.tableApi
202
203
  });
203
- let b = !1;
204
+ let d = !1;
204
205
  const T = {};
205
206
  gt.forEach(([e, t]) => {
206
- T[t] = (...i) => M(e, ...i);
207
+ T[t] = (...s) => v(e, ...s);
207
208
  });
208
- const { run: Ie } = A(async () => {
209
- if (b || !o(l).useHttpCache) return;
209
+ const { run: Ke } = F(async () => {
210
+ if (d || !o(m).useHttpCache) return;
210
211
  const e = (r.tableApi.getTableColumns() || []).map((t) => t.field).filter(Boolean);
211
- e.length && await X(JSON.stringify(e));
212
+ e.length && await Q(JSON.stringify(e));
212
213
  }, 300);
213
- function Ve(e) {
214
+ function Ie(e) {
214
215
  var t;
215
- (t = T.columnDragend) == null || t.call(T, e), Ie();
216
+ (t = T.columnDragend) == null || t.call(T, e), Ke();
216
217
  }
217
- const xe = g(() => ({ ...T, columnDragend: Ve }));
218
- function Ke(e) {
218
+ const Ve = b(() => ({ ...T, columnDragend: Ie }));
219
+ function xe(e) {
219
220
  r.setState((t) => t.table ? ot(e, t) : {}), e.table && r.tableApi.setState(e.table), e.form && (a == null || a.setState(e.form));
220
221
  }
221
- const { run: ke } = A(
222
+ const { run: ke } = F(
222
223
  async (e) => {
223
224
  if (a.isMounted && o(f).useSearchForm) {
224
225
  if (!(await a.validate()).valid) return;
225
- const i = await a.getValues();
226
- await r.tableApi.reload({ ...e, searchInfo: { ...e == null ? void 0 : e.searchInfo, ...i } });
226
+ const s = await a.getValues();
227
+ await r.tableApi.reload({ ...e, searchInfo: { ...e == null ? void 0 : e.searchInfo, ...s } });
227
228
  return;
228
229
  }
229
230
  await r.tableApi.reload({ ...e, searchInfo: { ...e == null ? void 0 : e.searchInfo } });
230
231
  },
231
232
  200,
232
233
  { leading: !0 }
233
- ), E = {
234
+ ), P = {
234
235
  tableMethods: r.tableApi,
235
236
  formMethods: a,
236
237
  setTableProps: r.tableApi.setState,
237
238
  setFormProps: a.setState,
238
- setProps: Ke,
239
+ setProps: xe,
239
240
  reload: ke,
240
- selectedKeys: g(() => h(r.tableApi.selectedKeys))
241
+ selectedKeys: b(() => g(r.tableApi.selectedKeys))
241
242
  };
242
243
  async function Be() {
243
- if (!await P("refresh")) return;
244
+ if (!await M("refresh")) return;
244
245
  const { tableRefreshBefore: e } = o(f);
245
- j(e) && await e(), E.reload();
246
+ L(e) && await e(), P.reload();
246
247
  }
247
- let k = { width: window.innerWidth, height: window.innerHeight };
248
- const { run: Y } = A(async () => {
249
- var s, m;
250
- if (await ne(), b) return;
251
- const { innerWidth: e, innerHeight: t } = window, i = e !== k.width || t !== k.height;
252
- if (k = { width: e, height: t }, !i) {
253
- if (!o(l).autoHeight) return;
254
- (s = r.tableApi) == null || s.redoHeight(!1);
248
+ let V = { width: window.innerWidth, height: window.innerHeight };
249
+ const { run: U } = F(async () => {
250
+ var i, n;
251
+ if (await ne(), d) return;
252
+ const { innerWidth: e, innerHeight: t } = window, s = e !== V.width || t !== V.height;
253
+ if (V = { width: e, height: t }, !s) {
254
+ if (!o(m).autoHeight) return;
255
+ (i = r.tableApi) == null || i.redoHeight(!1);
255
256
  return;
256
257
  }
257
- (m = r.tableApi) == null || m.redoHeight();
258
+ (n = r.tableApi) == null || n.redoHeight();
258
259
  }, 100);
259
260
  async function He(e) {
260
- var m, d;
261
- if (b) return;
262
- const t = h((d = (m = o(f)) == null ? void 0 : m.table) == null ? void 0 : d.columns) || [], i = new Map(t.map((p) => [p.field, p])), s = e.checkedModel.map((p) => i.get(p)).filter(Boolean);
261
+ var n, u;
262
+ if (d) return;
263
+ const t = g((u = (n = o(f)) == null ? void 0 : n.table) == null ? void 0 : u.columns) || [], s = new Map(t.map((c) => [c.field, c])), i = e.checkedModel.map((c) => s.get(c)).filter(Boolean);
263
264
  if (e.isExport) {
264
- M("export", e.checkedModel, e.modalApi);
265
+ v("export", e.checkedModel, e.modalApi);
265
266
  return;
266
267
  }
267
268
  e.modalApi.setModalProps({ confirmLoading: !0 });
268
269
  try {
269
- if (o(l).useHttpCache && await X(JSON.stringify(e.checkedModel)), b) return;
270
- r.tableApi.setTableColumns(s), e.modalApi.closeModal(), M("set-columns", s);
270
+ if (o(m).useHttpCache && await Q(JSON.stringify(e.checkedModel)), d) return;
271
+ r.tableApi.setTableColumns(i), e.modalApi.closeModal(), v("set-columns", i);
271
272
  } finally {
272
- b || e.modalApi.setModalProps({ confirmLoading: !1 });
273
+ d || e.modalApi.setModalProps({ confirmLoading: !1 });
273
274
  }
274
275
  }
275
- function Z(e, t = !1) {
276
- var p, v, F;
277
- const { notSetColumnField: i, columns: s } = o(l), m = ((((p = r.tableApi.getTableInstance()) == null ? void 0 : p.getTableColumn()) || {}).visibleColumn || []).map((u) => u.field).filter(Boolean), d = (h(s) || []).filter((u) => u.visible === !0 || u.visible === void 0).map((u) => u.field);
278
- (v = I.value) == null || v.openModal({
279
- columns: (h(s) || []).filter((u) => u.visible !== !1),
280
- displayFields: t ? d : m,
281
- disabledColumnField: i || [],
276
+ function X(e, t = !1) {
277
+ var c, ae;
278
+ const { notSetColumnField: s, columns: i } = o(m), n = Y(), u = (g(i) || []).filter((S) => S.visible === !0 || S.visible === void 0).map((S) => S.field);
279
+ (c = _.value) == null || c.openModal({
280
+ columns: (g(i) || []).filter((S) => S.visible !== !1),
281
+ displayFields: t ? u : n,
282
+ disabledColumnField: s || [],
282
283
  isExport: e
283
- }), (F = I.value) == null || F.setModalProps({ title: e ? "自定义导出" : "列设置" });
284
+ }), (ae = _.value) == null || ae.setModalProps({ title: e ? "自定义导出" : "列设置" });
284
285
  }
285
- function ee(e = !1) {
286
- Z(!1, e);
286
+ function Y() {
287
+ var n;
288
+ const { columnFieldSource: e = "visible" } = o(m), t = (n = r.tableApi.getTableInstance()) == null ? void 0 : n.getTableColumn();
289
+ return (t ? t[e === "collect" ? "collectColumn" : "visibleColumn"] : []).map((u) => u.field).filter((u) => !!u);
290
+ }
291
+ function Z(e = !1) {
292
+ X(!1, e);
287
293
  }
288
- function te(e = !1) {
289
- Z(!0, e);
294
+ function ee(e = !1) {
295
+ X(!0, e);
290
296
  }
291
297
  function Le() {
292
- var s, m;
293
- const { customExportConfig: e } = o(l), t = (s = fe.table) == null ? void 0 : s.columnsKey, i = (e == null ? void 0 : e.businessCode) ?? (j(t) ? t() : t);
294
- if (!i) {
298
+ var i, n;
299
+ const { customExportConfig: e } = o(m), t = (i = fe.table) == null ? void 0 : i.columnsKey, s = (e == null ? void 0 : e.businessCode) ?? (L(t) ? t() : t);
300
+ if (!s) {
295
301
  Ze.warning("请配置自定义导出的 businessCode 或 GlobalConfig.table.columnsKey");
296
302
  return;
297
303
  }
298
- (m = W.value) == null || m.open({
299
- businessCode: i,
304
+ (n = j.value) == null || n.open({
305
+ businessCode: s,
300
306
  listColumns: () => {
301
- var v, F;
302
- const d = (v = o(l).customExportConfig) == null ? void 0 : v.listColumns;
303
- if (d) return h(d);
304
- const p = (F = r.tableApi.getTableInstance()) == null ? void 0 : F.getTableColumn().visibleColumn;
305
- return p ? p.map((u) => u.field).filter((u) => !!u) : [];
307
+ var c;
308
+ const u = (c = o(m).customExportConfig) == null ? void 0 : c.listColumns;
309
+ return u ? g(u) : Y();
306
310
  }
307
311
  });
308
312
  }
309
313
  function ze() {
310
- const e = n.table;
311
- if (!N() || !e) return;
314
+ const e = l.table;
315
+ if (!z() || !e) return;
312
316
  const t = {};
313
- return Object.keys(O(e)).forEach((i) => {
314
- i !== "data" && Object.assign(t, { [i]: e[i] });
317
+ return Object.keys(A(e)).forEach((s) => {
318
+ s !== "data" && Object.assign(t, { [s]: e[s] });
315
319
  }), t;
316
320
  }
317
- return ft(n, r.setState, ["tableFormApi", "table"]), C(
321
+ return ft(l, r.setState, ["tableFormApi", "table"]), C(
318
322
  ze,
319
323
  (e) => {
320
324
  e && r.setState({ table: e });
321
325
  },
322
326
  { deep: !0, immediate: !0 }
323
- ), pt({ formInstance: a }), C(
327
+ ), ct({ formInstance: a }), C(
324
328
  () => r.tableApi.getLoading.value,
325
329
  (e) => {
326
330
  a == null || a.setState({ submitButtonOptions: { loading: e } });
327
331
  },
328
- { immediate: (ae = (re = r.store.state) == null ? void 0 : re.table) == null ? void 0 : ae.immediate }
329
- ), C(V, (e) => a == null ? void 0 : a.setState(e)), C(l, (e) => {
332
+ { immediate: (re = (oe = r.store.state) == null ? void 0 : oe.table) == null ? void 0 : re.immediate }
333
+ ), C($, (e) => a == null ? void 0 : a.setState(e)), C(m, (e) => {
330
334
  var t;
331
335
  return (t = r.tableApi) == null ? void 0 : t.setState(e);
332
336
  }), qe(() => {
333
- S && M("register", E, S.uid), r.mount(E, a), a == null || a.setState(o(V)), ne(() => {
334
- b || $e();
335
- }), window.addEventListener("resize", Y);
336
- }), se(() => {
337
- b = !0, x(), r == null || r.unmount(), window.removeEventListener("resize", Y);
338
- }), ge({ ...E, instance: S }), (e, t) => (B(), le("div", {
339
- class: H(o($)),
337
+ w && v("register", P, w.uid), r.mount(P, a), a == null || a.setState(o($)), ne(() => {
338
+ d || $e();
339
+ }), window.addEventListener("resize", U);
340
+ }), ie(() => {
341
+ d = !0, K(), r == null || r.unmount(), window.removeEventListener("resize", U);
342
+ }), ge({ ...P, instance: w }), (e, t) => (x(), le("div", {
343
+ class: k(o(D)),
340
344
  "data-testid": we.value
341
345
  }, [
342
- f.value.useSearchForm ? (B(), le("div", {
346
+ f.value.useSearchForm ? (x(), le("div", {
343
347
  key: 0,
344
- class: H(`${o($)}-header`),
348
+ class: k(`${o(D)}-header`),
345
349
  "data-testid": Se.value
346
350
  }, [
347
- R(o(_e), {
351
+ E(o(_e), {
348
352
  "test-id": `${y.value}-search-form`
349
- }, L({ _: 2 }, [
350
- ue(o(Ce)(o(_)), (i) => ({
351
- name: o(ye)(i),
352
- fn: w((s) => [
353
- c(e.$slots, i, pe(ce(s || {})))
353
+ }, B({ _: 2 }, [
354
+ ue(o(Ce)(o(R)), (s) => ({
355
+ name: o(ye)(s),
356
+ fn: h((i) => [
357
+ p(e.$slots, s, ce(pe(i || {})))
354
358
  ])
355
359
  }))
356
360
  ]), 1032, ["test-id"]),
357
- c(e.$slots, "header-down")
361
+ p(e.$slots, "header-down")
358
362
  ], 10, Ct)) : me("", !0),
359
363
  Qe("div", {
360
- class: H({
361
- [`${o($)}-wrapper`]: !0,
364
+ class: k({
365
+ [`${o(D)}-wrapper`]: !0,
362
366
  "pt-(--tt-base-padding)!": !0,
363
- "pb-(--tt-base-padding)!": !o(l).showPager
367
+ "pb-(--tt-base-padding)!": !o(m).showPager
364
368
  })
365
369
  }, [
366
- c(e.$slots, "table-top"),
367
- R(bt, z({
368
- ...o(l),
369
- ...Fe.value ? { data: U.value } : {},
370
+ p(e.$slots, "table-top"),
371
+ E(bt, H({
372
+ ...o(m),
373
+ ...ve.value ? { data: q.value } : {},
370
374
  beforePageChange: Oe
371
375
  }, {
372
376
  "form-api": o(a),
373
377
  "table-api": o(r).tableApi
374
- }, Xe(xe.value)), L({ _: 2 }, [
375
- ue(o(Te)(o(_)), (i) => ({
376
- name: o(ve)(i),
377
- fn: w((s) => [
378
- c(e.$slots, i, pe(ce(s || {})))
378
+ }, Xe(Ve.value)), B({ _: 2 }, [
379
+ ue(o(Te)(o(R)), (s) => ({
380
+ name: o(Fe)(s),
381
+ fn: h((i) => [
382
+ p(e.$slots, s, ce(pe(i || {})))
379
383
  ])
380
384
  })),
381
- o(l).showToolbar ? {
385
+ o(m).showToolbar ? {
382
386
  name: "toolbar_tools",
383
- fn: w(() => [
384
- R(lt, z(o(q), {
387
+ fn: h(() => [
388
+ E(lt, H(o(G), {
385
389
  onOnRefresh: Be,
386
- onOnExport: te,
390
+ onOnExport: ee,
387
391
  onOnCustomExport: Le,
388
- onOnColumnsSetting: ee
392
+ onOnColumnsSetting: Z
389
393
  }), {
390
- "toolbar-left": w(() => [
391
- c(e.$slots, "t-toolbar_tools-left")
394
+ "toolbar-left": h(() => [
395
+ p(e.$slots, "t-toolbar_tools-left")
392
396
  ]),
393
- "toolbar-right": w(() => [
394
- c(e.$slots, "t-toolbar_tools-right")
397
+ "toolbar-right": h(() => [
398
+ p(e.$slots, "t-toolbar_tools-right")
395
399
  ]),
396
400
  _: 3
397
401
  }, 16),
398
- c(e.$slots, "t-toolbar_tools")
402
+ p(e.$slots, "t-toolbar_tools")
399
403
  ]),
400
404
  key: "0"
401
405
  } : void 0
402
406
  ]), 1040, ["form-api", "table-api"]),
403
- c(e.$slots, "table-bottom")
407
+ p(e.$slots, "table-bottom")
404
408
  ], 2),
405
- o(q).showCustomExport ? (B(), Ue(o(st), z({
409
+ o(G).showCustomExport ? (x(), Ue(o(it), H({
406
410
  key: 1,
407
411
  ref_key: "customExportModalRef",
408
- ref: W
409
- }, o(l).customExportConfig), null, 16)) : me("", !0),
410
- R(nt, {
412
+ ref: j
413
+ }, o(m).customExportConfig), null, 16)) : me("", !0),
414
+ E(nt, {
411
415
  ref_key: "columnModalRef",
412
- ref: I,
413
- "open-export": te,
414
- "open-column": ee,
416
+ ref: _,
417
+ "open-export": ee,
418
+ "open-column": Z,
415
419
  onOnSubmit: He
416
- }, L({
417
- beforeFooter: w(() => [
418
- c(e.$slots, "t-column-modal-before-footer")
420
+ }, B({
421
+ beforeFooter: h(() => [
422
+ p(e.$slots, "t-column-modal-before-footer")
419
423
  ]),
420
424
  _: 2
421
425
  }, [
422
- o(_)["t-column-modal-title"] ? {
426
+ o(R)["t-column-modal-title"] ? {
423
427
  name: "title",
424
- fn: w(() => [
425
- c(e.$slots, "t-column-modal-title")
428
+ fn: h(() => [
429
+ p(e.$slots, "t-column-modal-title")
426
430
  ]),
427
431
  key: "0"
428
432
  } : void 0
@@ -431,5 +435,5 @@ const St = ["data-testid"], Ct = ["data-testid"], qo = /* @__PURE__ */ je({
431
435
  }
432
436
  });
433
437
  export {
434
- qo as default
438
+ Qo as default
435
439
  };
@@ -0,0 +1,12 @@
1
+ type __VLS_Props = {
2
+ /** 按钮提示和无障碍名称。 */
3
+ label?: string;
4
+ };
5
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
6
+ click: () => any;
7
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
8
+ onClick?: (() => any) | undefined;
9
+ }>, {
10
+ label: string;
11
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
12
+ export default _default;
@@ -0,0 +1,44 @@
1
+ import { defineComponent as i, createBlock as m, openBlock as p, unref as t, withCtx as l, createVNode as n } from "vue";
2
+ import { TtButton as s } from "../../../tt-button/index.js";
3
+ import { TtIcon as f } from "../../../tt-icon/index.js";
4
+ import u from "../../../../assets/svg/download.svg.js";
5
+ import { ElTooltip as b } from "element-plus";
6
+ const w = /* @__PURE__ */ i({
7
+ name: "TtTableExportButton",
8
+ __name: "TableExportButton",
9
+ props: {
10
+ label: { default: "自定义导出" }
11
+ },
12
+ emits: ["click"],
13
+ setup(a, { emit: r }) {
14
+ const o = a, c = r;
15
+ return (d, e) => (p(), m(t(b), {
16
+ class: "box-item",
17
+ effect: "dark",
18
+ content: o.label,
19
+ placement: "top",
20
+ "show-after": 200
21
+ }, {
22
+ default: l(() => [
23
+ n(t(s), {
24
+ class: "icon-table-btn",
25
+ "aria-label": o.label,
26
+ onClick: e[0] || (e[0] = (k) => c("click"))
27
+ }, {
28
+ default: l(() => [
29
+ n(t(f), {
30
+ icon: t(u),
31
+ size: 16,
32
+ "is-custom-svg": ""
33
+ }, null, 8, ["icon"])
34
+ ]),
35
+ _: 1
36
+ }, 8, ["aria-label"])
37
+ ]),
38
+ _: 1
39
+ }, 8, ["content"]));
40
+ }
41
+ });
42
+ export {
43
+ w as default
44
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./TableExportButton.vue.js";
2
+ export {
3
+ f as default
4
+ };