@aplus-frontend/ui 0.1.25 → 0.1.27

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 (151) hide show
  1. package/es/src/ap-download/ap-download.vue.d.ts +7 -3
  2. package/es/src/ap-download/ap-download.vue.mjs +50 -35
  3. package/es/src/ap-download/interface.d.ts +3 -11
  4. package/es/src/ap-download/style/ap-download.css +3 -0
  5. package/es/src/ap-form/ap-form-item.vue.mjs +26 -26
  6. package/es/src/ap-table/ap-table.vue.mjs +231 -183
  7. package/es/src/ap-table/components/interface.d.ts +33 -1
  8. package/es/src/ap-table/components/setting/images/icon_carst_down.svg.mjs +4 -0
  9. package/es/src/ap-table/components/setting/images/icon_fill_right.svg.mjs +4 -0
  10. package/es/src/ap-table/components/setting/modal/index.vue.d.ts +28 -0
  11. package/es/src/ap-table/components/setting/modal/index.vue.mjs +4 -0
  12. package/es/src/ap-table/components/setting/modal/index.vue2.mjs +152 -0
  13. package/es/src/ap-table/components/setting/select-group/index.vue.d.ts +13 -0
  14. package/es/src/ap-table/components/setting/select-group/index.vue.mjs +4 -0
  15. package/es/src/ap-table/components/setting/select-group/index.vue2.mjs +96 -0
  16. package/es/src/ap-table/components/setting/sortable/index.vue.d.ts +13 -0
  17. package/es/src/ap-table/components/setting/sortable/index.vue.mjs +4 -0
  18. package/es/src/ap-table/components/setting/sortable/index.vue2.mjs +51 -0
  19. package/es/src/ap-table/components/setting/sortable/item.vue.d.ts +20 -0
  20. package/es/src/ap-table/components/setting/sortable/item.vue.mjs +4 -0
  21. package/es/src/ap-table/components/setting/sortable/item.vue2.mjs +140 -0
  22. package/es/src/ap-table/components/setting/sorter/context.d.ts +11 -0
  23. package/es/src/ap-table/components/setting/sorter/context.mjs +20 -0
  24. package/es/src/ap-table/components/setting/sorter/index.vue.d.ts +18 -0
  25. package/es/src/ap-table/components/setting/sorter/index.vue.mjs +4 -0
  26. package/es/src/ap-table/components/setting/sorter/index.vue2.mjs +199 -0
  27. package/es/src/ap-table/components/setting/tree-select/index.vue.d.ts +13 -0
  28. package/es/src/ap-table/components/setting/tree-select/index.vue.mjs +4 -0
  29. package/es/src/ap-table/components/setting/tree-select/index.vue2.mjs +75 -0
  30. package/es/src/ap-table/components/setting/utils.d.ts +17 -0
  31. package/es/src/ap-table/components/setting/utils.mjs +48 -0
  32. package/es/src/ap-table/components/style/setting/modal.css +39 -0
  33. package/es/src/ap-table/components/style/setting/select-group.css +7 -0
  34. package/es/src/ap-table/components/style/setting/sortable-item-meta.css +50 -0
  35. package/es/src/ap-table/components/style/setting/sortable-item.css +3 -0
  36. package/es/src/ap-table/components/style/setting/sorter.css +26 -0
  37. package/es/src/ap-table/constants.d.ts +31 -8
  38. package/es/src/ap-table/constants.mjs +41 -53
  39. package/es/src/ap-table/context.d.ts +31 -0
  40. package/es/src/ap-table/context.mjs +20 -0
  41. package/es/src/ap-table/hooks/use-table-column-state.d.ts +18 -0
  42. package/es/src/ap-table/hooks/use-table-column-state.mjs +46 -0
  43. package/es/src/ap-table/hooks/use-table-content-height.mjs +19 -19
  44. package/es/src/ap-table/hooks/use-table-paging.d.ts +1 -0
  45. package/es/src/ap-table/hooks/use-table-paging.mjs +87 -82
  46. package/es/src/ap-table/interface.d.ts +51 -1
  47. package/es/src/ap-table/style/ap-table.css +29 -1
  48. package/es/src/ap-table/utils.d.ts +1 -1
  49. package/es/src/ap-table/utils.mjs +82 -82
  50. package/es/src/ap-upload/components/MultipleFile.vue2.mjs +91 -89
  51. package/es/src/ap-upload/components/Picture.vue2.mjs +114 -112
  52. package/es/src/ap-upload/components/SingleFile.vue2.mjs +10 -7
  53. package/es/src/business/ap-attachment/ApAttachment.d.ts +1 -1
  54. package/es/src/business/ap-attachment/ApAttachment.mjs +45 -42
  55. package/es/src/business/ap-attachment/style.css +2 -0
  56. package/es/src/business/ap-ladder/ApLadder.vue2.mjs +114 -84
  57. package/es/src/business/ap-ladder/interface.d.ts +42 -0
  58. package/es/src/business/ap-ladder/interface.mjs +10 -0
  59. package/es/src/business/hooks/usePageListApTable.d.ts +8 -3
  60. package/es/src/business/hooks/usePageListApTable.mjs +27 -17
  61. package/es/src/business/hooks/useTableRefresh.d.ts +3 -4
  62. package/es/src/business/hooks/useTableRefresh.mjs +9 -9
  63. package/es/src/business/index.d.ts +4 -4
  64. package/es/src/editable-table/interface.d.ts +1 -1
  65. package/es/src/locale/lang/en.mjs +14 -0
  66. package/es/src/locale/lang/zh-cn.mjs +14 -0
  67. package/es/src/theme/ap-attachment/ap-attachment.css +2 -0
  68. package/es/src/theme/ap-download/ap-download.css +3 -0
  69. package/es/src/theme/ap-table/ap-table.css +29 -1
  70. package/es/src/theme/ap-table/setting/modal.css +39 -0
  71. package/es/src/theme/ap-table/setting/select-group.css +7 -0
  72. package/es/src/theme/ap-table/setting/sortable-item-meta.css +50 -0
  73. package/es/src/theme/ap-table/setting/sortable-item.css +3 -0
  74. package/es/src/theme/ap-table/setting/sorter.css +26 -0
  75. package/es/src/theme/css-var/index.mjs +22 -12
  76. package/lib/src/ap-download/ap-download.vue.d.ts +7 -3
  77. package/lib/src/ap-download/ap-download.vue.js +1 -1
  78. package/lib/src/ap-download/interface.d.ts +3 -11
  79. package/lib/src/ap-download/style/ap-download.css +3 -0
  80. package/lib/src/ap-form/ap-form-item.vue.js +1 -1
  81. package/lib/src/ap-table/ap-table.vue.js +1 -1
  82. package/lib/src/ap-table/components/interface.d.ts +33 -1
  83. package/lib/src/ap-table/components/setting/images/icon_carst_down.svg.js +1 -0
  84. package/lib/src/ap-table/components/setting/images/icon_fill_right.svg.js +1 -0
  85. package/lib/src/ap-table/components/setting/modal/index.vue.d.ts +28 -0
  86. package/lib/src/ap-table/components/setting/modal/index.vue.js +1 -0
  87. package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -0
  88. package/lib/src/ap-table/components/setting/select-group/index.vue.d.ts +13 -0
  89. package/lib/src/ap-table/components/setting/select-group/index.vue.js +1 -0
  90. package/lib/src/ap-table/components/setting/select-group/index.vue2.js +1 -0
  91. package/lib/src/ap-table/components/setting/sortable/index.vue.d.ts +13 -0
  92. package/lib/src/ap-table/components/setting/sortable/index.vue.js +1 -0
  93. package/lib/src/ap-table/components/setting/sortable/index.vue2.js +1 -0
  94. package/lib/src/ap-table/components/setting/sortable/item.vue.d.ts +20 -0
  95. package/lib/src/ap-table/components/setting/sortable/item.vue.js +1 -0
  96. package/lib/src/ap-table/components/setting/sortable/item.vue2.js +1 -0
  97. package/lib/src/ap-table/components/setting/sorter/context.d.ts +11 -0
  98. package/lib/src/ap-table/components/setting/sorter/context.js +1 -0
  99. package/lib/src/ap-table/components/setting/sorter/index.vue.d.ts +18 -0
  100. package/lib/src/ap-table/components/setting/sorter/index.vue.js +1 -0
  101. package/lib/src/ap-table/components/setting/sorter/index.vue2.js +1 -0
  102. package/lib/src/ap-table/components/setting/tree-select/index.vue.d.ts +13 -0
  103. package/lib/src/ap-table/components/setting/tree-select/index.vue.js +1 -0
  104. package/lib/src/ap-table/components/setting/tree-select/index.vue2.js +1 -0
  105. package/lib/src/ap-table/components/setting/utils.d.ts +17 -0
  106. package/lib/src/ap-table/components/setting/utils.js +1 -0
  107. package/lib/src/ap-table/components/style/setting/modal.css +39 -0
  108. package/lib/src/ap-table/components/style/setting/select-group.css +7 -0
  109. package/lib/src/ap-table/components/style/setting/sortable-item-meta.css +50 -0
  110. package/lib/src/ap-table/components/style/setting/sortable-item.css +3 -0
  111. package/lib/src/ap-table/components/style/setting/sorter.css +26 -0
  112. package/lib/src/ap-table/constants.d.ts +31 -8
  113. package/lib/src/ap-table/constants.js +1 -1
  114. package/lib/src/ap-table/context.d.ts +31 -0
  115. package/lib/src/ap-table/context.js +1 -0
  116. package/lib/src/ap-table/hooks/use-table-column-state.d.ts +18 -0
  117. package/lib/src/ap-table/hooks/use-table-column-state.js +1 -0
  118. package/lib/src/ap-table/hooks/use-table-content-height.js +1 -1
  119. package/lib/src/ap-table/hooks/use-table-paging.d.ts +1 -0
  120. package/lib/src/ap-table/hooks/use-table-paging.js +1 -1
  121. package/lib/src/ap-table/interface.d.ts +51 -1
  122. package/lib/src/ap-table/style/ap-table.css +29 -1
  123. package/lib/src/ap-table/utils.d.ts +1 -1
  124. package/lib/src/ap-table/utils.js +1 -1
  125. package/lib/src/ap-upload/components/MultipleFile.vue2.js +1 -1
  126. package/lib/src/ap-upload/components/Picture.vue2.js +1 -1
  127. package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
  128. package/lib/src/business/ap-attachment/ApAttachment.d.ts +1 -1
  129. package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
  130. package/lib/src/business/ap-attachment/style.css +2 -0
  131. package/lib/src/business/ap-ladder/ApLadder.vue2.js +1 -1
  132. package/lib/src/business/ap-ladder/interface.d.ts +42 -0
  133. package/lib/src/business/ap-ladder/interface.js +1 -0
  134. package/lib/src/business/hooks/usePageListApTable.d.ts +8 -3
  135. package/lib/src/business/hooks/usePageListApTable.js +1 -1
  136. package/lib/src/business/hooks/useTableRefresh.d.ts +3 -4
  137. package/lib/src/business/hooks/useTableRefresh.js +1 -1
  138. package/lib/src/business/index.d.ts +4 -4
  139. package/lib/src/editable-table/interface.d.ts +1 -1
  140. package/lib/src/locale/lang/en.js +1 -1
  141. package/lib/src/locale/lang/zh-cn.js +1 -1
  142. package/lib/src/theme/ap-attachment/ap-attachment.css +2 -0
  143. package/lib/src/theme/ap-download/ap-download.css +3 -0
  144. package/lib/src/theme/ap-table/ap-table.css +29 -1
  145. package/lib/src/theme/ap-table/setting/modal.css +39 -0
  146. package/lib/src/theme/ap-table/setting/select-group.css +7 -0
  147. package/lib/src/theme/ap-table/setting/sortable-item-meta.css +50 -0
  148. package/lib/src/theme/ap-table/setting/sortable-item.css +3 -0
  149. package/lib/src/theme/ap-table/setting/sorter.css +26 -0
  150. package/lib/src/theme/css-var/index.js +1 -1
  151. package/package.json +3 -2
@@ -1,10 +1,11 @@
1
- import { defineComponent as O, useSlots as T, ref as W, computed as d, unref as l, onMounted as q, openBlock as t, createElementBlock as s, normalizeClass as a, createBlock as P, normalizeProps as S, mergeProps as _, createSlots as V, withCtx as m, Fragment as c, createElementVNode as u, normalizeStyle as p, toDisplayString as i, renderSlot as $, createCommentVNode as C, renderList as E } from "vue";
2
- import { Tooltip as M } from "ant-design-vue";
1
+ import { defineComponent as q, useSlots as H, ref as R, computed as h, unref as l, onMounted as J, openBlock as t, createElementBlock as r, normalizeClass as u, createBlock as $, normalizeProps as w, mergeProps as E, createSlots as M, withCtx as b, Fragment as y, createElementVNode as p, normalizeStyle as m, toDisplayString as i, renderSlot as N, createCommentVNode as f, renderList as z, createTextVNode as K } from "vue";
2
+ import { Tooltip as O } from "ant-design-vue";
3
3
  import "../../config-provider/index.mjs";
4
+ import { locales as Q } from "./interface.mjs";
4
5
  import "./style.css";
5
- import { useNamespace as H } from "../../config-provider/hooks/use-namespace.mjs";
6
- import { useGlobalConfig as J } from "../../config-provider/hooks/use-global-config.mjs";
7
- const K = { key: 0 }, Q = { key: 1 }, R = ["onClick"], U = { key: 0 }, X = { key: 1 }, re = /* @__PURE__ */ O({
6
+ import { useNamespace as U } from "../../config-provider/hooks/use-namespace.mjs";
7
+ import { useGlobalConfig as X } from "../../config-provider/hooks/use-global-config.mjs";
8
+ const Y = { key: 1 }, Z = { key: 0 }, x = { key: 1 }, ee = { key: 0 }, oe = ["onClick"], te = { key: 0 }, re = { key: 1 }, le = { key: 0 }, se = { key: 1 }, me = /* @__PURE__ */ q({
8
9
  name: "ApLadder",
9
10
  __name: "ApLadder",
10
11
  props: {
@@ -33,114 +34,143 @@ const K = { key: 0 }, Q = { key: 1 }, R = ["onClick"], U = { key: 0 }, X = { key
33
34
  trigger: "hover"
34
35
  }) }
35
36
  },
36
- setup(w) {
37
- const y = T(), r = w, { b: A, e: n, m: B } = H("ap-ladder"), N = J("uiMode", "aplus"), v = `ap-ladder-${Math.floor(Math.random() * 1e7)}`, L = n("ellipsis"), h = W(!1), z = d(() => r.major || r.minor), D = d(() => r.labelValues.length > 0), b = d(() => r.majorColor ? {
38
- color: `${r.majorColor}`
39
- } : {}), j = d(() => r.minorColor ? {
40
- color: `${r.minorColor}`
41
- } : {}), f = (e) => e == null ? "--" : typeof e == "string" ? e || "--" : typeof e == "number" ? e.toFixed(2) : "--", F = () => {
42
- const e = document.getElementById(v);
43
- if (!e)
37
+ setup(A) {
38
+ const v = H(), s = A, { b: B, e: n, m: L } = U("ap-ladder"), F = X("uiMode", "aplus"), _ = `ap-ladder-${Math.floor(Math.random() * 1e7)}`, W = n("ellipsis"), k = R(!1), D = h(() => s.labelValues.length === 0), T = h(() => s.labelValues.length > 0), g = h(() => s.majorColor ? {
39
+ color: `${s.majorColor}`
40
+ } : {}), S = h(() => s.minorColor ? {
41
+ color: `${s.minorColor}`
42
+ } : {}), C = (o) => o == null || typeof o == "string" && o.trim() === "", c = (o, a = {}) => {
43
+ const e = {
44
+ rawValue: a.rawValue,
45
+ precision: a.precision === void 0 ? 2 : a.precision,
46
+ thousand: a.thousand,
47
+ thousandSeparator: a.thousandSeparator || ",",
48
+ currency: a.currency,
49
+ percent: a.percent
50
+ };
51
+ return C(o) ? "--" : e.rawValue ? o : typeof o == "number" ? e.percent ? `${o.toFixed(e.precision)}%` : e.currency ? o.toLocaleString(Q[e.currency], {
52
+ style: "currency",
53
+ currency: e.currency
54
+ }) : e.thousand ? o.toFixed(e.precision).replace(
55
+ /(\d)(?=(\d{3})+(?!\d))/g,
56
+ `$1${e.thousandSeparator}`
57
+ ) : o.toFixed(e.precision) : o;
58
+ }, G = () => {
59
+ const o = document.getElementById(_);
60
+ if (!o)
44
61
  return;
45
- e.querySelectorAll(`.${L}`).forEach((o) => {
46
- o.clientWidth < o.scrollWidth && (h.value = !0);
62
+ const a = o.querySelectorAll(`.${W}`);
63
+ new ResizeObserver((d) => {
64
+ d.forEach((j) => {
65
+ j.target === o && (k.value = !1, a.forEach((P) => {
66
+ P.clientWidth < P.scrollWidth && (k.value = !0);
67
+ }));
68
+ });
69
+ }).observe(o), k.value = !1, a.forEach((d) => {
70
+ d.clientWidth < d.scrollWidth && (k.value = !0);
47
71
  });
48
- }, g = d(() => y.title ? !0 : r.tooltip && l(h)), G = (e) => {
49
- e && window.open(e, "_blank");
72
+ }, V = h(() => v.title ? !0 : s.tooltip && l(k)), I = (o) => {
73
+ o && window.open(o, "_blank");
50
74
  };
51
- return q(() => {
52
- F();
53
- }), (e, I) => (t(), s("div", {
54
- id: v,
55
- class: a([l(A)(), `${l(B)(l(N))}`])
75
+ return J(() => {
76
+ G();
77
+ }), (o, a) => (t(), r("div", {
78
+ id: _,
79
+ class: u([l(B)(), `${l(L)(l(F))}`])
56
80
  }, [
57
- z.value ? (t(), P(l(M), S(_({ key: 0 }, { ...r.tooltipProps })), V({
58
- default: m(() => [
59
- r.layout === "vertical" ? (t(), s(c, { key: 0 }, [
60
- u("div", {
61
- class: a([l(n)("major"), l(n)("ellipsis")]),
62
- style: p(b.value)
63
- }, i(e.major || "--"), 7),
64
- u("div", {
65
- class: a([l(n)("minor"), l(n)("ellipsis")]),
66
- style: p(j.value)
67
- }, i(e.minor || "--"), 7)
68
- ], 64)) : (t(), s("div", {
69
- key: 1,
70
- class: a(l(n)("ellipsis"))
71
- }, [
72
- u("span", {
73
- class: a([l(n)("major")]),
74
- style: p(b.value)
75
- }, i(e.major || "--"), 7),
76
- u("span", {
77
- class: a([l(n)("minor")]),
78
- style: p(j.value)
79
- }, i(e.minor || "--"), 7)
80
- ], 2))
81
+ D.value ? (t(), $(l(O), w(E({ key: 0 }, { ...s.tooltipProps })), M({
82
+ default: b(() => [
83
+ !C(o.major) || !C(o.minor) ? (t(), r(y, { key: 0 }, [
84
+ s.layout === "vertical" ? (t(), r(y, { key: 0 }, [
85
+ p("div", {
86
+ class: u([l(n)("major"), l(n)("ellipsis")]),
87
+ style: m(g.value)
88
+ }, i(c(o.major)), 7),
89
+ p("div", {
90
+ class: u([l(n)("minor"), l(n)("ellipsis")]),
91
+ style: m(S.value)
92
+ }, i(c(o.minor)), 7)
93
+ ], 64)) : (t(), r("div", {
94
+ key: 1,
95
+ class: u(l(n)("ellipsis"))
96
+ }, [
97
+ p("span", {
98
+ class: u([l(n)("major")]),
99
+ style: m(g.value)
100
+ }, i(c(o.major)), 7),
101
+ p("span", {
102
+ class: u([l(n)("minor")]),
103
+ style: m(S.value)
104
+ }, i(c(o.minor)), 7)
105
+ ], 2))
106
+ ], 64)) : (t(), r("div", Y, i("--")))
81
107
  ]),
82
108
  _: 2
83
109
  }, [
84
- g.value ? {
110
+ V.value ? {
85
111
  name: "title",
86
- fn: m(() => [
87
- y.title ? $(e.$slots, "title", { key: 0 }) : (t(), s(c, { key: 1 }, [
88
- r.tooltipProps.title ? (t(), s("div", K, i(r.tooltipProps.title), 1)) : (t(), s("div", Q, [
89
- u("div", null, i(e.major || "--"), 1),
90
- u("div", null, i(e.minor || "--"), 1)
112
+ fn: b(() => [
113
+ v.title ? N(o.$slots, "title", { key: 0 }) : (t(), r(y, { key: 1 }, [
114
+ s.tooltipProps.title ? (t(), r("div", Z, i(s.tooltipProps.title), 1)) : (t(), r("div", x, [
115
+ p("div", null, i(c(o.major)), 1),
116
+ p("div", null, i(c(o.minor)), 1)
91
117
  ]))
92
118
  ], 64))
93
119
  ]),
94
120
  key: "0"
95
121
  } : void 0
96
- ]), 1040)) : C("", !0),
97
- D.value ? (t(), P(l(M), S(_({ key: 1 }, { ...r.tooltipProps })), V({
98
- default: m(() => [
99
- (t(!0), s(c, null, E(r.labelValues, (o, k) => (t(), s("div", {
100
- key: k,
101
- class: a([l(n)("ellipsis")])
122
+ ]), 1040)) : f("", !0),
123
+ T.value ? (t(), $(l(O), w(E({ key: 1 }, { ...s.tooltipProps })), M({
124
+ default: b(() => [
125
+ (t(!0), r(y, null, z(s.labelValues, (e, d) => (t(), r("div", {
126
+ key: d,
127
+ class: u([l(n)("ellipsis")])
102
128
  }, [
103
- u("span", {
104
- class: a(l(n)("label")),
105
- style: p(o.labelColor ? { color: o.labelColor } : void 0)
106
- }, i(o.label) + ":", 7),
107
- o.link ? (t(), s("span", {
108
- key: 0,
109
- class: a(l(n)("link")),
110
- style: p(o.linkColor ? { color: o.linkColor } : void 0),
111
- onClick: (Y) => G(o.link)
112
- }, i(f(o.value)), 15, R)) : (t(), s("span", {
129
+ p("span", {
130
+ class: u(l(n)("label")),
131
+ style: m(e.labelColor ? { color: e.labelColor } : void 0)
132
+ }, [
133
+ K(i(e.label), 1),
134
+ e.label ? (t(), r("span", ee, ":")) : f("", !0)
135
+ ], 6),
136
+ C(e.link) ? (t(), r("span", {
113
137
  key: 1,
114
- class: a(l(n)("value")),
115
- style: p(o.valueColor ? { color: o.valueColor } : void 0)
116
- }, i(f(o.value)), 7)),
117
- o.unit ? (t(), s("span", {
138
+ class: u(l(n)("value")),
139
+ style: m(e.valueColor ? { color: e.valueColor } : void 0)
140
+ }, i(c(e.value, { ...e })), 7)) : (t(), r("span", {
141
+ key: 0,
142
+ class: u(l(n)("link")),
143
+ style: m(e.linkColor ? { color: e.linkColor } : void 0),
144
+ onClick: (j) => I(e.link)
145
+ }, i(c(e.value, { ...e })), 15, oe)),
146
+ e.unit ? (t(), r("span", {
118
147
  key: 2,
119
- class: a(l(n)("unit")),
120
- style: p(o.unitColor ? { color: o.unitColor } : void 0)
121
- }, i(o.unit), 7)) : C("", !0)
148
+ class: u(l(n)("unit")),
149
+ style: m(e.unitColor ? { color: e.unitColor } : void 0)
150
+ }, i(e.unit), 7)) : f("", !0)
122
151
  ], 2))), 128))
123
152
  ]),
124
153
  _: 2
125
154
  }, [
126
- g.value ? {
155
+ V.value ? {
127
156
  name: "title",
128
- fn: m(() => [
129
- y.title ? $(e.$slots, "title", { key: 0 }) : (t(), s(c, { key: 1 }, [
130
- r.tooltipProps.title ? (t(), s("div", U, i(r.tooltipProps.title), 1)) : (t(), s("div", X, [
131
- (t(!0), s(c, null, E(r.labelValues, (o, k) => (t(), s("div", { key: k }, [
132
- u("span", null, i(o.label), 1),
133
- u("span", null, i(f(o.value)), 1)
157
+ fn: b(() => [
158
+ v.title ? N(o.$slots, "title", { key: 0 }) : (t(), r(y, { key: 1 }, [
159
+ s.tooltipProps.title ? (t(), r("div", te, i(s.tooltipProps.title), 1)) : (t(), r("div", re, [
160
+ (t(!0), r(y, null, z(s.labelValues, (e, d) => (t(), r("div", { key: d }, [
161
+ e.label ? (t(), r("span", le, i(e.label), 1)) : f("", !0),
162
+ e.label ? (t(), r("span", se, ":")) : f("", !0),
163
+ p("span", null, i(c(e.value, { ...e })), 1)
134
164
  ]))), 128))
135
165
  ]))
136
166
  ], 64))
137
167
  ]),
138
168
  key: "0"
139
169
  } : void 0
140
- ]), 1040)) : C("", !0)
170
+ ]), 1040)) : f("", !0)
141
171
  ], 2));
142
172
  }
143
173
  });
144
174
  export {
145
- re as default
175
+ me as default
146
176
  };
@@ -16,6 +16,30 @@ export interface ApLadderLabelValue {
16
16
  * 值
17
17
  */
18
18
  value: string | number | undefined | null;
19
+ /**
20
+ * 是否采用原始值
21
+ */
22
+ rawValue?: boolean;
23
+ /**
24
+ * 精度 默认2位小数
25
+ */
26
+ precision?: number;
27
+ /**
28
+ * 千分位展示
29
+ */
30
+ thousand?: boolean;
31
+ /**
32
+ * 千分位分隔符
33
+ */
34
+ thousandSeparator?: string;
35
+ /**
36
+ * 货币单位
37
+ */
38
+ currency?: CurrencyCode;
39
+ /**
40
+ * 百分比展示
41
+ */
42
+ percent?: boolean;
19
43
  /**
20
44
  * 自定义单位
21
45
  */
@@ -90,3 +114,21 @@ export interface ApLadderProps {
90
114
  export interface ApLadderSlots {
91
115
  title?: VNode;
92
116
  }
117
+ /**
118
+ * 国际货币代码-映射-语言
119
+ */
120
+ export interface CurrencyCodeInLocale {
121
+ [string: string]: Intl.LocalesArgument;
122
+ }
123
+ /**
124
+ * 国际货币代码
125
+ * - `CNY` 人民币
126
+ * - `USD` 美元
127
+ * - `EUR` 欧元
128
+ * - `GBP` 英镑
129
+ */
130
+ export type CurrencyCode = 'CNY' | 'USD' | 'EUR' | 'GBP';
131
+ /**
132
+ * 国际货币代码-映射-语言
133
+ */
134
+ export declare const locales: CurrencyCodeInLocale;
@@ -0,0 +1,10 @@
1
+ const e = {
2
+ USD: "en-US",
3
+ CNY: "zh-CN",
4
+ EUR: "de-DE",
5
+ GBP: "en-GB"
6
+ // 请自行添加更多的国际货币代码-映射-语言
7
+ };
8
+ export {
9
+ e as locales
10
+ };
@@ -1,4 +1,5 @@
1
1
  import { ApTableProps } from '../../';
2
+ import { UseTableRefreshOption } from './useTableRefresh';
2
3
  import { Recordable } from '../../type';
3
4
  export interface UsePageListApTable extends ApTableProps {
4
5
  /** 是否显示默认的行选择配置
@@ -15,6 +16,10 @@ export interface UsePageListApTable extends ApTableProps {
15
16
  clearSelectionOnRequest?: boolean;
16
17
  /** 用于覆盖默认的class */
17
18
  class?: string;
19
+ /**
20
+ * 表格刷新相关
21
+ */
22
+ tableRefresh?: boolean | Omit<UseTableRefreshOption, 'apTableRef'>;
18
23
  }
19
24
  /**
20
25
  * 集成了列表页面的ApTable的默认配置
@@ -33,14 +38,14 @@ export declare function usePageListApTable(props?: UsePageListApTable): [ApTable
33
38
  dataSource: any;
34
39
  rowSelection?: {
35
40
  select: (item: any) => void;
41
+ selectAll: () => void;
42
+ unSelectAll: () => void;
36
43
  selectedRows: any[];
37
44
  unSelect: (item: any) => void;
38
45
  isSelected: (item: any) => boolean;
39
- selectAll: () => void;
40
- unSelectAll: () => void;
41
46
  clearAll: () => void;
42
47
  toggleSelect: (item: any) => void;
43
48
  } | undefined;
44
- } | null;
49
+ } | null | undefined;
45
50
  clearSelection: () => void;
46
51
  }];
@@ -1,17 +1,27 @@
1
1
  import { merge as m } from "lodash-unified";
2
- import { ref as d } from "vue";
3
- function y(n) {
4
- const r = d(null), {
2
+ import { ref as b } from "vue";
3
+ import { useTableRefresh as d } from "./useTableRefresh.mjs";
4
+ function h(a) {
5
+ return a === !0 ? {} : a === !1 ? {
6
+ refreshBefore: () => !1
7
+ } : a;
8
+ }
9
+ function F(a) {
10
+ const r = b(null), {
5
11
  isShowRowSelection: c = !0,
6
12
  clearSelectionOnRequest: u = !0,
7
13
  transformSearchFormValues: o,
8
- api: a,
9
- ...i
10
- } = n || {}, l = () => {
14
+ api: s,
15
+ tableRefresh: i = !1,
16
+ ...f
17
+ } = a || {}, n = () => {
11
18
  var e, t;
12
19
  (t = (e = r.value) == null ? void 0 : e.rowSelection) == null || t.clearAll();
13
20
  };
14
- return [m(
21
+ return d({
22
+ ...h(i),
23
+ apTableRef: r
24
+ }), [m(
15
25
  {
16
26
  // scroll,tableLayout,columnResizable设置表格可拖动
17
27
  scroll: { x: "100%", y: "100%" },
@@ -19,17 +29,17 @@ function y(n) {
19
29
  columnResizable: !0,
20
30
  // 表格header吸顶效果
21
31
  class: "ap-table--sticky",
22
- request: a ? async (e) => {
32
+ request: s ? async (e) => {
23
33
  const t = o ? o(e) : e;
24
34
  try {
25
- if (!a) throw new Error("api is not defined");
26
- const { records: s, total: p } = await a(t);
27
- return u && l(), {
28
- data: s,
35
+ if (!s) throw new Error("api is not defined");
36
+ const { records: l, total: p } = await s(t);
37
+ return u && n(), {
38
+ data: l,
29
39
  total: p
30
40
  };
31
- } catch (s) {
32
- return console.error(s), {
41
+ } catch (l) {
42
+ return console.error(l), {
33
43
  data: [],
34
44
  total: 0
35
45
  };
@@ -44,7 +54,7 @@ function y(n) {
44
54
  r.value = e;
45
55
  }
46
56
  },
47
- i
57
+ f
48
58
  ), {
49
59
  reload: () => {
50
60
  var e;
@@ -60,9 +70,9 @@ function y(n) {
60
70
  return o ? o(e) : e;
61
71
  },
62
72
  getApTableInstance: () => r.value,
63
- clearSelection: l
73
+ clearSelection: n
64
74
  }];
65
75
  }
66
76
  export {
67
- y as usePageListApTable
77
+ F as usePageListApTable
68
78
  };
@@ -1,10 +1,10 @@
1
1
  import { Ref } from 'vue';
2
- import { ApTableExpose } from '../..';
3
- interface UseTableRefreshOption {
2
+ import { ApTableExpose } from '../../';
3
+ export interface UseTableRefreshOption {
4
4
  /**
5
5
  * apTable实例
6
6
  */
7
- apTableRef?: Ref<ApTableExpose | undefined>;
7
+ apTableRef?: Ref<ApTableExpose | undefined | null>;
8
8
  /**
9
9
  * 刷新类型,reset:重置,submit:提交
10
10
  */
@@ -15,4 +15,3 @@ interface UseTableRefreshOption {
15
15
  refreshBefore?: () => boolean;
16
16
  }
17
17
  export declare function useTableRefresh(option?: UseTableRefreshOption): void;
18
- export {};
@@ -1,16 +1,16 @@
1
- import { onActivated as l } from "vue";
2
- function c(e) {
1
+ import { onMounted as c, nextTick as l, onActivated as T } from "vue";
2
+ function m(e) {
3
3
  const a = (["reset", "submit", void 0].includes(e == null ? void 0 : e.refreskType) ? e == null ? void 0 : e.refreskType : "submit") ?? "submit", r = (e == null ? void 0 : e.refreshBefore) ?? (() => !0);
4
4
  let s = !0;
5
- l(() => {
6
- var u, f;
7
- if (s) {
5
+ c(() => {
6
+ l(() => {
8
7
  s = !1;
9
- return;
10
- }
11
- r != null && r() && ((f = (u = e == null ? void 0 : e.apTableRef) == null ? void 0 : u.value) == null || f[a]());
8
+ });
9
+ }), T(() => {
10
+ var u, f;
11
+ s || r != null && r() && ((f = (u = e == null ? void 0 : e.apTableRef) == null ? void 0 : u.value) == null || f[a]());
12
12
  });
13
13
  }
14
14
  export {
15
- c as useTableRefresh
15
+ m as useTableRefresh
16
16
  };
@@ -3,7 +3,7 @@ import { CreateComponentPublicInstance, ExtractPropTypes, PropType, ComponentOpt
3
3
  import { TooltipPlacement, AdjustOverflow } from 'ant-design-vue/es/tooltip';
4
4
  import { VueTypeValidableDef } from '../../node_modules/vue-types';
5
5
  import { LiteralUnion, Key } from 'ant-design-vue/es/_util/type';
6
- import { ApStatusProps, ApStatusGroupItemProps, ApSelectItem, ApLabelGroupItemProps, ApBatchActionGroupMenuProps } from '.';
6
+ import { ApStatusProps, ApStatusGroupItemProps, ApSelectItem, ApLabelGroupItemProps, ApBatchActionGroupMenuProps, ApLadderLabelValue } from '.';
7
7
  import { ValueType } from 'ant-design-vue/es/input-number/src/utils/MiniDecimal';
8
8
  import { ApInputRadioOptions } from './ap-input-radio';
9
9
  import { KeyboardEventHandler, MouseEventHandler, FocusEventHandler } from 'ant-design-vue/es/_util/EventInterface';
@@ -17,7 +17,7 @@ import { accessCreate } from '@aplus-frontend/oss';
17
17
  import { TriggerType } from 'ant-design-vue/es/tooltip/abstractTooltipProps';
18
18
  import { PresetColorType } from 'ant-design-vue/es/_util/colors';
19
19
  import { AlignType, BuildInPlacements } from 'ant-design-vue/es/vc-trigger/interface';
20
- import { ApLadderLabelValue, ApLadderSlots } from './ap-ladder/interface';
20
+ import { ApLadderSlots } from './ap-ladder/interface';
21
21
  import { AttachmentItemProps, ApAttachmentProps } from './ap-attachment';
22
22
  export * from './hooks/index';
23
23
  export type { ApTitleProps } from './title/interface';
@@ -27,7 +27,7 @@ export type { ApStatusProps, ApStatusGroupProps, ApStatusGroupItemProps } from '
27
27
  export type { ApSelectItem, ApSelectLayoutProps } from './ap-select-layout/interface';
28
28
  export type { ApInputRadioProps, ApInputValType } from './ap-input-radio/interface';
29
29
  export type { ApExportGroupProps } from './ap-export-group/interface';
30
- export type { ApLadderProps } from './ap-ladder/interface';
30
+ export type { ApLadderProps, ApLadderLabelValue, CurrencyCode, TooltipNeedProps } from './ap-ladder/interface';
31
31
  export * from './ap-batch-action-group/interface';
32
32
  export type { AttachmentItemProps, ApAttachmentProps } from './ap-attachment';
33
33
  export declare const ApTitle: {
@@ -2748,7 +2748,7 @@ export declare const ApAttachment: DefineComponent<{
2748
2748
  toolTipBgColor: {
2749
2749
  type: StringConstructor;
2750
2750
  };
2751
- }, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
2751
+ }, () => false | import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
2752
2752
  attachmentList: {
2753
2753
  type: PropType<Array< AttachmentItemProps>>;
2754
2754
  default: never[];
@@ -12,7 +12,7 @@ export type EditableColumnType<RecordType = any, ExtraValueType = 'text', ValueT
12
12
  /**
13
13
  * 在title之后展示一个icon并触发tooltip
14
14
  */
15
- tooltip?: string;
15
+ tooltip?: any;
16
16
  /**
17
17
  * 是否可以复制(不可编辑模式下可用)
18
18
  */
@@ -85,6 +85,20 @@ const e = {
85
85
  totalLeftSuffix: "items",
86
86
  totalRightPrefix: "Page",
87
87
  totalRightSuffix: ""
88
+ },
89
+ setting: {
90
+ title: "Custom Table",
91
+ selectAll: "Select All",
92
+ unSelectAll: "Deselect All",
93
+ selectAllTip: "Please select the columns to display in the table.",
94
+ sizeSmall: "Small",
95
+ sizeNormal: "Normal",
96
+ selectCount: "Selected fields ({count})",
97
+ reset: "Reset",
98
+ fixToLeft: "Fixed on the left",
99
+ fixToRight: "Fixed on the right",
100
+ unFixed: "Not fixed",
101
+ delete: "Delete"
88
102
  }
89
103
  },
90
104
  apUpload: {
@@ -85,6 +85,20 @@ const e = {
85
85
  totalLeftSuffix: "条记录",
86
86
  totalRightPrefix: "第",
87
87
  totalRightSuffix: "页"
88
+ },
89
+ setting: {
90
+ title: "自定义表格",
91
+ selectAll: "全选",
92
+ unSelectAll: "取消全选",
93
+ selectAllTip: "请选择需要展示在表格的字段",
94
+ sizeSmall: "紧凑",
95
+ sizeNormal: "正常",
96
+ selectCount: "已选字段({count})",
97
+ reset: "重置",
98
+ fixToLeft: "固定在左侧",
99
+ fixToRight: "固定在右侧",
100
+ unFixed: "不固定",
101
+ delete: "删除"
88
102
  }
89
103
  },
90
104
  apUpload: {
@@ -39,6 +39,8 @@
39
39
  max-width: 312px;
40
40
  display: flex;
41
41
  flex-direction: column;
42
+ margin: 0;
43
+ padding: 0;
42
44
  }
43
45
  .aplus-ap-attachment__file-item {
44
46
  flex: 1;
@@ -14,6 +14,9 @@
14
14
  font-size: 18px;
15
15
  margin-right: 5px;
16
16
  }
17
+ .aplus-ap-download-inner-wrapper .text {
18
+ color: var(--download-main-color);
19
+ }
17
20
  .aplus-ap-download-inner-wrapper:hover {
18
21
  color: var(--download-main-color-opacity);
19
22
  }
@@ -7,7 +7,9 @@
7
7
  display: flex;
8
8
  flex-direction: column;
9
9
  }
10
- .aplus-ap-table-adaptive .ant-table-wrapper,
10
+ .aplus-ap-table-adaptive .ant-table-wrapper {
11
+ flex: 1;
12
+ }
11
13
  .aplus-ap-table-adaptive .ant-spin-nested-loading,
12
14
  .aplus-ap-table-adaptive .ant-spin-container {
13
15
  height: 100%;
@@ -35,6 +37,8 @@
35
37
  .aplus-ap-table__table-wrapper {
36
38
  flex: 1;
37
39
  max-height: 100%;
40
+ display: flex;
41
+ flex-direction: column;
38
42
  }
39
43
  .aplus-ap-table__table-wrapper-card {
40
44
  padding: 16px;
@@ -98,3 +102,27 @@
98
102
  .aplus-ap-table-pagination-total-wrapper {
99
103
  color: var(--ap-table-pagination-total-color, #526A90);
100
104
  }
105
+ .aplus-ap-table-header {
106
+ padding-bottom: 16px;
107
+ display: flex;
108
+ justify-content: space-between;
109
+ align-items: center;
110
+ flex-wrap: nowrap;
111
+ }
112
+ .aplus-ap-table-header__title {
113
+ flex: 1;
114
+ flex-shrink: 1;
115
+ min-width: 0;
116
+ }
117
+ .aplus-ap-table-table-header__title {
118
+ display: -webkit-inline-box;
119
+ -webkit-line-clamp: 2;
120
+ -webkit-box-orient: vertical;
121
+ overflow: hidden;
122
+ text-overflow: ellipsis;
123
+ white-space: normal;
124
+ max-width: 100%;
125
+ vertical-align: middle;
126
+ word-break: break-all;
127
+ flex: 1;
128
+ }