@aplus-frontend/ui 0.0.39 → 0.1.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 (97) hide show
  1. package/es/index.mjs +149 -148
  2. package/es/src/ap-action/item/index.vue2.mjs +19 -20
  3. package/es/src/ap-action/item-modal/index.vue.mjs +7 -6
  4. package/es/src/ap-action/style/item.css +10 -25
  5. package/es/src/ap-field/checkbox/index.vue.mjs +32 -27
  6. package/es/src/ap-field/checkbox/style.css +7 -0
  7. package/es/src/ap-field/interface.d.ts +3 -1
  8. package/es/src/ap-field/radio/index.vue.d.ts +3 -0
  9. package/es/src/ap-field/radio/index.vue.mjs +44 -29
  10. package/es/src/ap-field/radio/style.css +4 -0
  11. package/es/src/ap-field/text-area/index.vue.mjs +9 -10
  12. package/es/src/ap-form/style/ap-form-item.css +6 -6
  13. package/es/src/ap-table/ap-table.vue.d.ts +6 -0
  14. package/es/src/ap-table/ap-table.vue.mjs +124 -124
  15. package/es/src/ap-table/constants.d.ts +15 -6
  16. package/es/src/ap-table/style/ap-table.css +1 -21
  17. package/es/src/business/ap-export-group/ApExportGroup.vue.d.ts +14 -0
  18. package/es/src/business/ap-export-group/ApExportGroup.vue.mjs +4 -0
  19. package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +117 -0
  20. package/es/src/business/ap-export-group/interface.d.ts +37 -0
  21. package/es/src/business/ap-export-group/interface.mjs +4 -0
  22. package/es/src/business/ap-status/ApStatusGroup.vue2.mjs +10 -9
  23. package/es/src/business/index.d.ts +105 -0
  24. package/es/src/business/index.mjs +12 -9
  25. package/es/src/check-card/index.vue2.mjs +44 -48
  26. package/es/src/check-card/style/index.css +10 -42
  27. package/es/src/config-provider/config-provider.mjs +22 -17
  28. package/es/src/design-token/index.mjs +4 -2
  29. package/es/src/editable-table/form-item.vue.d.ts +4 -0
  30. package/es/src/editable-table/form-item.vue.mjs +75 -68
  31. package/es/src/editable-table/index.vue.d.ts +4 -0
  32. package/es/src/editable-table/index.vue.mjs +79 -72
  33. package/es/src/editable-table/interface.d.ts +8 -0
  34. package/es/src/editable-table/style/index.css +1 -21
  35. package/es/src/editable-table/utils.d.ts +8 -0
  36. package/es/src/editable-table/utils.mjs +29 -18
  37. package/es/src/index.mjs +175 -174
  38. package/es/src/locale/lang/en.mjs +7 -1
  39. package/es/src/locale/lang/zh-cn.mjs +28 -22
  40. package/es/src/theme/ap-action/item.css +10 -25
  41. package/es/src/theme/ap-field/checkbox.css +7 -0
  42. package/es/src/theme/ap-field/radio.css +4 -0
  43. package/es/src/theme/ap-form/ap-form-item.css +6 -6
  44. package/es/src/theme/ap-table/ap-table.css +1 -21
  45. package/es/src/theme/check-card/index.css +10 -42
  46. package/es/src/theme/css-var/index.d.ts +7 -0
  47. package/es/src/theme/css-var/index.mjs +109 -0
  48. package/es/src/theme/editable-table/index.css +1 -21
  49. package/lib/index.js +1 -1
  50. package/lib/src/ap-action/item/index.vue2.js +1 -1
  51. package/lib/src/ap-action/item-modal/index.vue.js +1 -1
  52. package/lib/src/ap-action/style/item.css +10 -25
  53. package/lib/src/ap-field/checkbox/index.vue.js +1 -1
  54. package/lib/src/ap-field/checkbox/style.css +7 -0
  55. package/lib/src/ap-field/interface.d.ts +3 -1
  56. package/lib/src/ap-field/radio/index.vue.d.ts +3 -0
  57. package/lib/src/ap-field/radio/index.vue.js +1 -1
  58. package/lib/src/ap-field/radio/style.css +4 -0
  59. package/lib/src/ap-field/text-area/index.vue.js +1 -1
  60. package/lib/src/ap-form/style/ap-form-item.css +6 -6
  61. package/lib/src/ap-table/ap-table.vue.d.ts +6 -0
  62. package/lib/src/ap-table/ap-table.vue.js +1 -1
  63. package/lib/src/ap-table/constants.d.ts +15 -6
  64. package/lib/src/ap-table/style/ap-table.css +1 -21
  65. package/lib/src/business/ap-export-group/ApExportGroup.vue.d.ts +14 -0
  66. package/lib/src/business/ap-export-group/ApExportGroup.vue.js +1 -0
  67. package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -0
  68. package/lib/src/business/ap-export-group/interface.d.ts +37 -0
  69. package/lib/src/business/ap-export-group/interface.js +1 -0
  70. package/lib/src/business/ap-status/ApStatusGroup.vue2.js +1 -1
  71. package/lib/src/business/index.d.ts +105 -0
  72. package/lib/src/business/index.js +1 -1
  73. package/lib/src/check-card/index.vue2.js +1 -1
  74. package/lib/src/check-card/style/index.css +10 -42
  75. package/lib/src/config-provider/config-provider.js +1 -1
  76. package/lib/src/design-token/index.js +1 -1
  77. package/lib/src/editable-table/form-item.vue.d.ts +4 -0
  78. package/lib/src/editable-table/form-item.vue.js +1 -1
  79. package/lib/src/editable-table/index.vue.d.ts +4 -0
  80. package/lib/src/editable-table/index.vue.js +1 -1
  81. package/lib/src/editable-table/interface.d.ts +8 -0
  82. package/lib/src/editable-table/style/index.css +1 -21
  83. package/lib/src/editable-table/utils.d.ts +8 -0
  84. package/lib/src/editable-table/utils.js +1 -1
  85. package/lib/src/index.js +1 -1
  86. package/lib/src/locale/lang/en.js +1 -1
  87. package/lib/src/locale/lang/zh-cn.js +1 -1
  88. package/lib/src/theme/ap-action/item.css +10 -25
  89. package/lib/src/theme/ap-field/checkbox.css +7 -0
  90. package/lib/src/theme/ap-field/radio.css +4 -0
  91. package/lib/src/theme/ap-form/ap-form-item.css +6 -6
  92. package/lib/src/theme/ap-table/ap-table.css +1 -21
  93. package/lib/src/theme/check-card/index.css +10 -42
  94. package/lib/src/theme/css-var/index.d.ts +7 -0
  95. package/lib/src/theme/css-var/index.js +1 -0
  96. package/lib/src/theme/editable-table/index.css +1 -21
  97. package/package.json +6 -5
@@ -1,23 +1,22 @@
1
- import { defineComponent as ne, useSlots as se, computed as s, createVNode as d, mergeProps as p, unref as l, 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 le, useSlots as ne, computed as s, createVNode as d, mergeProps as i, unref as l, watch as se, openBlock as p, createElementBlock as g, normalizeClass as T, normalizeStyle as x, createSlots as K, withCtx as c, Fragment as de, renderList as V, createBlock as ue, resolveDynamicComponent as ie, renderSlot as v, createCommentVNode as z, createElementVNode as D, toDisplayString as pe, normalizeProps as ce, guardReactiveProps as fe } from "vue";
2
+ import { Typography as me, Table as ye, Tooltip as ge } from "ant-design-vue";
3
3
  import { useToken as Se } from "ant-design-vue/es/theme/internal";
4
- import { ApForm as he } from "../ap-form/index.mjs";
5
- import { apTableRenderItemMap as we, noRenderAsFormItemValueList as N, apTableFormItemMap as Ce } from "./constants.mjs";
4
+ import { ApForm as be } from "../ap-form/index.mjs";
5
+ import { apTableRenderItemMap as he, noRenderAsFormItemValueList as N, apTableFormItemMap as we } from "./constants.mjs";
6
6
  import "../config-provider/index.mjs";
7
7
  import { useTablePaging as Re } from "./hooks/use-table-paging.mjs";
8
- import { omit as j, isUndefined as u, isBoolean as Fe } from "lodash-unified";
8
+ import { omit as j, isUndefined as u, isBoolean as Ce } from "lodash-unified";
9
9
  import "./style/ap-table.css";
10
- import { QuestionCircleOutlined as Te } from "@ant-design/icons-vue";
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
- import Le from "./hooks/use-table-content-height.mjs";
13
- import { getRawDisplayValue as Ee } from "../editable-table/utils.mjs";
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 = {
10
+ import { QuestionCircleOutlined as Fe } from "@ant-design/icons-vue";
11
+ import { apColumnToColumn as Te, getTableRenderType as xe, getTableRenderProps as ve, getColumnOrder as W, updateFormProps as Be, getFieldProps as Pe, getPlaceholder as Ie } from "./utils.mjs";
12
+ import ke from "./hooks/use-table-content-height.mjs";
13
+ import { getRawDisplayValue as Le } from "../editable-table/utils.mjs";
14
+ import Ee from "./hooks/use-table-row-selection.mjs";
15
+ import { useLocale as Oe } from "../config-provider/hooks/use-locale.mjs";
16
+ import { useNamespace as Ke } from "../config-provider/hooks/use-namespace.mjs";
17
+ const Ve = {
19
18
  key: 0
20
- }, aa = /* @__PURE__ */ ne({
19
+ }, Ye = /* @__PURE__ */ le({
21
20
  name: "ApTable",
22
21
  __name: "ap-table",
23
22
  props: {
@@ -137,46 +136,46 @@ const Ke = {
137
136
  expose: A
138
137
  }) {
139
138
  const a = _;
140
- let v = 0;
141
- const B = se(), [, M] = Se(), {
142
- t: q
143
- } = Ve(), {
144
- e: b,
145
- b: i
146
- } = ze("ap-table"), H = De("uiMode", "aplus"), {
139
+ let B = 0;
140
+ const P = ne(), [, q] = Se(), {
141
+ t: H
142
+ } = Oe(), {
143
+ e: S,
144
+ b: f
145
+ } = Ke("ap-table"), {
147
146
  height: $,
148
- contentRef: G
149
- } = Le(), S = s(() => {
150
- var t;
151
- let e = ((t = a.columns) == null ? void 0 : t.filter((o) => !o.hideInTable)) || [];
152
- return e = e.map((o) => ({
153
- ...j(xe(o), ["ellipsis"]),
147
+ contentRef: M
148
+ } = ke(), b = s(() => {
149
+ var o;
150
+ let e = ((o = a.columns) == null ? void 0 : o.filter((t) => !t.hideInTable)) || [];
151
+ return e = e.map((t) => ({
152
+ ...j(Te(t), ["ellipsis"]),
154
153
  customRender({
155
154
  value: r,
156
155
  ...n
157
156
  }) {
158
- const C = ve(o), O = we[C], le = Be(o, {
157
+ const C = xe(t), O = he[C], re = ve(t, {
159
158
  value: r,
160
159
  ...n
161
160
  });
162
- let R = oe(o, r, d(O, p(le, {
161
+ let F = ae(t, r, d(O, i(re, {
163
162
  mode: "read"
164
163
  }), null));
165
- return o.customRender && (R = o.customRender({
164
+ return t.customRender && (F = t.customRender({
166
165
  value: r,
167
166
  ...n,
168
- column: o,
169
- originalNode: R
170
- })), R;
167
+ column: t,
168
+ originalNode: F
169
+ })), F;
171
170
  }
172
171
  })), e;
173
- }), P = s(() => {
174
- var e, t, o;
175
- return v++, ((o = (t = (e = a.columns) == null ? void 0 : e.filter((r) => !r.hideInSearch && r.dataIndex && (r.valueType || r.customRenderFormItem) && !N.includes(r.valueType))) == null ? void 0 : t.sort((r, n) => {
172
+ }), I = s(() => {
173
+ var e, o, t;
174
+ return B++, ((t = (o = (e = a.columns) == null ? void 0 : e.filter((r) => !r.hideInSearch && r.dataIndex && (r.valueType || r.customRenderFormItem) && !N.includes(r.valueType))) == null ? void 0 : o.sort((r, n) => {
176
175
  let C = W(r.order);
177
176
  return W(n.order) - C;
178
- })) == null ? void 0 : o.map((r) => {
179
- const n = Pe(r, Ie(r.fieldProps, {}));
177
+ })) == null ? void 0 : t.map((r) => {
178
+ const n = Be(r, Pe(r.fieldProps, {}));
180
179
  return {
181
180
  ...r,
182
181
  fieldProps: {
@@ -184,34 +183,34 @@ const Ke = {
184
183
  name: r.dataIndex,
185
184
  ...n || {},
186
185
  // 格式化placeholder
187
- placeholder: ke(q, r.valueType, n == null ? void 0 : n.placeholder),
188
- _signal: v
186
+ placeholder: Ie(H, r.valueType, n == null ? void 0 : n.placeholder),
187
+ _signal: B
189
188
  }
190
189
  };
191
190
  })) || [];
192
- }), Q = s(() => l(S).filter((e) => e.sorter === !0).map((e) => e.dataIndex)), U = s(() => l(S).filter((e) => e.filters && !e.onFilter).map((e) => e.dataIndex)), J = s(() => u(a.dataSource) ? g.value.records : a.dataSource), {
193
- rowSelection: I,
191
+ }), Q = s(() => l(b).filter((e) => e.sorter === !0).map((e) => e.dataIndex)), U = s(() => l(b).filter((e) => e.filters && !e.onFilter).map((e) => e.dataIndex)), G = s(() => u(a.dataSource) ? y.value.records : a.dataSource), {
192
+ rowSelection: h,
194
193
  selectedRows: k,
195
- ...h
196
- } = Oe({
194
+ ...w
195
+ } = Ee({
197
196
  ...a.rowSelection === !0 ? {} : a.rowSelection,
198
197
  rowKey: a.rowKey,
199
- dataSource: J
198
+ dataSource: G
200
199
  }), {
201
- formRef: w,
200
+ formRef: R,
202
201
  submit: L,
203
202
  reset: E,
204
203
  tableProps: m,
205
- handleTableChange: X,
206
- data: g
204
+ handleTableChange: J,
205
+ data: y
207
206
  } = Re({
208
207
  async request(e) {
209
- var o, r;
210
- !I.value.preserveSelectedRowKeys && u(a.dataSource) && h.clearAll();
211
- const t = await ((o = a.request) == null ? void 0 : o.call(a, e));
212
- return (r = a.onLoad) == null || r.call(a, (t == null ? void 0 : t.data) || []), {
213
- data: (t == null ? void 0 : t.data) || [],
214
- total: (t == null ? void 0 : t.total) || 0
208
+ var t, r;
209
+ !h.value.preserveSelectedRowKeys && u(a.dataSource) && w.clearAll();
210
+ const o = await ((t = a.request) == null ? void 0 : t.call(a, e));
211
+ return (r = a.onLoad) == null || r.call(a, (o == null ? void 0 : o.data) || []), {
212
+ data: (o == null ? void 0 : o.data) || [],
213
+ total: (o == null ? void 0 : o.total) || 0
215
214
  };
216
215
  },
217
216
  filterFields: l(U),
@@ -222,138 +221,139 @@ const Ke = {
222
221
  defaultCurrent: a.pagination ? a.pagination.defaultCurrent : void 0,
223
222
  defaultPageSize: a.pagination ? a.pagination.defaultPageSize : void 0,
224
223
  formatParams: a.beforeSearchSubmit
225
- }), Y = s(() => {
224
+ }), X = s(() => {
226
225
  var e;
227
- return a.scroll ? a.scroll : a.adaptive && (g.value.total > 0 || (e = a.dataSource) != null && e.length) ? {
226
+ return a.scroll ? a.scroll : a.adaptive && (y.value.total > 0 || (e = a.dataSource) != null && e.length) ? {
228
227
  y: l($),
229
228
  x: "100%"
230
229
  } : {
231
230
  x: !0
232
231
  };
233
- }), Z = s(() => {
232
+ }), Y = s(() => {
234
233
  var e;
235
234
  if (a.tableLayout)
236
235
  return a.tableLayout;
237
- if ((e = a.columns) != null && e.some((t) => t.ellipsis))
236
+ if ((e = a.columns) != null && e.some((o) => o.ellipsis))
238
237
  return "fixed";
239
- }), ee = s(() => {
238
+ }), Z = s(() => {
240
239
  var r;
241
- const e = l(m), t = u(a.dataSource) ? e : {
240
+ const e = l(m), o = u(a.dataSource) ? e : {
242
241
  ...e,
243
242
  dataSource: a.dataSource,
244
243
  onChange: a.onChange
245
- }, o = l(I);
244
+ }, t = l(h);
246
245
  return {
247
246
  ...a,
248
- ...t,
247
+ ...o,
249
248
  rowSelection: a.rowSelection === !0 || ((r = a.rowSelection) == null ? void 0 : r.mode) === "internal" ? {
250
- ...o,
249
+ ...t,
251
250
  // tips 如果是前端分页,则默认会走缓存
252
- preserveSelectedRowKeys: u(a.dataSource) ? o.preserveSelectedRowKeys : !0
251
+ preserveSelectedRowKeys: u(a.dataSource) ? t.preserveSelectedRowKeys : !0
253
252
  } : a.rowSelection,
254
253
  loading: u(a.loading) ? l(m).loading : a.loading,
255
254
  pagination: a.pagination === !1 ? !1 : l(m).pagination,
256
- scroll: l(Y)
255
+ scroll: l(X)
257
256
  };
258
- }), ae = s(() => [i(), a.card ? null : i("wrapper"), a.adaptive ? i("adaptive") : null].filter(Boolean));
259
- function oe(e, t, o) {
260
- return N.includes(e.valueType) ? o : e.copyable || e.ellipsis ? d(ge.Paragraph, {
257
+ }), ee = s(() => [f(), a.card ? null : f("wrapper"), a.adaptive ? f("adaptive") : null].filter(Boolean));
258
+ function ae(e, o, t) {
259
+ return N.includes(e.valueType) ? t : e.copyable || e.ellipsis ? d(me.Paragraph, {
261
260
  copyable: e.copyable ? {
262
- text: t,
261
+ text: o,
263
262
  tooltip: !1
264
263
  } : !1,
265
- ellipsis: e.ellipsis ? Fe(e.ellipsis) ? {
266
- tooltip: t
264
+ ellipsis: e.ellipsis ? Ce(e.ellipsis) ? {
265
+ tooltip: o
267
266
  } : {
268
267
  ...e.ellipsis,
269
- tooltip: t
268
+ tooltip: o
270
269
  } : !1,
271
- content: e.ellipsis ? Ee(e, t) : o
272
- }, null) : o;
270
+ content: e.ellipsis ? Le(e, o) : t
271
+ }, null) : t;
273
272
  }
274
- de(() => l(g).loading, (e) => {
275
- var t;
276
- (t = a.onLoadingChange) == null || t.call(a, e);
273
+ se(() => l(y).loading, (e) => {
274
+ var o;
275
+ (o = a.onLoadingChange) == null || o.call(a, e);
277
276
  });
278
277
  function te(e) {
279
- var t, o, r;
280
- (r = (o = (t = w.value) == null ? void 0 : t.apForm) == null ? void 0 : o.setFieldsValue) == null || r.call(o, e);
278
+ var o, t, r;
279
+ (r = (t = (o = R.value) == null ? void 0 : o.apForm) == null ? void 0 : t.setFieldsValue) == null || r.call(t, e);
281
280
  }
282
- function re() {
283
- var e, t, o;
284
- return (o = (t = (e = w.value) == null ? void 0 : e.apForm) == null ? void 0 : t.getFieldsValue) == null ? void 0 : o.call(t, !0);
281
+ function oe() {
282
+ var e, o, t;
283
+ return (t = (o = (e = R.value) == null ? void 0 : e.apForm) == null ? void 0 : o.getFieldsValue) == null ? void 0 : t.call(o, !0);
285
284
  }
286
285
  return A({
287
286
  submit: () => L(),
288
287
  reset: () => E(),
289
288
  setSearchFormValues: te,
290
- getSearchFormValues: re,
291
- dataSource: s(() => l(g).records),
289
+ getSearchFormValues: oe,
290
+ dataSource: s(() => l(y).records),
292
291
  rowSelection: {
293
292
  selectedRows: s(() => l(k)),
294
- ...h
293
+ ...w
295
294
  }
296
- }), (e, t) => (c(), y("div", {
297
- class: F(ae.value)
298
- }, [l(u)(e.dataSource) && e.searchForm !== !1 && P.value.length > 0 ? (c(), y("div", {
295
+ }), (e, o) => (p(), g("div", {
296
+ class: T(ee.value)
297
+ }, [l(u)(e.dataSource) && e.searchForm !== !1 && I.value.length > 0 ? (p(), g("div", {
299
298
  key: 0,
300
- class: F(e.card ? l(b)("search-wrapper") : null),
301
- style: T(e.searchFormWrapperStyle)
302
- }, [d(l(he).SearchForm, p(e.searchForm || {}, {
299
+ class: T(e.card ? l(S)("search-wrapper") : null),
300
+ style: x(e.searchFormWrapperStyle)
301
+ }, [d(l(be).SearchForm, i(e.searchForm || {}, {
303
302
  ref_key: "formRef",
304
- ref: w,
303
+ ref: R,
305
304
  "custom-reset": "",
306
305
  onSubmit: l(L),
307
306
  onReset: l(E),
308
307
  "submit-loading": l(m).loading
309
- }), V({
310
- default: f(() => [(c(!0), y(ue, null, z(P.value, (o) => (c(), ie(pe(o.customRenderFormItem ? o.customRenderFormItem(o) : l(Ce)[o.valueType || "text"]), p({
311
- key: o.dataIndex,
308
+ }), K({
309
+ default: c(() => [(p(!0), g(de, null, V(I.value, (t) => (p(), ue(ie(t.customRenderFormItem ? t.customRenderFormItem(t) : l(we)[t.valueType || "text"]), i({
310
+ key: t.dataIndex,
312
311
  ref_for: !0
313
- }, o.fieldProps || {}, {
314
- span: o.span
312
+ }, t.fieldProps || {}, {
313
+ span: t.span
315
314
  }), null, 16, ["span"]))), 128))]),
316
315
  _: 2
317
- }, [B.searchFormExtra ? {
316
+ }, [P.searchFormExtra ? {
318
317
  name: "extra",
319
- fn: f(() => [x(e.$slots, "searchFormExtra")]),
318
+ fn: c(() => [v(e.$slots, "searchFormExtra")]),
320
319
  key: "0"
321
- } : void 0]), 1040, ["onSubmit", "onReset", "submit-loading"])], 6)) : D("", !0), K("div", {
320
+ } : void 0]), 1040, ["onSubmit", "onReset", "submit-loading"])], 6)) : z("", !0), D("div", {
322
321
  ref_key: "contentRef",
323
- ref: G,
324
- class: F([l(b)("table-wrapper"), e.card ? l(b)("table-wrapper-card") : null]),
325
- style: T(e.tableWrapperStyle)
326
- }, [x(e.$slots, "title", p({
327
- selectedRows: l(k)
328
- }, h)), d(l(ye), p({
329
- class: l(H) === "admin" ? l(i)("table-admin") : l(i)("table")
330
- }, ee.value, {
331
- "table-layout": Z.value,
332
- onChange: l(X),
333
- columns: S.value
334
- }), V({
335
- headerCell: f(({
336
- column: o,
322
+ ref: M,
323
+ class: T([l(S)("table-wrapper"), e.card ? l(S)("table-wrapper-card") : null]),
324
+ style: x(e.tableWrapperStyle)
325
+ }, [v(e.$slots, "title", i({
326
+ selectedRows: l(k),
327
+ selectedRowKeys: l(h).selectedRowKeys
328
+ }, w)), d(l(ye), i({
329
+ class: l(f)("table")
330
+ }, Z.value, {
331
+ "table-layout": Y.value,
332
+ onChange: l(J),
333
+ columns: b.value
334
+ }), K({
335
+ headerCell: c(({
336
+ column: t,
337
337
  title: r
338
- }) => [o.tooltip ? (c(), y("span", Ke, [K("span", null, ce(r), 1), d(l(be), {
339
- title: o.tooltip,
338
+ }) => [t.tooltip ? (p(), g("span", Ve, [D("span", null, pe(r), 1), d(l(ge), {
339
+ title: t.tooltip,
340
340
  placement: "bottom"
341
341
  }, {
342
- default: f(() => [d(l(Te), {
343
- style: T({
342
+ default: c(() => [d(l(Fe), {
343
+ style: x({
344
344
  paddingLeft: "4px",
345
- color: l(M).colorPrimary
345
+ color: l(q).colorPrimary
346
346
  })
347
347
  }, null, 8, ["style"])]),
348
348
  _: 2
349
- }, 1032, ["title"])])) : D("", !0)]),
349
+ }, 1032, ["title"])])) : z("", !0)]),
350
350
  _: 2
351
- }, [z(l(j)(B, ["title", "searchFormExtra"]), (o, r) => ({
351
+ }, [V(l(j)(P, ["title", "searchFormExtra"]), (t, r) => ({
352
352
  name: r,
353
- fn: f((n) => [x(e.$slots, r, fe(me(n || {})))])
353
+ fn: c((n) => [v(e.$slots, r, ce(fe(n || {})))])
354
354
  }))]), 1040, ["class", "table-layout", "onChange", "columns"])], 6)], 2));
355
355
  }
356
356
  });
357
357
  export {
358
- aa as default
358
+ Ye as default
359
359
  };
@@ -11802,6 +11802,10 @@ export declare const apTableRenderItemMap: {
11802
11802
  options: {
11803
11803
  type: PropType<(string | number | RadioGroupChildOption)[]>;
11804
11804
  };
11805
+ vertical: {
11806
+ type: PropType<boolean>;
11807
+ default: boolean;
11808
+ };
11805
11809
  'onUpdate:value': {
11806
11810
  type: PropType<(val: any) => void>;
11807
11811
  };
@@ -11858,6 +11862,10 @@ export declare const apTableRenderItemMap: {
11858
11862
  options: {
11859
11863
  type: PropType<(string | number | RadioGroupChildOption)[]>;
11860
11864
  };
11865
+ vertical: {
11866
+ type: PropType<boolean>;
11867
+ default: boolean;
11868
+ };
11861
11869
  'onUpdate:value': {
11862
11870
  type: PropType<(val: any) => void>;
11863
11871
  };
@@ -11878,6 +11886,7 @@ export declare const apTableRenderItemMap: {
11878
11886
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
11879
11887
  }, {
11880
11888
  mode: FieldMode;
11889
+ vertical: boolean;
11881
11890
  emptyText: string;
11882
11891
  }, {}>;
11883
11892
  select: {
@@ -16086,9 +16095,6 @@ export declare const apTableRenderItemMap: {
16086
16095
  rows: {
16087
16096
  type: PropType<number>;
16088
16097
  };
16089
- autosize: {
16090
- type: PropType<boolean | AutoSizeType>;
16091
- };
16092
16098
  autoSize: {
16093
16099
  type: PropType<boolean | AutoSizeType>;
16094
16100
  };
@@ -16237,9 +16243,6 @@ export declare const apTableRenderItemMap: {
16237
16243
  rows: {
16238
16244
  type: PropType<number>;
16239
16245
  };
16240
- autosize: {
16241
- type: PropType<boolean | AutoSizeType>;
16242
- };
16243
16246
  autoSize: {
16244
16247
  type: PropType<boolean | AutoSizeType>;
16245
16248
  };
@@ -16290,6 +16293,9 @@ export declare const apTableRenderItemMap: {
16290
16293
  type: PropType<(string | number | CheckboxOptionType)[]>;
16291
16294
  default: () => never[];
16292
16295
  };
16296
+ vertical: {
16297
+ type: PropType<boolean>;
16298
+ };
16293
16299
  defaultValue: {
16294
16300
  type: PropType< CheckboxValueType[]>;
16295
16301
  };
@@ -16338,6 +16344,9 @@ export declare const apTableRenderItemMap: {
16338
16344
  type: PropType<(string | number | CheckboxOptionType)[]>;
16339
16345
  default: () => never[];
16340
16346
  };
16347
+ vertical: {
16348
+ type: PropType<boolean>;
16349
+ };
16341
16350
  defaultValue: {
16342
16351
  type: PropType< CheckboxValueType[]>;
16343
16352
  };
@@ -48,31 +48,11 @@
48
48
  flex: 1;
49
49
  }
50
50
  .aplus-ap-table-table tr > th.ant-table-cell {
51
- background-color: #F2F6F9;
52
- border-bottom-color: #E9EDF3;
51
+ background-color: var(--ap-table-header-bg);
53
52
  }
54
53
  .aplus-ap-table-table tr > th.ant-table-cell::before {
55
54
  display: none;
56
55
  }
57
- .aplus-ap-table-table tr > td.ant-table-cell {
58
- border-top-color: #E9EDF3;
59
- }
60
- .aplus-ap-table-table-admin .ant-pagination {
61
- margin-bottom: 0 !important;
62
- }
63
- .aplus-ap-table-table-admin .ant-pagination .ant-pagination-total-text {
64
- flex: 1;
65
- }
66
- .aplus-ap-table-table-admin tr > th.ant-table-cell {
67
- background-color: #FAFAFA;
68
- border-bottom-color: #E9E9E9;
69
- }
70
- .aplus-ap-table-table-admin tr > th.ant-table-cell::before {
71
- display: none;
72
- }
73
- .aplus-ap-table-table-admin tr > td.ant-table-cell {
74
- border-top-color: #E9E9E9;
75
- }
76
56
  .aplus-ap-table .ant-table.ant-table-middle .ant-table-row .ant-table-cell {
77
57
  padding: 12px 16px;
78
58
  }
@@ -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
+ };