@aplus-frontend/ui 0.2.1 → 0.2.3

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 (77) hide show
  1. package/es/_virtual/_plugin-vue_export-helper.mjs +9 -0
  2. package/es/index.mjs +151 -147
  3. package/es/src/ap-button/ap-action-button.vue.d.ts +3 -0
  4. package/es/src/ap-button/ap-action-button.vue.mjs +5 -5
  5. package/es/src/ap-download/ap-download.vue.mjs +4 -4
  6. package/es/src/ap-table/ap-table.vue2.mjs +103 -97
  7. package/es/src/ap-table/utils.d.ts +2 -0
  8. package/es/src/ap-table/utils.mjs +36 -26
  9. package/es/src/ap-upload/apUpload.vue.d.ts +2 -2
  10. package/es/src/ap-upload/components/Picture.vue2.mjs +10 -10
  11. package/es/src/business/ap-appendix/ap-appendix.vue.d.ts +45 -0
  12. package/es/src/business/ap-appendix/ap-appendix.vue.mjs +4 -0
  13. package/es/src/business/ap-appendix/ap-appendix.vue2.mjs +156 -0
  14. package/es/src/business/ap-appendix/icons/file-icon.vue.d.ts +3 -0
  15. package/es/src/business/ap-appendix/icons/file-icon.vue.mjs +18 -0
  16. package/es/src/business/ap-appendix/index.d.ts +136 -0
  17. package/es/src/business/ap-appendix/index.mjs +9 -0
  18. package/es/src/business/ap-appendix/interface.d.ts +57 -0
  19. package/es/src/business/ap-appendix/interface.mjs +4 -0
  20. package/es/src/business/ap-appendix/style/css.d.ts +0 -0
  21. package/es/src/business/ap-appendix/style/css.js +1 -0
  22. package/es/src/business/ap-appendix/style/index.d.ts +0 -0
  23. package/es/src/business/ap-appendix/style/index.js +1 -0
  24. package/es/src/business/ap-appendix/utils/index.d.ts +8 -0
  25. package/es/src/business/ap-appendix/utils/index.mjs +63 -0
  26. package/es/src/business/ap-summary/style/css.js +1 -1
  27. package/es/src/business/ap-table-modal/table-modal.vue2.mjs +37 -37
  28. package/es/src/business/index.d.ts +1 -0
  29. package/es/src/business/index.mjs +8 -6
  30. package/es/src/config-provider/config-provider.d.ts +11 -0
  31. package/es/src/config-provider/css-var.d.ts +11 -0
  32. package/es/src/config-provider/css-var.mjs +31 -9
  33. package/es/src/config-provider/index.d.ts +66 -0
  34. package/es/src/editable-table/interface.d.ts +2 -2
  35. package/es/src/index.mjs +41 -37
  36. package/es/src/locale/lang/en.mjs +5 -0
  37. package/es/src/locale/lang/zh-cn.mjs +5 -0
  38. package/es/src/path-map.mjs +2 -1
  39. package/lib/_virtual/_plugin-vue_export-helper.js +1 -0
  40. package/lib/index.js +1 -1
  41. package/lib/src/ap-button/ap-action-button.vue.d.ts +3 -0
  42. package/lib/src/ap-button/ap-action-button.vue.js +1 -1
  43. package/lib/src/ap-download/ap-download.vue.js +1 -1
  44. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  45. package/lib/src/ap-table/utils.d.ts +2 -0
  46. package/lib/src/ap-table/utils.js +1 -1
  47. package/lib/src/ap-upload/apUpload.vue.d.ts +2 -2
  48. package/lib/src/ap-upload/components/Picture.vue2.js +1 -1
  49. package/lib/src/business/ap-appendix/ap-appendix.vue.d.ts +45 -0
  50. package/lib/src/business/ap-appendix/ap-appendix.vue.js +1 -0
  51. package/lib/src/business/ap-appendix/ap-appendix.vue2.js +1 -0
  52. package/lib/src/business/ap-appendix/icons/file-icon.vue.d.ts +3 -0
  53. package/lib/src/business/ap-appendix/icons/file-icon.vue.js +1 -0
  54. package/lib/src/business/ap-appendix/index.d.ts +136 -0
  55. package/lib/src/business/ap-appendix/index.js +1 -0
  56. package/lib/src/business/ap-appendix/interface.d.ts +57 -0
  57. package/lib/src/business/ap-appendix/interface.js +1 -0
  58. package/lib/src/business/ap-appendix/style/css.d.ts +0 -0
  59. package/lib/src/business/ap-appendix/style/css.js +1 -0
  60. package/lib/src/business/ap-appendix/style/index.d.ts +0 -0
  61. package/lib/src/business/ap-appendix/style/index.js +1 -0
  62. package/lib/src/business/ap-appendix/utils/index.d.ts +8 -0
  63. package/lib/src/business/ap-appendix/utils/index.js +1 -0
  64. package/lib/src/business/ap-summary/style/css.js +1 -1
  65. package/lib/src/business/ap-table-modal/table-modal.vue2.js +1 -1
  66. package/lib/src/business/index.d.ts +1 -0
  67. package/lib/src/business/index.js +1 -1
  68. package/lib/src/config-provider/config-provider.d.ts +11 -0
  69. package/lib/src/config-provider/css-var.d.ts +11 -0
  70. package/lib/src/config-provider/css-var.js +1 -1
  71. package/lib/src/config-provider/index.d.ts +66 -0
  72. package/lib/src/editable-table/interface.d.ts +2 -2
  73. package/lib/src/index.js +1 -1
  74. package/lib/src/locale/lang/en.js +1 -1
  75. package/lib/src/locale/lang/zh-cn.js +1 -1
  76. package/lib/src/path-map.js +1 -1
  77. package/package.json +1 -1
@@ -1,23 +1,23 @@
1
- import { defineComponent as Ce, useSlots as ve, ref as z, computed as s, unref as t, createVNode as f, Fragment as U, watchEffect as Te, watch as G, openBlock as m, createElementBlock as F, normalizeClass as c, normalizeStyle as M, mergeProps as h, createSlots as J, withCtx as w, renderList as Q, createBlock as X, resolveDynamicComponent as Fe, renderSlot as S, createCommentVNode as Y, createElementVNode as I, h as xe, normalizeProps as Be, guardReactiveProps as Pe } from "vue";
2
- import { Typography as ke, Divider as ze, Button as Ie, Table as Ne } from "@aplus-frontend/antdv";
3
- import { useToken as Ee } from "@aplus-frontend/antdv/es/theme/internal";
4
- import { ApForm as Ke } from "../ap-form/index.mjs";
1
+ import { defineComponent as ve, useSlots as Te, ref as z, computed as s, unref as t, createVNode as f, Fragment as U, watchEffect as Fe, watch as G, openBlock as m, createElementBlock as F, normalizeClass as c, normalizeStyle as M, mergeProps as h, createSlots as J, withCtx as w, renderList as Q, createBlock as X, resolveDynamicComponent as Be, renderSlot as S, createCommentVNode as Y, createElementVNode as I, h as xe, normalizeProps as ke, guardReactiveProps as Pe } from "vue";
2
+ import { Typography as ze, Divider as Ie, Button as Ne, Table as Ee } from "@aplus-frontend/antdv";
3
+ import { useToken as Ke } from "@aplus-frontend/antdv/es/theme/internal";
4
+ import { ApForm as Le } from "../ap-form/index.mjs";
5
5
  import { noRenderAsFormItemValueList as Z } from "./constants.mjs";
6
6
  import "../config-provider/index.mjs";
7
- import { useTablePaging as Le } from "./hooks/use-table-paging.mjs";
8
- import { omit as _, isUndefined as g, isBoolean as Oe } from "lodash-unified";
9
- import { apColumnToColumn as Ve, getTableTitle as De, getTableRenderType as je, getTableRenderProps as Ae, getTableCellRenderNode as We, getColumnOrder as ee, updateFormProps as $e, getFieldProps as He, getSearchFormItemRenderNode as qe, objectToString as Ue } from "./utils.mjs";
10
- import Ge from "./hooks/use-table-content-height.mjs";
11
- import { getRawDisplayValue as Me } from "../editable-table/utils.mjs";
12
- import Je from "./hooks/use-table-row-selection.mjs";
13
- import { isDef as Qe } from "../utils/index.mjs";
14
- import { SettingOutlined as Xe } from "@ant-design/icons-vue";
7
+ import { useTablePaging as Oe } from "./hooks/use-table-paging.mjs";
8
+ import { omit as _, isUndefined as g, isBoolean as Ve } from "lodash-unified";
9
+ import { apColumnToColumn as De, getTableTitle as Ae, getTableRenderType as je, getTableRenderProps as We, getTableCellRenderNode as $e, getColumnOrder as ee, updateFormProps as He, getFieldProps as qe, getSearchFormItemRenderNode as Ue, recursionApColumns as ae, objectToString as Ge } from "./utils.mjs";
10
+ import Me from "./hooks/use-table-content-height.mjs";
11
+ import { getRawDisplayValue as Je } from "../editable-table/utils.mjs";
12
+ import Qe from "./hooks/use-table-row-selection.mjs";
13
+ import { isDef as Xe } from "../utils/index.mjs";
14
+ import { SettingOutlined as Ye } from "@ant-design/icons-vue";
15
15
  import "./components/setting/modal/index.vue.mjs";
16
- import { useProvideApTable as Ye } from "./context.mjs";
17
- import { useNamespace as Ze } from "../config-provider/hooks/use-namespace.mjs";
18
- import { useGlobalConfig as _e } from "../config-provider/hooks/use-global-config.mjs";
19
- import ea from "./components/setting/modal/index.vue2.mjs";
20
- const ba = /* @__PURE__ */ Ce({
16
+ import { useProvideApTable as Ze } from "./context.mjs";
17
+ import { useNamespace as _e } from "../config-provider/hooks/use-namespace.mjs";
18
+ import { useGlobalConfig as ea } from "../config-provider/hooks/use-global-config.mjs";
19
+ import aa from "./components/setting/modal/index.vue2.mjs";
20
+ const Ra = /* @__PURE__ */ ve({
21
21
  name: "ApTable",
22
22
  __name: "ap-table",
23
23
  props: {
@@ -141,73 +141,73 @@ const ba = /* @__PURE__ */ Ce({
141
141
  default: void 0
142
142
  }
143
143
  },
144
- setup(ae, {
145
- expose: oe
144
+ setup(oe, {
145
+ expose: te
146
146
  }) {
147
- const a = ae;
147
+ const a = oe;
148
148
  let N = 0;
149
- const b = ve(), [, te] = Ee(), {
150
- e: x,
149
+ const b = Te(), [, re] = Ke(), {
150
+ e: B,
151
151
  b: i,
152
152
  be: E
153
- } = Ze("ap-table"), K = _e("valueTypeMap"), {
154
- height: re,
155
- contentRef: le
156
- } = Ge(), B = z(a.size), d = z([]), L = z([]);
157
- Ye({
153
+ } = _e("ap-table"), K = ea("valueTypeMap"), {
154
+ height: le,
155
+ contentRef: ne
156
+ } = Me(), x = z(a.size), d = z([]), L = z([]);
157
+ Ze({
158
158
  columns: s(() => d.value),
159
159
  columnsBackup: s(() => L.value),
160
- size: s(() => B.value),
160
+ size: s(() => x.value),
161
161
  updateColumns(e) {
162
162
  d.value = e;
163
163
  },
164
164
  updateSize(e) {
165
- B.value = e;
165
+ x.value = e;
166
166
  }
167
167
  });
168
- const ne = () => {
168
+ const se = () => {
169
169
  var r;
170
170
  let e = ((r = a.columns) == null ? void 0 : r.filter((l) => !l.hideInTable)) || [];
171
171
  function o(l, u) {
172
172
  return l.map((n) => ({
173
- resizable: Qe(n.resizable) ? n.resizable : a.columnResizable,
174
- ..._(Ve(n), ["ellipsis"]),
173
+ resizable: Xe(n.resizable) ? n.resizable : a.columnResizable,
174
+ ..._(De(n), ["ellipsis"]),
175
175
  fixed: u ? u.fixed : n.fixed,
176
- title: De(n, E("table-header", "title"), b.headerCell, t(te).colorPrimary),
176
+ title: Ae(n, E("table-header", "title"), b.headerCell, t(re).colorPrimary),
177
177
  customRender({
178
178
  value: p,
179
179
  ...y
180
180
  }) {
181
181
  var H, q;
182
- const W = je(n), Se = Ae({
182
+ const W = je(n), be = We({
183
183
  ...n,
184
184
  valueType: W
185
185
  }, {
186
186
  value: p,
187
187
  ...y
188
- }), be = We(W, Se, y.record, t(K)), $ = ((H = n.renderText) == null ? void 0 : H.call(n, {
188
+ }), Re = $e(W, be, y.record, t(K)), $ = ((H = n.renderText) == null ? void 0 : H.call(n, {
189
189
  value: p,
190
190
  ...y
191
- })) || p, Re = n.renderText ? f(U, null, [(q = n.renderText) == null ? void 0 : q.call(n, {
191
+ })) || p, Ce = n.renderText ? f(U, null, [(q = n.renderText) == null ? void 0 : q.call(n, {
192
192
  value: p,
193
193
  ...y
194
- })]) : be;
195
- let k = ge(n, $, Re);
196
- return n.customRender && (k = n.customRender({
194
+ })]) : Re;
195
+ let P = ye(n, $, Ce);
196
+ return n.customRender && (P = n.customRender({
197
197
  value: p,
198
198
  ...y,
199
199
  column: n,
200
- originalNode: k,
200
+ originalNode: P,
201
201
  originalText: $
202
- })), k;
202
+ })), P;
203
203
  },
204
204
  children: o(n.children || [], u || n)
205
205
  }));
206
206
  }
207
207
  return o(e);
208
208
  };
209
- Te(() => {
210
- const e = ne();
209
+ Fe(() => {
210
+ const e = se();
211
211
  d.value = e, L.value = e;
212
212
  });
213
213
  const O = s(() => {
@@ -216,7 +216,7 @@ const ba = /* @__PURE__ */ Ce({
216
216
  let n = ee(l.order);
217
217
  return ee(u.order) - n;
218
218
  })) == null ? void 0 : r.map((l) => {
219
- const u = $e(l, He(l.fieldProps, {})), n = {
219
+ const u = He(l, qe(l.fieldProps, {})), n = {
220
220
  ...l,
221
221
  fieldProps: {
222
222
  label: l.title,
@@ -226,25 +226,31 @@ const ba = /* @__PURE__ */ Ce({
226
226
  },
227
227
  renderNode: void 0
228
228
  };
229
- return n.renderNode = qe(n, t(K)), n;
229
+ return n.renderNode = Ue(n, t(K)), n;
230
230
  })) || [];
231
- }), se = s(() => t(d).filter((e) => e.sorter === !0).map((e) => e.dataIndex).filter(Boolean)), de = s(() => t(d).filter((e) => e.filters && !e.onFilter).map((e) => e.dataIndex).filter(Boolean)), ue = s(() => g(a.dataSource) ? T.value.records : a.dataSource), {
231
+ }), de = s(() => ae(t(d), (e) => {
232
+ if (e.sorter === !0)
233
+ return e.key;
234
+ }).filter(Boolean)), ue = s(() => ae(t(d), (e) => {
235
+ if (e.filters && !e.onFilter)
236
+ return e.key;
237
+ }).filter(Boolean)), ie = s(() => g(a.dataSource) ? T.value.records : a.dataSource), {
232
238
  rowSelection: R,
233
239
  selectedRows: C,
234
240
  ...v
235
- } = Je({
241
+ } = Qe({
236
242
  ...a.rowSelection === !0 ? {} : a.rowSelection,
237
243
  rowKey: a.rowKey,
238
- dataSource: ue
244
+ dataSource: ie
239
245
  }), {
240
- formRef: P,
246
+ formRef: k,
241
247
  submit: V,
242
248
  reset: D,
243
- tableProps: j,
244
- refresh: ie,
249
+ tableProps: A,
250
+ refresh: ce,
245
251
  data: T,
246
- setDataSource: ce
247
- } = Le({
252
+ setDataSource: pe
253
+ } = Oe({
248
254
  async request(e) {
249
255
  var r, l;
250
256
  if (!R.value.preserveSelectedRowKeys && g(a.dataSource) && v.clearAll(), !g(a.dataSource))
@@ -258,8 +264,8 @@ const ba = /* @__PURE__ */ Ce({
258
264
  total: (o == null ? void 0 : o.total) || 0
259
265
  };
260
266
  },
261
- filterFields: de,
262
- sortFields: se,
267
+ filterFields: ue,
268
+ sortFields: de,
263
269
  defaultParams: a.params,
264
270
  defaultData: a.defaultData,
265
271
  manual: a.manual,
@@ -268,24 +274,24 @@ const ba = /* @__PURE__ */ Ce({
268
274
  formatParams: a.beforeSearchSubmit,
269
275
  showLessItems: a.pagination ? a.pagination.showLessItems : void 0,
270
276
  showTotal: a.pagination ? a.pagination.showTotal : void 0
271
- }), pe = s(() => {
277
+ }), fe = s(() => {
272
278
  var o, r;
273
279
  if (a.adaptive && (T.value.total > 0 || ((o = a.dataSource) == null ? void 0 : o.length)))
274
280
  return {
275
- y: t(re),
281
+ y: t(le),
276
282
  x: ((r = a.scroll) == null ? void 0 : r.x) || "100%"
277
283
  };
278
284
  if (a.scroll)
279
285
  return a.scroll;
280
- }), fe = s(() => {
286
+ }), me = s(() => {
281
287
  var e;
282
288
  if (a.tableLayout)
283
289
  return a.tableLayout;
284
290
  if ((e = a.columns) != null && e.some((o) => o.ellipsis))
285
291
  return "fixed";
286
- }), A = s(() => {
292
+ }), j = s(() => {
287
293
  var r;
288
- const e = t(j), o = t(R);
294
+ const e = t(A), o = t(R);
289
295
  return {
290
296
  ...a,
291
297
  ...e,
@@ -296,73 +302,73 @@ const ba = /* @__PURE__ */ Ce({
296
302
  } : a.rowSelection,
297
303
  loading: g(a.loading) ? e.loading : a.loading,
298
304
  pagination: a.pagination === !1 ? !1 : e.pagination,
299
- scroll: t(pe)
305
+ scroll: t(fe)
300
306
  };
301
- }), me = s(() => [i(), a.card ? null : i("wrapper"), a.adaptive ? i("adaptive") : null].filter(Boolean));
302
- function ge(e, o, r) {
307
+ }), ge = s(() => [i(), a.card ? null : i("wrapper"), a.adaptive ? i("adaptive") : null].filter(Boolean));
308
+ function ye(e, o, r) {
303
309
  if (Z.includes(e.valueType))
304
310
  return r;
305
- const l = Ue(o);
306
- return e.copyable || e.ellipsis ? f(ke.Paragraph, {
311
+ const l = Ge(o);
312
+ return e.copyable || e.ellipsis ? f(ze.Paragraph, {
307
313
  copyable: e.copyable ? {
308
314
  text: l,
309
315
  tooltip: !1
310
316
  } : !1,
311
- ellipsis: e.ellipsis ? Oe(e.ellipsis) ? {
317
+ ellipsis: e.ellipsis ? Ve(e.ellipsis) ? {
312
318
  tooltip: l
313
319
  } : {
314
320
  ...e.ellipsis,
315
321
  tooltip: l
316
322
  } : !1,
317
- content: e.ellipsis ? Me(e, o) : r
323
+ content: e.ellipsis ? Je(e, o) : r
318
324
  }, null) : r;
319
325
  }
320
326
  G(() => t(T).loading, (e) => {
321
327
  var o;
322
328
  (o = a.onLoadingChange) == null || o.call(a, e);
323
329
  }), G(() => a.dataSource, (e) => {
324
- ce(e);
330
+ pe(e);
325
331
  }, {
326
332
  immediate: !0
327
333
  });
328
- function ye(e) {
334
+ function he(e) {
329
335
  var o, r, l;
330
- (l = (r = (o = P.value) == null ? void 0 : o.apForm) == null ? void 0 : r.setFieldsValue) == null || l.call(r, e);
336
+ (l = (r = (o = k.value) == null ? void 0 : o.apForm) == null ? void 0 : r.setFieldsValue) == null || l.call(r, e);
331
337
  }
332
- function he() {
338
+ function we() {
333
339
  var e, o, r;
334
- return (r = (o = (e = P.value) == null ? void 0 : e.apForm) == null ? void 0 : o.getFieldsValue) == null ? void 0 : r.call(o, !0);
340
+ return (r = (o = (e = k.value) == null ? void 0 : e.apForm) == null ? void 0 : o.getFieldsValue) == null ? void 0 : r.call(o, !0);
335
341
  }
336
- function we() {
342
+ function Se() {
337
343
  return t(d);
338
344
  }
339
- return oe({
345
+ return te({
340
346
  submit: () => V(),
341
347
  reset: () => D(),
342
- refresh: () => ie(),
343
- setSearchFormValues: ye,
344
- getSearchFormValues: he,
345
- getShownColumns: we,
348
+ refresh: () => ce(),
349
+ setSearchFormValues: he,
350
+ getSearchFormValues: we,
351
+ getShownColumns: Se,
346
352
  dataSource: s(() => t(T).records),
347
353
  rowSelection: {
348
354
  selectedRows: s(() => t(C)),
349
355
  ...v
350
356
  }
351
357
  }), (e, o) => (m(), F("div", {
352
- class: c(me.value)
358
+ class: c(ge.value)
353
359
  }, [t(g)(e.dataSource) && e.searchForm !== !1 && O.value.length > 0 ? (m(), F("div", {
354
360
  key: 0,
355
- class: c(e.card ? t(x)("search-wrapper") : null),
361
+ class: c(e.card ? t(B)("search-wrapper") : null),
356
362
  style: M(e.searchFormWrapperStyle)
357
- }, [f(t(Ke).SearchForm, h(e.searchForm || {}, {
363
+ }, [f(t(Le).SearchForm, h(e.searchForm || {}, {
358
364
  ref_key: "formRef",
359
- ref: P,
365
+ ref: k,
360
366
  "custom-reset": "",
361
367
  onSubmit: t(V),
362
368
  onReset: t(D),
363
- "submit-loading": t(j).loading
369
+ "submit-loading": t(A).loading
364
370
  }), J({
365
- default: w(() => [(m(!0), F(U, null, Q(O.value, (r) => (m(), X(Fe(r.renderNode), h({
371
+ default: w(() => [(m(!0), F(U, null, Q(O.value, (r) => (m(), X(Be(r.renderNode), h({
366
372
  key: r.dataIndex,
367
373
  ref_for: !0
368
374
  }, r.fieldProps || {}, {
@@ -375,8 +381,8 @@ const ba = /* @__PURE__ */ Ce({
375
381
  key: "0"
376
382
  } : void 0]), 1040, ["onSubmit", "onReset", "submit-loading"])], 6)) : Y("", !0), I("div", {
377
383
  ref_key: "contentRef",
378
- ref: le,
379
- class: c([t(x)("table-wrapper"), e.card ? t(x)("table-wrapper-card") : null]),
384
+ ref: ne,
385
+ class: c([t(B)("table-wrapper"), e.card ? t(B)("table-wrapper-card") : null]),
380
386
  style: M(e.tableWrapperStyle)
381
387
  }, [I("div", {
382
388
  class: c(t(i)("header-wrapper"))
@@ -389,15 +395,15 @@ const ba = /* @__PURE__ */ Ce({
389
395
  selectedRows: t(C),
390
396
  selectedRowKeys: t(R).selectedRowKeys,
391
397
  shownColumns: d.value
392
- }, v))], 2), b.title ? (m(), X(t(ze), {
398
+ }, v))], 2), b.title ? (m(), X(t(Ie), {
393
399
  key: 0,
394
400
  type: "vertical"
395
- })) : Y("", !0), f(ea, {
401
+ })) : Y("", !0), f(aa, {
396
402
  config: e.settings === !0 ? {} : e.settings
397
403
  }, {
398
- trigger: w(() => [f(t(Ie), {
404
+ trigger: w(() => [f(t(Ne), {
399
405
  class: c(t(i)("setting-trigger-button")),
400
- icon: xe(t(Xe))
406
+ icon: xe(t(Ye))
401
407
  }, null, 8, ["class", "icon"])]),
402
408
  _: 1
403
409
  }, 8, ["config"])], 2)) : S(e.$slots, "title", h({
@@ -405,26 +411,26 @@ const ba = /* @__PURE__ */ Ce({
405
411
  selectedRows: t(C),
406
412
  selectedRowKeys: t(R).selectedRowKeys,
407
413
  shownColumns: d.value
408
- }, v))], 2), f(t(Ne), h({
414
+ }, v))], 2), f(t(Ee), h({
409
415
  class: t(i)("table")
410
- }, A.value, {
411
- size: B.value,
412
- "table-layout": fe.value,
416
+ }, j.value, {
417
+ size: x.value,
418
+ "table-layout": me.value,
413
419
  columns: d.value,
414
420
  onResizeColumn: o[0] || (o[0] = (r, l) => l.width = r)
415
421
  }), J({
416
422
  summary: w(() => [S(e.$slots, "summary", {
417
423
  columns: d.value,
418
- records: A.value.dataSource,
424
+ records: j.value.dataSource,
419
425
  selectedRows: t(C)
420
426
  })]),
421
427
  _: 2
422
428
  }, [Q(t(_)(b, ["title", "searchFormExtra", "headerCell", "summary"]), (r, l) => ({
423
429
  name: l,
424
- fn: w((u) => [S(e.$slots, l, Be(Pe(u || {})))])
430
+ fn: w((u) => [S(e.$slots, l, ke(Pe(u || {})))])
425
431
  }))]), 1040, ["class", "size", "table-layout", "columns"])], 6)], 2));
426
432
  }
427
433
  });
428
434
  export {
429
- ba as default
435
+ Ra as default
430
436
  };
@@ -3,6 +3,7 @@ import { ValueTypeRenderConfig } from '../config-provider';
3
3
  import { apTableRenderItemMap } from './constants';
4
4
  import { VNode, CreateComponentPublicInstance, ExtractPropTypes, PropType, HTMLAttributes, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, VNodeArrayChildren, RendererNode, RendererElement } from 'vue';
5
5
  import { EditableColumnType } from '../editable-table/interface';
6
+ import { ColumnType, ColumnGroupType } from '@aplus-frontend/antdv/es/table';
6
7
  import { ApFormItemTransformType, ApFieldTextPasswordProps, ApFormItemSlots, ApFieldTextProps, ApFormItemTextPassword, ApFieldTextAreaProps, ApFieldNumberProps, ApFieldDateProps, ApFieldDateRangeProps, ApFieldRadioProps, ApFieldSelectProps, ApFieldSwitchProps, ApFieldCheckboxProps } from '..';
7
8
  import { ColSize } from '@aplus-frontend/antdv/es/grid';
8
9
  import { FormLabelAlign } from '@aplus-frontend/antdv/es/form/interface';
@@ -8544,4 +8545,5 @@ export declare function getTableTitle(column: ApColumnType<any>, titleNodeClassN
8544
8545
  }) => any, tooltipColor?: string): number | boolean | void | VNodeArrayChildren | VNode< RendererNode, RendererElement, {
8545
8546
  [key: string]: any;
8546
8547
  }> | ((props: ColumnTitleProps<any>) => VNodeArrayChildren | VueNode) | null;
8548
+ export declare function recursionApColumns<ReturnType = any>(columns: (ColumnType | ColumnGroupType<any>)[], handler: (column: ColumnType) => ReturnType): ReturnType[];
8547
8549
  export {};
@@ -1,18 +1,18 @@
1
- import { isVNode as b, createVNode as s, mergeProps as a, cloneVNode as T, Fragment as g } from "vue";
2
- import { isObject as f, isArray as p, isUndefined as h, isFunction as d, omit as j, isBoolean as O, isString as E } from "lodash-unified";
1
+ import { isVNode as b, createVNode as u, mergeProps as a, cloneVNode as T, Fragment as h } from "vue";
2
+ import { isObject as f, isArray as p, isUndefined as g, isFunction as d, omit as j, isBoolean as O, isString as E } from "lodash-unified";
3
3
  import { apTableRenderItemMap as F, apTableFormItemMap as N } from "./constants.mjs";
4
4
  import { isType as S } from "@fruits-chain/utils";
5
5
  import "../ap-form/index.mjs";
6
6
  import { Tooltip as v } from "@aplus-frontend/antdv";
7
7
  import { QuestionCircleOutlined as I } from "@ant-design/icons-vue";
8
- import V from "../ap-form/item/index.vue.mjs";
9
- function w(t) {
8
+ import C from "../ap-form/item/index.vue.mjs";
9
+ function V(t) {
10
10
  return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !b(t);
11
11
  }
12
- const C = (t, e, n) => {
12
+ const w = (t, e, n) => {
13
13
  let i = {};
14
14
  return f(t) ? Object.keys(t).forEach((o) => {
15
- f(t[o]) ? i[o] = C(t[o], e[o], n) : i[o] = n(t[o], e);
15
+ f(t[o]) ? i[o] = w(t[o], e[o], n) : i[o] = n(t[o], e);
16
16
  }) : i = n(t, e), i;
17
17
  }, Q = (t, e) => {
18
18
  switch (t) {
@@ -38,12 +38,12 @@ const C = (t, e, n) => {
38
38
  function U(t) {
39
39
  return p(t) ? t.join(".") : t;
40
40
  }
41
- function P(t) {
41
+ function A(t) {
42
42
  const e = Object.prototype.toString.call(t).match(/^\[object (.*)\]$/)[1].toLowerCase();
43
43
  return e === "string" && typeof t == "object" ? "object" : t === null ? "null" : t === void 0 ? "undefined" : e;
44
44
  }
45
- const x = (t) => P(t) === "map" ? t : new Map(Object.entries(t || {})), m = (t) => {
46
- const e = [], n = x(t);
45
+ const P = (t) => A(t) === "map" ? t : new Map(Object.entries(t || {})), m = (t) => {
46
+ const e = [], n = P(t);
47
47
  return n.forEach((i, o) => {
48
48
  const r = n.get(o) || n.get(`${o}`);
49
49
  if (r) {
@@ -63,8 +63,8 @@ const x = (t) => P(t) === "map" ? t : new Map(Object.entries(t || {})), m = (t)
63
63
  });
64
64
  }
65
65
  }), e;
66
- }, z = (t) => h(t) || t < 0 ? 0 : t;
67
- function A(t, e) {
66
+ }, z = (t) => g(t) || t < 0 ? 0 : t;
67
+ function x(t, e) {
68
68
  return !t || !d(t) ? t : t(e);
69
69
  }
70
70
  function G(t) {
@@ -72,14 +72,14 @@ function G(t) {
72
72
  return t.valueEnum && (e = "status"), e;
73
73
  }
74
74
  function K(t, e, n, i) {
75
- var u;
75
+ var s;
76
76
  const o = F[t];
77
77
  if (o)
78
- return s(o, a(e, {
78
+ return u(o, a(e, {
79
79
  mode: "read"
80
80
  }), null);
81
81
  const r = i == null ? void 0 : i[t];
82
- return ((u = r == null ? void 0 : r.render) == null ? void 0 : u.call(r, e.value, n, e)) || e.value;
82
+ return ((s = r == null ? void 0 : r.render) == null ? void 0 : s.call(r, e.value, n, e)) || e.value;
83
83
  }
84
84
  function X(t, e) {
85
85
  if (t.customRenderFormItem)
@@ -98,22 +98,22 @@ function X(t, e) {
98
98
  return () => {
99
99
  var r;
100
100
  const o = (r = i == null ? void 0 : i.renderFormItem) == null ? void 0 : r.call(i, t.fieldProps.field);
101
- return o ? s(V, a(t.fieldProps, {
101
+ return o ? u(C, a(t.fieldProps, {
102
102
  span: t.span
103
- }), w(o) ? o : {
103
+ }), V(o) ? o : {
104
104
  default: () => [o]
105
105
  }) : null;
106
106
  };
107
107
  }
108
108
  function Y(t, e) {
109
- const n = A(t.fieldProps, e), i = (n == null ? void 0 : n.field) || n || {}, o = t.valueType === "switch", r = t.valueType === "index", u = o ? {
109
+ const n = x(t.fieldProps, e), i = (n == null ? void 0 : n.field) || n || {}, o = t.valueType === "switch", r = t.valueType === "index", s = o ? {
110
110
  checked: e.value
111
111
  } : {
112
112
  value: r ? e.index + 1 : e.value
113
113
  };
114
114
  return t.valueEnum && (i.valueEnum = t.valueEnum), {
115
115
  ...j(i, ["request"]),
116
- ...u
116
+ ...s
117
117
  };
118
118
  }
119
119
  function Z(t) {
@@ -146,21 +146,21 @@ function M(t, e, n, i) {
146
146
  }), r = (o == null ? void 0 : o.filter((y) => y.type !== Symbol.for("v-cmt"))) || [];
147
147
  if (o && r.length > 0)
148
148
  return o;
149
- const l = E(t.title) ? s("span", {
149
+ const l = E(t.title) ? u("span", {
150
150
  class: e,
151
151
  title: t.title
152
- }, [t.title]) : t.title, c = t.tooltip ? d(t.tooltip) ? t.tooltip(t) : s(g, null, [t.tooltip]) : null;
153
- return c ? s("span", {
152
+ }, [t.title]) : t.title, c = t.tooltip ? d(t.tooltip) ? t.tooltip(t) : u(h, null, [t.tooltip]) : null;
153
+ return c ? u("span", {
154
154
  style: {
155
155
  display: "inline-flex",
156
156
  alignItems: "center",
157
157
  maxWidth: "100%"
158
158
  }
159
- }, [l, s(v, {
159
+ }, [l, u(v, {
160
160
  title: c,
161
161
  placement: "bottom"
162
162
  }, {
163
- default: () => [s(I, {
163
+ default: () => [u(I, {
164
164
  style: {
165
165
  padding: "4px",
166
166
  color: i,
@@ -169,20 +169,30 @@ function M(t, e, n, i) {
169
169
  }, null)]
170
170
  })]) : l;
171
171
  }
172
+ function tt(t, e) {
173
+ const n = [];
174
+ function i(o) {
175
+ var r;
176
+ for (const s of o)
177
+ (r = s.children) != null && r.length ? i(s.children) : n.push(e(s));
178
+ }
179
+ return i(t), n;
180
+ }
172
181
  export {
173
182
  Z as apColumnToColumn,
174
183
  U as dataIndexToStr,
175
- C as formatParamsValueType,
184
+ w as formatParamsValueType,
176
185
  z as getColumnOrder,
177
- A as getFieldProps,
186
+ x as getFieldProps,
178
187
  X as getSearchFormItemRenderNode,
179
188
  K as getTableCellRenderNode,
180
189
  Y as getTableRenderProps,
181
190
  G as getTableRenderType,
182
191
  M as getTableTitle,
183
- x as objectToMap,
192
+ P as objectToMap,
184
193
  H as objectToString,
185
194
  Q as parseFieldValue,
195
+ tt as recursionApColumns,
186
196
  k as updateFormProps,
187
197
  m as valueEnumToArray
188
198
  };
@@ -20,7 +20,7 @@ declare const __VLS_component: DefineComponent<{
20
20
  default: string;
21
21
  };
22
22
  value: {
23
- type: (ObjectConstructor | StringConstructor | ArrayConstructor)[];
23
+ type: (ObjectConstructor | ArrayConstructor | StringConstructor)[];
24
24
  default: undefined;
25
25
  };
26
26
  needName: {
@@ -68,7 +68,7 @@ declare const __VLS_component: DefineComponent<{
68
68
  default: string;
69
69
  };
70
70
  value: {
71
- type: (ObjectConstructor | StringConstructor | ArrayConstructor)[];
71
+ type: (ObjectConstructor | ArrayConstructor | StringConstructor)[];
72
72
  default: undefined;
73
73
  };
74
74
  needName: {
@@ -14,7 +14,7 @@ const me = ["accept"], fe = { class: "picture-context" }, he = { class: "picture
14
14
  }, ye = { class: "picture-title" }, we = { key: 0 }, ke = { key: 1 }, Te = /* @__PURE__ */ K({
15
15
  __name: "Picture",
16
16
  setup(Ce, { expose: E }) {
17
- const { t: r } = pe(), { b: U } = de("ap-upload-picture"), { put: O } = ie(), B = u("theme"), L = u("dirName"), y = u("accept") || "image/*", w = u("maxSize") ?? 5, A = u("title"), l = u("maxCount") ?? 10, v = u("uploadingCount"), N = u("beforeUpload"), P = u("customRequest"), S = u("getOssAccess"), x = R(null), c = u("value"), _ = u("needName");
17
+ const { t: r } = pe(), { b: U } = de("ap-upload-picture"), { put: O } = ie(), B = u("theme"), L = u("dirName"), y = u("accept") || "image/*", w = u("maxSize") ?? 5, S = u("title"), l = u("maxCount") ?? 10, v = u("uploadingCount"), A = u("beforeUpload"), N = u("customRequest"), P = u("getOssAccess"), x = R(null), c = u("value"), _ = u("needName");
18
18
  let s = R([]);
19
19
  const f = [];
20
20
  Q(
@@ -33,7 +33,7 @@ const me = ["accept"], fe = { class: "picture-context" }, he = { class: "picture
33
33
  W(async () => {
34
34
  const a = [];
35
35
  for (let t of e) {
36
- const n = ne(_, t), o = ae(_, t), p = await D(S), H = await p.getSignatureUrl(n), J = {
36
+ const n = ne(_, t), o = ae(_, t), p = await D(P), H = await p.getSignatureUrl(n), J = {
37
37
  ...typeof t == "string" ? {} : t,
38
38
  ...new File([t], o, {}),
39
39
  uid: `${(/* @__PURE__ */ new Date()).getTime()}-${Math.random()}`,
@@ -83,8 +83,8 @@ const me = ["accept"], fe = { class: "picture-context" }, he = { class: "picture
83
83
  r("ap.apUpload.maxUploadPicture", { maxCount: l })
84
84
  );
85
85
  }), !1;
86
- if (typeof N == "function") {
87
- if (N(e) === !1)
86
+ if (typeof A == "function") {
87
+ if (A(e) === !1)
88
88
  return !1;
89
89
  } else {
90
90
  if (e.size > w * 1024 * 1024)
@@ -109,8 +109,8 @@ const me = ["accept"], fe = { class: "picture-context" }, he = { class: "picture
109
109
  };
110
110
  }
111
111
  async function G(e, a) {
112
- if (v.value++, typeof P == "function") {
113
- P({
112
+ if (v.value++, typeof N == "function") {
113
+ N({
114
114
  onProgress: (t) => {
115
115
  const n = s.value.find((o) => o.uid === e.uid);
116
116
  n && (n.percent = t);
@@ -137,7 +137,7 @@ const me = ["accept"], fe = { class: "picture-context" }, he = { class: "picture
137
137
  return;
138
138
  }
139
139
  try {
140
- const t = await D(S);
140
+ const t = await D(P);
141
141
  e.oss = t, s.value.push(e), O({
142
142
  file: a,
143
143
  dirName: L,
@@ -174,12 +174,12 @@ const me = ["accept"], fe = { class: "picture-context" }, he = { class: "picture
174
174
  }
175
175
  function I(e) {
176
176
  var t;
177
- if (e.path) {
177
+ if (e.path && c) {
178
178
  if (Array.isArray(c.value)) {
179
179
  const n = f.findIndex(
180
180
  (o) => o.uid === e.uid
181
181
  );
182
- n >= 0 && (c == null || c.value.splice(n, 1), f.splice(n, 1)), c.value.length === 0 && (c.value = void 0);
182
+ n >= 0 && (c.value = c == null ? void 0 : c.value.toSpliced(n, 1), f.splice(n, 1)), c.value.length === 0 && (c.value = void 0);
183
183
  }
184
184
  } else
185
185
  (t = e == null ? void 0 : e.oss) == null || t.pauseUpload();
@@ -256,7 +256,7 @@ const me = ["accept"], fe = { class: "picture-context" }, he = { class: "picture
256
256
  ])) : $("", !0)
257
257
  ]),
258
258
  d("div", ye, [
259
- i(A) ? (h(), g("div", we, C(i(A)), 1)) : (h(), g("div", ke, C(`${i(r)("ap.apUpload.supportExtension")}:${i(ue)(i(y))},${i(r)(
259
+ i(S) ? (h(), g("div", we, C(i(S)), 1)) : (h(), g("div", ke, C(`${i(r)("ap.apUpload.supportExtension")}:${i(ue)(i(y))},${i(r)(
260
260
  "ap.apUpload.maxUploadPictureSize",
261
261
  { maxSize: i(w) }
262
262
  )}`), 1))