@aplus-frontend/ui 0.2.12 → 0.2.14

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 (87) hide show
  1. package/es/index.mjs +145 -143
  2. package/es/src/ap-descriptions/ap-descriptions.vue.mjs +4 -5
  3. package/es/src/ap-descriptions/help-message/index.vue.d.ts +3 -15
  4. package/es/src/ap-descriptions/help-message/index.vue2.mjs +35 -20
  5. package/es/src/ap-form/item-group/index.vue.mjs +1 -1
  6. package/es/src/ap-table/ap-table.vue2.mjs +73 -73
  7. package/es/src/ap-table/components/paragraph-ellipsis/index.vue.d.ts +20 -0
  8. package/es/src/ap-table/components/paragraph-ellipsis/index.vue.mjs +4 -0
  9. package/es/src/ap-table/components/paragraph-ellipsis/index.vue2.mjs +82 -0
  10. package/es/src/ap-table/hooks/use-table-paging.mjs +15 -14
  11. package/es/src/business/ap-batch-action/ApBatchAction.vue2.mjs +42 -33
  12. package/es/src/business/ap-image/ApImage.vue.d.ts +39 -1
  13. package/es/src/business/ap-image/ApImage.vue2.mjs +78 -30
  14. package/es/src/business/ap-image/hooks/useOss.mjs +35 -26
  15. package/es/src/business/ap-image/index.d.ts +41 -1
  16. package/es/src/business/ap-image/interface.d.ts +1 -0
  17. package/es/src/business/ap-image/style/css.d.ts +0 -1
  18. package/es/src/business/ap-image/style/css.js +1 -1
  19. package/es/src/business/ap-image/style/index.d.ts +0 -1
  20. package/es/src/business/ap-image/style/index.js +1 -1
  21. package/es/src/business/batch-input-group/index.d.ts +2 -0
  22. package/es/src/business/batch-input-group/index.mjs +1 -0
  23. package/es/src/business/batch-input-group/index.vue.d.ts +50 -0
  24. package/es/src/business/batch-input-group/index.vue.mjs +155 -0
  25. package/es/src/business/batch-input-group/index.vue2.mjs +4 -0
  26. package/es/src/business/batch-input-group/interface.d.ts +34 -0
  27. package/es/src/business/batch-input-group/popover-input/index.vue.d.ts +17 -0
  28. package/es/src/business/batch-input-group/popover-input/index.vue.mjs +4 -0
  29. package/es/src/business/batch-input-group/popover-input/index.vue2.mjs +74 -0
  30. package/es/src/business/batch-input-group/popover-input/style/css.d.ts +0 -0
  31. package/es/src/business/batch-input-group/popover-input/style/css.js +1 -0
  32. package/es/src/business/batch-input-group/popover-input/style/index.d.ts +0 -0
  33. package/es/src/business/batch-input-group/popover-input/style/index.js +1 -0
  34. package/es/src/business/batch-input-group/style/css.d.ts +0 -0
  35. package/es/src/business/batch-input-group/style/css.js +1 -0
  36. package/es/src/business/batch-input-group/style/index.d.ts +0 -0
  37. package/es/src/business/batch-input-group/style/index.js +1 -0
  38. package/es/src/business/index.d.ts +1 -0
  39. package/es/src/business/index.mjs +41 -40
  40. package/es/src/index.mjs +27 -25
  41. package/es/src/locale/lang/en.mjs +5 -1
  42. package/es/src/locale/lang/zh-cn.mjs +5 -1
  43. package/es/src/path-map.mjs +2 -1
  44. package/lib/index.js +1 -1
  45. package/lib/src/ap-descriptions/ap-descriptions.vue.js +1 -1
  46. package/lib/src/ap-descriptions/help-message/index.vue.d.ts +3 -15
  47. package/lib/src/ap-descriptions/help-message/index.vue2.js +1 -1
  48. package/lib/src/ap-form/item-group/index.vue.js +1 -1
  49. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  50. package/lib/src/ap-table/components/paragraph-ellipsis/index.vue.d.ts +20 -0
  51. package/lib/src/ap-table/components/paragraph-ellipsis/index.vue.js +1 -0
  52. package/lib/src/ap-table/components/paragraph-ellipsis/index.vue2.js +1 -0
  53. package/lib/src/ap-table/hooks/use-table-paging.js +1 -1
  54. package/lib/src/business/ap-batch-action/ApBatchAction.vue2.js +1 -1
  55. package/lib/src/business/ap-image/ApImage.vue.d.ts +39 -1
  56. package/lib/src/business/ap-image/ApImage.vue2.js +1 -1
  57. package/lib/src/business/ap-image/hooks/useOss.js +1 -1
  58. package/lib/src/business/ap-image/index.d.ts +41 -1
  59. package/lib/src/business/ap-image/interface.d.ts +1 -0
  60. package/lib/src/business/ap-image/style/css.d.ts +0 -1
  61. package/lib/src/business/ap-image/style/css.js +1 -1
  62. package/lib/src/business/ap-image/style/index.d.ts +0 -1
  63. package/lib/src/business/ap-image/style/index.js +1 -1
  64. package/lib/src/business/batch-input-group/index.d.ts +2 -0
  65. package/lib/src/business/batch-input-group/index.js +1 -0
  66. package/lib/src/business/batch-input-group/index.vue.d.ts +50 -0
  67. package/lib/src/business/batch-input-group/index.vue.js +2 -0
  68. package/lib/src/business/batch-input-group/index.vue2.js +1 -0
  69. package/lib/src/business/batch-input-group/interface.d.ts +34 -0
  70. package/lib/src/business/batch-input-group/popover-input/index.vue.d.ts +17 -0
  71. package/lib/src/business/batch-input-group/popover-input/index.vue.js +1 -0
  72. package/lib/src/business/batch-input-group/popover-input/index.vue2.js +2 -0
  73. package/lib/src/business/batch-input-group/popover-input/style/css.d.ts +0 -0
  74. package/lib/src/business/batch-input-group/popover-input/style/css.js +1 -0
  75. package/lib/src/business/batch-input-group/popover-input/style/index.d.ts +0 -0
  76. package/lib/src/business/batch-input-group/popover-input/style/index.js +1 -0
  77. package/lib/src/business/batch-input-group/style/css.d.ts +0 -0
  78. package/lib/src/business/batch-input-group/style/css.js +1 -0
  79. package/lib/src/business/batch-input-group/style/index.d.ts +0 -0
  80. package/lib/src/business/batch-input-group/style/index.js +1 -0
  81. package/lib/src/business/index.d.ts +1 -0
  82. package/lib/src/business/index.js +1 -1
  83. package/lib/src/index.js +1 -1
  84. package/lib/src/locale/lang/en.js +1 -1
  85. package/lib/src/locale/lang/zh-cn.js +1 -1
  86. package/lib/src/path-map.js +1 -1
  87. package/package.json +11 -11
@@ -1,22 +1,24 @@
1
- import { defineComponent as ve, useSlots as Te, ref as z, computed as s, unref as r, createVNode as y, Fragment as U, watchEffect as Fe, watch as G, openBlock as p, createElementBlock as T, normalizeClass as f, normalizeStyle as M, mergeProps as h, createSlots as J, withCtx as F, renderList as Q, createBlock as X, resolveDynamicComponent as Be, renderSlot as w, createCommentVNode as Y, createElementVNode as I, normalizeProps as xe, guardReactiveProps as ke } from "vue";
2
- import { Typography as Pe, Divider as ze, Table as Ie } from "@aplus-frontend/antdv";
3
- import { useToken as Ne } from "@aplus-frontend/antdv/es/theme/internal";
4
- import { ApForm as Ee } from "../ap-form/index.mjs";
5
- import { noRenderAsFormItemValueList as Z } from "./constants.mjs";
1
+ import { defineComponent as ve, useSlots as Te, ref as P, computed as s, unref as r, createVNode as y, Fragment as U, watchEffect as Fe, watch as G, openBlock as p, createElementBlock as T, normalizeClass as f, normalizeStyle as M, mergeProps as w, createSlots as _, withCtx as F, renderList as J, createBlock as Q, resolveDynamicComponent as xe, renderSlot as h, createCommentVNode as X, createElementVNode as I, normalizeProps as Be, guardReactiveProps as ke } from "vue";
2
+ import { Divider as ze, Table as Pe } from "@aplus-frontend/antdv";
3
+ import { useToken as Ie } from "@aplus-frontend/antdv/es/theme/internal";
4
+ import { ApForm as Ne } from "../ap-form/index.mjs";
5
+ import { noRenderAsFormItemValueList as Y } from "./constants.mjs";
6
6
  import "../config-provider/index.mjs";
7
- import { useTablePaging as Ke } from "./hooks/use-table-paging.mjs";
8
- import { omit as _, isUndefined as m, isBoolean as Le } from "lodash-unified";
9
- import { apColumnToColumn as Oe, getTableTitle as Ve, getTableRenderType as De, getTableRenderProps as Ae, getTableCellRenderNode as je, getColumnOrder as ee, updateFormProps as We, getFieldProps as $e, getSearchFormItemRenderNode as He, recursionApColumns as ae, objectToString as qe } from "./utils.mjs";
10
- import Ue from "./hooks/use-table-content-height.mjs";
11
- import { getRawDisplayValue as Ge } from "../editable-table/utils.mjs";
12
- import Me from "./hooks/use-table-row-selection.mjs";
13
- import { isDef as Je } from "../utils/index.mjs";
7
+ import { useTablePaging as Ee } from "./hooks/use-table-paging.mjs";
8
+ import { omit as Z, isUndefined as m, isBoolean as Ke } from "lodash-unified";
9
+ import { apColumnToColumn as Le, getTableTitle as Oe, getTableRenderType as Ve, getTableRenderProps as De, getTableCellRenderNode as Ae, getColumnOrder as ee, updateFormProps as je, getFieldProps as $e, getSearchFormItemRenderNode as We, recursionApColumns as ae, objectToString as He } from "./utils.mjs";
10
+ import qe from "./hooks/use-table-content-height.mjs";
11
+ import { getRawDisplayValue as Ue } from "../editable-table/utils.mjs";
12
+ import Ge from "./hooks/use-table-row-selection.mjs";
13
+ import { isDef as Me } from "../utils/index.mjs";
14
14
  import "./components/setting/modal/index.vue.mjs";
15
- import { useProvideApTable as Qe } from "./context.mjs";
16
- import { useNamespace as Xe } from "../config-provider/hooks/use-namespace.mjs";
17
- import { useGlobalConfig as Ye } from "../config-provider/hooks/use-global-config.mjs";
18
- import Ze from "./components/setting/modal/index.vue2.mjs";
19
- const ha = /* @__PURE__ */ ve({
15
+ import "./components/paragraph-ellipsis/index.vue.mjs";
16
+ import { useProvideApTable as _e } from "./context.mjs";
17
+ import { useNamespace as Je } from "../config-provider/hooks/use-namespace.mjs";
18
+ import { useGlobalConfig as Qe } from "../config-provider/hooks/use-global-config.mjs";
19
+ import Xe from "./components/paragraph-ellipsis/index.vue2.mjs";
20
+ import Ye from "./components/setting/modal/index.vue2.mjs";
21
+ const Sa = /* @__PURE__ */ ve({
20
22
  name: "ApTable",
21
23
  __name: "ap-table",
22
24
  props: {
@@ -145,23 +147,23 @@ const ha = /* @__PURE__ */ ve({
145
147
  }) {
146
148
  const a = oe;
147
149
  let N = 0;
148
- const S = Te(), [, re] = Ne(), {
149
- e: B,
150
+ const S = Te(), [, re] = Ie(), {
151
+ e: x,
150
152
  b: i,
151
153
  be: E
152
- } = Xe("ap-table"), K = Ye("valueTypeMap"), {
154
+ } = Je("ap-table"), K = Qe("valueTypeMap"), {
153
155
  height: le,
154
156
  contentRef: ne
155
- } = Ue(), x = z(a.size), d = z([]), L = z([]);
156
- Qe({
157
+ } = qe(), B = P(a.size), d = P([]), L = P([]);
158
+ _e({
157
159
  columns: s(() => d.value),
158
160
  columnsBackup: s(() => L.value),
159
- size: s(() => x.value),
161
+ size: s(() => B.value),
160
162
  updateColumns(e) {
161
163
  d.value = e;
162
164
  },
163
165
  updateSize(e) {
164
- x.value = e;
166
+ B.value = e;
165
167
  }
166
168
  });
167
169
  const se = () => {
@@ -169,36 +171,36 @@ const ha = /* @__PURE__ */ ve({
169
171
  let e = ((t = a.columns) == null ? void 0 : t.filter((l) => !l.hideInTable)) || [];
170
172
  function o(l, u) {
171
173
  return l.map((n) => ({
172
- resizable: Je(n.resizable) ? n.resizable : a.columnResizable,
173
- ..._(Oe(n), ["ellipsis"]),
174
+ resizable: Me(n.resizable) ? n.resizable : a.columnResizable,
175
+ ...Z(Le(n), ["ellipsis"]),
174
176
  fixed: u ? u.fixed : n.fixed,
175
- title: Ve(n, E("table-header", "title"), S.headerCell, r(re).colorPrimary),
177
+ title: Oe(n, E("table-header", "title"), S.headerCell, r(re).colorPrimary),
176
178
  customRender({
177
179
  value: c,
178
180
  ...g
179
181
  }) {
180
182
  var H, q;
181
- const W = De(n), be = Ae({
183
+ const $ = Ve(n), be = De({
182
184
  ...n,
183
- valueType: W
185
+ valueType: $
184
186
  }, {
185
187
  value: c,
186
188
  ...g
187
- }), Re = je(W, be, g.record, r(K)), $ = ((H = n.renderText) == null ? void 0 : H.call(n, {
189
+ }), Re = Ae($, be, g.record, r(K)), W = ((H = n.renderText) == null ? void 0 : H.call(n, {
188
190
  value: c,
189
191
  ...g
190
192
  })) || c, Ce = n.renderText ? y(U, null, [(q = n.renderText) == null ? void 0 : q.call(n, {
191
193
  value: c,
192
194
  ...g
193
195
  })]) : Re;
194
- let P = ye(n, $, Ce);
195
- return n.customRender && (P = n.customRender({
196
+ let z = ye(n, W, Ce);
197
+ return n.customRender && (z = n.customRender({
196
198
  value: c,
197
199
  ...g,
198
200
  column: n,
199
- originalNode: P,
200
- originalText: $
201
- })), P;
201
+ originalNode: z,
202
+ originalText: W
203
+ })), z;
202
204
  },
203
205
  children: o(n.children || [], u || n)
204
206
  }));
@@ -211,11 +213,11 @@ const ha = /* @__PURE__ */ ve({
211
213
  });
212
214
  const O = s(() => {
213
215
  var e, o, t;
214
- return N++, ((t = (o = (e = a.columns) == null ? void 0 : e.filter((l) => !l.hideInSearch && l.dataIndex && (l.valueType || l.customRenderFormItem) && !Z.includes(l.valueType))) == null ? void 0 : o.sort((l, u) => {
216
+ return N++, ((t = (o = (e = a.columns) == null ? void 0 : e.filter((l) => !l.hideInSearch && l.dataIndex && (l.valueType || l.customRenderFormItem) && !Y.includes(l.valueType))) == null ? void 0 : o.sort((l, u) => {
215
217
  let n = ee(l.order);
216
218
  return ee(u.order) - n;
217
219
  })) == null ? void 0 : t.map((l) => {
218
- const u = We(l, $e(l.fieldProps, {})), n = {
220
+ const u = je(l, $e(l.fieldProps, {})), n = {
219
221
  ...l,
220
222
  fieldProps: {
221
223
  label: l.title,
@@ -225,19 +227,20 @@ const ha = /* @__PURE__ */ ve({
225
227
  },
226
228
  renderNode: void 0
227
229
  };
228
- return n.renderNode = He(n, r(K)), n;
230
+ return n.renderNode = We(n, r(K)), n;
229
231
  })) || [];
230
232
  }), de = s(() => ae(r(d), (e) => {
231
233
  if (e.sorter === !0)
232
- return e.key;
234
+ return e.key || e.dataIndex;
233
235
  }).filter(Boolean)), ue = s(() => ae(r(d), (e) => {
234
236
  if (e.filters && !e.onFilter)
235
- return e.key;
237
+ return e.key || e.dataIndex;
236
238
  }).filter(Boolean)), ie = s(() => m(a.dataSource) ? v.value.records : a.dataSource), {
237
239
  rowSelection: b,
238
240
  selectedRows: R,
239
241
  ...C
240
- } = Me({
242
+ } = Ge({
243
+ fixed: !0,
241
244
  ...a.rowSelection === !0 ? {} : a.rowSelection,
242
245
  rowKey: a.rowKey,
243
246
  dataSource: ie
@@ -249,7 +252,7 @@ const ha = /* @__PURE__ */ ve({
249
252
  refresh: ce,
250
253
  data: v,
251
254
  setDataSource: pe
252
- } = Ke({
255
+ } = Ee({
253
256
  async request(e) {
254
257
  var t, l;
255
258
  if (!b.value.preserveSelectedRowKeys && m(a.dataSource) && C.clearAll(), !m(a.dataSource))
@@ -305,21 +308,18 @@ const ha = /* @__PURE__ */ ve({
305
308
  };
306
309
  }), ge = s(() => [i(), a.card ? null : i("wrapper"), a.adaptive ? i("adaptive") : null].filter(Boolean));
307
310
  function ye(e, o, t) {
308
- if (Z.includes(e.valueType))
311
+ if (Y.includes(e.valueType))
309
312
  return t;
310
- const l = qe(o);
311
- return e.copyable || e.ellipsis ? y(Pe.Paragraph, {
312
- copyable: e.copyable ? {
313
- text: l,
314
- tooltip: !1
315
- } : !1,
316
- ellipsis: e.ellipsis ? Le(e.ellipsis) ? {
313
+ const l = He(o);
314
+ return e.copyable || e.ellipsis ? y(Xe, {
315
+ copyable: e.copyable,
316
+ ellipsis: e.ellipsis ? Ke(e.ellipsis) ? {
317
317
  tooltip: l
318
318
  } : {
319
319
  ...e.ellipsis,
320
320
  tooltip: l
321
321
  } : !1,
322
- content: e.ellipsis ? Ge(e, o) : t
322
+ content: e.ellipsis ? Ue(e, o) : t
323
323
  }, null) : t;
324
324
  }
325
325
  G(() => r(v).loading, (e) => {
@@ -330,11 +330,11 @@ const ha = /* @__PURE__ */ ve({
330
330
  }, {
331
331
  immediate: !0
332
332
  });
333
- function he(e) {
333
+ function we(e) {
334
334
  var o, t, l;
335
335
  (l = (t = (o = k.value) == null ? void 0 : o.apForm) == null ? void 0 : t.setFieldsValue) == null || l.call(t, e);
336
336
  }
337
- function we() {
337
+ function he() {
338
338
  var e, o, t;
339
339
  return (t = (o = (e = k.value) == null ? void 0 : e.apForm) == null ? void 0 : o.getFieldsValue) == null ? void 0 : t.call(o, !0);
340
340
  }
@@ -345,8 +345,8 @@ const ha = /* @__PURE__ */ ve({
345
345
  submit: () => V(),
346
346
  reset: () => D(),
347
347
  refresh: () => ce(),
348
- setSearchFormValues: he,
349
- getSearchFormValues: we,
348
+ setSearchFormValues: we,
349
+ getSearchFormValues: he,
350
350
  getShownColumns: Se,
351
351
  dataSource: s(() => r(v).records),
352
352
  rowSelection: {
@@ -357,17 +357,17 @@ const ha = /* @__PURE__ */ ve({
357
357
  class: f(ge.value)
358
358
  }, [r(m)(e.dataSource) && e.searchForm !== !1 && O.value.length > 0 ? (p(), T("div", {
359
359
  key: 0,
360
- class: f(e.card ? r(B)("search-wrapper") : null),
360
+ class: f(e.card ? r(x)("search-wrapper") : null),
361
361
  style: M(e.searchFormWrapperStyle)
362
- }, [y(r(Ee).SearchForm, h(e.searchForm || {}, {
362
+ }, [y(r(Ne).SearchForm, w(e.searchForm || {}, {
363
363
  ref_key: "formRef",
364
364
  ref: k,
365
365
  "custom-reset": "",
366
366
  onSubmit: r(V),
367
367
  onReset: r(D),
368
368
  "submit-loading": r(A).loading
369
- }), J({
370
- default: F(() => [(p(!0), T(U, null, Q(O.value, (t) => (p(), X(Be(t.renderNode), h({
369
+ }), _({
370
+ default: F(() => [(p(!0), T(U, null, J(O.value, (t) => (p(), Q(xe(t.renderNode), w({
371
371
  key: t.dataIndex,
372
372
  ref_for: !0
373
373
  }, t.fieldProps || {}, {
@@ -376,12 +376,12 @@ const ha = /* @__PURE__ */ ve({
376
376
  _: 2
377
377
  }, [S.searchFormExtra ? {
378
378
  name: "extra",
379
- fn: F(() => [w(e.$slots, "searchFormExtra")]),
379
+ fn: F(() => [h(e.$slots, "searchFormExtra")]),
380
380
  key: "0"
381
- } : void 0]), 1040, ["onSubmit", "onReset", "submit-loading"])], 6)) : Y("", !0), I("div", {
381
+ } : void 0]), 1040, ["onSubmit", "onReset", "submit-loading"])], 6)) : X("", !0), I("div", {
382
382
  ref_key: "contentRef",
383
383
  ref: ne,
384
- class: f([r(B)("table-wrapper"), e.card ? r(B)("table-wrapper-card") : null]),
384
+ class: f([r(x)("table-wrapper"), e.card ? r(x)("table-wrapper-card") : null]),
385
385
  style: M(e.tableWrapperStyle)
386
386
  }, [I("div", {
387
387
  class: f(r(i)("header-wrapper"))
@@ -390,40 +390,40 @@ const ha = /* @__PURE__ */ ve({
390
390
  class: f(r(i)("header"))
391
391
  }, [I("div", {
392
392
  class: f(r(E)("header", "title"))
393
- }, [w(e.$slots, "title", h({
393
+ }, [h(e.$slots, "title", w({
394
394
  selectedRows: r(R),
395
395
  selectedRowKeys: r(b).selectedRowKeys,
396
396
  shownColumns: d.value
397
- }, C))], 2), S.title ? (p(), X(r(ze), {
397
+ }, C))], 2), S.title ? (p(), Q(r(ze), {
398
398
  key: 0,
399
399
  type: "vertical"
400
- })) : Y("", !0), y(Ze, {
400
+ })) : X("", !0), y(Ye, {
401
401
  config: e.settings === !0 ? {} : e.settings
402
- }, null, 8, ["config"])], 2)) : w(e.$slots, "title", h({
402
+ }, null, 8, ["config"])], 2)) : h(e.$slots, "title", w({
403
403
  key: 1,
404
404
  selectedRows: r(R),
405
405
  selectedRowKeys: r(b).selectedRowKeys,
406
406
  shownColumns: d.value
407
- }, C))], 2), y(r(Ie), h({
407
+ }, C))], 2), y(r(Pe), w({
408
408
  class: r(i)("table")
409
409
  }, j.value, {
410
- size: x.value,
410
+ size: B.value,
411
411
  "table-layout": me.value,
412
412
  columns: d.value,
413
413
  onResizeColumn: o[0] || (o[0] = (t, l) => l.width = t)
414
- }), J({
415
- summary: F(() => [w(e.$slots, "summary", {
414
+ }), _({
415
+ summary: F(() => [h(e.$slots, "summary", {
416
416
  columns: d.value,
417
417
  records: j.value.dataSource,
418
418
  selectedRows: r(R)
419
419
  })]),
420
420
  _: 2
421
- }, [Q(r(_)(S, ["title", "searchFormExtra", "headerCell", "summary"]), (t, l) => ({
421
+ }, [J(r(Z)(S, ["title", "searchFormExtra", "headerCell", "summary"]), (t, l) => ({
422
422
  name: l,
423
- fn: F((u) => [w(e.$slots, l, xe(ke(u || {})))])
423
+ fn: F((u) => [h(e.$slots, l, Be(ke(u || {})))])
424
424
  }))]), 1040, ["class", "size", "table-layout", "columns"])], 6)], 2));
425
425
  }
426
426
  });
427
427
  export {
428
- ha as default
428
+ Sa as default
429
429
  };
@@ -0,0 +1,20 @@
1
+ import { VNodeChild, DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
2
+ interface Props {
3
+ copyable?: boolean;
4
+ content?: VNodeChild;
5
+ ellipsis?: boolean | {
6
+ rows?: number;
7
+ tooltip?: VNodeChild;
8
+ };
9
+ }
10
+ declare const _default: DefineComponent<__VLS_TypePropsToOption<Props>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_TypePropsToOption<Props>>>, {}, {}>;
11
+ export default _default;
12
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
13
+ type __VLS_TypePropsToOption<T> = {
14
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
15
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
16
+ } : {
17
+ type: PropType<T[K]>;
18
+ required: true;
19
+ };
20
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./index.vue2.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,82 @@
1
+ import { defineComponent as T, ref as _, computed as w, openBlock as o, createElementBlock as f, mergeProps as B, unref as t, createElementVNode as O, normalizeClass as y, createVNode as d, createSlots as x, withCtx as u, createBlock as s, resolveDynamicComponent as v, h as b, Fragment as h, createCommentVNode as E } from "vue";
2
+ import "../../../config-provider/index.mjs";
3
+ import { Tooltip as C } from "@aplus-frontend/antdv";
4
+ import { CopyOutlined as N, CheckOutlined as j } from "@ant-design/icons-vue";
5
+ import { useNamespace as S } from "../../../config-provider/hooks/use-namespace.mjs";
6
+ import { useLocale as V } from "../../../config-provider/hooks/use-locale.mjs";
7
+ const $ = /* @__PURE__ */ T({
8
+ name: "ApTableParagraphEllipsis",
9
+ __name: "index",
10
+ props: {
11
+ copyable: { type: Boolean },
12
+ content: { type: [Object, String, Number, Boolean, null, Array] },
13
+ ellipsis: { type: [Boolean, Object] }
14
+ },
15
+ setup(g) {
16
+ const { b: i } = S("ap-table-paragraph-ellipsis"), { t: m } = V(), e = g, l = _(!1), r = w(() => e.ellipsis === !0 ? {
17
+ rows: 1,
18
+ tooltip: e.content
19
+ } : typeof e.ellipsis == "object" ? Object.assign(
20
+ {
21
+ rows: 1,
22
+ tooltip: e.content
23
+ },
24
+ e.ellipsis
25
+ ) : {});
26
+ function k() {
27
+ var c, a, p;
28
+ const n = ((c = r.value) == null ? void 0 : c.tooltip) ?? ((p = (a = e.content) == null ? void 0 : a.props) == null ? void 0 : p.value) ?? e.content;
29
+ navigator.clipboard.writeText(n), l.value || (l.value = !0, setTimeout(() => {
30
+ l.value = !1;
31
+ }, 2200));
32
+ }
33
+ return (n, c) => {
34
+ var a, p;
35
+ return o(), f("div", B({
36
+ class: [t(i)()]
37
+ }, {
38
+ ...n.$attrs
39
+ }, {
40
+ style: {
41
+ "--ap-table-paragraph-ellipsis-rows": (a = r.value) == null ? void 0 : a.rows
42
+ }
43
+ }), [
44
+ O("div", {
45
+ class: y([t(i)("content")])
46
+ }, [
47
+ d(t(C), null, x({
48
+ default: u(() => [
49
+ (o(), s(v(b(h, [e.content]))))
50
+ ]),
51
+ _: 2
52
+ }, [
53
+ (p = r.value) != null && p.tooltip ? {
54
+ name: "title",
55
+ fn: u(() => [
56
+ (o(), s(v(b(h, [r.value.tooltip]))))
57
+ ]),
58
+ key: "0"
59
+ } : void 0
60
+ ]), 1024)
61
+ ], 2),
62
+ e.copyable ? (o(), f("div", {
63
+ key: 0,
64
+ class: y([t(i)("copyable")]),
65
+ onClick: k
66
+ }, [
67
+ d(t(C), {
68
+ title: l.value ? t(m)("ap.apTable.paragraphEllipsis.copySuccess") : t(m)("ap.apTable.paragraphEllipsis.copy")
69
+ }, {
70
+ default: u(() => [
71
+ l.value ? (o(), s(t(j), { key: 1 })) : (o(), s(t(N), { key: 0 }))
72
+ ]),
73
+ _: 1
74
+ }, 8, ["title"])
75
+ ], 2)) : E("", !0)
76
+ ], 16);
77
+ };
78
+ }
79
+ });
80
+ export {
81
+ $ as default
82
+ };
@@ -11,16 +11,16 @@ const ue = ({
11
11
  request: N,
12
12
  defaultParams: $ = {},
13
13
  defaultData: q = [],
14
- formatParams: C,
15
- paramsValueTypeMap: y,
14
+ formatParams: y,
15
+ paramsValueTypeMap: C,
16
16
  resetFieldsIgnores: D,
17
17
  filterFields: J,
18
- sortFields: L,
18
+ sortFields: K,
19
19
  showLessItems: b = !1,
20
- showTotal: Q = !0
20
+ showTotal: L = !0
21
21
  }) => {
22
22
  let z = 0, f = {};
23
- const G = (e) => C ? C(e) : e, c = x(), l = x(M), p = x(w), {
23
+ const Q = (e) => y ? y(e) : e, c = x(), l = x(M), p = x(w), {
24
24
  t: F
25
25
  } = ae(), {
26
26
  b: S
@@ -30,7 +30,7 @@ const ue = ({
30
30
  loading: !1
31
31
  }), O = async (e) => {
32
32
  var r;
33
- const a = G(e), t = Date.now();
33
+ const a = Q(e), t = Date.now();
34
34
  z = t, n.value.loading = !0;
35
35
  try {
36
36
  const s = await N({
@@ -46,12 +46,12 @@ const ue = ({
46
46
  }, R = (e) => {
47
47
  const a = {};
48
48
  return Object.entries(e).forEach(([t, r]) => {
49
- if (a[t] = r, y && r) {
50
- const s = y[t];
49
+ if (a[t] = r, C && r) {
50
+ const s = C[t];
51
51
  s && (a[t] = ee(s, r));
52
52
  }
53
53
  }), a;
54
- }, H = async (e) => {
54
+ }, G = async (e) => {
55
55
  var r, s, g, d, m, u, h;
56
56
  const a = ((s = (r = c.value) == null ? void 0 : r.apForm) == null ? void 0 : s.getFieldsValue()) || {}, t = {};
57
57
  Object.entries(a).forEach(([v, i]) => {
@@ -63,7 +63,7 @@ const ue = ({
63
63
  f = e;
64
64
  const a = R(e);
65
65
  O(a);
66
- }, K = (e) => {
66
+ }, H = (e) => {
67
67
  T({
68
68
  ...f,
69
69
  ...e
@@ -77,21 +77,22 @@ const ue = ({
77
77
  pageSize: f.pageSize || w
78
78
  });
79
79
  }, U = () => {
80
- H(j);
80
+ G(j);
81
81
  }, W = () => {
82
82
  T(f);
83
83
  }, X = (e) => {
84
84
  const a = o(n).total - e, t = Math.ceil(a / o(p)), r = o(l) > t ? t : o(l);
85
- K({
85
+ H({
86
86
  current: r > 0 ? r : 1
87
87
  });
88
88
  }, A = (e, a, t) => {
89
89
  var m, u, h, v;
90
+ console.log("filters", a);
90
91
  const r = ((u = (m = c.value) == null ? void 0 : m.apForm) == null ? void 0 : u.getFieldsValue(!0)) || {};
91
92
  l.value = e.current, p.value = e.pageSize;
92
93
  const s = B(t) ? [...t] : [t], g = {};
93
94
  for (const i of s)
94
- (h = o(L)) != null && h.includes(i.field) && (g[te(i.field)] = i.order);
95
+ (h = o(K)) != null && h.includes(i.columnKey || i.field) && (g[te(i.field)] = i.order);
95
96
  const d = {};
96
97
  for (const i of Object.keys(a))
97
98
  (v = o(J)) != null && v.includes(i) && (d[i] = a[i]);
@@ -129,7 +130,7 @@ const ue = ({
129
130
  showQuickJumper: !b,
130
131
  showLessItems: b,
131
132
  size: "default",
132
- showTotal: Q ? (e) => P("span", {
133
+ showTotal: L ? (e) => P("span", {
133
134
  class: S("pagination-total-wrapper")
134
135
  }, [F("ap.apTable.pagination.totalLeftPrefix"), " ", P("span", {
135
136
  class: S("pagination-count-text")
@@ -1,58 +1,67 @@
1
- import { defineComponent as v, useSlots as _, computed as u, openBlock as m, createElementBlock as f, normalizeClass as r, unref as t, renderSlot as i, createCommentVNode as B, createElementVNode as s, createTextVNode as d, toDisplayString as o, createVNode as C, withCtx as k } from "vue";
2
- import { Button as N } from "@aplus-frontend/antdv";
1
+ import { defineComponent as A, useSlots as B, computed as _, ref as S, watch as C, openBlock as f, createElementBlock as h, normalizeClass as d, unref as t, renderSlot as p, createCommentVNode as b, createElementVNode as a, createTextVNode as m, toDisplayString as c, createVNode as k, withCtx as N } from "vue";
2
+ import { Button as g } from "@aplus-frontend/antdv";
3
3
  import "../../config-provider/index.mjs";
4
- import { useNamespace as V } from "../../config-provider/hooks/use-namespace.mjs";
5
- import { useLocale as $ } from "../../config-provider/hooks/use-locale.mjs";
6
- const b = { class: "selected-desc" }, g = { class: "selected-desc-conut" }, w = { class: "selected-desc-clean" }, z = /* @__PURE__ */ v({
4
+ import { useNamespace as w } from "../../config-provider/hooks/use-namespace.mjs";
5
+ import { useLocale as V } from "../../config-provider/hooks/use-locale.mjs";
6
+ const $ = { class: "selected-desc" }, x = { class: "selected-desc-conut" }, D = { class: "selected-desc-clean" }, H = /* @__PURE__ */ A({
7
7
  __name: "ApBatchAction",
8
8
  props: {
9
9
  selectedRowKeys: {},
10
10
  clearAll: { type: Function }
11
11
  },
12
- setup(h) {
13
- const { b: c } = V("ap-batch-action"), { t: a } = $(), l = h, n = _().header, y = u(() => {
12
+ setup(y) {
13
+ const { b: l } = w("ap-batch-action"), { t: r } = V(), n = y, o = B(), v = _(() => {
14
14
  var e;
15
- return ((e = l.selectedRowKeys) == null ? void 0 : e.length) || 0;
16
- }), A = u(() => {
17
- const e = n == null ? void 0 : n();
18
- return Array.isArray(e) && e.length > 0;
19
- });
20
- return (e, p) => (m(), f("div", {
21
- class: r([t(c)()])
15
+ return ((e = n.selectedRowKeys) == null ? void 0 : e.length) || 0;
16
+ }), u = S(!1);
17
+ return C(
18
+ () => o.header,
19
+ () => {
20
+ var s;
21
+ const e = (s = o == null ? void 0 : o.header) == null ? void 0 : s.call(o);
22
+ u.value = Array.isArray(e) && e.filter(Boolean).filter(
23
+ (i) => i.type !== Symbol.for("v-cmt") && i.type !== Symbol.for("v-fgt")
24
+ ).length > 0;
25
+ },
26
+ {
27
+ immediate: !0
28
+ }
29
+ ), (e, s) => (f(), h("div", {
30
+ class: d([t(l)()])
22
31
  }, [
23
- A.value ? (m(), f("div", {
32
+ u.value ? (f(), h("div", {
24
33
  key: 0,
25
- class: r(t(c)("header"))
34
+ class: d(t(l)("header"))
26
35
  }, [
27
- i(e.$slots, "header")
28
- ], 2)) : B("", !0),
29
- s("div", {
30
- class: r(t(c)("body"))
36
+ p(e.$slots, "header")
37
+ ], 2)) : b("", !0),
38
+ a("div", {
39
+ class: d(t(l)("body"))
31
40
  }, [
32
- i(e.$slots, "prefix"),
33
- s("div", b, [
34
- s("div", g, [
35
- d(o(t(a)("ap.apBatchAction.selected")) + " ", 1),
36
- s("span", null, o(y.value), 1),
37
- d(" " + o(t(a)("ap.apBatchAction.piecesOfData")), 1)
41
+ p(e.$slots, "prefix"),
42
+ a("div", $, [
43
+ a("div", x, [
44
+ m(c(t(r)("ap.apBatchAction.selected")) + " ", 1),
45
+ a("span", null, c(v.value), 1),
46
+ m(" " + c(t(r)("ap.apBatchAction.piecesOfData")), 1)
38
47
  ]),
39
- s("div", w, [
40
- C(t(N), {
48
+ a("div", D, [
49
+ k(t(g), {
41
50
  type: "link",
42
- onClick: p[0] || (p[0] = (x) => l.clearAll && l.clearAll())
51
+ onClick: s[0] || (s[0] = (i) => n.clearAll && n.clearAll())
43
52
  }, {
44
- default: k(() => [
45
- d(o(t(a)("ap.apBatchAction.empty")), 1)
53
+ default: N(() => [
54
+ m(c(t(r)("ap.apBatchAction.empty")), 1)
46
55
  ]),
47
56
  _: 1
48
57
  })
49
58
  ])
50
59
  ]),
51
- i(e.$slots, "suffix")
60
+ p(e.$slots, "suffix")
52
61
  ], 2)
53
62
  ], 2));
54
63
  }
55
64
  });
56
65
  export {
57
- z as default
66
+ H as default
58
67
  };