@aplus-frontend/ui 6.21.1 → 6.22.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/index.mjs +160 -155
- package/es/src/ag-grid/components/body-cell/index.vue.d.ts +6 -0
- package/es/src/ag-grid/components/body-cell/index.vue.mjs +4 -0
- package/es/src/ag-grid/components/body-cell/index.vue2.mjs +27 -0
- package/es/src/ag-grid/components/header-cell/index.vue.d.ts +6 -0
- package/es/src/ag-grid/components/header-cell/index.vue.mjs +4 -0
- package/es/src/ag-grid/components/header-cell/index.vue2.mjs +65 -0
- package/es/src/ag-grid/context.d.ts +18 -0
- package/es/src/ag-grid/context.mjs +17 -0
- package/es/src/ag-grid/hooks/use-row-selection.d.ts +78 -0
- package/es/src/ag-grid/hooks/use-row-selection.mjs +98 -0
- package/es/src/ag-grid/index.d.ts +3 -0
- package/es/src/ag-grid/index.mjs +2 -0
- package/es/src/ag-grid/index.vue.d.ts +43 -0
- package/es/src/ag-grid/index.vue.mjs +512 -0
- package/es/src/ag-grid/index.vue2.mjs +4 -0
- package/es/src/ag-grid/interface.d.ts +296 -0
- package/es/src/ag-grid/interface.mjs +1 -0
- package/es/src/ag-grid/style/css.d.ts +0 -0
- package/es/src/ag-grid/style/css.js +1 -0
- package/es/src/ag-grid/style/index.d.ts +0 -0
- package/es/src/ag-grid/style/index.js +1 -0
- package/es/src/ag-grid/theme.d.ts +3 -0
- package/es/src/ag-grid/theme.mjs +25 -0
- package/es/src/ap-field/number/index.vue.mjs +25 -25
- package/es/src/ap-grid/index.vue.mjs +1 -1
- package/es/src/ap-grid/utils/col.d.ts +11 -0
- package/es/src/ap-grid/utils/col.mjs +99 -95
- package/es/src/ap-pro-card/components/card/index.vue2.mjs +112 -102
- package/es/src/ap-pro-card/components/operation/index.vue.d.ts +18 -0
- package/es/src/ap-pro-card/components/operation/index.vue.mjs +4 -0
- package/es/src/ap-pro-card/components/operation/index.vue2.mjs +20 -0
- package/es/src/ap-pro-card/components/statistic/index.vue.d.ts +51 -0
- package/es/src/ap-pro-card/components/statistic/index.vue.mjs +4 -0
- package/es/src/ap-pro-card/components/statistic/index.vue2.mjs +134 -0
- package/es/src/ap-pro-card/components/statistic-card/index.vue.d.ts +25 -0
- package/es/src/ap-pro-card/components/statistic-card/index.vue.mjs +4 -0
- package/es/src/ap-pro-card/components/statistic-card/index.vue2.mjs +116 -0
- package/es/src/ap-pro-card/index.d.ts +13 -3
- package/es/src/ap-pro-card/index.mjs +16 -4
- package/es/src/ap-pro-card/interface.d.ts +64 -0
- package/es/src/ap-table/utils.d.ts +1 -1
- package/es/src/ap-tag/ap-tag-group.vue.mjs +42 -42
- package/es/src/business/ap-label/group/ApLabelGroup.mjs +17 -15
- package/es/src/business/hooks/index.d.ts +1 -0
- package/es/src/business/hooks/index.mjs +8 -6
- package/es/src/business/hooks/usePageListAgGrid.d.ts +37 -0
- package/es/src/business/hooks/usePageListAgGrid.mjs +88 -0
- package/es/src/index.d.ts +1 -0
- package/es/src/index.mjs +296 -290
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/index.js +1 -1
- package/lib/src/ag-grid/components/body-cell/index.vue.d.ts +6 -0
- package/lib/src/ag-grid/components/body-cell/index.vue.js +1 -0
- package/lib/src/ag-grid/components/body-cell/index.vue2.js +1 -0
- package/lib/src/ag-grid/components/header-cell/index.vue.d.ts +6 -0
- package/lib/src/ag-grid/components/header-cell/index.vue.js +1 -0
- package/lib/src/ag-grid/components/header-cell/index.vue2.js +1 -0
- package/lib/src/ag-grid/context.d.ts +18 -0
- package/lib/src/ag-grid/context.js +1 -0
- package/lib/src/ag-grid/hooks/use-row-selection.d.ts +78 -0
- package/lib/src/ag-grid/hooks/use-row-selection.js +1 -0
- package/lib/src/ag-grid/index.d.ts +3 -0
- package/lib/src/ag-grid/index.js +1 -0
- package/lib/src/ag-grid/index.vue.d.ts +43 -0
- package/lib/src/ag-grid/index.vue.js +1 -0
- package/lib/src/ag-grid/index.vue2.js +1 -0
- package/lib/src/ag-grid/interface.d.ts +296 -0
- package/lib/src/ag-grid/interface.js +1 -0
- package/lib/src/ag-grid/style/css.cjs +1 -0
- package/lib/src/ag-grid/style/css.d.ts +0 -0
- package/lib/src/ag-grid/style/index.cjs +1 -0
- package/lib/src/ag-grid/style/index.d.ts +0 -0
- package/lib/src/ag-grid/theme.d.ts +3 -0
- package/lib/src/ag-grid/theme.js +1 -0
- package/lib/src/ap-field/number/index.vue.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-grid/utils/col.d.ts +11 -0
- package/lib/src/ap-grid/utils/col.js +1 -1
- package/lib/src/ap-pro-card/components/card/index.vue2.js +1 -1
- package/lib/src/ap-pro-card/components/operation/index.vue.d.ts +18 -0
- package/lib/src/ap-pro-card/components/operation/index.vue.js +1 -0
- package/lib/src/ap-pro-card/components/operation/index.vue2.js +1 -0
- package/lib/src/ap-pro-card/components/statistic/index.vue.d.ts +51 -0
- package/lib/src/ap-pro-card/components/statistic/index.vue.js +1 -0
- package/lib/src/ap-pro-card/components/statistic/index.vue2.js +1 -0
- package/lib/src/ap-pro-card/components/statistic-card/index.vue.d.ts +25 -0
- package/lib/src/ap-pro-card/components/statistic-card/index.vue.js +1 -0
- package/lib/src/ap-pro-card/components/statistic-card/index.vue2.js +1 -0
- package/lib/src/ap-pro-card/index.d.ts +13 -3
- package/lib/src/ap-pro-card/index.js +1 -1
- package/lib/src/ap-pro-card/interface.d.ts +64 -0
- package/lib/src/ap-table/utils.d.ts +1 -1
- package/lib/src/ap-tag/ap-tag-group.vue.js +1 -1
- package/lib/src/business/ap-label/group/ApLabelGroup.js +1 -1
- package/lib/src/business/hooks/index.d.ts +1 -0
- package/lib/src/business/hooks/index.js +1 -1
- package/lib/src/business/hooks/usePageListAgGrid.d.ts +37 -0
- package/lib/src/business/hooks/usePageListAgGrid.js +1 -0
- package/lib/src/index.d.ts +1 -0
- package/lib/src/index.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +3 -1
- package/theme/ag-grid/index.css +468 -0
- package/theme/ag-grid/index.less +25 -0
- package/theme/ap-button/ap-button.css +1 -1
- package/theme/ap-button/ap-button.less +1 -1
- package/theme/ap-grid/index.css +3 -0
- package/theme/ap-grid/index.less +3 -0
- package/theme/ap-pro-card/index.css +147 -0
- package/theme/ap-pro-card/index.less +147 -0
- package/theme/ap-tag/ap-tag.css +1 -1
- package/theme/ap-tag/ap-tag.less +1 -1
- package/theme/index.css +330 -5
- package/theme/index.less +1 -0
|
@@ -0,0 +1,134 @@
|
|
|
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";
|
|
3
|
+
import { Tooltip as I, Badge as Q, Statistic as R } from "@aplus-frontend/antdv";
|
|
4
|
+
import { omit as T } from "lodash-unified";
|
|
5
|
+
import "../../../config-provider/index.mjs";
|
|
6
|
+
import { mergeClass as B } from "../../../editable-table/utils.mjs";
|
|
7
|
+
import { useNamespace as q } from "../../../config-provider/hooks/use-namespace.mjs";
|
|
8
|
+
const Y = /* @__PURE__ */ E({
|
|
9
|
+
name: "ApProCardStatistic",
|
|
10
|
+
__name: "index",
|
|
11
|
+
props: {
|
|
12
|
+
prefixCls: {},
|
|
13
|
+
decimalSeparator: {},
|
|
14
|
+
groupSeparator: {},
|
|
15
|
+
format: {},
|
|
16
|
+
value: {},
|
|
17
|
+
valueStyle: {},
|
|
18
|
+
valueRender: {},
|
|
19
|
+
formatter: {
|
|
20
|
+
type: [Boolean, String, Function]
|
|
21
|
+
},
|
|
22
|
+
precision: {},
|
|
23
|
+
prefix: {
|
|
24
|
+
type: [Object, String, Number, Boolean, null, Array],
|
|
25
|
+
default: void 0
|
|
26
|
+
},
|
|
27
|
+
suffix: {
|
|
28
|
+
type: [Object, String, Number, Boolean, null, Array],
|
|
29
|
+
default: void 0
|
|
30
|
+
},
|
|
31
|
+
title: {
|
|
32
|
+
type: [Object, String, Number, Boolean, null, Array],
|
|
33
|
+
default: void 0
|
|
34
|
+
},
|
|
35
|
+
loading: {
|
|
36
|
+
type: Boolean
|
|
37
|
+
},
|
|
38
|
+
description: {
|
|
39
|
+
type: [Object, String, Number, Boolean, null, Array],
|
|
40
|
+
default: void 0
|
|
41
|
+
},
|
|
42
|
+
tip: {
|
|
43
|
+
type: [Object, String, Number, Boolean, null, Array],
|
|
44
|
+
default: void 0
|
|
45
|
+
},
|
|
46
|
+
status: {
|
|
47
|
+
default: void 0
|
|
48
|
+
},
|
|
49
|
+
icon: {
|
|
50
|
+
type: [Object, String, Number, Boolean, null, Array],
|
|
51
|
+
default: void 0
|
|
52
|
+
},
|
|
53
|
+
layout: {
|
|
54
|
+
default: "inline"
|
|
55
|
+
},
|
|
56
|
+
trend: {
|
|
57
|
+
default: void 0
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
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(() => {
|
|
70
|
+
var e;
|
|
71
|
+
return n.tip || t.tip ? r(I, {
|
|
72
|
+
title: n.tip ?? ((e = t.tip) == null ? void 0 : e.call(t))
|
|
73
|
+
}, {
|
|
74
|
+
default: () => [r(z, {
|
|
75
|
+
class: g.value
|
|
76
|
+
}, null)]
|
|
77
|
+
}) : void 0;
|
|
78
|
+
}), f = i(() => n.trend ? r("div", {
|
|
79
|
+
class: D.value
|
|
80
|
+
}, null) : void 0), _ = i(() => n.status ? r(Q, {
|
|
81
|
+
class: N.value,
|
|
82
|
+
status: n.status
|
|
83
|
+
}, null) : void 0), w = i(() => {
|
|
84
|
+
var e;
|
|
85
|
+
return n.icon || t.icon ? r("div", {
|
|
86
|
+
class: $.value
|
|
87
|
+
}, [n.icon ?? ((e = t.icon) == null ? void 0 : e.call(t))]) : void 0;
|
|
88
|
+
}), p = i(() => {
|
|
89
|
+
var e;
|
|
90
|
+
return n.title || t.title ? r(d, null, [n.title || ((e = t.title) == null ? void 0 : e.call(t))]) : void 0;
|
|
91
|
+
}), m = i(() => {
|
|
92
|
+
var e;
|
|
93
|
+
return n.prefix || t.prefix ? r(d, null, [n.prefix || ((e = t.prefix) == null ? void 0 : e.call(t))]) : void 0;
|
|
94
|
+
}), v = i(() => {
|
|
95
|
+
var e;
|
|
96
|
+
return n.suffix || t.suffix ? r(d, null, [n.suffix || ((e = t.suffix) == null ? void 0 : e.call(t))]) : void 0;
|
|
97
|
+
}), h = i(() => {
|
|
98
|
+
var e;
|
|
99
|
+
return n.description || t.description ? r("div", {
|
|
100
|
+
class: k.value
|
|
101
|
+
}, [n.description || ((e = t.description) == null ? void 0 : e.call(t))]) : void 0;
|
|
102
|
+
});
|
|
103
|
+
return (e, G) => (l(), P("div", y({
|
|
104
|
+
...e.$attrs
|
|
105
|
+
}, {
|
|
106
|
+
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({
|
|
112
|
+
class: j.value
|
|
113
|
+
}, {
|
|
114
|
+
...O(T)(n, ["title", "prefix"])
|
|
115
|
+
}), V({
|
|
116
|
+
_: 2
|
|
117
|
+
}, [p.value || c.value ? {
|
|
118
|
+
name: "title",
|
|
119
|
+
fn: s(() => [(l(), a(o(p.value))), (l(), a(o(c.value)))]),
|
|
120
|
+
key: "0"
|
|
121
|
+
} : void 0, f.value || m.value ? {
|
|
122
|
+
name: "prefix",
|
|
123
|
+
fn: s(() => [(l(), a(o(f.value))), (l(), a(o(m.value)))]),
|
|
124
|
+
key: "1"
|
|
125
|
+
} : void 0, v.value ? {
|
|
126
|
+
name: "suffix",
|
|
127
|
+
fn: s(() => [(l(), a(o(v.value)))]),
|
|
128
|
+
key: "2"
|
|
129
|
+
} : void 0]), 1040, ["class"]), (l(), a(o(h.value)))], 2)], 2)], 16));
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
export {
|
|
133
|
+
Y as default
|
|
134
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ApStatisticCardProps, ApProCardSolts } from '../../interface';
|
|
2
|
+
import { VNodeChild, DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
declare function __VLS_template(): {
|
|
4
|
+
attrs: Partial<{}>;
|
|
5
|
+
slots: Readonly< ApProCardSolts & {
|
|
6
|
+
chart?: () => VNodeChild;
|
|
7
|
+
footer?: () => VNodeChild;
|
|
8
|
+
description?: () => VNodeChild;
|
|
9
|
+
}> & ApProCardSolts & {
|
|
10
|
+
chart?: () => VNodeChild;
|
|
11
|
+
footer?: () => VNodeChild;
|
|
12
|
+
description?: () => VNodeChild;
|
|
13
|
+
};
|
|
14
|
+
refs: {};
|
|
15
|
+
rootEl: HTMLDivElement;
|
|
16
|
+
};
|
|
17
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
18
|
+
declare const __VLS_component: DefineComponent<ApStatisticCardProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApStatisticCardProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
19
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { defineComponent as _, useSlots as $, computed as o, createVNode as n, mergeProps as f, createBlock as u, openBlock as d, createSlots as A, withCtx as y, createCommentVNode as h, renderSlot as v, resolveDynamicComponent as b, renderList as j, unref as P } from "vue";
|
|
2
|
+
import "../../../config-provider/index.mjs";
|
|
3
|
+
import "../card/index.vue.mjs";
|
|
4
|
+
import "../statistic/index.vue.mjs";
|
|
5
|
+
import { mergeClass as B } from "../../../editable-table/utils.mjs";
|
|
6
|
+
import { omit as x } from "lodash-unified";
|
|
7
|
+
import { useNamespace as D } from "../../../config-provider/hooks/use-namespace.mjs";
|
|
8
|
+
import k from "../statistic/index.vue2.mjs";
|
|
9
|
+
import M from "../card/index.vue2.mjs";
|
|
10
|
+
const J = /* @__PURE__ */ _({
|
|
11
|
+
name: "ApStatisticCard",
|
|
12
|
+
__name: "index",
|
|
13
|
+
props: {
|
|
14
|
+
headStyle: {},
|
|
15
|
+
bodyStyle: {},
|
|
16
|
+
actionsStyle: {},
|
|
17
|
+
headerBordered: {
|
|
18
|
+
type: Boolean
|
|
19
|
+
},
|
|
20
|
+
title: {
|
|
21
|
+
type: [Object, String, Number, Boolean, null, Array]
|
|
22
|
+
},
|
|
23
|
+
tooltip: {
|
|
24
|
+
type: [Object, String, Number, Boolean, null, Array]
|
|
25
|
+
},
|
|
26
|
+
extra: {
|
|
27
|
+
type: [Object, String, Number, Boolean, null, Array]
|
|
28
|
+
},
|
|
29
|
+
layout: {},
|
|
30
|
+
type: {},
|
|
31
|
+
direction: {},
|
|
32
|
+
wrap: {
|
|
33
|
+
type: Boolean
|
|
34
|
+
},
|
|
35
|
+
loading: {
|
|
36
|
+
type: [Boolean, Object, String, Number, null, Array]
|
|
37
|
+
},
|
|
38
|
+
colSpan: {},
|
|
39
|
+
colStyle: {},
|
|
40
|
+
gutter: {},
|
|
41
|
+
actions: {
|
|
42
|
+
type: [Object, String, Number, Boolean, null, Array]
|
|
43
|
+
},
|
|
44
|
+
split: {},
|
|
45
|
+
bordered: {
|
|
46
|
+
type: Boolean
|
|
47
|
+
},
|
|
48
|
+
hoverable: {
|
|
49
|
+
type: Boolean
|
|
50
|
+
},
|
|
51
|
+
ghost: {
|
|
52
|
+
type: Boolean
|
|
53
|
+
},
|
|
54
|
+
boxShadow: {
|
|
55
|
+
type: Boolean
|
|
56
|
+
},
|
|
57
|
+
chart: {
|
|
58
|
+
type: [Object, String, Number, Boolean, null, Array]
|
|
59
|
+
},
|
|
60
|
+
statistic: {},
|
|
61
|
+
chartPlacement: {},
|
|
62
|
+
footer: {
|
|
63
|
+
type: [Object, String, Number, Boolean, null, Array]
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
setup(S) {
|
|
67
|
+
const t = S, r = $(), {
|
|
68
|
+
b: a
|
|
69
|
+
} = D("statistic-card"), g = o(() => a()), C = o(() => {
|
|
70
|
+
const e = a("chart");
|
|
71
|
+
return B(`${e}`, [t.chartPlacement === "left" ? `${e}-left` : void 0, t.chartPlacement === "right" ? `${e}-right` : void 0].filter(Boolean));
|
|
72
|
+
}), p = o(() => {
|
|
73
|
+
const e = a("content");
|
|
74
|
+
return B(`${e}`, [t.chartPlacement === "left" || t.chartPlacement === "right" ? `${e}-horizontal` : void 0].filter(Boolean));
|
|
75
|
+
}), O = o(() => a("footer")), l = o(() => {
|
|
76
|
+
var e, s;
|
|
77
|
+
return t.statistic ? n(k, f({
|
|
78
|
+
layout: "vertical"
|
|
79
|
+
}, t.statistic, {
|
|
80
|
+
description: ((e = t.statistic) == null ? void 0 : e.description) || ((s = r.description) == null ? void 0 : s.call(r))
|
|
81
|
+
}), null) : void 0;
|
|
82
|
+
}), c = o(() => {
|
|
83
|
+
var e;
|
|
84
|
+
return t.chart || r.chart ? n("div", {
|
|
85
|
+
class: C.value
|
|
86
|
+
}, [t.chart || ((e = r.chart) == null ? void 0 : e.call(r))]) : void 0;
|
|
87
|
+
}), i = o(() => c.value || l.value ? t.chartPlacement === "left" ? n("div", {
|
|
88
|
+
class: p.value
|
|
89
|
+
}, [c.value, l.value]) : n("div", {
|
|
90
|
+
class: p.value
|
|
91
|
+
}, [l.value, c.value]) : void 0), N = o(() => {
|
|
92
|
+
var e;
|
|
93
|
+
return t.footer || r.footer ? n("div", {
|
|
94
|
+
class: O.value
|
|
95
|
+
}, [t.footer || ((e = r.footer) == null ? void 0 : e.call(r))]) : void 0;
|
|
96
|
+
});
|
|
97
|
+
return (e, s) => (d(), u(M, f({
|
|
98
|
+
class: g.value
|
|
99
|
+
}, {
|
|
100
|
+
...t
|
|
101
|
+
}), A({
|
|
102
|
+
default: y(() => [i.value ? (d(), u(b(i.value), {
|
|
103
|
+
key: 0
|
|
104
|
+
})) : h("", !0), v(e.$slots, "default"), i.value ? (d(), u(b(N.value), {
|
|
105
|
+
key: 1
|
|
106
|
+
})) : h("", !0)]),
|
|
107
|
+
_: 2
|
|
108
|
+
}, [j(P(x)(r, ["chart", "footer", "description", "default"]), (w, m) => ({
|
|
109
|
+
name: m,
|
|
110
|
+
fn: y(() => [v(e.$slots, m)])
|
|
111
|
+
}))]), 1040, ["class"]));
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
export {
|
|
115
|
+
J as default
|
|
116
|
+
};
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import { default as Card } from './components/card/index.vue';
|
|
2
2
|
import { default as Divider } from './components/divider/index.vue';
|
|
3
3
|
import { default as Title } from './components/title/index.vue';
|
|
4
|
-
|
|
4
|
+
import { default as Statistic } from './components/statistic/index.vue';
|
|
5
|
+
import { default as StatisticCard } from './components/statistic-card/index.vue';
|
|
6
|
+
import { default as Operation } from './components/operation/index.vue';
|
|
7
|
+
export type ApProCardType = typeof Card & {
|
|
5
8
|
isProCard: boolean;
|
|
6
9
|
Divider: typeof Divider;
|
|
7
10
|
Title: typeof Title;
|
|
8
11
|
};
|
|
9
|
-
|
|
10
|
-
|
|
12
|
+
export type ApStatisticCardType = typeof StatisticCard & {
|
|
13
|
+
isProCard: boolean;
|
|
14
|
+
Divider: typeof Divider;
|
|
15
|
+
Statistic: typeof Statistic;
|
|
16
|
+
Operation: typeof Operation;
|
|
17
|
+
};
|
|
18
|
+
declare const ApProCard: ApProCardType;
|
|
19
|
+
declare const ApStatisticCard: ApStatisticCardType;
|
|
20
|
+
export { ApProCard, ApStatisticCard };
|
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
import "./components/card/index.vue.mjs";
|
|
2
2
|
import "./components/divider/index.vue.mjs";
|
|
3
3
|
import "./components/title/index.vue.mjs";
|
|
4
|
-
import
|
|
4
|
+
import "./components/statistic/index.vue.mjs";
|
|
5
|
+
import "./components/statistic-card/index.vue.mjs";
|
|
6
|
+
import "./components/operation/index.vue.mjs";
|
|
7
|
+
import t from "./components/card/index.vue2.mjs";
|
|
5
8
|
import o from "./components/divider/index.vue2.mjs";
|
|
6
9
|
import m from "./components/title/index.vue2.mjs";
|
|
7
|
-
|
|
10
|
+
import p from "./components/statistic-card/index.vue2.mjs";
|
|
11
|
+
import a from "./components/statistic/index.vue2.mjs";
|
|
12
|
+
import f from "./components/operation/index.vue2.mjs";
|
|
13
|
+
const i = t;
|
|
14
|
+
i.isProCard = !0;
|
|
15
|
+
i.Divider = o;
|
|
16
|
+
i.Title = m;
|
|
17
|
+
const r = p;
|
|
8
18
|
r.isProCard = !0;
|
|
9
19
|
r.Divider = o;
|
|
10
|
-
r.
|
|
20
|
+
r.Statistic = a;
|
|
21
|
+
r.Operation = f;
|
|
11
22
|
export {
|
|
12
|
-
|
|
23
|
+
i as ApProCard,
|
|
24
|
+
r as ApStatisticCard
|
|
13
25
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BadgeProps, StatisticProps } from '@aplus-frontend/antdv';
|
|
1
2
|
import { CSSProperties, VNode, VNodeChild } from 'vue';
|
|
2
3
|
export type ApProCardBreakpoint = 'xxxl' | 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs';
|
|
3
4
|
export type ApProCardGutter = number | Partial<Record<ApProCardBreakpoint, number>>;
|
|
@@ -59,3 +60,66 @@ export type ApProCardSolts = {
|
|
|
59
60
|
/** 卡片操作组,位置在卡片底部 */
|
|
60
61
|
actions?: () => VNodeChild;
|
|
61
62
|
};
|
|
63
|
+
export type ApProCardStatisticProps = StatisticProps & {
|
|
64
|
+
/** 描述性标签 */
|
|
65
|
+
description?: VNodeChild;
|
|
66
|
+
/** 标题提示 */
|
|
67
|
+
tip?: VNodeChild;
|
|
68
|
+
status?: BadgeProps['status'];
|
|
69
|
+
/** Icon 图标 */
|
|
70
|
+
icon?: VNodeChild;
|
|
71
|
+
/** Layout 布局 */
|
|
72
|
+
layout?: 'horizontal' | 'vertical' | 'inline';
|
|
73
|
+
/** 趋势 */
|
|
74
|
+
trend?: 'up' | 'down';
|
|
75
|
+
};
|
|
76
|
+
export type ApProCardStatisticSolts = {
|
|
77
|
+
/**
|
|
78
|
+
* 数值的标题
|
|
79
|
+
*/
|
|
80
|
+
title?: () => VNode[];
|
|
81
|
+
/**
|
|
82
|
+
* 设置数值的前缀
|
|
83
|
+
*/
|
|
84
|
+
prefix?: () => VNode[];
|
|
85
|
+
/**
|
|
86
|
+
* 设置数值的后缀
|
|
87
|
+
*/
|
|
88
|
+
suffix?: () => VNode[];
|
|
89
|
+
/**
|
|
90
|
+
* 图标
|
|
91
|
+
*/
|
|
92
|
+
icon?: () => VNode[];
|
|
93
|
+
/**
|
|
94
|
+
* 标题提示
|
|
95
|
+
*/
|
|
96
|
+
tip?: () => VNode[];
|
|
97
|
+
/**
|
|
98
|
+
* 描述性标签
|
|
99
|
+
*/
|
|
100
|
+
description?: () => VNode[];
|
|
101
|
+
};
|
|
102
|
+
export type ApStatisticCardProps = ApProCardProps & {
|
|
103
|
+
/** 图表配置 */
|
|
104
|
+
chart?: VNodeChild;
|
|
105
|
+
/** 数值统计配置 */
|
|
106
|
+
statistic?: ApProCardStatisticProps;
|
|
107
|
+
/** Chart 相对于 statistic 的位置 */
|
|
108
|
+
chartPlacement?: 'right' | 'bottom' | 'left';
|
|
109
|
+
/** 底部额外展示区域 */
|
|
110
|
+
footer?: VNodeChild;
|
|
111
|
+
};
|
|
112
|
+
export type ApStatisticCardSolts = ApProCardSolts & {
|
|
113
|
+
/**
|
|
114
|
+
* 图表配置
|
|
115
|
+
*/
|
|
116
|
+
chart?: () => VNodeChild;
|
|
117
|
+
/**
|
|
118
|
+
* 额外指标展示
|
|
119
|
+
*/
|
|
120
|
+
footer?: () => VNodeChild;
|
|
121
|
+
/**
|
|
122
|
+
* 描述性标签
|
|
123
|
+
*/
|
|
124
|
+
description?: () => VNodeChild;
|
|
125
|
+
};
|
|
@@ -97,7 +97,7 @@ export declare function updateFormProps(item: ApColumnType<any, any>, fieldProps
|
|
|
97
97
|
* @returns
|
|
98
98
|
*/
|
|
99
99
|
export declare function objectToString(value: any): any;
|
|
100
|
-
export declare function getTableTitle(column: ApColumnType<any>, titleNodeClassName: string, slot?: (props: {
|
|
100
|
+
export declare function getTableTitle(column: ApColumnType<any>, titleNodeClassName: string | string[], slot?: (props: {
|
|
101
101
|
title: any;
|
|
102
102
|
column: ApColumnType<any>;
|
|
103
103
|
}) => any, tooltipColor?: string): number | boolean | void | VNodeArrayChildren | VNode< RendererNode, RendererElement, {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Tooltip as
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as S, ref as C, computed as n, unref as f, watch as j, nextTick as G, onMounted as L, onUnmounted as A, createBlock as g, openBlock as a, mergeProps as w, withCtx as d, createElementVNode as t, normalizeStyle as b, normalizeClass as k, createElementBlock as _, createCommentVNode as F, Fragment as I, renderList as U, toDisplayString as W, renderSlot as q, createTextVNode as H } from "vue";
|
|
2
|
+
import { Tooltip as J } from "@aplus-frontend/antdv";
|
|
3
|
+
import K from "@ant-design/icons-vue";
|
|
4
4
|
import "./ap-tag.vue2.mjs";
|
|
5
5
|
import "../config-provider/index.mjs";
|
|
6
|
-
import { omit as
|
|
6
|
+
import { omit as O } from "lodash-unified";
|
|
7
7
|
import { getTextWidth as T } from "./utils.mjs";
|
|
8
8
|
import "../hooks/index.mjs";
|
|
9
|
-
import { useLocale as
|
|
10
|
-
import { useGlobalConfig as
|
|
11
|
-
import { useNamespace as
|
|
12
|
-
import { useResize as
|
|
13
|
-
import
|
|
14
|
-
const
|
|
9
|
+
import { useLocale as Q } from "../config-provider/hooks/use-locale.mjs";
|
|
10
|
+
import { useGlobalConfig as X } from "../config-provider/hooks/use-global-config.mjs";
|
|
11
|
+
import { useNamespace as Y } from "../config-provider/hooks/use-namespace.mjs";
|
|
12
|
+
import { useResize as Z } from "../hooks/useResize.mjs";
|
|
13
|
+
import ee from "./ap-tag.vue.mjs";
|
|
14
|
+
const de = /* @__PURE__ */ S({
|
|
15
15
|
__name: "ap-tag-group",
|
|
16
16
|
props: {
|
|
17
17
|
list: { default: () => [] },
|
|
@@ -20,22 +20,22 @@ const ve = /* @__PURE__ */ G({
|
|
|
20
20
|
ellipsis: { default: () => ({}) }
|
|
21
21
|
},
|
|
22
22
|
setup(z) {
|
|
23
|
-
const { t: V } =
|
|
23
|
+
const { t: V } = Q(), o = z, v = X("uiMode"), { b: B, bm: h } = Y("tag-group"), r = C(), { observe: E, unobserve: $ } = Z(), i = n(() => ({
|
|
24
24
|
...{
|
|
25
25
|
iconColor: v.value === "aplus" ? "#182948" : "#333",
|
|
26
26
|
symbol: "icon",
|
|
27
27
|
text: V("ap.common.more")
|
|
28
28
|
},
|
|
29
29
|
...o.ellipsis
|
|
30
|
-
})), M = n(() => i.value.tooltip && typeof i.value.tooltip == "object" ?
|
|
30
|
+
})), M = n(() => i.value.tooltip && typeof i.value.tooltip == "object" ? O(i.value.tooltip, ["trigger", "title"]) : {}), p = n(() => f(c) < o.list.length), c = C(0), P = n(() => o.list.map((e) => e.text).join("、")), D = n(() => [B()].filter(Boolean)), N = n(() => v.value === "aplus" ? [h("ellipsis-text", "aplus")] : [h("ellipsis-text", "admin")]), y = () => {
|
|
31
31
|
let e = 0, l = 0;
|
|
32
|
-
if (!
|
|
33
|
-
const u =
|
|
34
|
-
for (let
|
|
35
|
-
const m =
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
)
|
|
32
|
+
if (!r.value) return;
|
|
33
|
+
const u = r.value.offsetWidth;
|
|
34
|
+
for (let s of o.list) {
|
|
35
|
+
const m = s.size === "small" ? 8 : 12, x = T(
|
|
36
|
+
s.size === "large" ? 14 : 12,
|
|
37
|
+
s.text
|
|
38
|
+
) + m + o.space;
|
|
39
39
|
if (e += x, e > u) {
|
|
40
40
|
e -= x;
|
|
41
41
|
break;
|
|
@@ -48,11 +48,11 @@ const ve = /* @__PURE__ */ G({
|
|
|
48
48
|
}
|
|
49
49
|
c.value = l;
|
|
50
50
|
};
|
|
51
|
-
|
|
51
|
+
j(
|
|
52
52
|
() => o.list,
|
|
53
53
|
(e, l) => {
|
|
54
|
-
e !== l &&
|
|
55
|
-
|
|
54
|
+
e !== l && G(() => {
|
|
55
|
+
y();
|
|
56
56
|
});
|
|
57
57
|
},
|
|
58
58
|
{
|
|
@@ -60,49 +60,49 @@ const ve = /* @__PURE__ */ G({
|
|
|
60
60
|
}
|
|
61
61
|
);
|
|
62
62
|
const R = () => {
|
|
63
|
-
|
|
63
|
+
y();
|
|
64
64
|
};
|
|
65
|
-
return
|
|
65
|
+
return L(() => {
|
|
66
66
|
[["ellipsisColor", "ellipse.color"]].forEach(
|
|
67
67
|
([e, l]) => {
|
|
68
68
|
o[e] && console.error(
|
|
69
69
|
`[ApTagGroup]: \`${e}\` is deprecated, please use \`${l}\` instead.`
|
|
70
70
|
);
|
|
71
71
|
}
|
|
72
|
-
),
|
|
73
|
-
}),
|
|
74
|
-
|
|
75
|
-
}), (e, l) => (a(),
|
|
76
|
-
title:
|
|
77
|
-
|
|
78
|
-
|
|
72
|
+
), r.value && E(r.value, R);
|
|
73
|
+
}), A(() => {
|
|
74
|
+
r.value && $(r.value);
|
|
75
|
+
}), (e, l) => (a(), g(f(J), w({ trigger: "hover" }, M.value), {
|
|
76
|
+
title: d(() => [
|
|
77
|
+
q(e.$slots, "tooltip", { tags: e.list }, () => [
|
|
78
|
+
H(W(P.value), 1)
|
|
79
79
|
])
|
|
80
80
|
]),
|
|
81
|
-
default:
|
|
81
|
+
default: d(() => [
|
|
82
82
|
t("div", {
|
|
83
83
|
ref_key: "container",
|
|
84
|
-
ref:
|
|
84
|
+
ref: r,
|
|
85
85
|
class: k(D.value),
|
|
86
|
-
style:
|
|
86
|
+
style: b({
|
|
87
87
|
pointerEvents: p.value ? "auto" : "none"
|
|
88
88
|
// opacity: isUpdating ? '0' : '1'
|
|
89
89
|
})
|
|
90
90
|
}, [
|
|
91
|
-
(a(!0), _(
|
|
92
|
-
key:
|
|
91
|
+
(a(!0), _(I, null, U(e.list, (u, s) => (a(), g(ee, w({ ref_for: !0 }, u, {
|
|
92
|
+
key: s,
|
|
93
93
|
style: {
|
|
94
|
-
display:
|
|
94
|
+
display: s >= c.value ? "none" : "inline-block",
|
|
95
95
|
marginRight: `${e.space}px`
|
|
96
96
|
}
|
|
97
97
|
}), null, 16, ["style"]))), 128)),
|
|
98
|
-
p.value && i.value.symbol === "icon" ? (a(),
|
|
98
|
+
p.value && i.value.symbol === "icon" ? (a(), g(f(K), {
|
|
99
99
|
key: 0,
|
|
100
|
-
style:
|
|
100
|
+
style: b({
|
|
101
101
|
color: e.ellipsisColor || i.value.iconColor,
|
|
102
102
|
cursor: "pointer"
|
|
103
103
|
})
|
|
104
104
|
}, {
|
|
105
|
-
component:
|
|
105
|
+
component: d(() => l[0] || (l[0] = [
|
|
106
106
|
t("svg", {
|
|
107
107
|
xmlns: "http://www.w3.org/2000/svg",
|
|
108
108
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
@@ -162,7 +162,7 @@ const ve = /* @__PURE__ */ G({
|
|
|
162
162
|
key: 1,
|
|
163
163
|
class: k(N.value),
|
|
164
164
|
style: { cursor: "pointer" }
|
|
165
|
-
}, W(i.value.text), 3)) :
|
|
165
|
+
}, W(i.value.text), 3)) : F("", !0)
|
|
166
166
|
], 6)
|
|
167
167
|
]),
|
|
168
168
|
_: 3
|
|
@@ -170,5 +170,5 @@ const ve = /* @__PURE__ */ G({
|
|
|
170
170
|
}
|
|
171
171
|
});
|
|
172
172
|
export {
|
|
173
|
-
|
|
173
|
+
de as default
|
|
174
174
|
};
|
|
@@ -1,26 +1,28 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as l, createVNode as o, mergeProps as t, createTextVNode as m } from "vue";
|
|
2
2
|
import "../../../config-provider/index.mjs";
|
|
3
|
-
import
|
|
4
|
-
import { omit as
|
|
5
|
-
import { ApLabelGroupProps as
|
|
3
|
+
import p from "../ApLabel.mjs";
|
|
4
|
+
import { omit as n } from "lodash-unified";
|
|
5
|
+
import { ApLabelGroupProps as s } from "../constans.mjs";
|
|
6
6
|
import "../../../ap-tag/index.mjs";
|
|
7
|
-
import { useNamespace as
|
|
8
|
-
import
|
|
7
|
+
import { useNamespace as c } from "../../../config-provider/hooks/use-namespace.mjs";
|
|
8
|
+
import f from "../../../ap-tag/ap-tag.vue.mjs";
|
|
9
9
|
const {
|
|
10
|
-
b:
|
|
11
|
-
} =
|
|
10
|
+
b: i
|
|
11
|
+
} = c("ap-label-group"), _ = /* @__PURE__ */ l({
|
|
12
12
|
name: "ApLabelGroup",
|
|
13
|
-
props:
|
|
13
|
+
props: s(),
|
|
14
14
|
setup(r) {
|
|
15
|
-
const
|
|
15
|
+
const a = (e) => (r.tagValue || r.tagValue === 0) && e.tagConfig && e.tagConfig.length > 0 ? () => e.tagConfig.filter((u) => r.tagValue === u.value).map((u) => o(f, t(n(u, "type"), {
|
|
16
|
+
type: "border"
|
|
17
|
+
}), null)) : e.customRender ? () => o("div", null, [e.customRender(r.record)]) : null;
|
|
16
18
|
return () => o("div", {
|
|
17
|
-
class:
|
|
18
|
-
}, [r.columns ? r.columns.map((e, u) => o(
|
|
19
|
+
class: i()
|
|
20
|
+
}, [r.columns ? r.columns.map((e, u) => o(p, t({
|
|
19
21
|
key: u,
|
|
20
22
|
show: r.value === e.value
|
|
21
|
-
},
|
|
22
|
-
custom:
|
|
23
|
-
})) : o("div", null, [
|
|
23
|
+
}, n(e, ["value", "tagConfig", "customRender"])), {
|
|
24
|
+
custom: a(e)
|
|
25
|
+
})) : o("div", null, [m("columns数组不能为空")])]);
|
|
24
26
|
}
|
|
25
27
|
});
|
|
26
28
|
export {
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { usePageListApTable as o } from "./usePageListApTable.mjs";
|
|
2
|
-
import { useTableRefresh as
|
|
3
|
-
import { usePageListApGrid as
|
|
4
|
-
import { useGridRefresh as
|
|
2
|
+
import { useTableRefresh as t } from "./useTableRefresh.mjs";
|
|
3
|
+
import { usePageListApGrid as p } from "./usePageListApGrid.mjs";
|
|
4
|
+
import { useGridRefresh as a } from "./useGridRefresh.mjs";
|
|
5
|
+
import { usePageListAgGrid as u } from "./usePageListAgGrid.mjs";
|
|
5
6
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
a as useGridRefresh,
|
|
8
|
+
u as usePageListAgGrid,
|
|
9
|
+
p as usePageListApGrid,
|
|
8
10
|
o as usePageListApTable,
|
|
9
|
-
|
|
11
|
+
t as useTableRefresh
|
|
10
12
|
};
|