@aplus-frontend/ui 0.5.24 → 0.5.25

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 (213) hide show
  1. package/es/src/ap-action/group/index.vue.mjs +3 -3
  2. package/es/src/ap-action/item/index.vue2.mjs +5 -5
  3. package/es/src/ap-action/item-dropdown/index.vue.mjs +7 -7
  4. package/es/src/ap-action/item-modal/index.vue.mjs +2 -2
  5. package/es/src/ap-action/item-popconfirm/index.vue.mjs +2 -2
  6. package/es/src/ap-button/ap-action-button.vue.mjs +2 -2
  7. package/es/src/ap-button/ap-button.vue.mjs +2 -2
  8. package/es/src/ap-button/ap-confirm-button.vue.mjs +2 -2
  9. package/es/src/ap-descriptions/ap-descriptions.vue.mjs +4 -4
  10. package/es/src/ap-descriptions/help-message/index.vue2.mjs +4 -4
  11. package/es/src/ap-download/ap-download.vue.mjs +1 -1
  12. package/es/src/ap-field/checkbox/index.vue.mjs +1 -1
  13. package/es/src/ap-field/date/index.vue.mjs +4 -4
  14. package/es/src/ap-field/date-range/index.vue.mjs +8 -8
  15. package/es/src/ap-field/index.mjs +36 -36
  16. package/es/src/ap-field/number/index.vue.mjs +8 -8
  17. package/es/src/ap-field/radio/index.vue.mjs +1 -1
  18. package/es/src/ap-field/rate/index.vue.mjs +2 -2
  19. package/es/src/ap-field/segmented/index.vue.mjs +1 -1
  20. package/es/src/ap-field/select/index.vue.mjs +2 -2
  21. package/es/src/ap-field/select/use-select-options.d.ts +2 -2
  22. package/es/src/ap-field/slider/index.vue.mjs +4 -4
  23. package/es/src/ap-field/switch/index.vue.mjs +3 -3
  24. package/es/src/ap-field/text/index.vue2.mjs +2 -2
  25. package/es/src/ap-field/text/password.vue.mjs +2 -2
  26. package/es/src/ap-field/text-area/index.vue.mjs +3 -3
  27. package/es/src/ap-field/tree-select/index.vue.mjs +3 -3
  28. package/es/src/ap-field/tree-select/use-request.d.ts +4 -4
  29. package/es/src/ap-form/ap-form.vue.d.ts +2 -1
  30. package/es/src/ap-form/ap-form.vue2.mjs +2 -2
  31. package/es/src/ap-form/drawer-form/index.vue.d.ts +4 -3
  32. package/es/src/ap-form/drawer-form/index.vue.mjs +9 -9
  33. package/es/src/ap-form/item/index.vue.mjs +7 -7
  34. package/es/src/ap-form/item-group/index.vue.mjs +3 -3
  35. package/es/src/ap-form/items/checkbox/index.vue.mjs +2 -2
  36. package/es/src/ap-form/items/date/index.vue.mjs +2 -2
  37. package/es/src/ap-form/items/date-range/index.vue.mjs +2 -2
  38. package/es/src/ap-form/items/number/index.vue.mjs +2 -2
  39. package/es/src/ap-form/items/radio/index.vue.mjs +2 -2
  40. package/es/src/ap-form/items/select/index.vue.d.ts +6 -6
  41. package/es/src/ap-form/items/select/index.vue.mjs +2 -2
  42. package/es/src/ap-form/items/switch/index.vue.mjs +2 -2
  43. package/es/src/ap-form/items/text/group.vue2.mjs +2 -2
  44. package/es/src/ap-form/items/text/index.vue2.mjs +2 -2
  45. package/es/src/ap-form/items/text/password.vue.mjs +2 -2
  46. package/es/src/ap-form/items/text-area/index.vue.mjs +2 -2
  47. package/es/src/ap-form/items/tree-select/index.vue.mjs +2 -2
  48. package/es/src/ap-form/modal-form/index.vue.d.ts +4 -3
  49. package/es/src/ap-form/modal-form/index.vue.mjs +7 -7
  50. package/es/src/ap-form/render/item.vue.mjs +2 -2
  51. package/es/src/ap-form/search-form/index.vue.d.ts +4 -3
  52. package/es/src/ap-form/search-form/index.vue.mjs +1 -1
  53. package/es/src/ap-form/set/index.vue.mjs +1 -1
  54. package/es/src/ap-grid/editable/form-item.vue.d.ts +4 -2
  55. package/es/src/ap-grid/editable/form-item.vue.mjs +2 -2
  56. package/es/src/ap-grid/editable/index.vue.d.ts +4 -2
  57. package/es/src/ap-grid/editable/index.vue.mjs +2 -2
  58. package/es/src/ap-grid/hooks/use-inner-params.mjs +3 -3
  59. package/es/src/ap-grid/index.vue.d.ts +4 -2
  60. package/es/src/ap-grid/index.vue.mjs +4 -4
  61. package/es/src/ap-info-layout/ApInfoLayout.vue.mjs +2 -2
  62. package/es/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue2.mjs +2 -2
  63. package/es/src/ap-info-layout/ap-info-layout-aplus/ap-info-layout.vue2.mjs +1 -1
  64. package/es/src/ap-list/index.vue.d.ts +4 -2
  65. package/es/src/ap-list/index.vue.mjs +4 -4
  66. package/es/src/ap-modal/utils/confirm.d.ts +1 -1
  67. package/es/src/ap-table/ap-table.vue.d.ts +4 -2
  68. package/es/src/ap-table/ap-table.vue2.mjs +13 -13
  69. package/es/src/ap-table/components/dynamic-component/index.vue2.mjs +2 -2
  70. package/es/src/ap-table/components/index/index.vue2.mjs +2 -2
  71. package/es/src/ap-table/components/paragraph-ellipsis/index.vue2.mjs +3 -3
  72. package/es/src/ap-table/components/setting/modal/index.vue2.mjs +3 -3
  73. package/es/src/ap-table/components/setting/select-group/index.vue2.mjs +1 -1
  74. package/es/src/ap-table/components/setting/sortable/index.vue2.mjs +1 -1
  75. package/es/src/ap-table/components/setting/sortable/item.vue2.mjs +1 -1
  76. package/es/src/ap-table/components/setting/sorter/index.vue2.mjs +11 -11
  77. package/es/src/ap-table/components/setting/tree-select/index.vue2.mjs +1 -1
  78. package/es/src/ap-table/components/status/index.vue2.mjs +2 -2
  79. package/es/src/ap-table/constants.d.ts +5 -5
  80. package/es/src/ap-table/constants.mjs +45 -45
  81. package/es/src/ap-table/hooks/use-table-column-state.d.ts +4 -4
  82. package/es/src/ap-table/hooks/use-table-column-state.mjs +3 -3
  83. package/es/src/ap-table/utils.d.ts +5 -5
  84. package/es/src/ap-tag/ap-tag-group.vue.mjs +8 -8
  85. package/es/src/ap-tag/ap-tag.vue.mjs +2 -2
  86. package/es/src/ap-upload/apUpload.vue.mjs +5 -5
  87. package/es/src/ap-upload/components/MultipleFile.vue.d.ts +1 -1
  88. package/es/src/ap-upload/components/MultipleFile.vue2.mjs +3 -3
  89. package/es/src/ap-upload/components/Picture.vue.d.ts +7 -2
  90. package/es/src/ap-upload/components/Picture.vue2.mjs +6 -6
  91. package/es/src/ap-upload/components/SingleFile.vue2.mjs +7 -7
  92. package/es/src/business/ap-appendix/ap-appendix.vue2.mjs +1 -1
  93. package/es/src/business/ap-appendix/icons/file-icon.vue.mjs +2 -2
  94. package/es/src/business/ap-batch-action/ApBatchAction.vue2.mjs +2 -2
  95. package/es/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.mjs +10 -10
  96. package/es/src/business/ap-batch-action-group/MenuItemGroup.vue2.mjs +1 -1
  97. package/es/src/business/ap-batch-action-group/index.d.ts +3 -3
  98. package/es/src/business/ap-button-group/ApButtonGroup.vue2.mjs +1 -1
  99. package/es/src/business/ap-card/ApCard.vue2.mjs +7 -7
  100. package/es/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +4 -2
  101. package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +11 -11
  102. package/es/src/business/ap-expand-alert/index.d.ts +6 -4
  103. package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +9 -9
  104. package/es/src/business/ap-group-search/ap-group-search.vue2.mjs +5 -5
  105. package/es/src/business/ap-group-search/extension-select/index.vue2.mjs +4 -4
  106. package/es/src/business/ap-group-search/images/icon-down.vue.mjs +2 -2
  107. package/es/src/business/ap-group-search/images/icon-line-select.vue.mjs +2 -2
  108. package/es/src/business/ap-group-search/popover-select/index.vue2.mjs +2 -2
  109. package/es/src/business/ap-image/ApImage.vue2.mjs +1 -1
  110. package/es/src/business/ap-input-radio/ApInputRadio.vue2.mjs +2 -2
  111. package/es/src/business/ap-ladder/ApLadder.vue.d.ts +1 -83
  112. package/es/src/business/ap-ladder/ApLadder.vue2.mjs +34 -59
  113. package/es/src/business/ap-ladder/components/SimpleMode.vue.d.ts +3 -65
  114. package/es/src/business/ap-ladder/components/SimpleMode.vue2.mjs +34 -99
  115. package/es/src/business/ap-ladder/components/ValueGroupMode.vue.d.ts +3 -75
  116. package/es/src/business/ap-ladder/components/ValueGroupMode.vue2.mjs +68 -195
  117. package/es/src/business/ap-ladder/index.d.ts +1 -235
  118. package/es/src/business/ap-ladder/interface.d.ts +4 -114
  119. package/es/src/business/ap-ladder/utils.d.ts +5 -0
  120. package/es/src/business/ap-ladder/utils.mjs +38 -3
  121. package/es/src/business/ap-product-info/ApProductInfo.d.ts +46 -0
  122. package/es/src/business/ap-product-info/constans.d.ts +23 -0
  123. package/es/src/business/ap-product-info/index.d.ts +1 -0
  124. package/es/src/business/ap-product-info/interface.d.ts +11 -0
  125. package/es/src/business/ap-select-layout/index.d.ts +4 -2
  126. package/es/src/business/ap-select-layout/select-layout.vue.d.ts +4 -2
  127. package/es/src/business/ap-select-layout/select-layout.vue2.mjs +4 -4
  128. package/es/src/business/ap-status/ApStatus.vue2.mjs +8 -8
  129. package/es/src/business/ap-status/group/ApStatusGroup.vue2.mjs +4 -4
  130. package/es/src/business/ap-summary/ap-summary.vue2.mjs +1 -1
  131. package/es/src/business/ap-table-modal/modal-title.vue2.mjs +2 -2
  132. package/es/src/business/ap-table-modal/table-layout/index.vue2.mjs +14 -14
  133. package/es/src/business/ap-table-modal/table-modal.vue2.mjs +3 -3
  134. package/es/src/business/ap-title/ApTitle.vue2.mjs +7 -7
  135. package/es/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.mjs +1 -1
  136. package/es/src/business/ap-upload-file/icon/delete-icon.vue.mjs +2 -2
  137. package/es/src/business/ap-upload-file/icon/file-icon.vue.mjs +2 -2
  138. package/es/src/business/batch-input-group/form-item.vue.mjs +2 -2
  139. package/es/src/business/batch-input-group/index.vue.mjs +1 -1
  140. package/es/src/business/batch-input-group/popover-input/index.vue2.mjs +2 -2
  141. package/es/src/check-card/index.vue2.mjs +3 -3
  142. package/es/src/config-provider/hooks/use-namespace.d.ts +1 -5
  143. package/es/src/editable-table/form-item.vue.d.ts +4 -2
  144. package/es/src/editable-table/form-item.vue.mjs +2 -2
  145. package/es/src/editable-table/index.vue.d.ts +4 -2
  146. package/es/src/editable-table/index.vue.mjs +2 -2
  147. package/es/src/full-screen/index.vue.mjs +3 -3
  148. package/es/src/hooks/useFullScreen.mjs +5 -5
  149. package/es/src/mask/index.vue.mjs +10 -10
  150. package/es/src/portal/index.vue.mjs +2 -2
  151. package/es/src/scroll-bar/index.vue.mjs +3 -3
  152. package/es/src/scroll-bar/internal.vue.mjs +2 -2
  153. package/es/src/scroll-view/index.vue.d.ts +5 -5
  154. package/es/src/scroll-view/index.vue.mjs +9 -9
  155. package/es/src/tests/wrapper.d.ts +4 -4
  156. package/es/src/text/group.vue.mjs +2 -2
  157. package/es/src/text/index.vue.mjs +4 -4
  158. package/es/src/work-order-modal/help-message.vue2.mjs +2 -2
  159. package/es/src/work-order-modal/work-order-modal.vue.d.ts +3 -2
  160. package/es/src/work-order-modal/work-order-modal.vue.mjs +2 -2
  161. package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
  162. package/lib/src/ap-field/index.js +1 -1
  163. package/lib/src/ap-field/select/use-select-options.d.ts +2 -2
  164. package/lib/src/ap-field/tree-select/use-request.d.ts +4 -4
  165. package/lib/src/ap-form/ap-form.vue.d.ts +2 -1
  166. package/lib/src/ap-form/drawer-form/index.vue.d.ts +4 -3
  167. package/lib/src/ap-form/items/select/index.vue.d.ts +6 -6
  168. package/lib/src/ap-form/modal-form/index.vue.d.ts +4 -3
  169. package/lib/src/ap-form/search-form/index.vue.d.ts +4 -3
  170. package/lib/src/ap-grid/editable/form-item.vue.d.ts +4 -2
  171. package/lib/src/ap-grid/editable/index.vue.d.ts +4 -2
  172. package/lib/src/ap-grid/index.vue.d.ts +4 -2
  173. package/lib/src/ap-list/index.vue.d.ts +4 -2
  174. package/lib/src/ap-modal/utils/confirm.d.ts +1 -1
  175. package/lib/src/ap-table/ap-table.vue.d.ts +4 -2
  176. package/lib/src/ap-table/constants.d.ts +5 -5
  177. package/lib/src/ap-table/constants.js +1 -1
  178. package/lib/src/ap-table/hooks/use-table-column-state.d.ts +4 -4
  179. package/lib/src/ap-table/utils.d.ts +5 -5
  180. package/lib/src/ap-upload/apUpload.vue.js +1 -1
  181. package/lib/src/ap-upload/components/MultipleFile.vue.d.ts +1 -1
  182. package/lib/src/ap-upload/components/Picture.vue.d.ts +7 -2
  183. package/lib/src/business/ap-batch-action-group/index.d.ts +3 -3
  184. package/lib/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +4 -2
  185. package/lib/src/business/ap-expand-alert/index.d.ts +6 -4
  186. package/lib/src/business/ap-ladder/ApLadder.vue.d.ts +1 -83
  187. package/lib/src/business/ap-ladder/ApLadder.vue2.js +1 -1
  188. package/lib/src/business/ap-ladder/components/SimpleMode.vue.d.ts +3 -65
  189. package/lib/src/business/ap-ladder/components/SimpleMode.vue2.js +1 -1
  190. package/lib/src/business/ap-ladder/components/ValueGroupMode.vue.d.ts +3 -75
  191. package/lib/src/business/ap-ladder/components/ValueGroupMode.vue2.js +1 -1
  192. package/lib/src/business/ap-ladder/index.d.ts +1 -235
  193. package/lib/src/business/ap-ladder/interface.d.ts +4 -114
  194. package/lib/src/business/ap-ladder/utils.d.ts +5 -0
  195. package/lib/src/business/ap-ladder/utils.js +1 -1
  196. package/lib/src/business/ap-product-info/ApProductInfo.d.ts +46 -0
  197. package/lib/src/business/ap-product-info/constans.d.ts +23 -0
  198. package/lib/src/business/ap-product-info/index.d.ts +1 -0
  199. package/lib/src/business/ap-product-info/interface.d.ts +11 -0
  200. package/lib/src/business/ap-select-layout/index.d.ts +4 -2
  201. package/lib/src/business/ap-select-layout/select-layout.vue.d.ts +4 -2
  202. package/lib/src/config-provider/hooks/use-namespace.d.ts +1 -5
  203. package/lib/src/editable-table/form-item.vue.d.ts +4 -2
  204. package/lib/src/editable-table/index.vue.d.ts +4 -2
  205. package/lib/src/scroll-view/index.vue.d.ts +5 -5
  206. package/lib/src/tests/wrapper.d.ts +4 -4
  207. package/lib/src/work-order-modal/work-order-modal.vue.d.ts +3 -2
  208. package/package.json +3 -3
  209. package/theme/ap-grid/index.css +3 -0
  210. package/theme/ap-grid/index.less +3 -0
  211. package/theme/ap-ladder/ap-ladder.css +14 -5
  212. package/theme/ap-ladder/ap-ladder.less +16 -7
  213. package/theme/index.css +17 -5
@@ -1,9 +1,7 @@
1
- import { defineComponent as j, createBlock as S, openBlock as n, unref as t, normalizeProps as v, guardReactiveProps as b, createSlots as k, withCtx as s, createElementBlock as i, createCommentVNode as u, Fragment as C, normalizeClass as l, createElementVNode as a, normalizeStyle as m, toDisplayString as r, renderSlot as V } from "vue";
2
- import { Tooltip as O } from "@aplus-frontend/antdv";
1
+ import { defineComponent as d, openBlock as r, createElementBlock as m, normalizeClass as a, unref as t, createElementVNode as l, toDisplayString as n, renderSlot as u, createCommentVNode as j } from "vue";
3
2
  import "../../../config-provider/index.mjs";
4
- import { isNull as c } from "../utils.mjs";
5
- import { useNamespace as g } from "../../../config-provider/hooks/use-namespace.mjs";
6
- const E = /* @__PURE__ */ j({
3
+ import { useNamespace as S } from "../../../config-provider/hooks/use-namespace.mjs";
4
+ const f = ["title"], y = ["title"], g = ["title"], b = ["title"], N = /* @__PURE__ */ d({
7
5
  name: "ApLadderSimpleMode",
8
6
  __name: "SimpleMode",
9
7
  props: {
@@ -15,108 +13,45 @@ const E = /* @__PURE__ */ j({
15
13
  type: [String, Number, Function, Object],
16
14
  default: null
17
15
  },
18
- majorStyles: {
19
- type: Object,
20
- default: () => ({})
21
- },
22
- majorColorStyles: {
23
- type: Object,
24
- default: () => ({})
25
- },
26
- minorStyles: {
27
- type: Object,
28
- default: () => ({})
29
- },
30
- minorColorStyles: {
31
- type: Object,
32
- default: () => ({})
33
- },
34
- tooltipProps: {
35
- type: Object,
36
- default: () => ({})
37
- },
38
16
  layout: {
39
17
  type: String,
40
18
  default: "vertical"
41
- },
42
- tooltip: {
43
- type: Boolean,
44
- default: !1
45
- },
46
- convertValue: {
47
- type: Function,
48
- required: !0
49
19
  }
50
20
  },
51
21
  setup(e) {
52
- const { b: y, e: o, m: d } = g("ap-ladder");
53
- return (f, N) => (n(), S(t(O), v(b(e.tooltipProps)), k({
54
- default: s(() => [
55
- !t(c)(e.major) || !t(c)(e.minor) ? (n(), i(C, { key: 0 }, [
56
- e.layout === "vertical" ? (n(), i("div", {
57
- key: 0,
58
- class: l([t(y)("base"), t(d)("vertical")])
59
- }, [
60
- a("span", {
61
- class: l([t(o)("major")]),
62
- style: m([e.majorStyles, e.majorColorStyles])
63
- }, r(e.convertValue(e.major)), 7),
64
- a("span", {
65
- class: l([t(o)("minor")]),
66
- style: m([e.minorStyles, e.minorColorStyles])
67
- }, r(e.convertValue(e.minor)), 7)
68
- ], 2)) : (n(), i("div", {
69
- key: 1,
70
- class: l([t(y)("base"), t(d)("horizontal")])
71
- }, [
72
- a("span", {
73
- class: l([t(o)("major")]),
74
- style: m([e.majorStyles, e.majorColorStyles])
75
- }, r(e.convertValue(e.major)), 7),
76
- a("span", {
77
- class: l([t(o)("minor")]),
78
- style: m([e.minorStyles, e.minorColorStyles])
79
- }, r(e.convertValue(e.minor)), 7)
80
- ], 2))
81
- ], 64)) : u("", !0)
82
- ]),
83
- _: 2
22
+ const { b: o, e: i, m: s } = S("ap-ladder");
23
+ return (c, p) => (r(), m("div", {
24
+ class: a([t(o)("simple-mode")])
84
25
  }, [
85
- f.$slots.title ? {
86
- name: "title",
87
- fn: s(() => [
88
- V(f.$slots, "title")
89
- ]),
90
- key: "0"
91
- } : e.tooltip ? {
92
- name: "title",
93
- fn: s(() => [
94
- a("div", {
95
- class: l(t(o)("tooltip"))
96
- }, [
97
- t(c)(e.major) ? u("", !0) : (n(), i("div", {
98
- key: 0,
99
- class: l(t(o)("tooltip-item"))
100
- }, [
101
- a("span", {
102
- class: l(t(o)("tooltip-label"))
103
- }, r(e.convertValue(e.major)), 3)
104
- ], 2)),
105
- t(c)(e.minor) ? u("", !0) : (n(), i("div", {
106
- key: 1,
107
- class: l(t(o)("tooltip-item"))
108
- }, [
109
- a("span", {
110
- class: l(t(o)("tooltip-label"))
111
- }, r(e.convertValue(e.minor)), 3)
112
- ], 2))
113
- ], 2)
114
- ]),
115
- key: "1"
116
- } : void 0
117
- ]), 1040));
26
+ e.layout === "vertical" ? (r(), m("div", {
27
+ key: 0,
28
+ class: a([t(o)("base"), t(s)("vertical")])
29
+ }, [
30
+ l("span", {
31
+ class: a([t(i)("major")]),
32
+ title: String(e.major)
33
+ }, n(e.major), 11, f),
34
+ l("span", {
35
+ class: a([t(i)("minor")]),
36
+ title: String(e.major)
37
+ }, n(e.minor), 11, y)
38
+ ], 2)) : (r(), m("div", {
39
+ key: 1,
40
+ class: a([t(o)("base"), t(s)("horizontal")])
41
+ }, [
42
+ l("span", {
43
+ class: a([t(i)("major")]),
44
+ title: String(e.major)
45
+ }, n(e.major), 11, g),
46
+ l("span", {
47
+ class: a([t(i)("minor")]),
48
+ title: String(e.major)
49
+ }, n(e.minor), 11, b)
50
+ ], 2)),
51
+ c.$slots.title ? u(c.$slots, "title", { key: 2 }) : j("", !0)
52
+ ], 2));
118
53
  }
119
54
  });
120
55
  export {
121
- E as default
56
+ N as default
122
57
  };
@@ -1,12 +1,12 @@
1
- import { CSSProperties, PropType, DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
1
  import { ApLadderLabelValue } from '../interface';
2
+ import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
3
  declare function __VLS_template(): {
4
4
  attrs: Partial<{}>;
5
5
  slots: {
6
6
  title?(_: {}): any;
7
7
  };
8
8
  refs: {};
9
- rootEl: any;
9
+ rootEl: HTMLDivElement;
10
10
  };
11
11
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
12
12
  declare const __VLS_component: DefineComponent<ExtractPropTypes<{
@@ -18,38 +18,6 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
18
18
  type: StringConstructor;
19
19
  default: string;
20
20
  };
21
- labelStyles: {
22
- type: PropType<CSSProperties>;
23
- default: () => {};
24
- };
25
- valueStyles: {
26
- type: PropType<CSSProperties>;
27
- default: () => {};
28
- };
29
- linkStyles: {
30
- type: PropType<CSSProperties>;
31
- default: () => {};
32
- };
33
- unitStyles: {
34
- type: PropType<CSSProperties>;
35
- default: () => {};
36
- };
37
- tooltipLabelStyles: {
38
- type: PropType<CSSProperties>;
39
- default: () => {};
40
- };
41
- tooltipValueStyles: {
42
- type: PropType<CSSProperties>;
43
- default: () => {};
44
- };
45
- tooltipProps: {
46
- type: ObjectConstructor;
47
- default: () => {};
48
- };
49
- tooltip: {
50
- type: BooleanConstructor;
51
- default: boolean;
52
- };
53
21
  }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
54
22
  handleClick: (...args: any[]) => void;
55
23
  "update:valueRefs": (...args: any[]) => void;
@@ -62,53 +30,13 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
62
30
  type: StringConstructor;
63
31
  default: string;
64
32
  };
65
- labelStyles: {
66
- type: PropType<CSSProperties>;
67
- default: () => {};
68
- };
69
- valueStyles: {
70
- type: PropType<CSSProperties>;
71
- default: () => {};
72
- };
73
- linkStyles: {
74
- type: PropType<CSSProperties>;
75
- default: () => {};
76
- };
77
- unitStyles: {
78
- type: PropType<CSSProperties>;
79
- default: () => {};
80
- };
81
- tooltipLabelStyles: {
82
- type: PropType<CSSProperties>;
83
- default: () => {};
84
- };
85
- tooltipValueStyles: {
86
- type: PropType<CSSProperties>;
87
- default: () => {};
88
- };
89
- tooltipProps: {
90
- type: ObjectConstructor;
91
- default: () => {};
92
- };
93
- tooltip: {
94
- type: BooleanConstructor;
95
- default: boolean;
96
- };
97
33
  }>> & Readonly<{
98
34
  onHandleClick?: ((...args: any[]) => any) | undefined;
99
35
  "onUpdate:valueRefs"?: ((...args: any[]) => any) | undefined;
100
36
  }>, {
101
- tooltip: boolean;
102
37
  labelAlign: string;
103
- tooltipProps: Record<string, any>;
104
38
  labelValues: ApLadderLabelValue[];
105
- labelStyles: CSSProperties;
106
- valueStyles: CSSProperties;
107
- linkStyles: CSSProperties;
108
- unitStyles: CSSProperties;
109
- tooltipLabelStyles: CSSProperties;
110
- tooltipValueStyles: CSSProperties;
111
- }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
39
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
112
40
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
113
41
  export default _default;
114
42
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1,9 +1,8 @@
1
- import { defineComponent as P, isVNode as g, h as C, ref as x, createBlock as h, openBlock as r, unref as n, normalizeProps as A, guardReactiveProps as B, createSlots as w, withCtx as v, createElementVNode as d, normalizeClass as s, createElementBlock as i, Fragment as f, renderList as j, createCommentVNode as p, normalizeStyle as u, createTextVNode as O, toDisplayString as a, withModifiers as z, renderSlot as M, createVNode as R } from "vue";
2
- import { Tooltip as Y } from "@aplus-frontend/antdv";
1
+ import { defineComponent as A, isVNode as v, h as k, openBlock as i, createElementBlock as r, normalizeClass as l, unref as e, Fragment as m, renderList as N, normalizeStyle as u, toDisplayString as c, createCommentVNode as a, createElementVNode as p, createBlock as $, withModifiers as B, renderSlot as L } from "vue";
3
2
  import "../../../config-provider/index.mjs";
4
- import { locales as E } from "../interface.mjs";
5
- import { useNamespace as G } from "../../../config-provider/hooks/use-namespace.mjs";
6
- const T = { key: 0 }, D = ["href", "onClick"], U = ["onClick"], b = { key: 0 }, q = { key: 0 }, W = /* @__PURE__ */ P({
3
+ import { convertValue as d } from "../utils.mjs";
4
+ import { useNamespace as M } from "../../../config-provider/hooks/use-namespace.mjs";
5
+ const z = ["title"], E = ["title"], F = ["href", "title", "onClick"], G = ["title", "onClick"], R = ["title"], x = /* @__PURE__ */ A({
7
6
  name: "ApLadderValueGroupMode",
8
7
  __name: "ValueGroupMode",
9
8
  props: {
@@ -14,203 +13,77 @@ const T = { key: 0 }, D = ["href", "onClick"], U = ["onClick"], b = { key: 0 },
14
13
  labelAlign: {
15
14
  type: String,
16
15
  default: ""
17
- },
18
- labelStyles: {
19
- type: Object,
20
- default: () => ({})
21
- },
22
- valueStyles: {
23
- type: Object,
24
- default: () => ({})
25
- },
26
- linkStyles: {
27
- type: Object,
28
- default: () => ({})
29
- },
30
- unitStyles: {
31
- type: Object,
32
- default: () => ({})
33
- },
34
- tooltipLabelStyles: {
35
- type: Object,
36
- default: () => ({})
37
- },
38
- tooltipValueStyles: {
39
- type: Object,
40
- default: () => ({})
41
- },
42
- tooltipProps: {
43
- type: Object,
44
- default: () => ({})
45
- },
46
- tooltip: {
47
- type: Boolean,
48
- default: !1
49
16
  }
50
17
  },
51
18
  emits: ["update:valueRefs", "handleClick"],
52
- setup(c, { emit: N }) {
53
- const $ = N, { e: l } = G("ap-ladder"), m = (e) => g(e) || typeof e == "function", S = (e) => {
54
- const { value: o, style: t } = e;
55
- return g(o) ? C(o, {
56
- style: t
57
- }) : typeof o == "function" ? C(o(), {
58
- ref: x,
59
- style: {
60
- ...t
61
- }
62
- }) : null;
63
- }, k = (e, o = {
64
- rawValue: !0,
65
- precision: 2,
66
- thousand: !0,
67
- thousandSeparator: ",",
68
- currency: "CNY",
69
- percent: !1
70
- }) => {
71
- if (Object.prototype.toString.call(e) === "[object Null]" || Object.prototype.toString.call(e) === "[object Undefined]" || Object.prototype.toString.call(e) === "[object Object]" || Object.prototype.toString.call(e) === "[object Function]")
72
- return "--";
73
- if (typeof e == "number") {
74
- if (o.percent)
75
- return `${e.toFixed(o.precision)}%`;
76
- if (o.currency)
77
- return e.toLocaleString(
78
- E[o.currency ? o.currency : "CNY"],
79
- {
80
- style: "currency",
81
- currency: o.currency ? o.currency : "CNY"
82
- }
83
- );
84
- if (o.thousand) {
85
- const [t, y] = e.toFixed(o.precision ? o.precision : 2).split(".");
86
- return `${t.replace(
87
- /(\d)(?=(\d{3})+(?!\d))/g,
88
- `$1${o.thousandSeparator ? o.thousandSeparator : ","}`
89
- )}.${y}`;
90
- }
91
- return e.toFixed(o.precision ? o.precision : 2);
92
- }
93
- return e;
94
- }, F = (e) => {
95
- $("handleClick", e);
19
+ setup(s, { emit: g }) {
20
+ const C = g, { e: o } = M("ap-ladder"), f = (n) => v(n) || typeof n == "function", y = (n) => v(n.value) ? k(n.value) : typeof n.value == "function" ? k(n.value()) : null, h = (n) => {
21
+ C("handleClick", n);
96
22
  };
97
- return (e, o) => (r(), h(n(Y), A(B(c.tooltipProps)), w({
98
- default: v(() => [
99
- d("div", {
100
- class: s(n(l)("value-group"))
23
+ return (n, w) => (i(), r("div", {
24
+ class: l(e(o)("value-group-mode"))
25
+ }, [
26
+ (i(!0), r(m, null, N(s.labelValues, (t, S) => (i(), r("div", {
27
+ key: S,
28
+ class: l([
29
+ e(o)("value-group-item"),
30
+ t.label === "" && e(o)("value-group-value-end")
31
+ ])
32
+ }, [
33
+ t.label ? (i(), r("span", {
34
+ key: 0,
35
+ class: l([
36
+ e(o)("value-group-label"),
37
+ s.labelAlign ? e(o)(`value-group-label-${s.labelAlign}`) : null
38
+ ]),
39
+ style: u(t.labelColor ? { color: t.labelColor } : null),
40
+ title: String(t.label)
41
+ }, c(t.label), 15, z)) : a("", !0),
42
+ t.label ? (i(), r("span", {
43
+ key: 1,
44
+ class: l(e(o)("value-group-label-semicolon"))
45
+ }, ":", 2)) : a("", !0),
46
+ p("span", {
47
+ class: l(e(o)("value-group-value")),
48
+ title: String(e(d)(t.value, { ...t }))
101
49
  }, [
102
- (r(!0), i(f, null, j(c.labelValues, (t, y) => (r(), i("div", {
103
- key: y,
104
- class: s([
105
- n(l)("value-group-item"),
106
- t.label === "" && n(l)("value-group-value-end")
107
- ])
108
- }, [
109
- t.label ? (r(), i("div", {
110
- key: 0,
111
- class: s([
112
- n(l)("value-group-label"),
113
- c.labelAlign && n(l)(`label-align-${c.labelAlign}`)
50
+ f(t.value) ? (i(), $(y, {
51
+ key: 0,
52
+ value: t.value
53
+ }, null, 8, ["value"])) : t.link ? (i(), r("a", {
54
+ key: 1,
55
+ href: t.link,
56
+ target: "_blank",
57
+ class: l(e(o)("value-group-link")),
58
+ title: String(t.value),
59
+ style: u(t.linkColor ? { color: t.linkColor } : null),
60
+ onClick: B((_) => h(t), ["prevent"])
61
+ }, c(e(d)(t.value, { ...t })), 15, F)) : (i(), r(m, { key: 2 }, [
62
+ p("span", {
63
+ class: l([
64
+ t.handleValueClick ? e(o)("value-group-link") : null
114
65
  ]),
115
- style: u(t.labelStyles)
116
- }, [
117
- O(a(t.label), 1),
118
- t.label ? (r(), i("span", T, ":")) : p("", !0)
119
- ], 6)) : p("", !0),
120
- d("div", {
121
- class: s(n(l)("value-group-value"))
122
- }, [
123
- m(t.value) ? (r(), h(S, {
124
- key: 0,
125
- value: t.value,
126
- style: u([t.labelColor, t.valueStyles])
127
- }, null, 8, ["value", "style"])) : (r(), i(f, { key: 1 }, [
128
- t.link ? (r(), i("a", {
129
- key: 0,
130
- href: t.link,
131
- target: "_blank",
132
- class: s(n(l)("value-group-link")),
133
- style: u([
134
- c.linkStyles,
135
- t.linkStyles,
136
- t.linkColor ? { color: t.linkColor } : void 0
137
- ]),
138
- onClick: z((L) => F(t), ["prevent"])
139
- }, a(k(t.value, { ...t })), 15, D)) : (r(), i(f, { key: 1 }, [
140
- d("span", {
141
- style: u([
142
- c.valueStyles,
143
- t.valueStyles,
144
- t.valueColor ? { color: t.valueColor } : void 0
145
- ]),
146
- class: s(
147
- t.handleValueClick ? n(l)("value-group-link") : void 0
148
- ),
149
- onClick: (L) => t.handleValueClick && t.handleValueClick(c.labelValues)
150
- }, a(k(t.value, { ...t })), 15, U),
151
- t.unit ? (r(), i("span", {
152
- key: 0,
153
- class: s(n(l)("value-group-unit")),
154
- style: u([
155
- c.unitStyles,
156
- t.unitStyles,
157
- t.unitColor ? { color: t.unitColor } : void 0
158
- ])
159
- }, a(t.unit), 7)) : p("", !0)
160
- ], 64))
161
- ], 64))
162
- ], 2)
163
- ], 2))), 128))
164
- ], 2)
165
- ]),
166
- _: 2
167
- }, [
168
- e.$slots.title ? {
169
- name: "title",
170
- fn: v(() => [
171
- M(e.$slots, "title")
172
- ]),
173
- key: "0"
174
- } : c.tooltip ? {
175
- name: "title",
176
- fn: v(() => [
177
- d("div", {
178
- class: s(n(l)("tooltip"))
179
- }, [
180
- (r(!0), i(f, null, j(c.labelValues, (t, y) => (r(), i("div", {
181
- key: y,
182
- class: s(n(l)("tooltip-item"))
183
- }, [
184
- d("span", {
185
- class: s(n(l)("tooltip-label")),
186
- style: u(c.tooltipLabelStyles)
187
- }, a(t.label ? t.label : "--") + ": ", 7),
188
- m(t.value) ? (r(), i("span", {
189
- key: 0,
190
- class: s(n(l)("tooltip-value")),
191
- style: u(c.tooltipValueStyles)
192
- }, [
193
- R(S, {
194
- value: t.value,
195
- style: u([t.tooltipValueStyles])
196
- }, null, 8, ["value", "style"]),
197
- t.unit ? (r(), i("span", b, a(t.unit), 1)) : p("", !0)
198
- ], 6)) : (r(), i("span", {
199
- key: 1,
200
- class: s(n(l)("tooltip-value")),
201
- style: u(c.tooltipValueStyles)
202
- }, [
203
- O(a(k(t.value, { ...t })) + " ", 1),
204
- t.unit ? (r(), i("span", q, a(t.unit), 1)) : p("", !0)
205
- ], 6))
206
- ], 2))), 128))
207
- ], 2)
208
- ]),
209
- key: "1"
210
- } : void 0
211
- ]), 1040));
66
+ title: String(t.value),
67
+ style: u(
68
+ t.valueColor ? { color: t.valueColor } : null
69
+ ),
70
+ onClick: (_) => t.handleValueClick && t.handleValueClick(s.labelValues)
71
+ }, c(e(d)(t.value, { ...t })), 15, G),
72
+ t.unit ? (i(), r("span", {
73
+ key: 0,
74
+ class: l(e(o)("value-group-unit")),
75
+ title: String(e(d)(t.value, { ...t })),
76
+ style: u(
77
+ t.unitColor ? { color: t.unitColor } : null
78
+ )
79
+ }, c(t.unit), 15, R)) : a("", !0)
80
+ ], 64))
81
+ ], 10, E),
82
+ n.$slots.title ? L(n.$slots, "title", { key: 2 }) : a("", !0)
83
+ ], 2))), 128))
84
+ ], 2));
212
85
  }
213
86
  });
214
87
  export {
215
- W as default
88
+ x as default
216
89
  };