@aplus-frontend/ui 0.5.17 → 0.5.19

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 (79) hide show
  1. package/es/src/ap-table/ap-table.vue2.mjs +30 -30
  2. package/es/src/ap-table/components/setting/sorter/index.vue2.mjs +1 -1
  3. package/es/src/ap-table/hooks/use-table-paging-ng.mjs +108 -107
  4. package/es/src/ap-table/interface.d.ts +8 -0
  5. package/es/src/business/ap-ladder/ApLadder.vue.d.ts +4 -20
  6. package/es/src/business/ap-ladder/ApLadder.vue2.mjs +64 -266
  7. package/es/src/business/ap-ladder/components/SimpleMode.vue.d.ts +110 -0
  8. package/es/src/business/ap-ladder/components/SimpleMode.vue.mjs +4 -0
  9. package/es/src/business/ap-ladder/components/SimpleMode.vue2.mjs +122 -0
  10. package/es/src/business/ap-ladder/components/ValueGroupMode.vue.d.ts +118 -0
  11. package/es/src/business/ap-ladder/components/ValueGroupMode.vue.mjs +4 -0
  12. package/es/src/business/ap-ladder/components/ValueGroupMode.vue2.mjs +209 -0
  13. package/es/src/business/ap-ladder/index.d.ts +5 -38
  14. package/es/src/business/ap-ladder/interface.d.ts +42 -16
  15. package/es/src/business/ap-ladder/useWatchEllipsis.d.ts +1 -2
  16. package/es/src/business/ap-ladder/useWatchEllipsis.origin.d.ts +3 -0
  17. package/es/src/business/ap-ladder/utils.d.ts +2 -0
  18. package/es/src/business/ap-ladder/utils.mjs +5 -0
  19. package/es/src/business/ap-table-modal/hooks/use-create-table-modal.mjs +1 -1
  20. package/es/src/business/ap-table-modal/interface.d.ts +1 -1
  21. package/es/src/business/ap-table-modal/modal-title.vue2.mjs +1 -1
  22. package/es/src/business/ap-table-modal/table-layout/index.vue2.mjs +8 -9
  23. package/es/src/business/ap-table-modal/table-modal.vue2.mjs +14 -14
  24. package/es/src/mask/style/css.d.ts +0 -0
  25. package/es/src/mask/style/css.js +1 -0
  26. package/es/src/mask/style/index.d.ts +0 -0
  27. package/es/src/mask/style/index.js +1 -0
  28. package/es/src/path-map.mjs +3 -1
  29. package/es/src/text/index.vue.mjs +46 -41
  30. package/es/src/text/interface.d.ts +6 -0
  31. package/es/src/text/style/css.d.ts +0 -0
  32. package/es/src/text/style/css.js +2 -0
  33. package/es/src/text/style/index.d.ts +0 -0
  34. package/es/src/text/style/index.js +2 -0
  35. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  36. package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
  37. package/lib/src/ap-table/interface.d.ts +8 -0
  38. package/lib/src/business/ap-ladder/ApLadder.vue.d.ts +4 -20
  39. package/lib/src/business/ap-ladder/ApLadder.vue2.js +1 -1
  40. package/lib/src/business/ap-ladder/components/SimpleMode.vue.d.ts +110 -0
  41. package/lib/src/business/ap-ladder/components/SimpleMode.vue.js +1 -0
  42. package/lib/src/business/ap-ladder/components/SimpleMode.vue2.js +1 -0
  43. package/lib/src/business/ap-ladder/components/ValueGroupMode.vue.d.ts +118 -0
  44. package/lib/src/business/ap-ladder/components/ValueGroupMode.vue.js +1 -0
  45. package/lib/src/business/ap-ladder/components/ValueGroupMode.vue2.js +1 -0
  46. package/lib/src/business/ap-ladder/index.d.ts +5 -38
  47. package/lib/src/business/ap-ladder/interface.d.ts +42 -16
  48. package/lib/src/business/ap-ladder/useWatchEllipsis.d.ts +1 -2
  49. package/lib/src/business/ap-ladder/useWatchEllipsis.origin.d.ts +3 -0
  50. package/lib/src/business/ap-ladder/utils.d.ts +2 -0
  51. package/lib/src/business/ap-ladder/utils.js +1 -0
  52. package/lib/src/business/ap-table-modal/hooks/use-create-table-modal.js +1 -1
  53. package/lib/src/business/ap-table-modal/interface.d.ts +1 -1
  54. package/lib/src/business/ap-table-modal/modal-title.vue2.js +1 -1
  55. package/lib/src/business/ap-table-modal/table-layout/index.vue2.js +1 -1
  56. package/lib/src/business/ap-table-modal/table-modal.vue2.js +1 -1
  57. package/lib/src/mask/style/css.cjs +1 -0
  58. package/lib/src/mask/style/css.d.ts +0 -0
  59. package/lib/src/mask/style/index.cjs +1 -0
  60. package/lib/src/mask/style/index.d.ts +0 -0
  61. package/lib/src/path-map.js +1 -1
  62. package/lib/src/text/index.vue.js +1 -1
  63. package/lib/src/text/interface.d.ts +6 -0
  64. package/lib/src/text/style/css.cjs +2 -0
  65. package/lib/src/text/style/css.d.ts +0 -0
  66. package/lib/src/text/style/index.cjs +2 -0
  67. package/lib/src/text/style/index.d.ts +0 -0
  68. package/package.json +1 -1
  69. package/theme/ap-ladder/ap-ladder.css +68 -1
  70. package/theme/ap-ladder/ap-ladder.less +72 -2
  71. package/theme/index.css +68 -1
  72. package/es/src/business/ap-ladder/HelpMessageIcon.vue.d.ts +0 -14
  73. package/es/src/business/ap-ladder/HelpMessageIcon.vue.mjs +0 -4
  74. package/es/src/business/ap-ladder/HelpMessageIcon.vue2.mjs +0 -35
  75. package/es/src/business/ap-ladder/useWatchEllipsis.mjs +0 -35
  76. package/lib/src/business/ap-ladder/HelpMessageIcon.vue.d.ts +0 -14
  77. package/lib/src/business/ap-ladder/HelpMessageIcon.vue.js +0 -1
  78. package/lib/src/business/ap-ladder/HelpMessageIcon.vue2.js +0 -1
  79. package/lib/src/business/ap-ladder/useWatchEllipsis.js +0 -1
@@ -1,4 +1,4 @@
1
- import { defineComponent as Ke, useSlots as Ee, ref as h, computed as s, unref as l, watch as k, createElementBlock as B, openBlock as p, normalizeStyle as V, normalizeClass as m, createCommentVNode as Z, createElementVNode as K, createVNode as y, mergeProps as w, createSlots as ee, withCtx as v, Fragment as oe, renderList as re, createBlock as ae, resolveDynamicComponent as Oe, renderSlot as R, normalizeProps as Le, guardReactiveProps as $e } from "vue";
1
+ import { defineComponent as Ke, useSlots as Ee, ref as h, computed as s, unref as l, createVNode as p, Fragment as Z, watch as k, createElementBlock as B, openBlock as m, normalizeStyle as V, normalizeClass as y, createCommentVNode as ee, createElementVNode as K, mergeProps as w, createSlots as oe, withCtx as v, renderList as re, createBlock as ae, resolveDynamicComponent as Oe, renderSlot as R, normalizeProps as Le, guardReactiveProps as $e } from "vue";
2
2
  import { Divider as Ae, Table as De } from "@aplus-frontend/antdv";
3
3
  import { useToken as je } from "@aplus-frontend/antdv/es/theme/internal";
4
4
  import { ApForm as We } from "../ap-form/index.mjs";
@@ -6,7 +6,7 @@ import { noRenderAsFormItemValueList as te } from "./constants.mjs";
6
6
  import "../config-provider/index.mjs";
7
7
  import { useTablePaging as _e } from "./hooks/use-table-paging-ng.mjs";
8
8
  import { isUndefined as g, omit as le, isBoolean as He } from "lodash-unified";
9
- import { getColumnOrder as ne, updateFormProps as Ue, getFieldProps as qe, getSearchFormItemRenderNode as Me, recursionApColumns as se, falseToUndefined as Ge, getTableTitle as Je, getTableRenderType as Qe, getTableRenderProps as Xe, getTableCellRenderNode as Ye, apColumnToColumn as Ze, objectToString as eo } from "./utils.mjs";
9
+ import { getColumnOrder as ne, updateFormProps as Ue, getFieldProps as qe, getSearchFormItemRenderNode as Me, recursionApColumns as se, getTableTitle as Ge, getTableRenderType as Je, getTableRenderProps as Qe, getTableCellRenderNode as Xe, apColumnToColumn as Ye, falseToUndefined as Ze, objectToString as eo } from "./utils.mjs";
10
10
  import oo from "./hooks/use-table-content-height.mjs";
11
11
  import ro from "./hooks/use-table-row-selection.mjs";
12
12
  import { getScrollbarSize as ao, isDef as to } from "../utils/index.mjs";
@@ -17,9 +17,9 @@ import "../scroll-bar/index.mjs";
17
17
  import { useStickyScroll as no } from "./hooks/use-sticky-scroll.mjs";
18
18
  import { useNamespace as so } from "../config-provider/hooks/use-namespace.mjs";
19
19
  import { useGlobalConfig as uo } from "../config-provider/hooks/use-global-config.mjs";
20
- import io from "./components/setting/modal/index.vue2.mjs";
21
- import co from "../scroll-bar/index.vue.mjs";
22
- import fo from "./components/paragraph-ellipsis/index.vue2.mjs";
20
+ import io from "./components/paragraph-ellipsis/index.vue2.mjs";
21
+ import co from "./components/setting/modal/index.vue2.mjs";
22
+ import fo from "../scroll-bar/index.vue.mjs";
23
23
  const Eo = /* @__PURE__ */ Ke({
24
24
  name: "ApTable",
25
25
  __name: "ap-table",
@@ -245,26 +245,26 @@ const Eo = /* @__PURE__ */ Ke({
245
245
  function a(t, d) {
246
246
  return t.map((n) => ({
247
247
  resizable: to(n.resizable) ? n.resizable : o.columnResizable,
248
- ...le(Ze(n), ["ellipsis"]),
248
+ ...le(Ye(n), ["ellipsis"]),
249
249
  // tips: 此函数内部依赖查询&筛选的相应式值
250
250
  ...M(n),
251
251
  fixed: d ? d.fixed : n.fixed,
252
- title: Je(n, O("table-header", "title"), C.headerCell, l(ie).colorPrimary),
252
+ title: Ge(n, O("table-header", "title"), C.headerCell, l(ie).colorPrimary),
253
253
  customRender({
254
254
  value: f,
255
255
  ...S
256
256
  }) {
257
257
  var X, Y;
258
- const J = Qe(n), Ie = Xe({
258
+ const J = Je(n), Ie = Qe({
259
259
  ...n,
260
260
  valueType: J
261
261
  }, {
262
262
  value: f,
263
263
  ...S
264
- }), Ne = Ye(J, Ie, S.record, l(L)), Q = ((X = n.renderText) == null ? void 0 : X.call(n, {
264
+ }), Ne = Xe(J, Ie, S.record, l(L)), Q = ((X = n.renderText) == null ? void 0 : X.call(n, {
265
265
  value: f,
266
266
  ...S
267
- })) || f, Ve = n.renderText ? y(oe, null, [(Y = n.renderText) == null ? void 0 : Y.call(n, {
267
+ })) || f, Ve = n.renderText ? p(Z, null, [(Y = n.renderText) == null ? void 0 : Y.call(n, {
268
268
  value: f,
269
269
  ...S
270
270
  })]) : Ne;
@@ -325,7 +325,7 @@ const Eo = /* @__PURE__ */ Ke({
325
325
  ...a,
326
326
  // tips 如果是前端分页,则默认会走缓存
327
327
  preserveSelectedRowKeys: g(o.dataSource) ? a.preserveSelectedRowKeys : !0
328
- } : Ge(o.rowSelection),
328
+ } : Ze(o.rowSelection),
329
329
  loading: g(o.loading) ? e.loading : o.loading,
330
330
  pagination: o.pagination === !1 ? !1 : e.pagination,
331
331
  scroll: l(Te)
@@ -338,7 +338,7 @@ const Eo = /* @__PURE__ */ Ke({
338
338
  if (te.includes(e.valueType))
339
339
  return r;
340
340
  const t = eo(a);
341
- return e.copyable || e.ellipsis ? y(fo, {
341
+ return e.copyable || e.ellipsis ? p(io, {
342
342
  copyable: e.copyable,
343
343
  rawValue: t,
344
344
  ellipsis: e.ellipsis ? He(e.ellipsis) ? {
@@ -396,26 +396,26 @@ const Eo = /* @__PURE__ */ Ke({
396
396
  },
397
397
  y: void 0
398
398
  }
399
- }), (e, a) => (p(), B("div", {
399
+ }), (e, a) => (m(), B("div", {
400
400
  ref_key: "tableWrapperRef",
401
401
  ref: $,
402
- class: m(xe.value),
402
+ class: y(xe.value),
403
403
  style: V(l(fe)({
404
404
  "scroll-bar-width": `${l(W)}px`
405
405
  }))
406
- }, [l(g)(e.dataSource) && e.searchForm !== !1 && _.value.length > 0 ? (p(), B("div", {
406
+ }, [l(g)(e.dataSource) && e.searchForm !== !1 && _.value.length > 0 ? (m(), B("div", {
407
407
  key: 0,
408
- class: m(e.card ? l(z)("search-wrapper") : null),
408
+ class: y(e.card ? l(z)("search-wrapper") : null),
409
409
  style: V(e.searchFormWrapperStyle)
410
- }, [y(l(We).SearchForm, w(e.searchForm || {}, {
410
+ }, [p(l(We).SearchForm, w(e.searchForm || {}, {
411
411
  ref_key: "formRef",
412
412
  ref: I,
413
413
  "custom-reset": "",
414
414
  "submit-loading": l(q).loading,
415
415
  onSubmit: l(H),
416
416
  onReset: l(U)
417
- }), ee({
418
- default: v(() => [(p(!0), B(oe, null, re(_.value, (r) => (p(), ae(Oe(r.renderNode.Comp), w({
417
+ }), oe({
418
+ default: v(() => [(m(!0), B(Z, null, re(_.value, (r) => (m(), ae(Oe(r.renderNode.Comp), w({
419
419
  key: r.dataIndex,
420
420
  item: r,
421
421
  ref_for: !0
@@ -428,33 +428,33 @@ const Eo = /* @__PURE__ */ Ke({
428
428
  name: "extra",
429
429
  fn: v(() => [R(e.$slots, "searchFormExtra")]),
430
430
  key: "0"
431
- } : void 0]), 1040, ["submit-loading", "onSubmit", "onReset"])], 6)) : Z("", !0), K("div", {
431
+ } : void 0]), 1040, ["submit-loading", "onSubmit", "onReset"])], 6)) : ee("", !0), K("div", {
432
432
  ref_key: "contentRef",
433
433
  ref: me,
434
- class: m([l(z)("table-wrapper"), e.card ? l(z)("table-wrapper-card") : null]),
434
+ class: y([l(z)("table-wrapper"), e.card ? l(z)("table-wrapper-card") : null]),
435
435
  style: V(e.tableWrapperStyle)
436
436
  }, [K("div", {
437
- class: m(l(c)("header-wrapper"))
438
- }, [e.settings ? (p(), B("div", {
437
+ class: y(l(c)("header-wrapper"))
438
+ }, [e.settings ? (m(), B("div", {
439
439
  key: 0,
440
- class: m(l(c)("header"))
440
+ class: y(l(c)("header"))
441
441
  }, [K("div", {
442
- class: m(l(O)("header", "title"))
442
+ class: y(l(O)("header", "title"))
443
443
  }, [R(e.$slots, "title", w({
444
444
  selectedRows: l(F),
445
445
  selectedRowKeys: l(T).selectedRowKeys,
446
446
  shownColumns: u.value
447
- }, x))], 2), C.title ? (p(), ae(l(Ae), {
447
+ }, x))], 2), C.title ? (m(), ae(l(Ae), {
448
448
  key: 0,
449
449
  type: "vertical"
450
- })) : Z("", !0), y(io, {
450
+ })) : ee("", !0), p(co, {
451
451
  config: e.settings === !0 ? {} : e.settings
452
452
  }, null, 8, ["config"])], 2)) : R(e.$slots, "title", w({
453
453
  key: 1,
454
454
  selectedRows: l(F),
455
455
  selectedRowKeys: l(T).selectedRowKeys,
456
456
  shownColumns: u.value
457
- }, x))], 2), y(l(De), w({
457
+ }, x))], 2), p(l(De), w({
458
458
  ref_key: "antdTableRef",
459
459
  ref: A,
460
460
  class: l(c)("table")
@@ -463,7 +463,7 @@ const Eo = /* @__PURE__ */ Ke({
463
463
  "table-layout": Fe.value,
464
464
  columns: u.value,
465
465
  onResizeColumn: a[0] || (a[0] = (r, t) => t.width = r)
466
- }), ee({
466
+ }), oe({
467
467
  summary: v(() => [R(e.$slots, "summary", {
468
468
  columns: u.value,
469
469
  records: G.value.dataSource,
@@ -474,7 +474,7 @@ const Eo = /* @__PURE__ */ Ke({
474
474
  name: "bottomPaginationTop",
475
475
  fn: v(() => {
476
476
  var r, t;
477
- return [y(l(co), {
477
+ return [p(l(fo), {
478
478
  ref_key: "scrollBarRef",
479
479
  ref: i,
480
480
  "scroll-container": (t = (r = A.value) == null ? void 0 : r.table) == null ? void 0 : t.scrollBodyRef,
@@ -1,4 +1,4 @@
1
- import { defineComponent as A, ref as L, computed as O, watch as $, createElementBlock as y, openBlock as c, normalizeClass as d, unref as n, createVNode as m, createElementVNode as v, withCtx as g, toDisplayString as k, createTextVNode as q, createCommentVNode as p, createBlock as b } from "vue";
1
+ import { defineComponent as A, ref as L, unref as n, computed as O, watch as $, createElementBlock as y, openBlock as c, normalizeClass as d, createVNode as m, createElementVNode as v, withCtx as g, toDisplayString as k, createTextVNode as q, createCommentVNode as p, createBlock as b } from "vue";
2
2
  import { Flex as G, Button as H, Divider as J } from "@aplus-frontend/antdv";
3
3
  import N from "vuedraggable";
4
4
  import "../sortable/index.vue.mjs";
@@ -1,140 +1,141 @@
1
- import { ref as oe, reactive as q, unref as h, nextTick as ne, onMounted as ae, watch as se, computed as A, createVNode as C } from "vue";
1
+ import { ref as ne, reactive as J, unref as S, nextTick as ae, onMounted as se, watch as ie, computed as D, createVNode as b } from "vue";
2
2
  import { useTableSortedAndFiltered as ce } from "./use-sorted-filtered.mjs";
3
3
  import "../../config-provider/index.mjs";
4
- import { parseFieldValue as ie, dataIndexToStr as le, isEqualCustom as ue } from "../utils.mjs";
5
- import { isArray as N, isEqualWith as fe } from "lodash-unified";
6
- import { useLocale as ge } from "../../config-provider/hooks/use-locale.mjs";
7
- import { useNamespace as pe } from "../../config-provider/hooks/use-namespace.mjs";
8
- const S = 1, L = 10;
9
- function de(g) {
4
+ import { parseFieldValue as le, dataIndexToStr as ue, isEqualCustom as fe } from "../utils.mjs";
5
+ import { isArray as N, isEqualWith as ge } from "lodash-unified";
6
+ import { isDef as Q } from "../../utils/index.mjs";
7
+ import { useLocale as pe } from "../../config-provider/hooks/use-locale.mjs";
8
+ import { useNamespace as de } from "../../config-provider/hooks/use-namespace.mjs";
9
+ const z = 1, L = 10;
10
+ function me(g) {
10
11
  const l = {};
11
- return g && (g === !0 ? (l.current = S, l.pageSize = L) : (l.current = g.defaultCurrent || S, l.pageSize = g.defaultPageSize || L)), l;
12
+ return g && (g === !0 ? (l.current = z, l.pageSize = L) : (l.current = g.defaultCurrent || z, l.pageSize = g.defaultPageSize || L)), l;
12
13
  }
13
- const we = ({
14
+ const xe = ({
14
15
  manual: g = !1,
15
16
  request: l,
16
17
  defaultParams: v = {},
17
18
  defaultData: y = [],
18
- formatParams: D,
19
- paramsValueTypeMap: R,
20
- resetFieldsIgnores: I,
19
+ formatParams: R,
20
+ paramsValueTypeMap: I,
21
+ resetFieldsIgnores: V,
21
22
  filterFields: U,
22
23
  sortFields: B,
23
24
  namespace: K = "ap-table",
24
25
  pagination: p = {
25
- defaultCurrent: S,
26
+ defaultCurrent: z,
26
27
  defaultPageSize: L,
27
28
  showLessItems: !1,
28
29
  showTotal: !0
29
30
  }
30
31
  }) => {
31
- let b = 0, s = {};
32
- const M = p ?? {}, $ = (e) => D ? D(e) : e, z = oe(), c = q(de(p)), {
33
- getColumnSFConfig: G,
34
- setSF: J,
35
- clearAll: Q,
36
- sortedInfo: W,
37
- filteredInfo: Z
32
+ let E = 0, s = {};
33
+ const d = p ?? {}, M = (e) => R ? R(e) : e, T = ne(), i = J(me(p)), {
34
+ getColumnSFConfig: $,
35
+ setSF: G,
36
+ clearAll: W,
37
+ sortedInfo: Z,
38
+ filteredInfo: H
38
39
  } = ce(), {
39
- t: T
40
- } = ge(), {
40
+ t: w
41
+ } = pe(), {
41
42
  b: P
42
- } = pe(K), o = q({
43
+ } = de(K), o = J({
43
44
  total: y.length,
44
45
  records: y,
45
46
  loading: !1
46
- }), F = () => {
47
+ }), C = () => {
47
48
  var e, t;
48
- return ((t = (e = z.value) == null ? void 0 : e.apForm) == null ? void 0 : t.getFieldsValueTransformed(!0)) || {};
49
- }, V = async (e) => {
49
+ return ((t = (e = T.value) == null ? void 0 : e.apForm) == null ? void 0 : t.getFieldsValueTransformed(!0)) || {};
50
+ }, O = async (e) => {
50
51
  var n;
51
- const t = $(e), r = Date.now();
52
- b = r, o.loading = !0;
52
+ const t = M(e), r = Date.now();
53
+ E = r, o.loading = !0;
53
54
  try {
54
55
  const a = await l({
55
- ...h(v),
56
+ ...S(v),
56
57
  ...t
57
58
  });
58
- b === r && (o.total = a.total || ((n = a.data) == null ? void 0 : n.length) || 0, o.records = [...a.data || []]);
59
+ E === r && (o.total = a.total || ((n = a.data) == null ? void 0 : n.length) || 0, o.records = [...a.data || []]);
59
60
  } catch {
60
- b === r && (o.records = [], o.total = 0);
61
+ E === r && (o.records = [], o.total = 0);
61
62
  } finally {
62
63
  o.loading = !1;
63
64
  }
64
- }, O = (e) => {
65
+ }, _ = (e) => {
65
66
  const t = {};
66
67
  return Object.entries(e).forEach(([r, n]) => {
67
- if (t[r] = n, R && n) {
68
- const a = R[r];
69
- a && (t[r] = ie(a, n));
68
+ if (t[r] = n, I && n) {
69
+ const a = I[r];
70
+ a && (t[r] = le(a, n));
70
71
  }
71
72
  }), t;
72
- }, H = async (e) => {
73
- var n, a, u, f, d;
74
- const t = F(), r = {};
75
- Object.entries(t).forEach(([m, x]) => {
76
- I && I.indexOf(m) > -1 && (r[m] = x);
77
- }), await ((a = (n = z.value) == null ? void 0 : n.apForm) == null ? void 0 : a.resetFields()), (d = (f = (u = z.value) == null ? void 0 : u.apForm) == null ? void 0 : f.setFieldsValue) == null || d.call(f, r), ne(() => {
73
+ }, X = async (e) => {
74
+ var n, a, u, f, m;
75
+ const t = C(), r = {};
76
+ Object.entries(t).forEach(([h, x]) => {
77
+ V && V.indexOf(h) > -1 && (r[h] = x);
78
+ }), await ((a = (n = T.value) == null ? void 0 : n.apForm) == null ? void 0 : a.resetFields()), (m = (f = (u = T.value) == null ? void 0 : u.apForm) == null ? void 0 : f.setFieldsValue) == null || m.call(f, r), ae(() => {
78
79
  e == null || e();
79
80
  });
80
- }, w = (e) => {
81
+ }, F = (e) => {
81
82
  s = e;
82
- const t = O(e);
83
- V(t);
84
- }, X = (e) => {
85
- w({
83
+ const t = _(e);
84
+ O(t);
85
+ }, Y = (e) => {
86
+ F({
86
87
  ...s,
87
88
  ...e
88
89
  });
89
- }, E = () => {
90
- const e = F();
91
- p && (c.current = S), w({
90
+ }, A = () => {
91
+ const e = C();
92
+ p && (i.current = z), F({
92
93
  ...e,
93
94
  filter: s.filter,
94
95
  sort: s.sort,
95
- current: p ? S : void 0,
96
- pageSize: p ? s.pageSize || c.pageSize : void 0
96
+ current: p ? z : void 0,
97
+ pageSize: p ? s.pageSize || i.pageSize : void 0
97
98
  });
98
- }, Y = () => {
99
- Q(), s.sort = {}, s.filter = {}, H(E);
100
- }, _ = () => {
101
- w(s);
102
- }, k = (e) => {
99
+ }, k = () => {
100
+ W(), s.sort = {}, s.filter = {}, X(A);
101
+ }, j = () => {
102
+ F(s);
103
+ }, ee = (e) => {
103
104
  if (!p)
104
- _();
105
+ j();
105
106
  else {
106
107
  const {
107
108
  current: t,
108
109
  pageSize: r
109
- } = c, n = o.total - e, a = Math.ceil(n / r), u = t > a ? a : t;
110
- X({
110
+ } = i, n = o.total - e, a = Math.ceil(n / r), u = t > a ? a : t;
111
+ Y({
111
112
  current: u > 0 ? u : 1
112
113
  });
113
114
  }
114
- }, j = (e, t, r) => {
115
- var m, x;
116
- const n = F();
117
- c.current = e.current, c.pageSize = e.pageSize, J(t, r);
115
+ }, q = (e, t, r) => {
116
+ var h, x;
117
+ const n = C();
118
+ i.current = e.current, i.pageSize = e.pageSize, G(t, r);
118
119
  const a = N(r) ? [...r] : [r], u = {};
119
- for (const i of a)
120
- (m = h(B)) != null && m.includes(i.columnKey || i.field) && i.order && (u[le(i.columnKey || i.field)] = i.order);
120
+ for (const c of a)
121
+ (h = S(B)) != null && h.includes(c.columnKey || c.field) && c.order && (u[ue(c.columnKey || c.field)] = c.order);
121
122
  const f = {};
122
- for (const i of Object.keys(t))
123
- (x = h(U)) != null && x.includes(i) && t[i] && (f[i] = t[i]);
124
- const d = {
123
+ for (const c of Object.keys(t))
124
+ (x = S(U)) != null && x.includes(c) && t[c] && (f[c] = t[c]);
125
+ const m = {
125
126
  ...n,
126
127
  filter: f,
127
128
  sort: u,
128
129
  current: e.current,
129
130
  pageSize: e.pageSize
130
131
  };
131
- fe(s, d, ue) || w(d);
132
+ ge(s, m, fe) || F(m);
132
133
  };
133
- ae(() => {
134
- const e = F(), {
134
+ se(() => {
135
+ const e = C(), {
135
136
  current: t,
136
137
  pageSize: r
137
- } = c;
138
+ } = i;
138
139
  if (s = {
139
140
  current: t,
140
141
  pageSize: r,
@@ -142,75 +143,75 @@ const we = ({
142
143
  sort: {},
143
144
  ...e
144
145
  }, !g) {
145
- const n = O(s);
146
- V(n);
146
+ const n = _(s);
147
+ O(n);
147
148
  }
148
- }), se(() => h(v), () => {
149
- E();
149
+ }), ie(() => S(v), () => {
150
+ A();
150
151
  }, {
151
152
  deep: !0
152
153
  });
153
- const ee = A(() => {
154
+ const te = D(() => {
154
155
  if (o.total === 0)
155
156
  return "-";
156
157
  const {
157
158
  current: e,
158
159
  pageSize: t
159
- } = c;
160
+ } = i;
160
161
  return `${e}/${Math.ceil(o.total / t)}`;
161
162
  });
162
- function te(e) {
163
+ function re(e) {
163
164
  N(e) && (o.records = e, o.total = e.length);
164
165
  }
165
- const re = A(() => {
166
+ const oe = D(() => {
166
167
  const {
167
168
  showLessItems: e,
168
169
  showTotal: t
169
- } = M;
170
+ } = d;
170
171
  return {
171
172
  loading: o.loading,
172
173
  pagination: {
173
- current: c.current,
174
- pageSize: c.pageSize,
174
+ current: i.current,
175
+ pageSize: i.pageSize,
175
176
  total: o.total,
176
- showSizeChanger: !e,
177
- showQuickJumper: !e,
177
+ showSizeChanger: Q(d.showSizeChanger) ? d.showSizeChanger : !e,
178
+ showQuickJumper: Q(d.showQuickJumper) ? d.showQuickJumper : !e,
178
179
  showLessItems: e,
179
180
  size: "default",
180
- showTotal: t ? (r) => C("span", {
181
+ showTotal: t ? (r) => b("span", {
181
182
  class: P("pagination-total-wrapper")
182
- }, [T("ap.apTable.pagination.totalLeftPrefix"), " ", C("span", {
183
+ }, [w("ap.apTable.pagination.totalLeftPrefix"), " ", b("span", {
183
184
  class: P("pagination-count-text")
184
- }, [r]), " ", T("ap.apTable.pagination.totalLeftSuffix"), C("span", {
185
+ }, [r]), " ", w("ap.apTable.pagination.totalLeftSuffix"), b("span", {
185
186
  class: P("pagination--total-right")
186
- }, [T("ap.apTable.pagination.totalRightPrefix"), " ", C("span", {
187
+ }, [w("ap.apTable.pagination.totalRightPrefix"), " ", b("span", {
187
188
  class: P("pagination-count-text")
188
- }, [h(ee)]), " ", T("ap.apTable.pagination.totalRightSuffix")])]) : void 0
189
+ }, [S(te)]), " ", w("ap.apTable.pagination.totalRightSuffix")])]) : void 0
189
190
  },
190
- onChange: j,
191
+ onChange: q,
191
192
  dataSource: o.records
192
193
  };
193
194
  });
194
195
  return {
195
- formRef: z,
196
- submit: E,
197
- reset: Y,
198
- refresh: _,
199
- refreshByDelete: k,
196
+ formRef: T,
197
+ submit: A,
198
+ reset: k,
199
+ refresh: j,
200
+ refreshByDelete: ee,
200
201
  data: o,
201
- current: c.current,
202
- pageSize: c.pageSize,
203
- handleTableChange: j,
204
- tableProps: re,
205
- dataSource: A(() => o.records),
206
- setDataSource: te,
207
- getColumnSFConfig: G,
208
- sortedInfo: W,
209
- filteredInfo: Z
202
+ current: i.current,
203
+ pageSize: i.pageSize,
204
+ handleTableChange: q,
205
+ tableProps: oe,
206
+ dataSource: D(() => o.records),
207
+ setDataSource: re,
208
+ getColumnSFConfig: $,
209
+ sortedInfo: Z,
210
+ filteredInfo: H
210
211
  };
211
212
  };
212
213
  export {
213
- S as DEFAULT_CURRENT,
214
+ z as DEFAULT_CURRENT,
214
215
  L as DEFAULT_PAGE_SIZE,
215
- we as useTablePaging
216
+ xe as useTablePaging
216
217
  };
@@ -226,6 +226,14 @@ export type ApTablePaginationConfig = {
226
226
  * 用于显示数据总量和当前数据顺序
227
227
  */
228
228
  showTotal?: boolean;
229
+ /**
230
+ * 是否显示尺寸切换器
231
+ */
232
+ showSizeChanger?: boolean;
233
+ /**
234
+ * 是否显示快速跳转
235
+ */
236
+ showQuickJumper?: boolean;
229
237
  };
230
238
  export type ApTableProps<RecordType = any, ParamsType = any> = Omit<TableProps<RecordType>, 'columns' | 'pagination' | 'dataSource' | 'size' | 'rowSelection'> & {
231
239
  /**
@@ -1,5 +1,5 @@
1
1
  import { ApLadderLabelValue, ApLadderProps, ApLadderSlots } from './interface';
2
- import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType, CSSProperties, StyleValue, ComponentProvideOptions } from 'vue';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType, CSSProperties, ComponentProvideOptions } from 'vue';
3
3
  import { VueTypeValidableDef } from '../../../node_modules/vue-types';
4
4
  import { TriggerType } from '@aplus-frontend/antdv/es/tooltip/abstractTooltipProps';
5
5
  import { TooltipPlacement, AdjustOverflow } from '@aplus-frontend/antdv/es/tooltip';
@@ -9,18 +9,13 @@ import { AlignType, BuildInPlacements } from '@aplus-frontend/antdv/es/vc-trigge
9
9
  declare function __VLS_template(): {
10
10
  attrs: Partial<{}>;
11
11
  slots: Readonly<ApLadderSlots> & ApLadderSlots;
12
- refs: {
13
- wrapperRef: HTMLDivElement;
14
- valueRefs: HTMLSpanElement;
15
- };
12
+ refs: {};
16
13
  rootEl: HTMLDivElement;
17
14
  };
18
15
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
19
16
  declare const __VLS_component: DefineComponent<ApLadderProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApLadderProps> & Readonly<{}>, {
20
17
  layout: "vertical" | "horizontal";
21
18
  tooltip: boolean;
22
- major: string;
23
- minor: string;
24
19
  labelAlign: "left" | "right";
25
20
  tooltipProps: Partial<Pick<Partial< ExtractPropTypes<{
26
21
  title: VueTypeValidableDef<any>;
@@ -97,21 +92,10 @@ declare const __VLS_component: DefineComponent<ApLadderProps, {}, {}, {}, {}, Co
97
92
  default: boolean;
98
93
  };
99
94
  }>>, "title" | "placement" | "color" | "mouseEnterDelay" | "trigger" | "getPopupContainer" | "align" | "overlayStyle" | "overlayInnerStyle" | "overlayClassName" | "mouseLeaveDelay" | "arrowPointAtCenter" | "arrow" | "autoAdjustOverflow" | "destroyTooltipOnHide">>;
95
+ labelValues: Array<ApLadderLabelValue>;
100
96
  majorColor: string;
101
- majorStyles: string | false | CSSProperties | StyleValue[] | null;
102
97
  minorColor: string;
103
- minorStyles: string | false | CSSProperties | StyleValue[] | null;
104
- labelValues: Array<ApLadderLabelValue>;
105
- labelStyles: string | false | CSSProperties | StyleValue[] | null;
106
- valueStyles: string | false | CSSProperties | StyleValue[] | null;
107
- linkStyles: string | false | CSSProperties | StyleValue[] | null;
108
- unitStyles: string | false | CSSProperties | StyleValue[] | null;
109
- tooltipLabelStyles: string | false | CSSProperties | StyleValue[] | null;
110
- tooltipValueStyles: string | false | CSSProperties | StyleValue[] | null;
111
- }, {}, {}, {}, string, ComponentProvideOptions, false, {
112
- wrapperRef: HTMLDivElement;
113
- valueRefs: HTMLSpanElement;
114
- }, HTMLDivElement>;
98
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
115
99
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
116
100
  export default _default;
117
101
  type __VLS_WithTemplateSlots<T, S> = T & {