@aplus-frontend/ui 0.0.38 → 0.0.40

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 (69) hide show
  1. package/es/index.mjs +149 -148
  2. package/es/src/ap-field/interface.d.ts +1 -1
  3. package/es/src/ap-field/text-area/index.vue.mjs +9 -10
  4. package/es/src/ap-form/ap-form-item-group/index.vue.mjs +28 -27
  5. package/es/src/ap-form/search-form/index.vue.mjs +107 -102
  6. package/es/src/ap-form/style/ap-form-item.css +6 -6
  7. package/es/src/ap-table/ap-table.vue.d.ts +16 -4
  8. package/es/src/ap-table/ap-table.vue.mjs +68 -66
  9. package/es/src/ap-table/constants.d.ts +8 -14
  10. package/es/src/ap-table/hooks/use-table-row-selection.d.ts +1 -1
  11. package/es/src/ap-table/interface.d.ts +6 -2
  12. package/es/src/business/ap-export-group/ApExportGroup.vue.d.ts +14 -0
  13. package/es/src/business/ap-export-group/ApExportGroup.vue.mjs +4 -0
  14. package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +117 -0
  15. package/es/src/business/ap-export-group/interface.d.ts +37 -0
  16. package/es/src/business/ap-export-group/interface.mjs +4 -0
  17. package/es/src/business/expandAlert/ApExpandAlert.vue2.mjs +1 -1
  18. package/es/src/business/expandAlert/interface.d.ts +1 -1
  19. package/es/src/business/index.d.ts +105 -0
  20. package/es/src/business/index.mjs +12 -9
  21. package/es/src/config-provider/config-provider.mjs +22 -17
  22. package/es/src/editable-table/form-item.vue.d.ts +4 -0
  23. package/es/src/editable-table/form-item.vue.mjs +83 -75
  24. package/es/src/editable-table/index.vue.d.ts +4 -0
  25. package/es/src/editable-table/index.vue.mjs +80 -72
  26. package/es/src/editable-table/interface.d.ts +8 -0
  27. package/es/src/editable-table/utils.d.ts +8 -0
  28. package/es/src/editable-table/utils.mjs +29 -18
  29. package/es/src/index.mjs +175 -174
  30. package/es/src/locale/lang/en.mjs +6 -0
  31. package/es/src/locale/lang/zh-cn.mjs +6 -0
  32. package/es/src/theme/ap-form/ap-form-item.css +6 -6
  33. package/es/src/theme/css-var/index.d.ts +7 -0
  34. package/es/src/theme/css-var/index.mjs +45 -0
  35. package/lib/index.js +1 -1
  36. package/lib/src/ap-field/interface.d.ts +1 -1
  37. package/lib/src/ap-field/text-area/index.vue.js +1 -1
  38. package/lib/src/ap-form/ap-form-item-group/index.vue.js +1 -1
  39. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  40. package/lib/src/ap-form/style/ap-form-item.css +6 -6
  41. package/lib/src/ap-table/ap-table.vue.d.ts +16 -4
  42. package/lib/src/ap-table/ap-table.vue.js +1 -1
  43. package/lib/src/ap-table/constants.d.ts +8 -14
  44. package/lib/src/ap-table/hooks/use-table-row-selection.d.ts +1 -1
  45. package/lib/src/ap-table/interface.d.ts +6 -2
  46. package/lib/src/business/ap-export-group/ApExportGroup.vue.d.ts +14 -0
  47. package/lib/src/business/ap-export-group/ApExportGroup.vue.js +1 -0
  48. package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -0
  49. package/lib/src/business/ap-export-group/interface.d.ts +37 -0
  50. package/lib/src/business/ap-export-group/interface.js +1 -0
  51. package/lib/src/business/expandAlert/ApExpandAlert.vue2.js +1 -1
  52. package/lib/src/business/expandAlert/interface.d.ts +1 -1
  53. package/lib/src/business/index.d.ts +105 -0
  54. package/lib/src/business/index.js +1 -1
  55. package/lib/src/config-provider/config-provider.js +1 -1
  56. package/lib/src/editable-table/form-item.vue.d.ts +4 -0
  57. package/lib/src/editable-table/form-item.vue.js +1 -1
  58. package/lib/src/editable-table/index.vue.d.ts +4 -0
  59. package/lib/src/editable-table/index.vue.js +1 -1
  60. package/lib/src/editable-table/interface.d.ts +8 -0
  61. package/lib/src/editable-table/utils.d.ts +8 -0
  62. package/lib/src/editable-table/utils.js +1 -1
  63. package/lib/src/index.js +1 -1
  64. package/lib/src/locale/lang/en.js +1 -1
  65. package/lib/src/locale/lang/zh-cn.js +1 -1
  66. package/lib/src/theme/ap-form/ap-form-item.css +6 -6
  67. package/lib/src/theme/css-var/index.d.ts +7 -0
  68. package/lib/src/theme/css-var/index.js +1 -0
  69. package/package.json +8 -7
@@ -1,21 +1,21 @@
1
- import { defineComponent as ne, useSlots as se, computed as s, createVNode as d, mergeProps as p, unref as r, watch as de, openBlock as c, createElementBlock as y, normalizeClass as F, normalizeStyle as T, createSlots as V, withCtx as f, Fragment as ue, renderList as z, createBlock as ie, resolveDynamicComponent as pe, renderSlot as x, createCommentVNode as D, createElementVNode as K, toDisplayString as ce, normalizeProps as fe, guardReactiveProps as me } from "vue";
2
- import { Typography as ge, Table as ye, Tooltip as be } from "ant-design-vue";
1
+ import { defineComponent as ne, useSlots as se, computed as s, createVNode as d, mergeProps as p, unref as r, watch as de, openBlock as c, createElementBlock as g, normalizeClass as T, normalizeStyle as x, createSlots as K, withCtx as f, Fragment as ue, renderList as V, createBlock as ie, resolveDynamicComponent as pe, renderSlot as v, createCommentVNode as z, createElementVNode as D, toDisplayString as ce, normalizeProps as fe, guardReactiveProps as me } from "vue";
2
+ import { Typography as ye, Table as ge, Tooltip as be } from "ant-design-vue";
3
3
  import { useToken as Se } from "ant-design-vue/es/theme/internal";
4
4
  import { ApForm as he } from "../ap-form/index.mjs";
5
- import { apTableRenderItemMap as we, noRenderAsFormItemValueList as N, apTableFormItemMap as Ce } from "./constants.mjs";
5
+ import { apTableRenderItemMap as we, noRenderAsFormItemValueList as N, apTableFormItemMap as Re } from "./constants.mjs";
6
6
  import "../config-provider/index.mjs";
7
- import { useTablePaging as Re } from "./hooks/use-table-paging.mjs";
8
- import { omit as W, isUndefined as u, isBoolean as Fe } from "lodash-unified";
7
+ import { useTablePaging as Ce } from "./hooks/use-table-paging.mjs";
8
+ import { omit as j, isUndefined as u, isBoolean as Fe } from "lodash-unified";
9
9
  import "./style/ap-table.css";
10
10
  import { QuestionCircleOutlined as Te } from "@ant-design/icons-vue";
11
- import { apColumnToColumn as xe, getTableRenderType as ve, getTableRenderProps as Be, getColumnOrder as _, updateFormProps as Pe, getFieldProps as Ie, getPlaceholder as ke } from "./utils.mjs";
11
+ import { apColumnToColumn as xe, getTableRenderType as ve, getTableRenderProps as Be, getColumnOrder as W, updateFormProps as Pe, getFieldProps as Ie, getPlaceholder as ke } from "./utils.mjs";
12
12
  import Le from "./hooks/use-table-content-height.mjs";
13
13
  import { getRawDisplayValue as Ee } from "../editable-table/utils.mjs";
14
14
  import Oe from "./hooks/use-table-row-selection.mjs";
15
- import { useLocale as Ve } from "../config-provider/hooks/use-locale.mjs";
16
- import { useNamespace as ze } from "../config-provider/hooks/use-namespace.mjs";
17
- import { useGlobalConfig as De } from "../config-provider/hooks/use-global-config.mjs";
18
- const Ke = {
15
+ import { useLocale as Ke } from "../config-provider/hooks/use-locale.mjs";
16
+ import { useNamespace as Ve } from "../config-provider/hooks/use-namespace.mjs";
17
+ import { useGlobalConfig as ze } from "../config-provider/hooks/use-global-config.mjs";
18
+ const De = {
19
19
  key: 0
20
20
  }, aa = /* @__PURE__ */ ne({
21
21
  name: "ApTable",
@@ -97,7 +97,7 @@ const Ke = {
97
97
  transformCellText: {},
98
98
  columns: {},
99
99
  rowSelection: {
100
- type: Boolean
100
+ type: [Boolean, Object]
101
101
  },
102
102
  card: {
103
103
  type: Boolean,
@@ -133,24 +133,24 @@ const Ke = {
133
133
  default: !1
134
134
  }
135
135
  },
136
- setup(j, {
136
+ setup(_, {
137
137
  expose: A
138
138
  }) {
139
- const a = j;
140
- let v = 0;
141
- const B = se(), [, M] = Se(), {
139
+ const a = _;
140
+ let B = 0;
141
+ const P = se(), [, M] = Se(), {
142
142
  t: q
143
- } = Ve(), {
143
+ } = Ke(), {
144
144
  e: b,
145
145
  b: i
146
- } = ze("ap-table"), H = De("uiMode", "aplus"), {
146
+ } = Ve("ap-table"), H = ze("uiMode", "aplus"), {
147
147
  height: $,
148
148
  contentRef: G
149
149
  } = Le(), S = s(() => {
150
150
  var t;
151
151
  let e = ((t = a.columns) == null ? void 0 : t.filter((o) => !o.hideInTable)) || [];
152
152
  return e = e.map((o) => ({
153
- ...W(xe(o), ["ellipsis"]),
153
+ ...j(xe(o), ["ellipsis"]),
154
154
  customRender({
155
155
  value: l,
156
156
  ...n
@@ -159,22 +159,22 @@ const Ke = {
159
159
  value: l,
160
160
  ...n
161
161
  });
162
- let R = oe(o, l, d(O, p(le, {
162
+ let F = oe(o, l, d(O, p(le, {
163
163
  mode: "read"
164
164
  }), null));
165
- return o.customRender && (R = o.customRender({
165
+ return o.customRender && (F = o.customRender({
166
166
  value: l,
167
167
  ...n,
168
168
  column: o,
169
- originalNode: R
170
- })), R;
169
+ originalNode: F
170
+ })), F;
171
171
  }
172
172
  })), e;
173
- }), P = s(() => {
173
+ }), I = s(() => {
174
174
  var e, t, o;
175
- return v++, ((o = (t = (e = a.columns) == null ? void 0 : e.filter((l) => !l.hideInSearch && l.dataIndex && (l.valueType || l.customRenderFormItem) && !N.includes(l.valueType))) == null ? void 0 : t.sort((l, n) => {
176
- let C = _(l.order);
177
- return _(n.order) - C;
175
+ return B++, ((o = (t = (e = a.columns) == null ? void 0 : e.filter((l) => !l.hideInSearch && l.dataIndex && (l.valueType || l.customRenderFormItem) && !N.includes(l.valueType))) == null ? void 0 : t.sort((l, n) => {
176
+ let C = W(l.order);
177
+ return W(n.order) - C;
178
178
  })) == null ? void 0 : o.map((l) => {
179
179
  const n = Pe(l, Ie(l.fieldProps, {}));
180
180
  return {
@@ -185,29 +185,29 @@ const Ke = {
185
185
  ...n || {},
186
186
  // 格式化placeholder
187
187
  placeholder: ke(q, l.valueType, n == null ? void 0 : n.placeholder),
188
- _signal: v
188
+ _signal: B
189
189
  }
190
190
  };
191
191
  })) || [];
192
- }), Q = s(() => r(S).filter((e) => e.sorter === !0).map((e) => e.dataIndex)), U = s(() => r(S).filter((e) => e.filters && !e.onFilter).map((e) => e.dataIndex)), J = s(() => u(a.dataSource) ? g.value.records : a.dataSource), {
193
- rowSelection: I,
192
+ }), Q = s(() => r(S).filter((e) => e.sorter === !0).map((e) => e.dataIndex)), U = s(() => r(S).filter((e) => e.filters && !e.onFilter).map((e) => e.dataIndex)), J = s(() => u(a.dataSource) ? y.value.records : a.dataSource), {
193
+ rowSelection: h,
194
194
  selectedRows: k,
195
- ...h
195
+ ...w
196
196
  } = Oe({
197
197
  ...a.rowSelection === !0 ? {} : a.rowSelection,
198
198
  rowKey: a.rowKey,
199
199
  dataSource: J
200
200
  }), {
201
- formRef: w,
201
+ formRef: R,
202
202
  submit: L,
203
203
  reset: E,
204
204
  tableProps: m,
205
205
  handleTableChange: X,
206
- data: g
207
- } = Re({
206
+ data: y
207
+ } = Ce({
208
208
  async request(e) {
209
209
  var o, l;
210
- !I.value.preserveSelectedRowKeys && u(a.dataSource) && h.clearAll();
210
+ !h.value.preserveSelectedRowKeys && u(a.dataSource) && w.clearAll();
211
211
  const t = await ((o = a.request) == null ? void 0 : o.call(a, e));
212
212
  return (l = a.onLoad) == null || l.call(a, (t == null ? void 0 : t.data) || []), {
213
213
  data: (t == null ? void 0 : t.data) || [],
@@ -224,7 +224,7 @@ const Ke = {
224
224
  formatParams: a.beforeSearchSubmit
225
225
  }), Y = s(() => {
226
226
  var e;
227
- return a.scroll ? a.scroll : a.adaptive && (g.value.total > 0 || (e = a.dataSource) != null && e.length) ? {
227
+ return a.scroll ? a.scroll : a.adaptive && (y.value.total > 0 || (e = a.dataSource) != null && e.length) ? {
228
228
  y: r($),
229
229
  x: "100%"
230
230
  } : {
@@ -237,26 +237,27 @@ const Ke = {
237
237
  if ((e = a.columns) != null && e.some((t) => t.ellipsis))
238
238
  return "fixed";
239
239
  }), ee = s(() => {
240
+ var l;
240
241
  const e = r(m), t = u(a.dataSource) ? e : {
241
242
  ...e,
242
243
  dataSource: a.dataSource,
243
244
  onChange: a.onChange
244
- }, o = r(I);
245
+ }, o = r(h);
245
246
  return {
246
247
  ...a,
247
248
  ...t,
248
- rowSelection: a.rowSelection ? {
249
+ rowSelection: a.rowSelection === !0 || ((l = a.rowSelection) == null ? void 0 : l.mode) === "internal" ? {
249
250
  ...o,
250
251
  // tips 如果是前端分页,则默认会走缓存
251
252
  preserveSelectedRowKeys: u(a.dataSource) ? o.preserveSelectedRowKeys : !0
252
- } : void 0,
253
+ } : a.rowSelection,
253
254
  loading: u(a.loading) ? r(m).loading : a.loading,
254
255
  pagination: a.pagination === !1 ? !1 : r(m).pagination,
255
256
  scroll: r(Y)
256
257
  };
257
258
  }), ae = s(() => [i(), a.card ? null : i("wrapper"), a.adaptive ? i("adaptive") : null].filter(Boolean));
258
259
  function oe(e, t, o) {
259
- return N.includes(e.valueType) ? o : e.copyable || e.ellipsis ? d(ge.Paragraph, {
260
+ return N.includes(e.valueType) ? o : e.copyable || e.ellipsis ? d(ye.Paragraph, {
260
261
  copyable: e.copyable ? {
261
262
  text: t,
262
263
  tooltip: !1
@@ -270,86 +271,87 @@ const Ke = {
270
271
  content: e.ellipsis ? Ee(e, t) : o
271
272
  }, null) : o;
272
273
  }
273
- de(() => r(g).loading, (e) => {
274
+ de(() => r(y).loading, (e) => {
274
275
  var t;
275
276
  (t = a.onLoadingChange) == null || t.call(a, e);
276
277
  });
277
278
  function te(e) {
278
279
  var t, o, l;
279
- (l = (o = (t = w.value) == null ? void 0 : t.apForm) == null ? void 0 : o.setFieldsValue) == null || l.call(o, e);
280
+ (l = (o = (t = R.value) == null ? void 0 : t.apForm) == null ? void 0 : o.setFieldsValue) == null || l.call(o, e);
280
281
  }
281
282
  function re() {
282
283
  var e, t, o;
283
- return (o = (t = (e = w.value) == null ? void 0 : e.apForm) == null ? void 0 : t.getFieldsValue) == null ? void 0 : o.call(t, !0);
284
+ return (o = (t = (e = R.value) == null ? void 0 : e.apForm) == null ? void 0 : t.getFieldsValue) == null ? void 0 : o.call(t, !0);
284
285
  }
285
286
  return A({
286
287
  submit: () => L(),
287
288
  reset: () => E(),
288
289
  setSearchFormValues: te,
289
290
  getSearchFormValues: re,
290
- dataSource: s(() => r(g).records),
291
+ dataSource: s(() => r(y).records),
291
292
  rowSelection: {
292
293
  selectedRows: s(() => r(k)),
293
- ...h
294
+ ...w
294
295
  }
295
- }), (e, t) => (c(), y("div", {
296
- class: F(ae.value)
297
- }, [r(u)(e.dataSource) && e.searchForm !== !1 && P.value.length > 0 ? (c(), y("div", {
296
+ }), (e, t) => (c(), g("div", {
297
+ class: T(ae.value)
298
+ }, [r(u)(e.dataSource) && e.searchForm !== !1 && I.value.length > 0 ? (c(), g("div", {
298
299
  key: 0,
299
- class: F(e.card ? r(b)("search-wrapper") : null),
300
- style: T(e.searchFormWrapperStyle)
300
+ class: T(e.card ? r(b)("search-wrapper") : null),
301
+ style: x(e.searchFormWrapperStyle)
301
302
  }, [d(r(he).SearchForm, p(e.searchForm || {}, {
302
303
  ref_key: "formRef",
303
- ref: w,
304
+ ref: R,
304
305
  "custom-reset": "",
305
306
  onSubmit: r(L),
306
307
  onReset: r(E),
307
308
  "submit-loading": r(m).loading
308
- }), V({
309
- default: f(() => [(c(!0), y(ue, null, z(P.value, (o) => (c(), ie(pe(o.customRenderFormItem ? o.customRenderFormItem(o) : r(Ce)[o.valueType || "text"]), p({
309
+ }), K({
310
+ default: f(() => [(c(!0), g(ue, null, V(I.value, (o) => (c(), ie(pe(o.customRenderFormItem ? o.customRenderFormItem(o) : r(Re)[o.valueType || "text"]), p({
310
311
  key: o.dataIndex,
311
312
  ref_for: !0
312
313
  }, o.fieldProps || {}, {
313
314
  span: o.span
314
315
  }), null, 16, ["span"]))), 128))]),
315
316
  _: 2
316
- }, [B.searchFormExtra ? {
317
+ }, [P.searchFormExtra ? {
317
318
  name: "extra",
318
- fn: f(() => [x(e.$slots, "searchFormExtra")]),
319
+ fn: f(() => [v(e.$slots, "searchFormExtra")]),
319
320
  key: "0"
320
- } : void 0]), 1040, ["onSubmit", "onReset", "submit-loading"])], 6)) : D("", !0), K("div", {
321
+ } : void 0]), 1040, ["onSubmit", "onReset", "submit-loading"])], 6)) : z("", !0), D("div", {
321
322
  ref_key: "contentRef",
322
323
  ref: G,
323
- class: F([r(b)("table-wrapper"), e.card ? r(b)("table-wrapper-card") : null]),
324
- style: T(e.tableWrapperStyle)
325
- }, [x(e.$slots, "title", p({
326
- selectedRows: r(k)
327
- }, h)), d(r(ye), p({
324
+ class: T([r(b)("table-wrapper"), e.card ? r(b)("table-wrapper-card") : null]),
325
+ style: x(e.tableWrapperStyle)
326
+ }, [v(e.$slots, "title", p({
327
+ selectedRows: r(k),
328
+ selectedRowKeys: r(h).selectedRowKeys
329
+ }, w)), d(r(ge), p({
328
330
  class: r(H) === "admin" ? r(i)("table-admin") : r(i)("table")
329
331
  }, ee.value, {
330
332
  "table-layout": Z.value,
331
333
  onChange: r(X),
332
334
  columns: S.value
333
- }), V({
335
+ }), K({
334
336
  headerCell: f(({
335
337
  column: o,
336
338
  title: l
337
- }) => [o.tooltip ? (c(), y("span", Ke, [K("span", null, ce(l), 1), d(r(be), {
339
+ }) => [o.tooltip ? (c(), g("span", De, [D("span", null, ce(l), 1), d(r(be), {
338
340
  title: o.tooltip,
339
341
  placement: "bottom"
340
342
  }, {
341
343
  default: f(() => [d(r(Te), {
342
- style: T({
344
+ style: x({
343
345
  paddingLeft: "4px",
344
346
  color: r(M).colorPrimary
345
347
  })
346
348
  }, null, 8, ["style"])]),
347
349
  _: 2
348
- }, 1032, ["title"])])) : D("", !0)]),
350
+ }, 1032, ["title"])])) : z("", !0)]),
349
351
  _: 2
350
- }, [z(r(W)(B, ["title", "searchFormExtra"]), (o, l) => ({
352
+ }, [V(r(j)(P, ["title", "searchFormExtra"]), (o, l) => ({
351
353
  name: l,
352
- fn: f((n) => [x(e.$slots, l, fe(me(n || {})))])
354
+ fn: f((n) => [v(e.$slots, l, fe(me(n || {})))])
353
355
  }))]), 1040, ["class", "table-layout", "onChange", "columns"])], 6)], 2));
354
356
  }
355
357
  });
@@ -9419,7 +9419,7 @@ export declare const apTableRenderItemMap: {
9419
9419
  default: string;
9420
9420
  };
9421
9421
  timezone: {
9422
- type: PropType<"LD" | "PR" | "MS" | "DB" | "SH" | "SU" | "LA" | "NY">;
9422
+ type: PropType<"RJ" | "PR" | "VD" | "CP" | "BS" | "MS" | "SP" | "DB" | "NY" | "KR" | "CG" | "TM" | "DV" | "SU" | "LA" | "SH" | "ALS">;
9423
9423
  };
9424
9424
  }>> & {
9425
9425
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
@@ -9624,7 +9624,7 @@ export declare const apTableRenderItemMap: {
9624
9624
  default: string;
9625
9625
  };
9626
9626
  timezone: {
9627
- type: PropType<"LD" | "PR" | "MS" | "DB" | "SH" | "SU" | "LA" | "NY">;
9627
+ type: PropType<"RJ" | "PR" | "VD" | "CP" | "BS" | "MS" | "SP" | "DB" | "NY" | "KR" | "CG" | "TM" | "DV" | "SU" | "LA" | "SH" | "ALS">;
9628
9628
  };
9629
9629
  }>> & {
9630
9630
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
@@ -9861,7 +9861,7 @@ export declare const apTableRenderItemMap: {
9861
9861
  default: string;
9862
9862
  };
9863
9863
  timezone: {
9864
- type: PropType<"LD" | "PR" | "MS" | "DB" | "SH" | "SU" | "LA" | "NY">;
9864
+ type: PropType<"RJ" | "PR" | "VD" | "CP" | "BS" | "MS" | "SP" | "DB" | "NY" | "KR" | "CG" | "TM" | "DV" | "SU" | "LA" | "SH" | "ALS">;
9865
9865
  };
9866
9866
  }>> & {
9867
9867
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
@@ -10095,7 +10095,7 @@ export declare const apTableRenderItemMap: {
10095
10095
  default: string;
10096
10096
  };
10097
10097
  timezone: {
10098
- type: PropType<"LD" | "PR" | "MS" | "DB" | "SH" | "SU" | "LA" | "NY">;
10098
+ type: PropType<"RJ" | "PR" | "VD" | "CP" | "BS" | "MS" | "SP" | "DB" | "NY" | "KR" | "CG" | "TM" | "DV" | "SU" | "LA" | "SH" | "ALS">;
10099
10099
  };
10100
10100
  }>> & {
10101
10101
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
@@ -10363,7 +10363,7 @@ export declare const apTableRenderItemMap: {
10363
10363
  default: string;
10364
10364
  };
10365
10365
  timezone: {
10366
- type: PropType<"LD" | "PR" | "MS" | "DB" | "SH" | "SU" | "LA" | "NY">;
10366
+ type: PropType<"RJ" | "PR" | "VD" | "CP" | "BS" | "MS" | "SP" | "DB" | "NY" | "KR" | "CG" | "TM" | "DV" | "SU" | "LA" | "SH" | "ALS">;
10367
10367
  };
10368
10368
  }>> & {
10369
10369
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
@@ -10576,7 +10576,7 @@ export declare const apTableRenderItemMap: {
10576
10576
  default: string;
10577
10577
  };
10578
10578
  timezone: {
10579
- type: PropType<"LD" | "PR" | "MS" | "DB" | "SH" | "SU" | "LA" | "NY">;
10579
+ type: PropType<"RJ" | "PR" | "VD" | "CP" | "BS" | "MS" | "SP" | "DB" | "NY" | "KR" | "CG" | "TM" | "DV" | "SU" | "LA" | "SH" | "ALS">;
10580
10580
  };
10581
10581
  }>> & {
10582
10582
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
@@ -10826,7 +10826,7 @@ export declare const apTableRenderItemMap: {
10826
10826
  default: string;
10827
10827
  };
10828
10828
  timezone: {
10829
- type: PropType<"LD" | "PR" | "MS" | "DB" | "SH" | "SU" | "LA" | "NY">;
10829
+ type: PropType<"RJ" | "PR" | "VD" | "CP" | "BS" | "MS" | "SP" | "DB" | "NY" | "KR" | "CG" | "TM" | "DV" | "SU" | "LA" | "SH" | "ALS">;
10830
10830
  };
10831
10831
  }>> & {
10832
10832
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
@@ -11073,7 +11073,7 @@ export declare const apTableRenderItemMap: {
11073
11073
  default: string;
11074
11074
  };
11075
11075
  timezone: {
11076
- type: PropType<"LD" | "PR" | "MS" | "DB" | "SH" | "SU" | "LA" | "NY">;
11076
+ type: PropType<"RJ" | "PR" | "VD" | "CP" | "BS" | "MS" | "SP" | "DB" | "NY" | "KR" | "CG" | "TM" | "DV" | "SU" | "LA" | "SH" | "ALS">;
11077
11077
  };
11078
11078
  }>> & {
11079
11079
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
@@ -16086,9 +16086,6 @@ export declare const apTableRenderItemMap: {
16086
16086
  rows: {
16087
16087
  type: PropType<number>;
16088
16088
  };
16089
- autosize: {
16090
- type: PropType<boolean | AutoSizeType>;
16091
- };
16092
16089
  autoSize: {
16093
16090
  type: PropType<boolean | AutoSizeType>;
16094
16091
  };
@@ -16237,9 +16234,6 @@ export declare const apTableRenderItemMap: {
16237
16234
  rows: {
16238
16235
  type: PropType<number>;
16239
16236
  };
16240
- autosize: {
16241
- type: PropType<boolean | AutoSizeType>;
16242
- };
16243
16237
  autoSize: {
16244
16238
  type: PropType<boolean | AutoSizeType>;
16245
16239
  };
@@ -46,7 +46,7 @@ export interface RowSelectionReturnType<RecordType = any> {
46
46
  */
47
47
  toggleSelect: (item: RecordType) => void;
48
48
  }
49
- type RowSelectionParams<T> = ApTableRowSelection<T> & {
49
+ type RowSelectionParams<T> = Omit<ApTableRowSelection<T>, 'mode'> & {
50
50
  /**
51
51
  * 数据源(如果是后端分页,则表示当页数据,否则是全量数据)
52
52
  */
@@ -65,7 +65,9 @@ export type ExtraProColumnType<T> = Omit<ColumnType<T>, 'children' | 'filters' |
65
65
  multiple?: number;
66
66
  };
67
67
  };
68
- export type ApTableRowSelection<RecordType = any> = Omit<TableRowSelection<RecordType>, 'selectedRowKeys' | 'onChange' | 'onSelect' | 'onSelectAll' | 'onSelectInvert' | 'onSelectNone'>;
68
+ export type ApTableRowSelection<RecordType = any> = Omit<TableRowSelection<RecordType>, 'selectedRowKeys' | 'onChange' | 'onSelect' | 'onSelectAll' | 'onSelectInvert' | 'onSelectNone'> & {
69
+ mode: 'internal';
70
+ };
69
71
  export type ApColumnType<RecordType = any, ValueType extends ApTableValueTypes = ApTableValueTypes> = ValueType extends ApTableValueTypes ? ExtraProColumnType<RecordType> & {
70
72
  children?: ApColumnType<RecordType, ValueType>[];
71
73
  /**
@@ -151,7 +153,9 @@ export type ApTableProps<RecordType = any, ParamsType = any> = Omit<TableProps<R
151
153
  /**
152
154
  * 行选中配置
153
155
  */
154
- rowSelection?: true | ApTableRowSelection<RecordType>;
156
+ rowSelection?: true | ApTableRowSelection<RecordType> | (TableRowSelection<RecordType> & {
157
+ mode?: 'base';
158
+ });
155
159
  /**
156
160
  * 是否启用卡片样式
157
161
  */
@@ -0,0 +1,14 @@
1
+ import { Props } from './interface';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
3
+
4
+ declare const _default: DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>>, {}, {}>;
5
+ export default _default;
6
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
7
+ type __VLS_TypePropsToRuntimeProps<T> = {
8
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
9
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
10
+ } : {
11
+ type: PropType<T[K]>;
12
+ required: true;
13
+ };
14
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./ApExportGroup.vue2.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,117 @@
1
+ import { defineComponent as G, computed as u, ref as N, openBlock as f, createBlock as y, unref as t, normalizeClass as D, withCtx as i, createVNode as x, createTextVNode as h, toDisplayString as w, normalizeStyle as B, createCommentVNode as K } from "vue";
2
+ import { formatFileNameAndDownloadFile as T } from "@aplus-frontend/utils";
3
+ import { DownOutlined as V } from "@ant-design/icons-vue";
4
+ import { Modal as z, Dropdown as O, Menu as I, MenuItem as C, Button as J } from "ant-design-vue";
5
+ import "../../config-provider/index.mjs";
6
+ import { ActionType as c } from "./interface.mjs";
7
+ import { usePermission as R } from "@aplus-frontend/hooks";
8
+ import { useNamespace as j } from "../../config-provider/hooks/use-namespace.mjs";
9
+ import { useLocale as H } from "../../config-provider/hooks/use-locale.mjs";
10
+ import { useGlobalConfig as P } from "../../config-provider/hooks/use-global-config.mjs";
11
+ const oe = /* @__PURE__ */ G({
12
+ __name: "ApExportGroup",
13
+ props: {
14
+ selectedRowKeys: {},
15
+ disabled: { type: Boolean },
16
+ auth: {},
17
+ ifShow: { type: Function },
18
+ text: {},
19
+ request: { type: Function },
20
+ getRequestParams: { type: Function }
21
+ },
22
+ setup(E) {
23
+ const { hasPermission: L } = R(), e = E, { b: S } = j("ap-export-group"), { t: s } = H(), F = P("uiMode"), g = u(() => {
24
+ const o = {
25
+ aplus: "#0070FF",
26
+ admin: "#34b77c"
27
+ };
28
+ return b.value ? "" : o[F.value] || o.aplus;
29
+ }), b = u(() => !!(e != null && e.disabled)), A = {
30
+ textAlign: "center"
31
+ }, p = N(!1), v = u(() => (e == null ? void 0 : e.selectedRowKeys) || []), M = u(() => {
32
+ let o = e == null ? void 0 : e.ifShow;
33
+ return !(e != null && e.ifShow) && (e != null && e.auth) && (o = () => L(e.auth)), (o == null ? void 0 : o()) ?? !0;
34
+ });
35
+ async function k({ key: o }) {
36
+ var _;
37
+ const { getRequestParams: n, request: r } = e || {};
38
+ let l = {};
39
+ if (o === c.SELECT) {
40
+ const a = ((n == null ? void 0 : n()) || {}).exportFieldList;
41
+ l = {
42
+ ids: v.value,
43
+ exportFieldList: a
44
+ };
45
+ for (const d in l)
46
+ l[d] || delete l[d];
47
+ } else
48
+ o === c.ALL && (l = (n == null ? void 0 : n()) || {});
49
+ try {
50
+ p.value = !0;
51
+ const a = await (r == null ? void 0 : r(l));
52
+ a.headers && !((_ = a == null ? void 0 : a.headers) != null && _["content-disposition"]) ? a.data.text().then((d) => {
53
+ const m = JSON.parse(d || "{}");
54
+ m.code && m.code !== "200" && z.error({
55
+ title: s("ap.apExportGroup.exportError"),
56
+ content: m.message,
57
+ centered: !0
58
+ });
59
+ }) : T(a);
60
+ } finally {
61
+ p.value = !1;
62
+ }
63
+ }
64
+ return (o, n) => M.value ? (f(), y(t(O), {
65
+ key: 0,
66
+ class: D([t(S)()]),
67
+ overlayStyle: A,
68
+ disabled: b.value
69
+ }, {
70
+ overlay: i(() => [
71
+ x(t(I), { onClick: k }, {
72
+ default: i(() => {
73
+ var r;
74
+ return [
75
+ (f(), y(t(C), {
76
+ key: t(c).SELECT,
77
+ disabled: ((r = v.value) == null ? void 0 : r.length) === 0
78
+ }, {
79
+ default: i(() => [
80
+ h(w(t(s)("ap.apExportGroup.exportSelected")), 1)
81
+ ]),
82
+ _: 1
83
+ }, 8, ["disabled"])),
84
+ (f(), y(t(C), {
85
+ key: t(c).ALL
86
+ }, {
87
+ default: i(() => [
88
+ h(w(t(s)("ap.apExportGroup.exportAll")), 1)
89
+ ]),
90
+ _: 1
91
+ }))
92
+ ];
93
+ }),
94
+ _: 1
95
+ })
96
+ ]),
97
+ default: i(() => [
98
+ x(t(J), {
99
+ style: B({
100
+ color: g.value
101
+ }),
102
+ loading: p.value
103
+ }, {
104
+ default: i(() => [
105
+ h(w((e == null ? void 0 : e.text) ?? t(s)("ap.apExportGroup.export")) + " ", 1),
106
+ x(t(V))
107
+ ]),
108
+ _: 1
109
+ }, 8, ["style", "loading"])
110
+ ]),
111
+ _: 1
112
+ }, 8, ["class", "disabled"])) : K("", !0);
113
+ }
114
+ });
115
+ export {
116
+ oe as default
117
+ };
@@ -0,0 +1,37 @@
1
+ import { MenuProps } from 'ant-design-vue';
2
+
3
+ export interface Props {
4
+ /**
5
+ * 选中行的Key列表
6
+ */
7
+ selectedRowKeys?: any[];
8
+ /**
9
+ * 是否禁用
10
+ */
11
+ disabled?: boolean;
12
+ /**
13
+ * 权限
14
+ */
15
+ auth?: string;
16
+ /**
17
+ * 是否显示
18
+ */
19
+ ifShow?: () => boolean;
20
+ /**
21
+ * 导出按钮文案
22
+ */
23
+ text?: string;
24
+ /**
25
+ * 导出接口
26
+ */
27
+ request?: (key: any) => Promise<any>;
28
+ /**
29
+ * 导出接口参数
30
+ */
31
+ getRequestParams?: () => Record<string, any>;
32
+ }
33
+ export declare enum ActionType {
34
+ ALL = "ALL",
35
+ SELECT = "SELECT"
36
+ }
37
+ export type AntMenuInfo = Parameters<Exclude<MenuProps['onClick'], undefined>>[0];
@@ -0,0 +1,4 @@
1
+ var r = /* @__PURE__ */ ((L) => (L.ALL = "ALL", L.SELECT = "SELECT", L))(r || {});
2
+ export {
3
+ r as ActionType
4
+ };
@@ -15,7 +15,7 @@ const K = { key: 0 }, P = ["onClick"], le = /* @__PURE__ */ z({
15
15
  tipTitle: { default: "查看详情" },
16
16
  mapLabel: {},
17
17
  separator: { default: "|" },
18
- rows: { default: 1 }
18
+ rows: { default: 2 }
19
19
  },
20
20
  emits: ["choose", "expand"],
21
21
  setup(g, { expose: b, emit: C }) {
@@ -24,7 +24,7 @@ export interface ApExpandAlertProps {
24
24
  */
25
25
  separator: string;
26
26
  /**
27
- * 内容达到几行显示展开收起,默认是一行
27
+ * 内容达到几行显示展开收起,默认是两行
28
28
  */
29
29
  rows: string | number;
30
30
  }