@aplus-frontend/ui 6.24.2 → 6.25.0

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 (30) hide show
  1. package/es/src/ap-form/interface.d.ts +1 -2
  2. package/es/src/ap-form/search-form/hooks/use-count-per-row.mjs +27 -24
  3. package/es/src/ap-form/search-form/index.vue.d.ts +9 -3
  4. package/es/src/ap-form/search-form/index.vue.mjs +116 -108
  5. package/es/src/ap-pro-card/components/card/index.vue.d.ts +1 -1
  6. package/es/src/ap-pro-card/components/statistic/index.vue.d.ts +2 -1
  7. package/es/src/ap-pro-card/components/statistic/index.vue2.mjs +43 -37
  8. package/es/src/ap-pro-card/interface.d.ts +3 -1
  9. package/es/src/business/ap-value-select-card/index.vue.d.ts +6 -0
  10. package/es/src/business/ap-value-select-card/index.vue2.mjs +88 -80
  11. package/es/src/version.d.ts +1 -1
  12. package/es/src/version.mjs +1 -1
  13. package/lib/src/ap-form/interface.d.ts +1 -2
  14. package/lib/src/ap-form/search-form/hooks/use-count-per-row.js +1 -1
  15. package/lib/src/ap-form/search-form/index.vue.d.ts +9 -3
  16. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  17. package/lib/src/ap-pro-card/components/card/index.vue.d.ts +1 -1
  18. package/lib/src/ap-pro-card/components/statistic/index.vue.d.ts +2 -1
  19. package/lib/src/ap-pro-card/components/statistic/index.vue2.js +1 -1
  20. package/lib/src/ap-pro-card/interface.d.ts +3 -1
  21. package/lib/src/business/ap-value-select-card/index.vue.d.ts +6 -0
  22. package/lib/src/business/ap-value-select-card/index.vue2.js +1 -1
  23. package/lib/src/version.d.ts +1 -1
  24. package/lib/src/version.js +1 -1
  25. package/package.json +5 -5
  26. package/theme/ap-pro-card/index.css +29 -25
  27. package/theme/ap-pro-card/index.less +32 -16
  28. package/theme/ap-value-select-card/index.css +1 -0
  29. package/theme/ap-value-select-card/index.less +1 -0
  30. package/theme/index.css +30 -25
@@ -151,7 +151,6 @@ export type ApFormListProps = {
151
151
  initialValue?: any[];
152
152
  transform?: ApFormItemTransformType;
153
153
  };
154
- type AllowCountPerRowType = 1 | 2 | 3 | 4 | 6 | 8 | 12 | 24;
155
154
  export type ApFormSearchFormProps = ApFormProps & {
156
155
  collapse?: boolean;
157
156
  defaultCollapse?: boolean;
@@ -163,7 +162,7 @@ export type ApFormSearchFormProps = ApFormProps & {
163
162
  customReset?: boolean;
164
163
  extraInAction?: boolean;
165
164
  forceExpand?: boolean;
166
- countPerRow?: AllowCountPerRowType;
165
+ countPerRow?: number;
167
166
  submitLoading?: boolean;
168
167
  /**
169
168
  * 最大显示的行(超出后将会收起进入更多筛选)
@@ -1,35 +1,38 @@
1
- import { ref as w, watchEffect as a, computed as s, unref as i } from "vue";
2
- import { useResizeObserver as P } from "@vueuse/core";
3
- import { isUndefined as R } from "lodash-unified";
4
- const c = [1, 2, 3, 4, 6, 8, 12, 24], g = { xs: 0, sm: 768, md: 1280, lg: 1728 }, h = Object.entries(g).sort(
5
- (t, r) => r[1] - t[1]
6
- ), v = (t) => {
7
- const r = w(0);
8
- a(
9
- (e) => {
10
- const n = R(t.resizeTarget) ? document.documentElement : t.resizeTarget, { stop: o } = P(n, (f) => {
11
- const m = f[0], { width: d } = m.contentRect;
12
- r.value = d;
1
+ import { ref as a, watchEffect as d, computed as r, unref as f } from "vue";
2
+ import { useResizeObserver as w } from "@vueuse/core";
3
+ import { isUndefined as h } from "lodash-unified";
4
+ const l = { xs: 0, sm: 768, md: 1280, lg: 1728 }, z = Object.entries(l).sort(
5
+ (e, n) => n[1] - e[1]
6
+ ), p = (e) => {
7
+ const n = a(0);
8
+ d(
9
+ (t) => {
10
+ const o = h(e.resizeTarget) ? document.documentElement : e.resizeTarget, { stop: c } = w(o, (i) => {
11
+ const m = i[0], { width: u } = m.contentRect;
12
+ n.value = u;
13
13
  });
14
- e(() => {
15
- o();
14
+ t(() => {
15
+ c();
16
16
  });
17
17
  },
18
18
  { flush: "post" }
19
19
  );
20
- const u = s(() => {
21
- for (const [e, n] of h)
22
- if (i(r) > n)
23
- return e;
20
+ const s = r(() => {
21
+ for (const [t, o] of z)
22
+ if (f(n) > o)
23
+ return t;
24
24
  return "md";
25
25
  });
26
- return s(() => {
27
- const e = c.findIndex(
28
- (o) => o === t.countPerRow
29
- ), n = i(u);
30
- return n === "lg" ? c[e + 1] || t.countPerRow : n === "xs" && c[e - 1] || t.countPerRow;
26
+ return r(() => {
27
+ const t = e.countPerRow, o = {
28
+ xs: t - 2,
29
+ sm: t - 1,
30
+ md: t,
31
+ lg: t + 1
32
+ };
33
+ return Math.max(1, o[s.value]);
31
34
  });
32
35
  };
33
36
  export {
34
- v as useCountPerRow
37
+ p as useCountPerRow
35
38
  };
@@ -414,7 +414,10 @@ declare function __VLS_template(): {
414
414
  default: string | number | ColSize;
415
415
  };
416
416
  xl: {
417
- type: PropType<string | number | ColSize>;
417
+ type: PropType<string | number | **
418
+ *最后一行剩余的空间
419
+ tips: 如果有小数,则其包含误差, 会比实际值更大
420
+ */).ColSize>;
418
421
  default: string | number | ColSize;
419
422
  };
420
423
  xxl: {
@@ -851,7 +854,7 @@ declare const __VLS_component: DefineComponent<ApFormSearchFormProps, {
851
854
  validateTrigger: string | string[];
852
855
  hideRequiredMark: boolean;
853
856
  validateOnRuleChange: boolean;
854
- countPerRow: 1 | 2 | 3 | 4 | 6 | 8 | 12 | 24;
857
+ countPerRow: number;
855
858
  defaultCollapse: boolean;
856
859
  customReset: boolean;
857
860
  extraInAction: boolean;
@@ -1253,7 +1256,10 @@ declare const __VLS_component: DefineComponent<ApFormSearchFormProps, {
1253
1256
  default: string | number | ColSize;
1254
1257
  };
1255
1258
  xl: {
1256
- type: PropType<string | number | ColSize>;
1259
+ type: PropType<string | number | **
1260
+ *最后一行剩余的空间
1261
+ tips: 如果有小数,则其包含误差, 会比实际值更大
1262
+ */).ColSize>;
1257
1263
  default: string | number | ColSize;
1258
1264
  };
1259
1265
  xxl: {
@@ -1,27 +1,28 @@
1
- import { isVNode as ne, defineComponent as le, useSlots as re, ref as D, shallowRef as U, computed as S, unref as n, watch as W, createVNode as o, Fragment as _, createBlock as x, openBlock as d, mergeProps as se, withCtx as A, resolveDynamicComponent as B, createElementBlock as ie, renderList as ue } from "vue";
2
- import { Col as w, Flex as I, Button as M, Row as ce } from "@aplus-frontend/antdv";
1
+ import { isVNode as se, defineComponent as ie, useSlots as ce, ref as D, shallowRef as U, computed as _, unref as n, watch as z, createVNode as o, Fragment as w, createBlock as y, openBlock as d, mergeProps as ue, withCtx as B, resolveDynamicComponent as I, createElementBlock as pe, renderList as de, normalizeStyle as fe } from "vue";
2
+ import { Col as R, Flex as k, Button as M, Row as me } from "@aplus-frontend/antdv";
3
3
  import "../ap-form.vue.mjs";
4
4
  import "../item/index.vue2.mjs";
5
- import { genRealChildren as z } from "../item-group/helper.mjs";
5
+ import { genRealChildren as q } from "../item-group/helper.mjs";
6
6
  import "../../config-provider/index.mjs";
7
- import { isArray as pe, isBoolean as de, omit as me } from "lodash-unified";
8
- import { isDef as q } from "../../utils/index.mjs";
9
- import { execFunc as H, diffFormItem as fe } from "./utils.mjs";
7
+ import { isArray as he, isBoolean as xe, omit as ge } from "lodash-unified";
8
+ import { isDef as H } from "../../utils/index.mjs";
9
+ import { execFunc as G, diffFormItem as ye } from "./utils.mjs";
10
10
  import "./components/popover-filter.vue.mjs";
11
- import { useCountPerRow as he } from "./hooks/use-count-per-row.mjs";
11
+ import { useCountPerRow as ve } from "./hooks/use-count-per-row.mjs";
12
12
  import "./components/popover-sorter/index.vue.mjs";
13
- import { useSorter as ge } from "./hooks/use-sorter.mjs";
14
- import { getTargetNode as xe } from "./hooks/use-collapse-input-count.mjs";
15
- import { useNamespace as ye } from "../../config-provider/hooks/use-namespace.mjs";
16
- import { useLocale as ve } from "../../config-provider/hooks/use-locale.mjs";
17
- import G from "../item/index.vue.mjs";
18
- import Ce from "./components/popover-filter.vue2.mjs";
19
- import Se from "./components/popover-sorter/index.vue2.mjs";
20
- import _e from "../ap-form.vue2.mjs";
21
- function we(m) {
22
- return typeof m == "function" || Object.prototype.toString.call(m) === "[object Object]" && !ne(m);
13
+ import { useSorter as Ce } from "./hooks/use-sorter.mjs";
14
+ import { getTargetNode as Se } from "./hooks/use-collapse-input-count.mjs";
15
+ import { floorWith as J } from "@fruits-chain/utils";
16
+ import { useNamespace as _e } from "../../config-provider/hooks/use-namespace.mjs";
17
+ import { useLocale as we } from "../../config-provider/hooks/use-locale.mjs";
18
+ import K from "../item/index.vue.mjs";
19
+ import Re from "./components/popover-filter.vue2.mjs";
20
+ import be from "./components/popover-sorter/index.vue2.mjs";
21
+ import Fe from "../ap-form.vue2.mjs";
22
+ function Ne(f) {
23
+ return typeof f == "function" || Object.prototype.toString.call(f) === "[object Object]" && !se(f);
23
24
  }
24
- const s = 24, He = /* @__PURE__ */ le({
25
+ const s = 100, Xe = /* @__PURE__ */ ie({
25
26
  name: "ApFormSearchForm",
26
27
  __name: "index",
27
28
  props: {
@@ -99,7 +100,7 @@ const s = 24, He = /* @__PURE__ */ le({
99
100
  default: !1
100
101
  },
101
102
  countPerRow: {
102
- default: 4
103
+ default: 5
103
104
  },
104
105
  submitLoading: {
105
106
  type: Boolean
@@ -116,152 +117,159 @@ const s = 24, He = /* @__PURE__ */ le({
116
117
  default: 300
117
118
  }
118
119
  },
119
- setup(m, {
120
- expose: J
120
+ setup(f, {
121
+ expose: Q
121
122
  }) {
122
- var L;
123
- const i = re(), t = m, {
124
- b: f
125
- } = ye("ap-form-search-form"), {
126
- t: k
127
- } = ve(), K = he(t), y = D(), Q = D();
128
- function T() {
123
+ var W;
124
+ const i = ce(), t = f, {
125
+ b: m
126
+ } = _e("ap-form-search-form"), {
127
+ t: T
128
+ } = we(), X = ve(t), v = D(), Y = D();
129
+ function P() {
129
130
  var a;
130
- const e = (a = y.value) == null ? void 0 : a.getFieldsValueTransformed(!0);
131
- H(t.onSubmit, e);
131
+ const e = (a = v.value) == null ? void 0 : a.getFieldsValueTransformed(!0);
132
+ G(t.onSubmit, e);
132
133
  }
133
- function X() {
134
+ function Z() {
134
135
  var e, a;
135
- t.customReset || (a = (e = y.value) == null ? void 0 : e.resetFields) == null || a.call(e), H(t.onReset);
136
+ t.customReset || (a = (e = v.value) == null ? void 0 : e.resetFields) == null || a.call(e), G(t.onReset);
136
137
  }
137
- const Y = (e) => q(e) ? (pe(e) ? e : [e]).join("") : Date.now();
138
+ const ee = (e) => H(e) ? (he(e) ? e : [e]).join("") : Date.now();
138
139
  let E = [];
139
- const h = U(z(i.default())), c = U((L = i.extra) == null ? void 0 : L.call(i)), P = S(() => Math.floor(s / n(K))), {
140
- items: R,
141
- sorted: O,
142
- handleClickConfirm: b
143
- } = ge(h);
144
- W(() => i.default(), (e) => {
145
- E = h.value, h.value = fe(E, z(e)), O.value = !1;
146
- }), W(() => {
140
+ const h = U(q(i.default())), p = U((W = i.extra) == null ? void 0 : W.call(i)), O = _(() => J(s / n(X), 4)), {
141
+ items: b,
142
+ sorted: L,
143
+ handleClickConfirm: F
144
+ } = Ce(h);
145
+ z(() => i.default(), (e) => {
146
+ E = h.value, h.value = ye(E, q(e)), L.value = !1;
147
+ }), z(() => {
147
148
  var e;
148
149
  return (e = i.extra) == null ? void 0 : e.call(i);
149
150
  }, (e) => {
150
- c.value = e;
151
+ p.value = e;
151
152
  });
152
- const l = S(() => {
153
- const e = h.value, a = [], r = [], g = [], u = n(P);
154
- let v = 0, F = 0;
155
- const te = s * t.maxRows - u * (n(c) && !t.extraInAction ? 2 : 1);
156
- e.forEach((N) => {
157
- const p = xe(N).props;
158
- if (de(p.hidden) ? !!p.hidden : q(p.hidden))
159
- a.push(N);
153
+ function te(e) {
154
+ return J(e * (s / 24), 4);
155
+ }
156
+ const l = _(() => {
157
+ const e = h.value, a = [], r = [], g = [], c = n(O);
158
+ console.log("_spanPerCol", c);
159
+ let C = 0, N = 0;
160
+ const ne = s * t.maxRows - c * (n(p) && !t.extraInAction ? 2 : 1);
161
+ e.forEach((A) => {
162
+ const u = Se(A).props;
163
+ if (xe(u.hidden) ? !!u.hidden : H(u.hidden))
164
+ a.push(A);
160
165
  else {
161
- let C = p.span || u;
162
- const V = {
163
- node: N,
164
- span: C,
165
- key: `ApFormSearchFormItem-${Y(p.name)}-${p._signal}`
166
- }, $ = s - v % s;
167
- $ < C && (C += $), v += C, v > te ? r.push(V) : (F = v, g.push(V));
166
+ let S = u.span ? te(u.span) : c;
167
+ const j = {
168
+ node: A,
169
+ span: S,
170
+ key: `ApFormSearchFormItem-${ee(u.name)}-${u._signal}`
171
+ }, V = s - C % s;
172
+ V < S && (S += V), C += S, C > ne ? r.push(j) : (N = C, g.push(j));
168
173
  }
169
174
  });
170
- const j = s - (F + u) % s, oe = F % s < u, ae = j < u ? s : j;
175
+ const $ = s - (N + c) % s, le = Math.ceil(N) % s < c, re = $ < c ? s : $;
171
176
  return {
172
- hideNode: o(_, null, [a]),
177
+ hideNode: o(w, null, [a]),
173
178
  nodes: g,
174
179
  collapseNodes: r,
175
- extraSpan: ae,
176
- lastRowOnlyIncludeActionAndExtra: oe
180
+ extraSpan: re,
181
+ lastRowOnlyIncludeActionAndExtra: le
177
182
  };
178
- }), Z = S(() => {
183
+ }), x = (e) => `${e}%`, oe = _(() => {
179
184
  let e;
180
- const a = l.value.collapseNodes.length || t.sortable && h.value.length, r = o(w, {
181
- span: n(P),
185
+ const a = l.value.collapseNodes.length || t.sortable && h.value.length, r = o(R, {
186
+ flex: x(n(O)),
182
187
  key: "actionWrapper"
183
188
  }, {
184
- default: () => [o(G, null, {
185
- default: () => [o(I, {
189
+ default: () => [o(K, null, {
190
+ default: () => [o(k, {
186
191
  wrap: "wrap",
187
- justify: l.value.lastRowOnlyIncludeActionAndExtra && !(n(c) && t.extraInAction) ? "flex-end" : "space-between"
192
+ justify: l.value.lastRowOnlyIncludeActionAndExtra && !(n(p) && t.extraInAction) ? "flex-end" : "space-between"
188
193
  }, {
189
- default: () => [o(I, {
194
+ default: () => [o(k, {
190
195
  gap: 8,
191
196
  wrap: "wrap"
192
197
  }, {
193
198
  default: () => [a ? o("div", {
194
- class: f("column-setting-trigger-wrapper")
195
- }, [l.value.collapseNodes.length ? o(Ce, {
196
- onSubmit: T,
199
+ class: m("column-setting-trigger-wrapper")
200
+ }, [l.value.collapseNodes.length ? o(Re, {
201
+ onSubmit: P,
197
202
  config: l.value.collapseNodes,
198
203
  submitLoading: t.submitLoading
199
- }, null) : null, t.sortable && R.value.length ? o(Se, {
204
+ }, null) : null, t.sortable && b.value.length ? o(be, {
200
205
  ref: "sorterIns",
201
- items: R.value,
202
- onClickConfirm: b,
203
- sorted: O.value
206
+ items: b.value,
207
+ onClickConfirm: F,
208
+ sorted: L.value
204
209
  }, null) : null]) : null, o(M, {
205
210
  type: "primary",
206
- onClick: T,
211
+ onClick: P,
207
212
  loading: t.submitLoading ? {
208
213
  delay: t.loadingDelay
209
214
  } : !1,
210
215
  htmlType: "submit",
211
- class: f("action-btn")
216
+ class: m("action-btn")
212
217
  }, {
213
- default: () => [t.searchText || k("ap.apForm.search.search")]
218
+ default: () => [t.searchText || T("ap.apForm.search.search")]
214
219
  }), o(M, {
215
- onClick: X,
220
+ onClick: Z,
216
221
  type: "text",
217
- class: [f("action-btn"), f("action-btn-reset")]
222
+ class: [m("action-btn"), m("action-btn-reset")]
218
223
  }, {
219
- default: () => [t.resetText || k("ap.apForm.search.reset")]
224
+ default: () => [t.resetText || T("ap.apForm.search.reset")]
220
225
  })]
221
- }), t.extraInAction ? n(c) : null]
226
+ }), t.extraInAction ? n(p) : null]
222
227
  })]
223
228
  })]
224
- }), g = !t.extraInAction && n(c) ? o(w, {
225
- span: l.value.extraSpan,
229
+ }), g = !t.extraInAction && n(p) ? o(R, {
230
+ flex: x(l.value.extraSpan),
226
231
  key: "extraNode"
227
232
  }, {
228
- default: () => [o(G, null, {
229
- default: () => [o(I, {
233
+ default: () => [o(K, null, {
234
+ default: () => [o(k, {
230
235
  justify: l.value.extraSpan === s || l.value.lastRowOnlyIncludeActionAndExtra ? "start" : "flex-end"
231
- }, we(e = n(c)) ? e : {
236
+ }, Ne(e = n(p)) ? e : {
232
237
  default: () => [e]
233
238
  })]
234
239
  })]
235
- }) : null, u = o(w, {
236
- span: l.value.extraSpan
240
+ }) : null, c = o(R, {
241
+ flex: x(l.value.extraSpan)
237
242
  }, null);
238
- return l.value.lastRowOnlyIncludeActionAndExtra ? o(_, null, [g || u, r]) : o(_, null, [r, g]);
243
+ return l.value.lastRowOnlyIncludeActionAndExtra ? o(w, null, [g || c, r]) : o(w, null, [r, g]);
239
244
  });
240
- function ee() {
245
+ function ae() {
241
246
  var a;
242
- const e = (a = Q.value) == null ? void 0 : a.getCachedList();
243
- b(e);
247
+ const e = (a = Y.value) == null ? void 0 : a.getCachedList();
248
+ F(e);
244
249
  }
245
- return J({
246
- apForm: S(() => n(y)),
247
- getSorterItems: () => R.value,
248
- setSorterItems: b,
249
- resetSorterItems: ee
250
- }), (e, a) => (d(), x(_e, se({
250
+ return Q({
251
+ apForm: _(() => n(v)),
252
+ getSorterItems: () => b.value,
253
+ setSorterItems: F,
254
+ resetSorterItems: ae
255
+ }), (e, a) => (d(), y(Fe, ue({
251
256
  ref_key: "apForm",
252
- ref: y,
253
- class: n(f)()
254
- }, n(me)(t, ["collapse", "defaultCollapse", "onUpdate:collapse", "searchText", "resetText", "onSubmit", "onReset", "extraInAction", "forceExpand", "countPerRow"])), {
255
- default: A(() => [(d(), x(B(l.value.hideNode))), o(n(ce), {
257
+ ref: v,
258
+ class: n(m)()
259
+ }, n(ge)(t, ["collapse", "defaultCollapse", "onUpdate:collapse", "searchText", "resetText", "onSubmit", "onReset", "extraInAction", "forceExpand", "countPerRow"])), {
260
+ default: B(() => [(d(), y(I(l.value.hideNode))), o(n(me), {
256
261
  gutter: 8
257
262
  }, {
258
- default: A(() => [(d(!0), ie(_, null, ue(l.value.nodes, (r) => (d(), x(n(w), {
263
+ default: B(() => [(d(!0), pe(w, null, de(l.value.nodes, (r) => (d(), y(n(R), {
259
264
  key: r.key,
260
- span: r.span
265
+ flex: x(r.span),
266
+ style: fe({
267
+ maxWidth: x(r.span)
268
+ })
261
269
  }, {
262
- default: A(() => [(d(), x(B(r.node)))]),
270
+ default: B(() => [(d(), y(I(r.node)))]),
263
271
  _: 2
264
- }, 1032, ["span"]))), 128)), (d(), x(B(Z.value)))]),
272
+ }, 1032, ["flex", "style"]))), 128)), (d(), y(I(oe.value)))]),
265
273
  _: 1
266
274
  })]),
267
275
  _: 1
@@ -269,5 +277,5 @@ const s = 24, He = /* @__PURE__ */ le({
269
277
  }
270
278
  });
271
279
  export {
272
- He as default
280
+ Xe as default
273
281
  };
@@ -21,9 +21,9 @@ declare const __VLS_component: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}
21
21
  gutter: ApProCardGutter | ApProCardGutter[];
22
22
  ghost: boolean;
23
23
  bordered: boolean;
24
+ collapsible: boolean;
24
25
  headerBordered: boolean;
25
26
  hoverable: boolean;
26
- collapsible: boolean;
27
27
  defaultCollapsed: boolean;
28
28
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
29
29
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -8,6 +8,7 @@ declare function __VLS_template(): {
8
8
  };
9
9
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
10
10
  declare const __VLS_component: DefineComponent<ApProCardStatisticProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApProCardStatisticProps> & Readonly<{}>, {
11
+ size: "default" | "small";
11
12
  title: string | number | boolean | void | VNode<RendererNode, RendererElement, {
12
13
  [key: string]: any;
13
14
  }> | (string | number | boolean | void | VNode<RendererNode, RendererElement, {
@@ -15,7 +16,7 @@ declare const __VLS_component: DefineComponent<ApProCardStatisticProps, {}, {},
15
16
  }> | null | undefined)[] | VNode<RendererNode, RendererElement, {
16
17
  [key: string]: any;
17
18
  }> | null;
18
- layout: "horizontal" | "vertical" | "inline";
19
+ layout: "horizontal" | "vertical" | "vertical-center" | "inline";
19
20
  icon: string | number | boolean | void | VNodeArrayChildren | VNode<RendererNode, RendererElement, {
20
21
  [key: string]: any;
21
22
  }> | null;
@@ -1,11 +1,11 @@
1
- import { defineComponent as E, useSlots as F, computed as i, createVNode as r, Fragment as d, createElementBlock as P, openBlock as l, mergeProps as y, createBlock as a, createElementVNode as x, resolveDynamicComponent as o, normalizeClass as C, unref as O, createSlots as V, withCtx as s } from "vue";
2
- import { QuestionCircleOutlined as z } from "@ant-design/icons-vue";
1
+ import { defineComponent as h, useSlots as E, computed as i, createVNode as r, Fragment as d, createElementBlock as F, openBlock as u, mergeProps as x, createBlock as a, createElementVNode as C, resolveDynamicComponent as o, normalizeClass as B, unref as O, createSlots as P, withCtx as s } from "vue";
2
+ import { QuestionCircleOutlined as V } from "@ant-design/icons-vue";
3
3
  import { Tooltip as I, Badge as Q, Statistic as R } from "@aplus-frontend/antdv";
4
4
  import { omit as T } from "lodash-unified";
5
5
  import "../../../config-provider/index.mjs";
6
- import { mergeClass as B } from "../../../editable-table/utils.mjs";
6
+ import { mergeClass as c } from "../../../editable-table/utils.mjs";
7
7
  import { useNamespace as q } from "../../../config-provider/hooks/use-namespace.mjs";
8
- const Y = /* @__PURE__ */ E({
8
+ const Y = /* @__PURE__ */ h({
9
9
  name: "ApProCardStatistic",
10
10
  __name: "index",
11
11
  props: {
@@ -55,78 +55,84 @@ const Y = /* @__PURE__ */ E({
55
55
  },
56
56
  trend: {
57
57
  default: void 0
58
+ },
59
+ size: {
60
+ default: "default"
58
61
  }
59
62
  },
60
63
  setup(S) {
61
- const t = F(), n = S, {
62
- b: u
63
- } = q("pro-card-statistic"), b = i(() => u()), g = i(() => u("tip")), D = i(() => {
64
- const e = u();
65
- return B(`${e}-trend-icon`, [n.trend ? `${e}-trend-icon-${n.trend}` : void 0].filter(Boolean));
66
- }), N = i(() => u("status")), $ = i(() => u("icon")), M = i(() => u("wrapper")), A = i(() => u("content")), j = i(() => {
67
- const e = u();
68
- return B(`${e}-layout`, [n.layout ? `${e}-layout-${n.layout}` : void 0, n.trend ? `${e}-trend-${n.trend}` : void 0].filter(Boolean));
69
- }), k = i(() => u("description")), c = i(() => {
64
+ const t = E(), n = S, {
65
+ b: l
66
+ } = q("pro-card-statistic"), b = i(() => {
67
+ const e = l();
68
+ return c(`${e}`, [n.size ? `${e}-size-${n.size}` : void 0].filter(Boolean));
69
+ }), g = i(() => l("tip")), $ = i(() => {
70
+ const e = l();
71
+ return c(`${e}-trend-icon`, [n.trend ? `${e}-trend-icon-${n.trend}` : void 0].filter(Boolean));
72
+ }), D = i(() => l("status")), N = i(() => l("icon")), M = i(() => l("wrapper")), A = i(() => l("content")), j = i(() => {
73
+ const e = l();
74
+ return c(`${e}-layout`, [n.layout ? `${e}-layout-${n.layout}` : void 0, n.trend ? `${e}-trend-${n.trend}` : void 0].filter(Boolean));
75
+ }), k = i(() => l("description")), f = i(() => {
70
76
  var e;
71
77
  return n.tip || t.tip ? r(I, {
72
78
  title: n.tip ?? ((e = t.tip) == null ? void 0 : e.call(t))
73
79
  }, {
74
- default: () => [r(z, {
80
+ default: () => [r(V, {
75
81
  class: g.value
76
82
  }, null)]
77
83
  }) : void 0;
78
- }), f = i(() => n.trend ? r("div", {
79
- class: D.value
84
+ }), p = i(() => n.trend ? r("div", {
85
+ class: $.value
80
86
  }, null) : void 0), _ = i(() => n.status ? r(Q, {
81
- class: N.value,
87
+ class: D.value,
82
88
  status: n.status
83
- }, null) : void 0), w = i(() => {
89
+ }, null) : void 0), z = i(() => {
84
90
  var e;
85
91
  return n.icon || t.icon ? r("div", {
86
- class: $.value
92
+ class: N.value
87
93
  }, [n.icon ?? ((e = t.icon) == null ? void 0 : e.call(t))]) : void 0;
88
- }), p = i(() => {
94
+ }), m = i(() => {
89
95
  var e;
90
96
  return n.title || t.title ? r(d, null, [n.title || ((e = t.title) == null ? void 0 : e.call(t))]) : void 0;
91
- }), m = i(() => {
97
+ }), v = i(() => {
92
98
  var e;
93
99
  return n.prefix || t.prefix ? r(d, null, [n.prefix || ((e = t.prefix) == null ? void 0 : e.call(t))]) : void 0;
94
- }), v = i(() => {
100
+ }), y = i(() => {
95
101
  var e;
96
102
  return n.suffix || t.suffix ? r(d, null, [n.suffix || ((e = t.suffix) == null ? void 0 : e.call(t))]) : void 0;
97
- }), h = i(() => {
103
+ }), w = i(() => {
98
104
  var e;
99
105
  return n.description || t.description ? r("div", {
100
106
  class: k.value
101
107
  }, [n.description || ((e = t.description) == null ? void 0 : e.call(t))]) : void 0;
102
108
  });
103
- return (e, G) => (l(), P("div", y({
109
+ return (e, G) => (u(), F("div", x({
104
110
  ...e.$attrs
105
111
  }, {
106
112
  class: b.value
107
- }), [(l(), a(o(w.value))), x("div", {
108
- class: C(M.value)
109
- }, [(l(), a(o(_.value))), x("div", {
110
- class: C(A.value)
111
- }, [r(O(R), y({
113
+ }), [(u(), a(o(z.value))), C("div", {
114
+ class: B(M.value)
115
+ }, [(u(), a(o(_.value))), C("div", {
116
+ class: B(A.value)
117
+ }, [r(O(R), x({
112
118
  class: j.value
113
119
  }, {
114
120
  ...O(T)(n, ["title", "prefix"])
115
- }), V({
121
+ }), P({
116
122
  _: 2
117
- }, [p.value || c.value ? {
123
+ }, [m.value || f.value ? {
118
124
  name: "title",
119
- fn: s(() => [(l(), a(o(p.value))), (l(), a(o(c.value)))]),
125
+ fn: s(() => [(u(), a(o(m.value))), (u(), a(o(f.value)))]),
120
126
  key: "0"
121
- } : void 0, f.value || m.value ? {
127
+ } : void 0, p.value || v.value ? {
122
128
  name: "prefix",
123
- fn: s(() => [(l(), a(o(f.value))), (l(), a(o(m.value)))]),
129
+ fn: s(() => [(u(), a(o(p.value))), (u(), a(o(v.value)))]),
124
130
  key: "1"
125
- } : void 0, v.value ? {
131
+ } : void 0, y.value ? {
126
132
  name: "suffix",
127
- fn: s(() => [(l(), a(o(v.value)))]),
133
+ fn: s(() => [(u(), a(o(y.value)))]),
128
134
  key: "2"
129
- } : void 0]), 1040, ["class"]), (l(), a(o(h.value)))], 2)], 2)], 16));
135
+ } : void 0]), 1040, ["class"]), (u(), a(o(w.value)))], 2)], 2)], 16));
130
136
  }
131
137
  });
132
138
  export {
@@ -79,9 +79,11 @@ export type ApProCardStatisticProps = StatisticProps & {
79
79
  /** Icon 图标 */
80
80
  icon?: VNodeChild;
81
81
  /** Layout 布局 */
82
- layout?: 'horizontal' | 'vertical' | 'inline';
82
+ layout?: 'horizontal' | 'vertical' | 'vertical-center' | 'inline';
83
83
  /** 趋势 */
84
84
  trend?: 'up' | 'down';
85
+ /** 尺寸 */
86
+ size?: 'default' | 'small';
85
87
  };
86
88
  export type ApProCardStatisticSolts = {
87
89
  /**
@@ -22,6 +22,12 @@ declare const _default: <T extends Record<string, any> = Record<string, any>>(__
22
22
  }>): void;
23
23
  attrs: any;
24
24
  slots: {
25
+ 'popover-label'?(_: {
26
+ option: ApValueSelectCardOption<T>;
27
+ }): any;
28
+ 'popover-value'?(_: {
29
+ option: ApValueSelectCardOption<T>;
30
+ }): any;
25
31
  'close-icon'?(_: {}): any;
26
32
  label?(_: {
27
33
  option: ApValueSelectCardOption<T>;