@aplus-frontend/ui 0.5.19 → 0.5.21

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 (83) hide show
  1. package/es/index.mjs +231 -227
  2. package/es/src/ap-field/index.d.ts +3 -1
  3. package/es/src/ap-field/index.mjs +34 -30
  4. package/es/src/ap-field/interface.d.ts +39 -1
  5. package/es/src/ap-field/text/index.vue2.mjs +45 -39
  6. package/es/src/ap-field/tree-select/index.vue.d.ts +1155 -0
  7. package/es/src/ap-field/tree-select/index.vue.mjs +251 -0
  8. package/es/src/ap-field/tree-select/index.vue2.mjs +4 -0
  9. package/es/src/ap-field/tree-select/style/css.d.ts +1 -0
  10. package/es/src/ap-field/tree-select/style/css.js +1 -0
  11. package/es/src/ap-field/tree-select/style/index.d.ts +1 -0
  12. package/es/src/ap-field/tree-select/style/index.js +1 -0
  13. package/es/src/ap-field/tree-select/use-request.d.ts +41 -0
  14. package/es/src/ap-field/tree-select/use-request.mjs +66 -0
  15. package/es/src/ap-form/item-tree-select/style/css.d.ts +1 -0
  16. package/es/src/ap-form/item-tree-select/style/css.js +1 -0
  17. package/es/src/ap-form/item-tree-select/style/index.d.ts +1 -0
  18. package/es/src/ap-form/item-tree-select/style/index.js +1 -0
  19. package/es/src/ap-form/items/index.d.ts +2 -1
  20. package/es/src/ap-form/items/index.mjs +3 -2
  21. package/es/src/ap-form/items/interface.d.ts +6 -1
  22. package/es/src/ap-form/items/select/index.vue.d.ts +1244 -4
  23. package/es/src/ap-form/items/select/index.vue.mjs +25 -22
  24. package/es/src/ap-form/items/text/index.vue.d.ts +2 -0
  25. package/es/src/ap-form/items/tree-select/index.vue.d.ts +1589 -0
  26. package/es/src/ap-form/items/tree-select/index.vue.mjs +107 -0
  27. package/es/src/ap-form/items/tree-select/index.vue2.mjs +4 -0
  28. package/es/src/ap-grid/editable/form-item.vue.mjs +32 -31
  29. package/es/src/ap-grid/editable/index.vue.mjs +9 -8
  30. package/es/src/ap-grid/index.vue.mjs +102 -99
  31. package/es/src/ap-grid/interface.d.ts +1 -1
  32. package/es/src/ap-table/constants.d.ts +4056 -1945
  33. package/es/src/ap-table/constants.mjs +47 -43
  34. package/es/src/ap-table/interface.d.ts +5 -1
  35. package/es/src/ap-table/utils.d.ts +1463 -6
  36. package/es/src/business/ap-ladder/components/ValueGroupMode.vue2.mjs +51 -47
  37. package/es/src/business/ap-ladder/interface.d.ts +4 -0
  38. package/es/src/business/batch-input-group/index.vue.d.ts +1 -0
  39. package/es/src/business/batch-input-group/index.vue.mjs +2 -1
  40. package/es/src/index.mjs +230 -226
  41. package/es/src/path-map.mjs +2 -0
  42. package/lib/index.js +1 -1
  43. package/lib/src/ap-field/index.d.ts +3 -1
  44. package/lib/src/ap-field/index.js +1 -1
  45. package/lib/src/ap-field/interface.d.ts +39 -1
  46. package/lib/src/ap-field/text/index.vue2.js +1 -1
  47. package/lib/src/ap-field/tree-select/index.vue.d.ts +1155 -0
  48. package/lib/src/ap-field/tree-select/index.vue.js +1 -0
  49. package/lib/src/ap-field/tree-select/index.vue2.js +1 -0
  50. package/lib/src/ap-field/tree-select/style/css.cjs +1 -0
  51. package/lib/src/ap-field/tree-select/style/css.d.ts +1 -0
  52. package/lib/src/ap-field/tree-select/style/index.cjs +1 -0
  53. package/lib/src/ap-field/tree-select/style/index.d.ts +1 -0
  54. package/lib/src/ap-field/tree-select/use-request.d.ts +41 -0
  55. package/lib/src/ap-field/tree-select/use-request.js +1 -0
  56. package/lib/src/ap-form/item-tree-select/style/css.cjs +1 -0
  57. package/lib/src/ap-form/item-tree-select/style/css.d.ts +1 -0
  58. package/lib/src/ap-form/item-tree-select/style/index.cjs +1 -0
  59. package/lib/src/ap-form/item-tree-select/style/index.d.ts +1 -0
  60. package/lib/src/ap-form/items/index.d.ts +2 -1
  61. package/lib/src/ap-form/items/index.js +1 -1
  62. package/lib/src/ap-form/items/interface.d.ts +6 -1
  63. package/lib/src/ap-form/items/select/index.vue.d.ts +1244 -4
  64. package/lib/src/ap-form/items/select/index.vue.js +1 -1
  65. package/lib/src/ap-form/items/text/index.vue.d.ts +2 -0
  66. package/lib/src/ap-form/items/tree-select/index.vue.d.ts +1589 -0
  67. package/lib/src/ap-form/items/tree-select/index.vue.js +1 -0
  68. package/lib/src/ap-form/items/tree-select/index.vue2.js +1 -0
  69. package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
  70. package/lib/src/ap-grid/editable/index.vue.js +1 -1
  71. package/lib/src/ap-grid/index.vue.js +1 -1
  72. package/lib/src/ap-grid/interface.d.ts +1 -1
  73. package/lib/src/ap-table/constants.d.ts +4056 -1945
  74. package/lib/src/ap-table/constants.js +1 -1
  75. package/lib/src/ap-table/interface.d.ts +5 -1
  76. package/lib/src/ap-table/utils.d.ts +1463 -6
  77. package/lib/src/business/ap-ladder/components/ValueGroupMode.vue2.js +1 -1
  78. package/lib/src/business/ap-ladder/interface.d.ts +4 -0
  79. package/lib/src/business/batch-input-group/index.vue.d.ts +1 -0
  80. package/lib/src/business/batch-input-group/index.vue.js +2 -2
  81. package/lib/src/index.js +1 -1
  82. package/lib/src/path-map.js +1 -1
  83. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
- import { defineComponent as L, isVNode as g, h as C, ref as P, createBlock as h, openBlock as o, unref as i, normalizeProps as x, guardReactiveProps as A, createSlots as B, withCtx as v, createElementVNode as d, normalizeClass as s, createElementBlock as n, Fragment as f, renderList as j, createCommentVNode as p, normalizeStyle as u, createTextVNode as O, toDisplayString as y, withModifiers as w, renderSlot as z, createVNode as M } from "vue";
2
- import { Tooltip as R } from "@aplus-frontend/antdv";
1
+ import { defineComponent as P, isVNode as C, h as g, ref as x, createBlock as h, openBlock as r, unref as i, normalizeProps as A, guardReactiveProps as B, createSlots as w, withCtx as v, createElementVNode as d, normalizeClass as s, createElementBlock as n, 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";
3
3
  import "../../../config-provider/index.mjs";
4
- import { locales as Y } from "../interface.mjs";
5
- import { useNamespace as b } from "../../../config-provider/hooks/use-namespace.mjs";
6
- const E = { key: 0 }, G = ["href", "onClick"], T = { key: 0 }, D = { key: 0 }, Q = /* @__PURE__ */ L({
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({
7
7
  name: "ApLadderValueGroupMode",
8
8
  __name: "ValueGroupMode",
9
9
  props: {
@@ -50,17 +50,17 @@ const E = { key: 0 }, G = ["href", "onClick"], T = { key: 0 }, D = { key: 0 }, Q
50
50
  },
51
51
  emits: ["update:valueRefs", "handleClick"],
52
52
  setup(l, { emit: N }) {
53
- const $ = N, { e: c } = b("ap-ladder"), m = (e) => g(e) || typeof e == "function", S = (e) => {
54
- const { value: r, style: t } = e;
55
- return g(r) ? C(r, {
53
+ const $ = N, { e: c } = G("ap-ladder"), m = (e) => C(e) || typeof e == "function", S = (e) => {
54
+ const { value: o, style: t } = e;
55
+ return C(o) ? g(o, {
56
56
  style: t
57
- }) : typeof r == "function" ? C(r(), {
58
- ref: P,
57
+ }) : typeof o == "function" ? g(o(), {
58
+ ref: x,
59
59
  style: {
60
60
  ...t
61
61
  }
62
62
  }) : null;
63
- }, k = (e, r = {
63
+ }, k = (e, o = {
64
64
  rawValue: !0,
65
65
  precision: 2,
66
66
  thousand: !0,
@@ -71,39 +71,39 @@ const E = { key: 0 }, G = ["href", "onClick"], T = { key: 0 }, D = { key: 0 }, Q
71
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
72
  return "--";
73
73
  if (typeof e == "number") {
74
- if (r.percent)
75
- return `${e.toFixed(r.precision)}%`;
76
- if (r.currency)
74
+ if (o.percent)
75
+ return `${e.toFixed(o.precision)}%`;
76
+ if (o.currency)
77
77
  return e.toLocaleString(
78
- Y[r.currency ? r.currency : "CNY"],
78
+ E[o.currency ? o.currency : "CNY"],
79
79
  {
80
80
  style: "currency",
81
- currency: r.currency ? r.currency : "CNY"
81
+ currency: o.currency ? o.currency : "CNY"
82
82
  }
83
83
  );
84
- if (r.thousand) {
85
- const [t, a] = e.toFixed(r.precision ? r.precision : 2).split(".");
84
+ if (o.thousand) {
85
+ const [t, y] = e.toFixed(o.precision ? o.precision : 2).split(".");
86
86
  return `${t.replace(
87
87
  /(\d)(?=(\d{3})+(?!\d))/g,
88
- `$1${r.thousandSeparator ? r.thousandSeparator : ","}`
89
- )}.${a}`;
88
+ `$1${o.thousandSeparator ? o.thousandSeparator : ","}`
89
+ )}.${y}`;
90
90
  }
91
- return e.toFixed(r.precision ? r.precision : 2);
91
+ return e.toFixed(o.precision ? o.precision : 2);
92
92
  }
93
93
  return e;
94
94
  }, F = (e) => {
95
95
  $("handleClick", e);
96
96
  };
97
- return (e, r) => (o(), h(i(R), x(A(l.tooltipProps)), B({
97
+ return (e, o) => (r(), h(i(Y), A(B(l.tooltipProps)), w({
98
98
  default: v(() => [
99
99
  d("div", {
100
100
  class: s(i(c)("value-group"))
101
101
  }, [
102
- (o(!0), n(f, null, j(l.labelValues, (t, a) => (o(), n("div", {
103
- key: a,
102
+ (r(!0), n(f, null, j(l.labelValues, (t, y) => (r(), n("div", {
103
+ key: y,
104
104
  class: s(i(c)("value-group-item"))
105
105
  }, [
106
- t.label ? (o(), n("div", {
106
+ t.label ? (r(), n("div", {
107
107
  key: 0,
108
108
  class: s([
109
109
  i(c)("value-group-label"),
@@ -111,18 +111,18 @@ const E = { key: 0 }, G = ["href", "onClick"], T = { key: 0 }, D = { key: 0 }, Q
111
111
  ]),
112
112
  style: u(t.labelStyles)
113
113
  }, [
114
- O(y(t.label), 1),
115
- t.label ? (o(), n("span", E, ":")) : p("", !0)
114
+ O(a(t.label), 1),
115
+ t.label ? (r(), n("span", T, ":")) : p("", !0)
116
116
  ], 6)) : p("", !0),
117
117
  d("div", {
118
118
  class: s(i(c)("value-group-value"))
119
119
  }, [
120
- m(t.value) ? (o(), h(S, {
120
+ m(t.value) ? (r(), h(S, {
121
121
  key: 0,
122
122
  value: t.value,
123
123
  style: u([t.labelColor, t.valueStyles])
124
- }, null, 8, ["value", "style"])) : (o(), n(f, { key: 1 }, [
125
- t.link ? (o(), n("a", {
124
+ }, null, 8, ["value", "style"])) : (r(), n(f, { key: 1 }, [
125
+ t.link ? (r(), n("a", {
126
126
  key: 0,
127
127
  href: t.link,
128
128
  target: "_blank",
@@ -132,16 +132,20 @@ const E = { key: 0 }, G = ["href", "onClick"], T = { key: 0 }, D = { key: 0 }, Q
132
132
  t.linkStyles,
133
133
  t.linkColor ? { color: t.linkColor } : void 0
134
134
  ]),
135
- onClick: w((U) => F(t), ["prevent"])
136
- }, y(k(t.value, { ...t })), 15, G)) : (o(), n(f, { key: 1 }, [
135
+ onClick: z((L) => F(t), ["prevent"])
136
+ }, a(k(t.value, { ...t })), 15, D)) : (r(), n(f, { key: 1 }, [
137
137
  d("span", {
138
138
  style: u([
139
139
  l.valueStyles,
140
140
  t.valueStyles,
141
141
  t.valueColor ? { color: t.valueColor } : void 0
142
- ])
143
- }, y(k(t.value, { ...t })), 5),
144
- t.unit ? (o(), n("span", {
142
+ ]),
143
+ class: s(
144
+ t.handleValueClick ? i(c)("value-group-link") : void 0
145
+ ),
146
+ onClick: (L) => t.handleValueClick && t.handleValueClick(l.labelValues)
147
+ }, a(k(t.value, { ...t })), 15, U),
148
+ t.unit ? (r(), n("span", {
145
149
  key: 0,
146
150
  class: s(i(c)("value-group-unit")),
147
151
  style: u([
@@ -149,7 +153,7 @@ const E = { key: 0 }, G = ["href", "onClick"], T = { key: 0 }, D = { key: 0 }, Q
149
153
  t.unitStyles,
150
154
  t.unitColor ? { color: t.unitColor } : void 0
151
155
  ])
152
- }, y(t.unit), 7)) : p("", !0)
156
+ }, a(t.unit), 7)) : p("", !0)
153
157
  ], 64))
154
158
  ], 64))
155
159
  ], 2)
@@ -161,7 +165,7 @@ const E = { key: 0 }, G = ["href", "onClick"], T = { key: 0 }, D = { key: 0 }, Q
161
165
  e.$slots.title ? {
162
166
  name: "title",
163
167
  fn: v(() => [
164
- z(e.$slots, "title")
168
+ M(e.$slots, "title")
165
169
  ]),
166
170
  key: "0"
167
171
  } : l.tooltip ? {
@@ -170,31 +174,31 @@ const E = { key: 0 }, G = ["href", "onClick"], T = { key: 0 }, D = { key: 0 }, Q
170
174
  d("div", {
171
175
  class: s(i(c)("tooltip"))
172
176
  }, [
173
- (o(!0), n(f, null, j(l.labelValues, (t, a) => (o(), n("div", {
174
- key: a,
177
+ (r(!0), n(f, null, j(l.labelValues, (t, y) => (r(), n("div", {
178
+ key: y,
175
179
  class: s(i(c)("tooltip-item"))
176
180
  }, [
177
181
  d("span", {
178
182
  class: s(i(c)("tooltip-label")),
179
183
  style: u(l.tooltipLabelStyles)
180
- }, y(t.label ? t.label : "--") + ": ", 7),
181
- m(t.value) ? (o(), n("span", {
184
+ }, a(t.label ? t.label : "--") + ": ", 7),
185
+ m(t.value) ? (r(), n("span", {
182
186
  key: 0,
183
187
  class: s(i(c)("tooltip-value")),
184
188
  style: u(l.tooltipValueStyles)
185
189
  }, [
186
- M(S, {
190
+ R(S, {
187
191
  value: t.value,
188
192
  style: u([t.tooltipValueStyles])
189
193
  }, null, 8, ["value", "style"]),
190
- t.unit ? (o(), n("span", T, y(t.unit), 1)) : p("", !0)
191
- ], 6)) : (o(), n("span", {
194
+ t.unit ? (r(), n("span", b, a(t.unit), 1)) : p("", !0)
195
+ ], 6)) : (r(), n("span", {
192
196
  key: 1,
193
197
  class: s(i(c)("tooltip-value")),
194
198
  style: u(l.tooltipValueStyles)
195
199
  }, [
196
- O(y(k(t.value, { ...t })) + " ", 1),
197
- t.unit ? (o(), n("span", D, y(t.unit), 1)) : p("", !0)
200
+ O(a(k(t.value, { ...t })) + " ", 1),
201
+ t.unit ? (r(), n("span", q, a(t.unit), 1)) : p("", !0)
198
202
  ], 6))
199
203
  ], 2))), 128))
200
204
  ], 2)
@@ -205,5 +209,5 @@ const E = { key: 0 }, G = ["href", "onClick"], T = { key: 0 }, D = { key: 0 }, Q
205
209
  }
206
210
  });
207
211
  export {
208
- Q as default
212
+ W as default
209
213
  };
@@ -68,6 +68,10 @@ export interface ApLadderLabelValue {
68
68
  * 跳转第三方链接 - 回调
69
69
  */
70
70
  handleClickLink?: () => void;
71
+ /**
72
+ * value值-点击事件
73
+ */
74
+ handleValueClick?: (labelValueRecord: ApLadderLabelValue[]) => void;
71
75
  /**
72
76
  * label 标签的文本对齐方式 仅支持健值对(labelValues)类型
73
77
  * @default `right`
@@ -73,6 +73,7 @@ declare const _default: DefineComponent<BatchInputGroupProps, {}, {}, {}, {}, Co
73
73
  readonly clearIcon?: any;
74
74
  readonly allowClear?: boolean | undefined;
75
75
  readonly emptyText?: string | undefined;
76
+ readonly beforeInput?: ((nextVal: string) => string) | undefined;
76
77
  } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
77
78
  $attrs: {
78
79
  [x: string]: unknown;
@@ -67,7 +67,8 @@ const d = "GROUP_SEARCH_ALL", ge = /* @__PURE__ */ N({
67
67
  suffix: {},
68
68
  clearIcon: {},
69
69
  allowClear: { type: Boolean, default: !0 },
70
- emptyText: { default: "--" }
70
+ emptyText: { default: "--" },
71
+ beforeInput: {}
71
72
  },
72
73
  emits: ["update:value"],
73
74
  setup(V, { emit: C }) {