@aplus-frontend/ui 6.24.1 → 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.
- package/es/src/ag-grid/hooks/use-search-form.d.ts +3 -0
- package/es/src/ag-grid/hooks/use-search-form.mjs +41 -0
- package/es/src/ag-grid/index.vue.mjs +248 -270
- package/es/src/ag-grid/interface.d.ts +1 -0
- package/es/src/ap-form/interface.d.ts +1 -2
- package/es/src/ap-form/search-form/hooks/use-count-per-row.mjs +27 -24
- package/es/src/ap-form/search-form/index.vue.d.ts +9 -3
- package/es/src/ap-form/search-form/index.vue.mjs +116 -108
- package/es/src/ap-pro-card/components/card/index.vue.d.ts +1 -1
- package/es/src/ap-pro-card/components/statistic/index.vue.d.ts +2 -1
- package/es/src/ap-pro-card/components/statistic/index.vue2.mjs +43 -37
- package/es/src/ap-pro-card/interface.d.ts +3 -1
- package/es/src/ap-pro-card/utils/css-var.mjs +10 -10
- package/es/src/business/ap-value-select-card/index.vue.d.ts +6 -0
- package/es/src/business/ap-value-select-card/index.vue2.mjs +88 -80
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ag-grid/hooks/use-search-form.d.ts +3 -0
- package/lib/src/ag-grid/hooks/use-search-form.js +1 -0
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ag-grid/interface.d.ts +1 -0
- package/lib/src/ap-form/interface.d.ts +1 -2
- package/lib/src/ap-form/search-form/hooks/use-count-per-row.js +1 -1
- package/lib/src/ap-form/search-form/index.vue.d.ts +9 -3
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-pro-card/components/card/index.vue.d.ts +1 -1
- package/lib/src/ap-pro-card/components/statistic/index.vue.d.ts +2 -1
- package/lib/src/ap-pro-card/components/statistic/index.vue2.js +1 -1
- package/lib/src/ap-pro-card/interface.d.ts +3 -1
- package/lib/src/ap-pro-card/utils/css-var.js +1 -1
- package/lib/src/business/ap-value-select-card/index.vue.d.ts +6 -0
- package/lib/src/business/ap-value-select-card/index.vue2.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +5 -5
- package/theme/ap-grid/index.css +4 -0
- package/theme/ap-grid/index.less +4 -0
- package/theme/ap-pro-card/index.css +36 -29
- package/theme/ap-pro-card/index.less +39 -20
- package/theme/ap-value-select-card/index.css +1 -0
- package/theme/ap-value-select-card/index.less +1 -0
- package/theme/index.css +41 -29
|
@@ -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?:
|
|
165
|
+
countPerRow?: number;
|
|
167
166
|
submitLoading?: boolean;
|
|
168
167
|
/**
|
|
169
168
|
* 最大显示的行(超出后将会收起进入更多筛选)
|
|
@@ -1,35 +1,38 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { useResizeObserver as
|
|
3
|
-
import { isUndefined as
|
|
4
|
-
const
|
|
5
|
-
(
|
|
6
|
-
),
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
(
|
|
10
|
-
const
|
|
11
|
-
const m =
|
|
12
|
-
|
|
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
|
-
|
|
15
|
-
|
|
14
|
+
t(() => {
|
|
15
|
+
c();
|
|
16
16
|
});
|
|
17
17
|
},
|
|
18
18
|
{ flush: "post" }
|
|
19
19
|
);
|
|
20
|
-
const
|
|
21
|
-
for (const [
|
|
22
|
-
if (
|
|
23
|
-
return
|
|
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
|
|
27
|
-
const e =
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
-
|
|
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 |
|
|
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:
|
|
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 |
|
|
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
|
|
2
|
-
import { Col as
|
|
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
|
|
5
|
+
import { genRealChildren as q } from "../item-group/helper.mjs";
|
|
6
6
|
import "../../config-provider/index.mjs";
|
|
7
|
-
import { isArray as
|
|
8
|
-
import { isDef as
|
|
9
|
-
import { execFunc as
|
|
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
|
|
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
|
|
14
|
-
import { getTargetNode as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
|
|
22
|
-
|
|
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 =
|
|
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:
|
|
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(
|
|
120
|
-
expose:
|
|
120
|
+
setup(f, {
|
|
121
|
+
expose: Q
|
|
121
122
|
}) {
|
|
122
|
-
var
|
|
123
|
-
const i =
|
|
124
|
-
b:
|
|
125
|
-
} =
|
|
126
|
-
t:
|
|
127
|
-
} =
|
|
128
|
-
function
|
|
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 =
|
|
131
|
-
|
|
131
|
+
const e = (a = v.value) == null ? void 0 : a.getFieldsValueTransformed(!0);
|
|
132
|
+
G(t.onSubmit, e);
|
|
132
133
|
}
|
|
133
|
-
function
|
|
134
|
+
function Z() {
|
|
134
135
|
var e, a;
|
|
135
|
-
t.customReset || (a = (e =
|
|
136
|
+
t.customReset || (a = (e = v.value) == null ? void 0 : e.resetFields) == null || a.call(e), G(t.onReset);
|
|
136
137
|
}
|
|
137
|
-
const
|
|
138
|
+
const ee = (e) => H(e) ? (he(e) ? e : [e]).join("") : Date.now();
|
|
138
139
|
let E = [];
|
|
139
|
-
const h = U(
|
|
140
|
-
items:
|
|
141
|
-
sorted:
|
|
142
|
-
handleClickConfirm:
|
|
143
|
-
} =
|
|
144
|
-
|
|
145
|
-
E = h.value, h.value =
|
|
146
|
-
}),
|
|
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
|
-
|
|
151
|
+
p.value = e;
|
|
151
152
|
});
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
e.
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
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
|
|
162
|
-
const
|
|
163
|
-
node:
|
|
164
|
-
span:
|
|
165
|
-
key: `ApFormSearchFormItem-${
|
|
166
|
-
},
|
|
167
|
-
|
|
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
|
|
175
|
+
const $ = s - (N + c) % s, le = Math.ceil(N) % s < c, re = $ < c ? s : $;
|
|
171
176
|
return {
|
|
172
|
-
hideNode: o(
|
|
177
|
+
hideNode: o(w, null, [a]),
|
|
173
178
|
nodes: g,
|
|
174
179
|
collapseNodes: r,
|
|
175
|
-
extraSpan:
|
|
176
|
-
lastRowOnlyIncludeActionAndExtra:
|
|
180
|
+
extraSpan: re,
|
|
181
|
+
lastRowOnlyIncludeActionAndExtra: le
|
|
177
182
|
};
|
|
178
|
-
}),
|
|
183
|
+
}), x = (e) => `${e}%`, oe = _(() => {
|
|
179
184
|
let e;
|
|
180
|
-
const a = l.value.collapseNodes.length || t.sortable && h.value.length, r = o(
|
|
181
|
-
|
|
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(
|
|
185
|
-
default: () => [o(
|
|
189
|
+
default: () => [o(K, null, {
|
|
190
|
+
default: () => [o(k, {
|
|
186
191
|
wrap: "wrap",
|
|
187
|
-
justify: l.value.lastRowOnlyIncludeActionAndExtra && !(n(
|
|
192
|
+
justify: l.value.lastRowOnlyIncludeActionAndExtra && !(n(p) && t.extraInAction) ? "flex-end" : "space-between"
|
|
188
193
|
}, {
|
|
189
|
-
default: () => [o(
|
|
194
|
+
default: () => [o(k, {
|
|
190
195
|
gap: 8,
|
|
191
196
|
wrap: "wrap"
|
|
192
197
|
}, {
|
|
193
198
|
default: () => [a ? o("div", {
|
|
194
|
-
class:
|
|
195
|
-
}, [l.value.collapseNodes.length ? o(
|
|
196
|
-
onSubmit:
|
|
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 &&
|
|
204
|
+
}, null) : null, t.sortable && b.value.length ? o(be, {
|
|
200
205
|
ref: "sorterIns",
|
|
201
|
-
items:
|
|
202
|
-
onClickConfirm:
|
|
203
|
-
sorted:
|
|
206
|
+
items: b.value,
|
|
207
|
+
onClickConfirm: F,
|
|
208
|
+
sorted: L.value
|
|
204
209
|
}, null) : null]) : null, o(M, {
|
|
205
210
|
type: "primary",
|
|
206
|
-
onClick:
|
|
211
|
+
onClick: P,
|
|
207
212
|
loading: t.submitLoading ? {
|
|
208
213
|
delay: t.loadingDelay
|
|
209
214
|
} : !1,
|
|
210
215
|
htmlType: "submit",
|
|
211
|
-
class:
|
|
216
|
+
class: m("action-btn")
|
|
212
217
|
}, {
|
|
213
|
-
default: () => [t.searchText ||
|
|
218
|
+
default: () => [t.searchText || T("ap.apForm.search.search")]
|
|
214
219
|
}), o(M, {
|
|
215
|
-
onClick:
|
|
220
|
+
onClick: Z,
|
|
216
221
|
type: "text",
|
|
217
|
-
class: [
|
|
222
|
+
class: [m("action-btn"), m("action-btn-reset")]
|
|
218
223
|
}, {
|
|
219
|
-
default: () => [t.resetText ||
|
|
224
|
+
default: () => [t.resetText || T("ap.apForm.search.reset")]
|
|
220
225
|
})]
|
|
221
|
-
}), t.extraInAction ? n(
|
|
226
|
+
}), t.extraInAction ? n(p) : null]
|
|
222
227
|
})]
|
|
223
228
|
})]
|
|
224
|
-
}), g = !t.extraInAction && n(
|
|
225
|
-
|
|
229
|
+
}), g = !t.extraInAction && n(p) ? o(R, {
|
|
230
|
+
flex: x(l.value.extraSpan),
|
|
226
231
|
key: "extraNode"
|
|
227
232
|
}, {
|
|
228
|
-
default: () => [o(
|
|
229
|
-
default: () => [o(
|
|
233
|
+
default: () => [o(K, null, {
|
|
234
|
+
default: () => [o(k, {
|
|
230
235
|
justify: l.value.extraSpan === s || l.value.lastRowOnlyIncludeActionAndExtra ? "start" : "flex-end"
|
|
231
|
-
},
|
|
236
|
+
}, Ne(e = n(p)) ? e : {
|
|
232
237
|
default: () => [e]
|
|
233
238
|
})]
|
|
234
239
|
})]
|
|
235
|
-
}) : null,
|
|
236
|
-
|
|
240
|
+
}) : null, c = o(R, {
|
|
241
|
+
flex: x(l.value.extraSpan)
|
|
237
242
|
}, null);
|
|
238
|
-
return l.value.lastRowOnlyIncludeActionAndExtra ? o(
|
|
243
|
+
return l.value.lastRowOnlyIncludeActionAndExtra ? o(w, null, [g || c, r]) : o(w, null, [r, g]);
|
|
239
244
|
});
|
|
240
|
-
function
|
|
245
|
+
function ae() {
|
|
241
246
|
var a;
|
|
242
|
-
const e = (a =
|
|
243
|
-
|
|
247
|
+
const e = (a = Y.value) == null ? void 0 : a.getCachedList();
|
|
248
|
+
F(e);
|
|
244
249
|
}
|
|
245
|
-
return
|
|
246
|
-
apForm:
|
|
247
|
-
getSorterItems: () =>
|
|
248
|
-
setSorterItems:
|
|
249
|
-
resetSorterItems:
|
|
250
|
-
}), (e, a) => (d(),
|
|
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:
|
|
253
|
-
class: n(
|
|
254
|
-
}, n(
|
|
255
|
-
default:
|
|
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:
|
|
263
|
+
default: B(() => [(d(!0), pe(w, null, de(l.value.nodes, (r) => (d(), y(n(R), {
|
|
259
264
|
key: r.key,
|
|
260
|
-
|
|
265
|
+
flex: x(r.span),
|
|
266
|
+
style: fe({
|
|
267
|
+
maxWidth: x(r.span)
|
|
268
|
+
})
|
|
261
269
|
}, {
|
|
262
|
-
default:
|
|
270
|
+
default: B(() => [(d(), y(I(r.node)))]),
|
|
263
271
|
_: 2
|
|
264
|
-
}, 1032, ["
|
|
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
|
-
|
|
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
|
|
2
|
-
import { QuestionCircleOutlined as
|
|
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
|
|
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__ */
|
|
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 =
|
|
62
|
-
b:
|
|
63
|
-
} = q("pro-card-statistic"), b = i(() =>
|
|
64
|
-
const e =
|
|
65
|
-
return
|
|
66
|
-
}),
|
|
67
|
-
const e =
|
|
68
|
-
return
|
|
69
|
-
}),
|
|
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(
|
|
80
|
+
default: () => [r(V, {
|
|
75
81
|
class: g.value
|
|
76
82
|
}, null)]
|
|
77
83
|
}) : void 0;
|
|
78
|
-
}),
|
|
79
|
-
class:
|
|
84
|
+
}), p = i(() => n.trend ? r("div", {
|
|
85
|
+
class: $.value
|
|
80
86
|
}, null) : void 0), _ = i(() => n.status ? r(Q, {
|
|
81
|
-
class:
|
|
87
|
+
class: D.value,
|
|
82
88
|
status: n.status
|
|
83
|
-
}, null) : void 0),
|
|
89
|
+
}, null) : void 0), z = i(() => {
|
|
84
90
|
var e;
|
|
85
91
|
return n.icon || t.icon ? r("div", {
|
|
86
|
-
class:
|
|
92
|
+
class: N.value
|
|
87
93
|
}, [n.icon ?? ((e = t.icon) == null ? void 0 : e.call(t))]) : void 0;
|
|
88
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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) => (
|
|
109
|
+
return (e, G) => (u(), F("div", x({
|
|
104
110
|
...e.$attrs
|
|
105
111
|
}, {
|
|
106
112
|
class: b.value
|
|
107
|
-
}), [(
|
|
108
|
-
class:
|
|
109
|
-
}, [(
|
|
110
|
-
class:
|
|
111
|
-
}, [r(O(R),
|
|
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
|
-
}),
|
|
121
|
+
}), P({
|
|
116
122
|
_: 2
|
|
117
|
-
}, [
|
|
123
|
+
}, [m.value || f.value ? {
|
|
118
124
|
name: "title",
|
|
119
|
-
fn: s(() => [(
|
|
125
|
+
fn: s(() => [(u(), a(o(m.value))), (u(), a(o(f.value)))]),
|
|
120
126
|
key: "0"
|
|
121
|
-
} : void 0,
|
|
127
|
+
} : void 0, p.value || v.value ? {
|
|
122
128
|
name: "prefix",
|
|
123
|
-
fn: s(() => [(
|
|
129
|
+
fn: s(() => [(u(), a(o(p.value))), (u(), a(o(v.value)))]),
|
|
124
130
|
key: "1"
|
|
125
|
-
} : void 0,
|
|
131
|
+
} : void 0, y.value ? {
|
|
126
132
|
name: "suffix",
|
|
127
|
-
fn: s(() => [(
|
|
133
|
+
fn: s(() => [(u(), a(o(y.value)))]),
|
|
128
134
|
key: "2"
|
|
129
|
-
} : void 0]), 1040, ["class"]), (
|
|
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
|
/**
|