@aplus-frontend/ui 6.20.1 → 6.21.1
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 +159 -155
- package/es/src/ap-field/hooks/use-default-presets.d.ts +1 -0
- package/es/src/ap-field/hooks/use-default-presets.mjs +18 -12
- package/es/src/ap-pro-card/components/card/index.vue.d.ts +25 -0
- package/es/src/ap-pro-card/components/card/index.vue.mjs +4 -0
- package/es/src/ap-pro-card/components/card/index.vue2.mjs +226 -0
- package/es/src/ap-pro-card/components/divider/index.vue.d.ts +13 -0
- package/es/src/ap-pro-card/components/divider/index.vue.mjs +4 -0
- package/es/src/ap-pro-card/components/divider/index.vue2.mjs +29 -0
- package/es/src/ap-pro-card/components/title/index.vue.d.ts +23 -0
- package/es/src/ap-pro-card/components/title/index.vue.mjs +4 -0
- package/es/src/ap-pro-card/components/title/index.vue2.mjs +28 -0
- package/es/src/ap-pro-card/index.d.ts +10 -0
- package/es/src/ap-pro-card/index.mjs +13 -0
- package/es/src/ap-pro-card/interface.d.ts +61 -0
- package/es/src/ap-pro-card/style/css.d.ts +0 -0
- package/es/src/ap-pro-card/style/css.js +1 -0
- package/es/src/ap-pro-card/style/index.d.ts +0 -0
- package/es/src/ap-pro-card/style/index.js +1 -0
- package/es/src/ap-pro-card/utils/css-var.d.ts +17 -0
- package/es/src/ap-pro-card/utils/css-var.mjs +29 -0
- package/es/src/business/ap-value-select-card/index.d.ts +8 -0
- package/es/src/business/ap-value-select-card/index.mjs +9 -0
- package/es/src/business/ap-value-select-card/index.vue.d.ts +48 -0
- package/es/src/business/ap-value-select-card/index.vue.mjs +4 -0
- package/es/src/business/ap-value-select-card/index.vue2.mjs +186 -0
- package/es/src/business/ap-value-select-card/interface.d.ts +107 -0
- package/es/src/business/ap-value-select-card/interface.mjs +1 -0
- package/es/src/business/ap-value-select-card/style/css.d.ts +0 -0
- package/es/src/business/ap-value-select-card/style/css.js +1 -0
- package/es/src/business/ap-value-select-card/style/index.d.ts +0 -0
- package/es/src/business/ap-value-select-card/style/index.js +1 -0
- package/es/src/business/ap-value-select-card/utils.d.ts +7 -0
- package/es/src/business/ap-value-select-card/utils.mjs +9 -0
- package/es/src/business/index.d.ts +1 -0
- package/es/src/business/index.mjs +15 -13
- package/es/src/index.d.ts +1 -0
- package/es/src/index.mjs +275 -271
- package/es/src/path-map.mjs +3 -1
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/index.js +1 -1
- package/lib/src/ap-field/hooks/use-default-presets.d.ts +1 -0
- package/lib/src/ap-field/hooks/use-default-presets.js +1 -1
- package/lib/src/ap-pro-card/components/card/index.vue.d.ts +25 -0
- package/lib/src/ap-pro-card/components/card/index.vue.js +1 -0
- package/lib/src/ap-pro-card/components/card/index.vue2.js +1 -0
- package/lib/src/ap-pro-card/components/divider/index.vue.d.ts +13 -0
- package/lib/src/ap-pro-card/components/divider/index.vue.js +1 -0
- package/lib/src/ap-pro-card/components/divider/index.vue2.js +1 -0
- package/lib/src/ap-pro-card/components/title/index.vue.d.ts +23 -0
- package/lib/src/ap-pro-card/components/title/index.vue.js +1 -0
- package/lib/src/ap-pro-card/components/title/index.vue2.js +1 -0
- package/lib/src/ap-pro-card/index.d.ts +10 -0
- package/lib/src/ap-pro-card/index.js +1 -0
- package/lib/src/ap-pro-card/interface.d.ts +61 -0
- package/lib/src/ap-pro-card/style/css.cjs +1 -0
- package/lib/src/ap-pro-card/style/css.d.ts +0 -0
- package/lib/src/ap-pro-card/style/index.cjs +1 -0
- package/lib/src/ap-pro-card/style/index.d.ts +0 -0
- package/lib/src/ap-pro-card/utils/css-var.d.ts +17 -0
- package/lib/src/ap-pro-card/utils/css-var.js +1 -0
- package/lib/src/business/ap-value-select-card/index.d.ts +8 -0
- package/lib/src/business/ap-value-select-card/index.js +1 -0
- package/lib/src/business/ap-value-select-card/index.vue.d.ts +48 -0
- package/lib/src/business/ap-value-select-card/index.vue.js +1 -0
- package/lib/src/business/ap-value-select-card/index.vue2.js +1 -0
- package/lib/src/business/ap-value-select-card/interface.d.ts +107 -0
- package/lib/src/business/ap-value-select-card/interface.js +1 -0
- package/lib/src/business/ap-value-select-card/style/css.cjs +1 -0
- package/lib/src/business/ap-value-select-card/style/css.d.ts +0 -0
- package/lib/src/business/ap-value-select-card/style/index.cjs +1 -0
- package/lib/src/business/ap-value-select-card/style/index.d.ts +0 -0
- package/lib/src/business/ap-value-select-card/utils.d.ts +7 -0
- package/lib/src/business/ap-value-select-card/utils.js +1 -0
- package/lib/src/business/index.d.ts +1 -0
- package/lib/src/business/index.js +1 -1
- package/lib/src/index.d.ts +1 -0
- package/lib/src/index.js +1 -1
- package/lib/src/path-map.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
- package/theme/ag-grid/custom-header.css +82 -0
- package/theme/ag-grid/custom-header.less +39 -0
- package/theme/ag-grid/index.css +204 -0
- package/theme/ag-grid/index.less +118 -0
- package/theme/ap-pro-card/index.css +311 -0
- package/theme/ap-pro-card/index.less +185 -0
- package/theme/ap-value-select-card/index.css +163 -0
- package/theme/ap-value-select-card/index.less +157 -0
- package/theme/index.css +382 -0
- package/theme/index.less +2 -0
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { defineComponent as Y, useSlots as Z, computed as s, ref as ee, createVNode as u, Fragment as x, createElementBlock as b, openBlock as n, mergeProps as te, createCommentVNode as v, createElementVNode as oe, normalizeStyle as A, normalizeClass as m, unref as g, renderSlot as G, createBlock as p, resolveDynamicComponent as h, withCtx as P } from "vue";
|
|
2
|
+
import { Spin as re, Tooltip as le } from "@aplus-frontend/antdv";
|
|
3
|
+
import { QuestionCircleOutlined as ne } from "@ant-design/icons-vue";
|
|
4
|
+
import { getProCardCssVar as ae } from "../../utils/css-var.mjs";
|
|
5
|
+
import "../../../config-provider/index.mjs";
|
|
6
|
+
import { mergeClass as S } from "../../../editable-table/utils.mjs";
|
|
7
|
+
import ie from "@aplus-frontend/antdv/es/_util/hooks/useBreakpoint";
|
|
8
|
+
import { useNamespace as se } from "../../../config-provider/hooks/use-namespace.mjs";
|
|
9
|
+
import { useGlobalConfig as de } from "../../../config-provider/hooks/use-global-config.mjs";
|
|
10
|
+
const be = /* @__PURE__ */ Y({
|
|
11
|
+
name: "ApProCard",
|
|
12
|
+
__name: "index",
|
|
13
|
+
props: {
|
|
14
|
+
headStyle: {},
|
|
15
|
+
bodyStyle: {},
|
|
16
|
+
actionsStyle: {},
|
|
17
|
+
headerBordered: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: !1
|
|
20
|
+
},
|
|
21
|
+
title: {
|
|
22
|
+
type: [Object, String, Number, Boolean, null, Array]
|
|
23
|
+
},
|
|
24
|
+
tooltip: {
|
|
25
|
+
type: [Object, String, Number, Boolean, null, Array]
|
|
26
|
+
},
|
|
27
|
+
extra: {
|
|
28
|
+
type: [Object, String, Number, Boolean, null, Array]
|
|
29
|
+
},
|
|
30
|
+
layout: {},
|
|
31
|
+
type: {},
|
|
32
|
+
direction: {},
|
|
33
|
+
wrap: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: !1
|
|
36
|
+
},
|
|
37
|
+
loading: {
|
|
38
|
+
type: [Boolean, Object, String, Number, null, Array]
|
|
39
|
+
},
|
|
40
|
+
colSpan: {},
|
|
41
|
+
colStyle: {},
|
|
42
|
+
gutter: {
|
|
43
|
+
default: 0
|
|
44
|
+
},
|
|
45
|
+
actions: {
|
|
46
|
+
type: [Object, String, Number, Boolean, null, Array]
|
|
47
|
+
},
|
|
48
|
+
split: {},
|
|
49
|
+
bordered: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: !1
|
|
52
|
+
},
|
|
53
|
+
hoverable: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: !1
|
|
56
|
+
},
|
|
57
|
+
ghost: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: !1
|
|
60
|
+
},
|
|
61
|
+
boxShadow: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
default: !1
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
setup(E) {
|
|
67
|
+
const t = E, o = Z(), {
|
|
68
|
+
b: c
|
|
69
|
+
} = se("pro-card"), V = de("uiMode"), M = s(() => ae(V.value)), $ = ["xxxl", "xxl", "xl", "lg", "md", "sm", "xs"], f = ie(), k = (e, r) => e ? r : {}, _ = (e) => {
|
|
70
|
+
const r = [0, 0];
|
|
71
|
+
return (Array.isArray(e) ? e : [e, 0]).forEach((a, d) => {
|
|
72
|
+
if (typeof a == "object")
|
|
73
|
+
for (let i = 0; i < $.length; i += 1) {
|
|
74
|
+
const y = $[i];
|
|
75
|
+
if ({
|
|
76
|
+
lg: !0,
|
|
77
|
+
md: !0,
|
|
78
|
+
sm: !0,
|
|
79
|
+
xl: !1,
|
|
80
|
+
xs: !1,
|
|
81
|
+
xxl: !1,
|
|
82
|
+
xxxl: !1,
|
|
83
|
+
...f == null ? void 0 : f.value
|
|
84
|
+
}[y] && a[y] !== void 0) {
|
|
85
|
+
r[d] = a[y];
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
else
|
|
90
|
+
r[d] = a || 0;
|
|
91
|
+
}), r;
|
|
92
|
+
}, I = (e) => {
|
|
93
|
+
let r = e;
|
|
94
|
+
if (typeof e == "object")
|
|
95
|
+
for (let a = 0; a < $.length; a += 1) {
|
|
96
|
+
const d = $[a], i = {
|
|
97
|
+
lg: !0,
|
|
98
|
+
md: !0,
|
|
99
|
+
sm: !0,
|
|
100
|
+
xl: !1,
|
|
101
|
+
xs: !1,
|
|
102
|
+
xxl: !1,
|
|
103
|
+
xxxl: !1,
|
|
104
|
+
...f == null ? void 0 : f.value
|
|
105
|
+
};
|
|
106
|
+
if (i != null && i[d] && (e == null ? void 0 : e[d]) !== void 0) {
|
|
107
|
+
r = e[d];
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
const l = k(typeof r == "string" && /\d%|\dpx/i.test(r), {
|
|
112
|
+
width: r,
|
|
113
|
+
flexShrink: 0
|
|
114
|
+
});
|
|
115
|
+
return {
|
|
116
|
+
span: r,
|
|
117
|
+
colSpanStyle: l
|
|
118
|
+
};
|
|
119
|
+
}, D = s(() => _(t.gutter)), N = ee(!1), O = (e) => {
|
|
120
|
+
N.value = e;
|
|
121
|
+
}, F = s(() => {
|
|
122
|
+
var e;
|
|
123
|
+
return u(x, null, [t.title || ((e = o.title) == null ? void 0 : e.call(o))]);
|
|
124
|
+
}), H = s(() => u(x, null, [t.tooltip])), Q = s(() => {
|
|
125
|
+
var e;
|
|
126
|
+
return u(x, null, [t.extra || ((e = o.extra) == null ? void 0 : e.call(o))]);
|
|
127
|
+
}), T = s(() => {
|
|
128
|
+
var e;
|
|
129
|
+
return u(x, null, [t.actions || ((e = o.actions) == null ? void 0 : e.call(o))]);
|
|
130
|
+
}), q = s(() => t.loading === !0 ? u(re, {
|
|
131
|
+
style: {
|
|
132
|
+
width: "100%",
|
|
133
|
+
height: "100%",
|
|
134
|
+
display: "flex",
|
|
135
|
+
alignItems: "center",
|
|
136
|
+
justifyContent: "center"
|
|
137
|
+
}
|
|
138
|
+
}, null) : u(x, null, [t.loading]));
|
|
139
|
+
function J() {
|
|
140
|
+
var r;
|
|
141
|
+
const e = (r = o.default) == null ? void 0 : r.call(o);
|
|
142
|
+
return O(!1), u(x, null, [e == null ? void 0 : e.map((l, a, d) => {
|
|
143
|
+
var i, y, z;
|
|
144
|
+
if (l && typeof l == "object" && "type" in l && ((i = l.type) == null ? void 0 : i.isProCard) === !0) {
|
|
145
|
+
O(!0);
|
|
146
|
+
const U = ((y = l == null ? void 0 : l.props) == null ? void 0 : y.colSpan) || ((z = l == null ? void 0 : l.props) == null ? void 0 : z["col-span"]) || {}, {
|
|
147
|
+
span: C,
|
|
148
|
+
colSpanStyle: W
|
|
149
|
+
} = I(U), B = c("col"), X = S(`${B}`, [typeof C == "number" && C >= 0 && C <= 24 ? `${B}-span-${C}` : void 0, t.split === "horizontal" && a !== d.length - 1 ? `${B}-split-horizontal` : void 0, t.split === "vertical" && a !== d.length - 1 ? `${B}-split-vertical` : void 0].filter(Boolean)), [j, w] = D.value;
|
|
150
|
+
return u("div", {
|
|
151
|
+
class: X,
|
|
152
|
+
style: {
|
|
153
|
+
...W,
|
|
154
|
+
...k(j > 0, {
|
|
155
|
+
paddingInlineStart: `${j / 2}px`,
|
|
156
|
+
paddingInlineEnd: `${j / 2}px`
|
|
157
|
+
}),
|
|
158
|
+
...k(w > 0, {
|
|
159
|
+
paddingBlockStart: `${w / 2}px`,
|
|
160
|
+
paddingBlockEnd: `${w / 2}px`
|
|
161
|
+
}),
|
|
162
|
+
...t.colStyle
|
|
163
|
+
}
|
|
164
|
+
}, [l]);
|
|
165
|
+
}
|
|
166
|
+
return l;
|
|
167
|
+
})]);
|
|
168
|
+
}
|
|
169
|
+
const K = s(() => {
|
|
170
|
+
const e = c();
|
|
171
|
+
return S(`${e}`, [t.bordered ? `${e}-border` : void 0, t.boxShadow ? `${e}-box-shadow` : void 0, N.value ? `${e}-contain-card` : void 0, t.loading ? `${e}-loading` : void 0, t.split === "vertical" || t.split === "horizontal" ? `${e}-split` : void 0, t.ghost ? `${e}-ghost` : void 0, t.hoverable ? `${e}-hoverable` : void 0, t.type ? `${e}-type-${t.type}` : void 0].filter(Boolean));
|
|
172
|
+
}), L = s(() => {
|
|
173
|
+
const e = c("header");
|
|
174
|
+
return S(`${e}`, [t.headerBordered || t.type === "inner" ? `${e}-border` : void 0].filter(Boolean));
|
|
175
|
+
}), R = s(() => {
|
|
176
|
+
const e = c("body");
|
|
177
|
+
return S(`${e}`, [t.layout === "center" ? `${e}-center` : void 0, t.split === "horizontal" || t.direction === "column" ? `${e}-direction-column` : void 0, t.wrap && N.value ? `${e}-wrap` : void 0].filter(Boolean));
|
|
178
|
+
});
|
|
179
|
+
return (e, r) => (n(), b("div", te({
|
|
180
|
+
class: K.value,
|
|
181
|
+
style: {
|
|
182
|
+
...M.value
|
|
183
|
+
}
|
|
184
|
+
}, {
|
|
185
|
+
...e.$attrs
|
|
186
|
+
}), [t.title || o.title || t.extra || o.extra ? (n(), b("div", {
|
|
187
|
+
key: 0,
|
|
188
|
+
class: m(L.value),
|
|
189
|
+
style: A({
|
|
190
|
+
...t.headStyle
|
|
191
|
+
})
|
|
192
|
+
}, [t.title || o.title ? (n(), b("div", {
|
|
193
|
+
key: 0,
|
|
194
|
+
class: m(g(c)("header-title"))
|
|
195
|
+
}, [G(e.$slots, "title", {}, () => [(n(), p(h(F.value)))]), t.tooltip ? (n(), p(g(le), {
|
|
196
|
+
key: 0
|
|
197
|
+
}, {
|
|
198
|
+
title: P(() => [(n(), p(h(H.value)))]),
|
|
199
|
+
default: P(() => [u(g(ne), {
|
|
200
|
+
class: m(g(c)("header-title-tooltip"))
|
|
201
|
+
}, null, 8, ["class"])]),
|
|
202
|
+
_: 1
|
|
203
|
+
})) : v("", !0)], 2)) : v("", !0), t.extra || o.extra ? (n(), b("div", {
|
|
204
|
+
key: 1,
|
|
205
|
+
class: m(g(c)("header-extra"))
|
|
206
|
+
}, [G(e.$slots, "extra", {}, () => [(n(), p(h(Q.value)))])], 2)) : v("", !0)], 6)) : v("", !0), oe("div", {
|
|
207
|
+
class: m(R.value),
|
|
208
|
+
style: A({
|
|
209
|
+
...t.bodyStyle
|
|
210
|
+
})
|
|
211
|
+
}, [t.loading ? (n(), p(h(q.value), {
|
|
212
|
+
key: 0
|
|
213
|
+
})) : (n(), p(h(J()), {
|
|
214
|
+
key: 1
|
|
215
|
+
}))], 6), t.actions || o.actions ? (n(), b("div", {
|
|
216
|
+
key: 1,
|
|
217
|
+
class: m(g(c)("actions")),
|
|
218
|
+
style: A({
|
|
219
|
+
...t.actionsStyle
|
|
220
|
+
})
|
|
221
|
+
}, [(n(), p(h(T.value)))], 6)) : v("", !0)], 16));
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
export {
|
|
225
|
+
be as default
|
|
226
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/**
|
|
4
|
+
* 布局类型
|
|
5
|
+
*
|
|
6
|
+
* @default vertical
|
|
7
|
+
*/
|
|
8
|
+
type?: 'horizontal' | 'vertical';
|
|
9
|
+
};
|
|
10
|
+
declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
11
|
+
type: "horizontal" | "vertical";
|
|
12
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { defineComponent as p, computed as s, createElementBlock as a, openBlock as i, mergeProps as c } from "vue";
|
|
2
|
+
import "../../../config-provider/index.mjs";
|
|
3
|
+
import { mergeClass as m } from "../../../editable-table/utils.mjs";
|
|
4
|
+
import { useNamespace as d } from "../../../config-provider/hooks/use-namespace.mjs";
|
|
5
|
+
const _ = /* @__PURE__ */ p({
|
|
6
|
+
name: "ApProCardDivider",
|
|
7
|
+
__name: "index",
|
|
8
|
+
props: {
|
|
9
|
+
type: {
|
|
10
|
+
default: "vertical"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
setup(t) {
|
|
14
|
+
const {
|
|
15
|
+
b: o
|
|
16
|
+
} = d("pro-card-divider"), r = t, n = s(() => {
|
|
17
|
+
const e = o();
|
|
18
|
+
return m(`${e}`, [r.type ? `${e}-${r.type}` : void 0].filter(Boolean));
|
|
19
|
+
});
|
|
20
|
+
return (e, l) => (i(), a("div", c({
|
|
21
|
+
...e.$attrs
|
|
22
|
+
}, {
|
|
23
|
+
class: n.value
|
|
24
|
+
}), null, 16));
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
export {
|
|
28
|
+
_ as default
|
|
29
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
type?: 'default';
|
|
4
|
+
};
|
|
5
|
+
declare function __VLS_template(): {
|
|
6
|
+
attrs: Partial<{}>;
|
|
7
|
+
slots: {
|
|
8
|
+
default?(_: {}): any;
|
|
9
|
+
};
|
|
10
|
+
refs: {};
|
|
11
|
+
rootEl: HTMLDivElement;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
14
|
+
declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
15
|
+
type: "default";
|
|
16
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
17
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { defineComponent as a, computed as s, createElementBlock as p, openBlock as i, normalizeClass as u, renderSlot as d } from "vue";
|
|
2
|
+
import "../../../config-provider/index.mjs";
|
|
3
|
+
import { mergeClass as m } from "../../../editable-table/utils.mjs";
|
|
4
|
+
import { useNamespace as c } from "../../../config-provider/hooks/use-namespace.mjs";
|
|
5
|
+
import { useGlobalConfig as f } from "../../../config-provider/hooks/use-global-config.mjs";
|
|
6
|
+
const B = /* @__PURE__ */ a({
|
|
7
|
+
name: "ApProCardTitle",
|
|
8
|
+
__name: "index",
|
|
9
|
+
props: {
|
|
10
|
+
type: {
|
|
11
|
+
default: "default"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
setup(r) {
|
|
15
|
+
const {
|
|
16
|
+
b: l
|
|
17
|
+
} = c("pro-card-title"), o = f("uiMode"), t = r, n = s(() => {
|
|
18
|
+
const e = l();
|
|
19
|
+
return m(`${e}`, [t.type ? `${e}-${t.type}` : void 0, o.value ? `${e}-${t.type ?? "default"}-${o.value}` : void 0].filter(Boolean));
|
|
20
|
+
});
|
|
21
|
+
return (e, C) => (i(), p("div", {
|
|
22
|
+
class: u(n.value)
|
|
23
|
+
}, [d(e.$slots, "default")], 2));
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
export {
|
|
27
|
+
B as default
|
|
28
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as Card } from './components/card/index.vue';
|
|
2
|
+
import { default as Divider } from './components/divider/index.vue';
|
|
3
|
+
import { default as Title } from './components/title/index.vue';
|
|
4
|
+
export type ProCardType = typeof Card & {
|
|
5
|
+
isProCard: boolean;
|
|
6
|
+
Divider: typeof Divider;
|
|
7
|
+
Title: typeof Title;
|
|
8
|
+
};
|
|
9
|
+
declare const ApProCard: ProCardType;
|
|
10
|
+
export { ApProCard };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "./components/card/index.vue.mjs";
|
|
2
|
+
import "./components/divider/index.vue.mjs";
|
|
3
|
+
import "./components/title/index.vue.mjs";
|
|
4
|
+
import i from "./components/card/index.vue2.mjs";
|
|
5
|
+
import o from "./components/divider/index.vue2.mjs";
|
|
6
|
+
import m from "./components/title/index.vue2.mjs";
|
|
7
|
+
const r = i;
|
|
8
|
+
r.isProCard = !0;
|
|
9
|
+
r.Divider = o;
|
|
10
|
+
r.Title = m;
|
|
11
|
+
export {
|
|
12
|
+
r as ApProCard
|
|
13
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { CSSProperties, VNode, VNodeChild } from 'vue';
|
|
2
|
+
export type ApProCardBreakpoint = 'xxxl' | 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs';
|
|
3
|
+
export type ApProCardGutter = number | Partial<Record<ApProCardBreakpoint, number>>;
|
|
4
|
+
export type ApProCardColSpanType = number | string;
|
|
5
|
+
export interface ApProCardProps {
|
|
6
|
+
/** 标题样式 */
|
|
7
|
+
headStyle?: CSSProperties;
|
|
8
|
+
/** 内容样式 */
|
|
9
|
+
bodyStyle?: CSSProperties;
|
|
10
|
+
/** 操作区样式 */
|
|
11
|
+
actionsStyle?: CSSProperties;
|
|
12
|
+
/** 页头是否有分割线 */
|
|
13
|
+
headerBordered?: boolean;
|
|
14
|
+
/** 卡片标题 */
|
|
15
|
+
title?: VNodeChild;
|
|
16
|
+
/** 标题说明 */
|
|
17
|
+
tooltip?: VNodeChild;
|
|
18
|
+
/** 右上角自定义区域 */
|
|
19
|
+
extra?: VNodeChild;
|
|
20
|
+
/** 布局,center 代表垂直居中 */
|
|
21
|
+
layout?: 'default' | 'center';
|
|
22
|
+
/** 卡片类型 */
|
|
23
|
+
type?: 'default' | 'inner';
|
|
24
|
+
/** 指定 Flex 方向,仅在嵌套子卡片时有效 */
|
|
25
|
+
direction?: 'column' | 'row';
|
|
26
|
+
/** 是否自动换行,仅在嵌套子卡片时有效 */
|
|
27
|
+
wrap?: boolean;
|
|
28
|
+
/** 加载中 */
|
|
29
|
+
loading?: boolean | VNodeChild;
|
|
30
|
+
/** 栅格布局宽度,24 栅格,支持指定宽度或百分,需要支持响应式 colSpan={{ xs: 12, sm: 6 }} */
|
|
31
|
+
colSpan?: ApProCardColSpanType | Partial<Record<ApProCardBreakpoint, ApProCardColSpanType>>;
|
|
32
|
+
colStyle?: CSSProperties;
|
|
33
|
+
/** 栅格间距 */
|
|
34
|
+
gutter?: ApProCardGutter | ApProCardGutter[];
|
|
35
|
+
/** 操作区 */
|
|
36
|
+
actions?: VNodeChild;
|
|
37
|
+
/** 拆分卡片方式 */
|
|
38
|
+
split?: 'vertical' | 'horizontal';
|
|
39
|
+
/** 是否有边框 */
|
|
40
|
+
bordered?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* 鼠标移过时可浮起
|
|
43
|
+
*
|
|
44
|
+
* @default false
|
|
45
|
+
*/
|
|
46
|
+
hoverable?: boolean;
|
|
47
|
+
/** 幽灵模式,即是否取消卡片内容区域的 padding 和 背景颜色。 */
|
|
48
|
+
ghost?: boolean;
|
|
49
|
+
/** card的阴影 */
|
|
50
|
+
boxShadow?: boolean;
|
|
51
|
+
}
|
|
52
|
+
export type ApProCardSolts = {
|
|
53
|
+
/** 内容区 */
|
|
54
|
+
default?: () => VNode[];
|
|
55
|
+
/** 标题 */
|
|
56
|
+
title?: () => VNodeChild;
|
|
57
|
+
/** 右上角自定义区域 */
|
|
58
|
+
extra?: () => VNodeChild;
|
|
59
|
+
/** 卡片操作组,位置在卡片底部 */
|
|
60
|
+
actions?: () => VNodeChild;
|
|
61
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@aplus-frontend/ui/theme/ap-pro-card/index.css';
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@aplus-frontend/ui/theme/ap-pro-card/index.less';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const getProCardCssVar: (uiMode: "aplus" | "admin") => {
|
|
2
|
+
'--ap-pro-card-border-color-split': string;
|
|
3
|
+
'--ap-pro-card-box-shadow': string;
|
|
4
|
+
'--ap-pro-card-tooltip-color': string;
|
|
5
|
+
'--ap-pro-card-header-title-font-color': string;
|
|
6
|
+
'--ap-pro-card-area-color': string;
|
|
7
|
+
'--ap-pro-card-colo-bg-container': string;
|
|
8
|
+
'--ap-pro-card-border-radius': string;
|
|
9
|
+
'--ap-pro-card-header-padding': string;
|
|
10
|
+
'--ap-pro-card-header-padding-bottom': string;
|
|
11
|
+
'--ap-pro-card-body-padding': string;
|
|
12
|
+
'--ap-pro-card-actions-padding': string;
|
|
13
|
+
'--ap-pro-card-border-line-width': string;
|
|
14
|
+
'--ap-pro-card-border-line-type': string;
|
|
15
|
+
'--ap-pro-card-header-title-font-size': string;
|
|
16
|
+
'--ap-pro-card-split-line-height': string;
|
|
17
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const r = {
|
|
2
|
+
"--ap-pro-card-colo-bg-container": "transparent",
|
|
3
|
+
"--ap-pro-card-border-radius": "4px",
|
|
4
|
+
"--ap-pro-card-header-padding": "12px 16px 0",
|
|
5
|
+
"--ap-pro-card-header-padding-bottom": "12px",
|
|
6
|
+
"--ap-pro-card-body-padding": "12px 16px",
|
|
7
|
+
"--ap-pro-card-actions-padding": "12px 16px",
|
|
8
|
+
"--ap-pro-card-border-line-width": "1px",
|
|
9
|
+
"--ap-pro-card-border-line-type": "solid",
|
|
10
|
+
"--ap-pro-card-border-color-split": "#e9edf3",
|
|
11
|
+
"--ap-pro-card-box-shadow": "0 1px 2px -2px #00000029, 0 3px 6px #0000001f, 0 5px 12px 4px #00000017",
|
|
12
|
+
"--ap-pro-card-tooltip-color": "#8896b0",
|
|
13
|
+
"--ap-pro-card-header-title-font-size": "16px",
|
|
14
|
+
"--ap-pro-card-header-title-font-color": "#182948",
|
|
15
|
+
"--ap-pro-card-area-color": "#f1f7ff",
|
|
16
|
+
"--ap-pro-card-split-line-height": "100%"
|
|
17
|
+
}, a = {
|
|
18
|
+
"--ap-pro-card-border-color-split": "#e9e9e9",
|
|
19
|
+
"--ap-pro-card-box-shadow": "0 1px 2px -2px #00000029, 0 3px 6px #0000001f, 0 5px 12px 4px #00000017",
|
|
20
|
+
"--ap-pro-card-tooltip-color": "#999",
|
|
21
|
+
"--ap-pro-card-header-title-font-color": "#333",
|
|
22
|
+
"--ap-pro-card-area-color": "#eff9f5"
|
|
23
|
+
}, o = (p) => ({
|
|
24
|
+
...r,
|
|
25
|
+
...p === "admin" ? a : {}
|
|
26
|
+
});
|
|
27
|
+
export {
|
|
28
|
+
o as getProCardCssVar
|
|
29
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as _ApValueSelectCard } from './index.vue';
|
|
2
|
+
import { hexToRgba } from './utils';
|
|
3
|
+
type ApValueSelectCardInstance = typeof _ApValueSelectCard & {
|
|
4
|
+
hexToRgba: typeof hexToRgba;
|
|
5
|
+
};
|
|
6
|
+
export * from './interface';
|
|
7
|
+
declare const ApValueSelectCard: ApValueSelectCardInstance;
|
|
8
|
+
export { ApValueSelectCard };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ApValueSelectCardProps, ApValueSelectCardOption } from './interface';
|
|
2
|
+
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, Ref, ComputedRef, VNode } from 'vue';
|
|
3
|
+
declare const _default: <T extends Record<string, any> = Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
5
|
+
readonly onChange?: ((keys: (string | number)[]) => any) | undefined;
|
|
6
|
+
readonly onSelect?: ((key: string | number) => any) | undefined;
|
|
7
|
+
readonly onRemove?: ((key: string | number) => any) | undefined;
|
|
8
|
+
readonly onHighlight?: ((keys: (string | number)[]) => any) | undefined;
|
|
9
|
+
readonly "onUpdate:selectedKeys"?: ((keys: (string | number)[]) => any) | undefined;
|
|
10
|
+
readonly "onUpdate:highlightedKeys"?: ((keys: (string | number)[]) => any) | undefined;
|
|
11
|
+
} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, "onChange" | "onSelect" | "onUpdate:selectedKeys" | "onRemove" | "onHighlight" | "onUpdate:highlightedKeys"> & ApValueSelectCardProps<T> & Partial<{}>> & PublicProps;
|
|
12
|
+
expose(exposed: ShallowUnwrapRef<{
|
|
13
|
+
popoverVisible: Ref<boolean, boolean>;
|
|
14
|
+
allOptions: ComputedRef< ApValueSelectCardOption<T>[]>;
|
|
15
|
+
selectedOptions: ComputedRef< ApValueSelectCardOption<T>[]>;
|
|
16
|
+
isSelected: (key: string | number) => boolean;
|
|
17
|
+
isHighlighted: (key: string | number) => boolean;
|
|
18
|
+
toggleOption: (key: string | number) => void;
|
|
19
|
+
addOption: (key: string | number) => void;
|
|
20
|
+
removeOption: (key: string | number) => void;
|
|
21
|
+
highlightOption: (key: string | number) => void;
|
|
22
|
+
}>): void;
|
|
23
|
+
attrs: any;
|
|
24
|
+
slots: {
|
|
25
|
+
'close-icon'?(_: {}): any;
|
|
26
|
+
label?(_: {
|
|
27
|
+
option: ApValueSelectCardOption<T>;
|
|
28
|
+
}): any;
|
|
29
|
+
value?(_: {
|
|
30
|
+
option: ApValueSelectCardOption<T>;
|
|
31
|
+
}): any;
|
|
32
|
+
'add-button'?(_: {}): any;
|
|
33
|
+
};
|
|
34
|
+
emit: {
|
|
35
|
+
(e: "update:selectedKeys", keys: (string | number)[]): void;
|
|
36
|
+
(e: "update:highlightedKeys", keys: (string | number)[]): void;
|
|
37
|
+
(e: "change", keys: (string | number)[]): void;
|
|
38
|
+
(e: "select", key: string | number): void;
|
|
39
|
+
(e: "remove", key: string | number): void;
|
|
40
|
+
(e: "highlight", keys: (string | number)[]): void;
|
|
41
|
+
};
|
|
42
|
+
}>) => VNode & {
|
|
43
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
44
|
+
};
|
|
45
|
+
export default _default;
|
|
46
|
+
type __VLS_PrettifyLocal<T> = {
|
|
47
|
+
[K in keyof T]: T[K];
|
|
48
|
+
} & {};
|