@antdv-next1/pro-card 2.0.8 → 2.0.10
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/dist/Card.d.ts +54 -0
- package/dist/Card.js +443 -0
- package/dist/ProCard.d.ts +64 -54
- package/dist/ProCard.js +115 -289
- package/dist/components/CheckCard/CheckCard.d.ts +7 -6
- package/dist/components/CheckCard/CheckCard.js +24 -24
- package/dist/components/CheckCard/Group.js +2 -2
- package/dist/components/CheckCard/index.d.ts +2 -2
- package/dist/components/CheckCard/style/index.js +24 -12
- package/dist/components/Statistic/index.d.ts +18 -14
- package/dist/components/Statistic/index.js +48 -48
- package/dist/components/StatisticCard/index.d.ts +52 -12
- package/dist/components/StatisticCard/index.js +133 -133
- package/dist/index.d.ts +2 -2
- package/dist/pro-card.esm.js +17945 -21780
- package/dist/pro-card.js +79 -79
- package/package.json +3 -3
package/dist/Card.d.ts
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { CollapsibleType } from "./typing.js";
|
|
2
|
+
import { ProCardProps } from "./ProCard.js";
|
|
3
|
+
import * as _$vue from "vue";
|
|
4
|
+
import { CSSProperties, VNode } from "vue";
|
|
5
|
+
import { VueNode } from "@antdv-next1/pro-utils";
|
|
6
|
+
import * as _$antdv_next0 from "antdv-next";
|
|
7
|
+
import { ColProps } from "antdv-next";
|
|
8
|
+
import { CustomSlotsType } from "@v-c/util/dist/type";
|
|
9
|
+
import { Gutter } from "antdv-next/dist/grid/row";
|
|
10
|
+
|
|
11
|
+
//#region src/Card.d.ts
|
|
12
|
+
declare const InternalProCard: _$vue.DefineSetupFnComponent<ProCardProps, {}, CustomSlotsType<{
|
|
13
|
+
default?: () => VNode[];
|
|
14
|
+
extra?: () => VueNode;
|
|
15
|
+
title?: () => VueNode;
|
|
16
|
+
}>, _$antdv_next0.CardProps & _$antdv_next0.RowProps & {
|
|
17
|
+
tooltip?: VueNode;
|
|
18
|
+
split?: "vertical" | "horizontal";
|
|
19
|
+
direction?: "column" | "row";
|
|
20
|
+
gutter?: Gutter | [Gutter, Gutter];
|
|
21
|
+
colStyle?: CSSProperties;
|
|
22
|
+
borderBeam?: _$antdv_next0.BorderBeamProps | boolean;
|
|
23
|
+
layout?: "default" | "center";
|
|
24
|
+
boxShadow?: boolean;
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
headerBordered?: boolean;
|
|
27
|
+
ghost?: boolean;
|
|
28
|
+
collapsible?: CollapsibleType;
|
|
29
|
+
collapsed?: boolean;
|
|
30
|
+
collapsibleIconRender?: ({
|
|
31
|
+
collapsed
|
|
32
|
+
}: {
|
|
33
|
+
collapsed: boolean;
|
|
34
|
+
}) => VueNode;
|
|
35
|
+
defaultCollapsed?: boolean;
|
|
36
|
+
onCollapse?: (collapsed: boolean) => void;
|
|
37
|
+
checked?: boolean;
|
|
38
|
+
onChecked?: (e: MouseEvent) => void;
|
|
39
|
+
colSpan?: ColProps["span"];
|
|
40
|
+
colOffset?: ColProps["offset"];
|
|
41
|
+
colFlex?: ColProps["flex"];
|
|
42
|
+
colOrder?: ColProps["order"];
|
|
43
|
+
colPull?: ColProps["pull"];
|
|
44
|
+
colPush?: ColProps["push"];
|
|
45
|
+
colXs?: ColProps["xs"];
|
|
46
|
+
colSm?: ColProps["sm"];
|
|
47
|
+
colMd?: ColProps["md"];
|
|
48
|
+
colLg?: ColProps["lg"];
|
|
49
|
+
colXl?: ColProps["xl"];
|
|
50
|
+
colXxl?: ColProps["xxl"];
|
|
51
|
+
onClick?: (e: MouseEvent) => void;
|
|
52
|
+
} & {}, _$vue.PublicProps>;
|
|
53
|
+
//#endregion
|
|
54
|
+
export { InternalProCard as default };
|
package/dist/Card.js
ADDED
|
@@ -0,0 +1,443 @@
|
|
|
1
|
+
import useStyle from "./style/index.js";
|
|
2
|
+
import { Fragment, computed, createTextVNode, createVNode, defineComponent, isVNode, mergeProps, ref, watch } from "vue";
|
|
3
|
+
import { childrenToArray, isSpecialNode } from "@antdv-next1/pro-utils";
|
|
4
|
+
import { InfoCircleOutlined } from "@antdv-next/icons";
|
|
5
|
+
import { classNames } from "@v-c/util";
|
|
6
|
+
import { BorderBeam, Card, Col, Collapse, Row, Tooltip, useBreakpoint } from "antdv-next";
|
|
7
|
+
import { responsiveArray } from "antdv-next/dist/_util/responsiveObserver";
|
|
8
|
+
import { useConfig } from "antdv-next/dist/config-provider/context";
|
|
9
|
+
//#region src/Card.tsx
|
|
10
|
+
function _isSlot(s) {
|
|
11
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
12
|
+
}
|
|
13
|
+
const InternalProCard = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
14
|
+
const config = useConfig();
|
|
15
|
+
const prefixCls = computed(() => props.prefixCls || config.value.getPrefixCls("pro"));
|
|
16
|
+
const baseClassName = computed(() => `${prefixCls.value}-card`);
|
|
17
|
+
const { wrapSSR, hashId } = useStyle(baseClassName);
|
|
18
|
+
const activeKey = ref();
|
|
19
|
+
const screens = useBreakpoint();
|
|
20
|
+
/**
|
|
21
|
+
* 根据响应式获取 gutter, 参考 antd 实现
|
|
22
|
+
* @param gut
|
|
23
|
+
*/
|
|
24
|
+
const getNormalizedGutter = (gut) => {
|
|
25
|
+
const results = [0, 0];
|
|
26
|
+
(Array.isArray(gut) ? gut : [gut, 0]).forEach((g, index) => {
|
|
27
|
+
if (typeof g === "object") for (let i = 0; i < responsiveArray.length; i += 1) {
|
|
28
|
+
const breakpoint = responsiveArray[i];
|
|
29
|
+
if (screens.value?.[breakpoint] && g[breakpoint] !== void 0) {
|
|
30
|
+
results[index] = g[breakpoint];
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
else results[index] = g || 0;
|
|
35
|
+
});
|
|
36
|
+
return results;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* 根据条件返回 style.ts,负责返回空对象
|
|
40
|
+
*
|
|
41
|
+
* @param withStyle 是否符合条件
|
|
42
|
+
* @param appendStyle 如果符合条件要返回的 style.ts 属性
|
|
43
|
+
*/
|
|
44
|
+
const getStyle = (withStyle, appendStyle) => {
|
|
45
|
+
return withStyle ? appendStyle : {};
|
|
46
|
+
};
|
|
47
|
+
watch(() => props.defaultCollapsed, (next) => {
|
|
48
|
+
if (!next) activeKey.value = ["collapseCard"];
|
|
49
|
+
}, { immediate: true });
|
|
50
|
+
let containProCard = false;
|
|
51
|
+
const slotTitleProps = computed(() => {
|
|
52
|
+
if (props.title && props.tooltip || slots.title && props.tooltip) return { title: () => createVNode(Fragment, null, [props.title || slots.title?.(), createVNode(Tooltip, null, {
|
|
53
|
+
default: () => [createVNode(InfoCircleOutlined, { "style": {
|
|
54
|
+
marginInlineStart: "4px",
|
|
55
|
+
cursor: "pointer"
|
|
56
|
+
} }, null)],
|
|
57
|
+
title: () => props.tooltip
|
|
58
|
+
})]) };
|
|
59
|
+
if (slots.title && !props.tooltip) return { title: slots.title };
|
|
60
|
+
return {};
|
|
61
|
+
});
|
|
62
|
+
return () => {
|
|
63
|
+
const { ghost, direction, boxShadow, colSpan, split, align, borderBeam, colStyle, headerBordered = false, collapsible = false, collapsibleIconRender, collapsed: controlCollapsed, defaultCollapsed = false, onChecked, checked, onCollapse, justify, colLg, colFlex, colMd, colXl, colXxl, colSm, colPush, colPull, colXs, disabled, gutter = 0, title, tooltip, ...rest } = props;
|
|
64
|
+
const [horizontalGutter, verticalGutter] = getNormalizedGutter(gutter);
|
|
65
|
+
const { default: children, title: slotTitle, ...restSlots } = slots;
|
|
66
|
+
const childrenDom = childrenToArray(children?.())?.map((element) => {
|
|
67
|
+
if (isVNode(element) && !isSpecialNode(element)) {
|
|
68
|
+
if (element.props && element.type.isProCard && direction === "column") {
|
|
69
|
+
const colBreakpointKeyList = [
|
|
70
|
+
"span",
|
|
71
|
+
"flex",
|
|
72
|
+
"offset",
|
|
73
|
+
"order",
|
|
74
|
+
"pull",
|
|
75
|
+
"push",
|
|
76
|
+
"xs",
|
|
77
|
+
"sm",
|
|
78
|
+
"md",
|
|
79
|
+
"lg",
|
|
80
|
+
"xl",
|
|
81
|
+
"xxl"
|
|
82
|
+
];
|
|
83
|
+
const colPropsClass = Object.entries(element.props).reduce((prev, [key, value]) => {
|
|
84
|
+
const keys = key.split("-");
|
|
85
|
+
if (colBreakpointKeyList.includes(keys[keys.length - 1])) if (["span", "flex"].includes(keys[keys.length - 1])) prev[`${baseClassName.value}-${keys[keys.length - 2]}-${value}`] = true;
|
|
86
|
+
else prev[`${baseClassName.value}-${key}-${value}`] = true;
|
|
87
|
+
return prev;
|
|
88
|
+
}, {});
|
|
89
|
+
containProCard = true;
|
|
90
|
+
return createVNode("div", {
|
|
91
|
+
"style": {
|
|
92
|
+
...getStyle(horizontalGutter > 0, {
|
|
93
|
+
paddingInlineEnd: `${horizontalGutter / 2}px`,
|
|
94
|
+
paddingInlineStart: `${horizontalGutter / 2}px`
|
|
95
|
+
}),
|
|
96
|
+
...getStyle(verticalGutter > 0, {
|
|
97
|
+
paddingBlockStart: `${verticalGutter / 2}px`,
|
|
98
|
+
paddingBlockEnd: `${verticalGutter / 2}px`
|
|
99
|
+
})
|
|
100
|
+
},
|
|
101
|
+
"class": classNames([`${baseClassName.value}-col`], colPropsClass)
|
|
102
|
+
}, [element]);
|
|
103
|
+
}
|
|
104
|
+
if (element.type.isProCard) {
|
|
105
|
+
containProCard = true;
|
|
106
|
+
return createVNode(Col, [
|
|
107
|
+
"span",
|
|
108
|
+
"flex",
|
|
109
|
+
"offset",
|
|
110
|
+
"order",
|
|
111
|
+
"pull",
|
|
112
|
+
"push",
|
|
113
|
+
"xs",
|
|
114
|
+
"sm",
|
|
115
|
+
"md",
|
|
116
|
+
"lg",
|
|
117
|
+
"xl",
|
|
118
|
+
"xxl"
|
|
119
|
+
].reduce((prev, key) => {
|
|
120
|
+
if (element.props?.[`col-${key}`] !== void 0) prev[key] = element.props?.[`col-${key}`];
|
|
121
|
+
return prev;
|
|
122
|
+
}, {}), _isSlot(element) ? element : { default: () => [element] });
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return element;
|
|
126
|
+
});
|
|
127
|
+
return wrapSSR(createVNode(Fragment, null, [collapsible ? createVNode(Collapse, mergeProps({ "bordered": rest.variant !== "borderless" }, defaultCollapsed ? {} : { activeKey: activeKey.value }, {
|
|
128
|
+
"class": classNames(baseClassName.value, attrs.class, hashId.value),
|
|
129
|
+
"ghost": !ghost
|
|
130
|
+
}), { default: () => [createTextVNode("asdsa")] }) : createVNode(Fragment, null, [rest.variant !== "borderless" && borderBeam && !disabled ? createVNode(BorderBeam, typeof borderBeam === "boolean" ? {} : borderBeam, { default: () => [createVNode(Card, mergeProps(attrs, rest, { "class": classNames(baseClassName.value, attrs.class, hashId.value, {
|
|
131
|
+
[`${baseClassName.value}-direction-column`]: split === "horizontal" || direction === "column",
|
|
132
|
+
[`${baseClassName.value}-ghost`]: ghost,
|
|
133
|
+
[`${baseClassName.value}-box-shadow`]: boxShadow,
|
|
134
|
+
[`${baseClassName.value}-contain-card`]: containProCard
|
|
135
|
+
}) }, title && !tooltip && !slotTitle ? { title } : {}, { "styles": {
|
|
136
|
+
header: headerBordered ? {} : { borderBlockEnd: "none" },
|
|
137
|
+
...rest.styles
|
|
138
|
+
} }), {
|
|
139
|
+
default: () => [direction !== "column" && containProCard ? createVNode(Row, { "gutter": gutter }, _isSlot(childrenDom) ? childrenDom : { default: () => [childrenDom] }) : ghost && containProCard ? createVNode("div", {
|
|
140
|
+
"class": `${baseClassName.value}-column`,
|
|
141
|
+
"style": {
|
|
142
|
+
...getStyle(horizontalGutter > 0, {
|
|
143
|
+
marginInlineEnd: `-${horizontalGutter / 2}px`,
|
|
144
|
+
marginInlineStart: `-${horizontalGutter / 2}px`
|
|
145
|
+
}),
|
|
146
|
+
...getStyle(verticalGutter > 0, {
|
|
147
|
+
marginBlockStart: `-${verticalGutter / 2}px`,
|
|
148
|
+
marginBlockEnd: `-${verticalGutter / 2}px`
|
|
149
|
+
})
|
|
150
|
+
}
|
|
151
|
+
}, [childrenDom]) : childrenDom],
|
|
152
|
+
...restSlots,
|
|
153
|
+
...slotTitleProps.value
|
|
154
|
+
})] }) : createVNode(Card, mergeProps(attrs, rest, { "class": classNames(baseClassName.value, attrs.class, hashId.value, {
|
|
155
|
+
[`${baseClassName.value}-direction-column`]: split === "horizontal" || direction === "column",
|
|
156
|
+
[`${baseClassName.value}-ghost`]: ghost,
|
|
157
|
+
[`${baseClassName.value}-disabled`]: disabled,
|
|
158
|
+
[`${baseClassName.value}-box-shadow`]: boxShadow,
|
|
159
|
+
[`${baseClassName.value}-contain-card`]: containProCard
|
|
160
|
+
}) }, title && !tooltip && !slotTitle ? { title } : {}, { "styles": {
|
|
161
|
+
header: headerBordered ? {} : { borderBlockEnd: "none" },
|
|
162
|
+
...rest.styles
|
|
163
|
+
} }), {
|
|
164
|
+
default: () => [direction !== "column" && containProCard ? createVNode(Row, { "gutter": gutter }, _isSlot(childrenDom) ? childrenDom : { default: () => [childrenDom] }) : ghost && containProCard ? createVNode("div", {
|
|
165
|
+
"class": `${baseClassName.value}-column`,
|
|
166
|
+
"style": {
|
|
167
|
+
...getStyle(horizontalGutter > 0, {
|
|
168
|
+
marginInlineEnd: `-${horizontalGutter / 2}px`,
|
|
169
|
+
marginInlineStart: `-${horizontalGutter / 2}px`
|
|
170
|
+
}),
|
|
171
|
+
...getStyle(verticalGutter > 0, {
|
|
172
|
+
marginBlockStart: `-${verticalGutter / 2}px`,
|
|
173
|
+
marginBlockEnd: `-${verticalGutter / 2}px`
|
|
174
|
+
})
|
|
175
|
+
}
|
|
176
|
+
}, [childrenDom]) : childrenDom],
|
|
177
|
+
...restSlots,
|
|
178
|
+
...slotTitleProps.value
|
|
179
|
+
})])]));
|
|
180
|
+
};
|
|
181
|
+
}, {
|
|
182
|
+
props: {
|
|
183
|
+
title: {
|
|
184
|
+
type: [
|
|
185
|
+
Function,
|
|
186
|
+
String,
|
|
187
|
+
Number,
|
|
188
|
+
null,
|
|
189
|
+
Object,
|
|
190
|
+
Boolean
|
|
191
|
+
],
|
|
192
|
+
required: false,
|
|
193
|
+
default: void 0
|
|
194
|
+
},
|
|
195
|
+
extra: {
|
|
196
|
+
type: [
|
|
197
|
+
Function,
|
|
198
|
+
String,
|
|
199
|
+
Number,
|
|
200
|
+
null,
|
|
201
|
+
Object,
|
|
202
|
+
Boolean
|
|
203
|
+
],
|
|
204
|
+
required: false,
|
|
205
|
+
default: void 0
|
|
206
|
+
},
|
|
207
|
+
bordered: {
|
|
208
|
+
type: Boolean,
|
|
209
|
+
required: false,
|
|
210
|
+
default: void 0
|
|
211
|
+
},
|
|
212
|
+
headStyle: {
|
|
213
|
+
type: Object,
|
|
214
|
+
required: false
|
|
215
|
+
},
|
|
216
|
+
bodyStyle: {
|
|
217
|
+
type: Object,
|
|
218
|
+
required: false
|
|
219
|
+
},
|
|
220
|
+
loading: {
|
|
221
|
+
type: Boolean,
|
|
222
|
+
required: false,
|
|
223
|
+
default: void 0
|
|
224
|
+
},
|
|
225
|
+
hoverable: {
|
|
226
|
+
type: Boolean,
|
|
227
|
+
required: false,
|
|
228
|
+
default: void 0
|
|
229
|
+
},
|
|
230
|
+
id: {
|
|
231
|
+
type: String,
|
|
232
|
+
required: false
|
|
233
|
+
},
|
|
234
|
+
size: {
|
|
235
|
+
type: String,
|
|
236
|
+
required: false
|
|
237
|
+
},
|
|
238
|
+
type: {
|
|
239
|
+
type: String,
|
|
240
|
+
required: false
|
|
241
|
+
},
|
|
242
|
+
cover: {
|
|
243
|
+
type: [
|
|
244
|
+
Function,
|
|
245
|
+
String,
|
|
246
|
+
Number,
|
|
247
|
+
null,
|
|
248
|
+
Object,
|
|
249
|
+
Boolean
|
|
250
|
+
],
|
|
251
|
+
required: false,
|
|
252
|
+
default: void 0
|
|
253
|
+
},
|
|
254
|
+
actions: {
|
|
255
|
+
type: Array,
|
|
256
|
+
required: false
|
|
257
|
+
},
|
|
258
|
+
tabList: {
|
|
259
|
+
type: Array,
|
|
260
|
+
required: false
|
|
261
|
+
},
|
|
262
|
+
tabBarExtraContent: {
|
|
263
|
+
type: [
|
|
264
|
+
Function,
|
|
265
|
+
String,
|
|
266
|
+
Number,
|
|
267
|
+
null,
|
|
268
|
+
Object,
|
|
269
|
+
Boolean
|
|
270
|
+
],
|
|
271
|
+
required: false,
|
|
272
|
+
default: void 0
|
|
273
|
+
},
|
|
274
|
+
activeTabKey: {
|
|
275
|
+
type: String,
|
|
276
|
+
required: false
|
|
277
|
+
},
|
|
278
|
+
defaultActiveTabKey: {
|
|
279
|
+
type: String,
|
|
280
|
+
required: false
|
|
281
|
+
},
|
|
282
|
+
tabProps: {
|
|
283
|
+
type: Object,
|
|
284
|
+
required: false
|
|
285
|
+
},
|
|
286
|
+
classes: {
|
|
287
|
+
type: [Object, Function],
|
|
288
|
+
required: false
|
|
289
|
+
},
|
|
290
|
+
styles: {
|
|
291
|
+
type: [Object, Function],
|
|
292
|
+
required: false
|
|
293
|
+
},
|
|
294
|
+
variant: {
|
|
295
|
+
type: String,
|
|
296
|
+
required: false
|
|
297
|
+
},
|
|
298
|
+
rootClass: {
|
|
299
|
+
type: String,
|
|
300
|
+
required: false
|
|
301
|
+
},
|
|
302
|
+
prefixCls: {
|
|
303
|
+
type: String,
|
|
304
|
+
required: false
|
|
305
|
+
},
|
|
306
|
+
onTabChange: {
|
|
307
|
+
type: Function,
|
|
308
|
+
required: false
|
|
309
|
+
},
|
|
310
|
+
"onUpdate:activeTabKey": {
|
|
311
|
+
type: Function,
|
|
312
|
+
required: false
|
|
313
|
+
},
|
|
314
|
+
gutter: {
|
|
315
|
+
type: [
|
|
316
|
+
Number,
|
|
317
|
+
null,
|
|
318
|
+
Object,
|
|
319
|
+
Array
|
|
320
|
+
],
|
|
321
|
+
required: false
|
|
322
|
+
},
|
|
323
|
+
align: {
|
|
324
|
+
type: [String, Object],
|
|
325
|
+
required: false
|
|
326
|
+
},
|
|
327
|
+
justify: {
|
|
328
|
+
type: [String, Object],
|
|
329
|
+
required: false
|
|
330
|
+
},
|
|
331
|
+
wrap: {
|
|
332
|
+
type: Boolean,
|
|
333
|
+
required: false,
|
|
334
|
+
default: void 0
|
|
335
|
+
},
|
|
336
|
+
tooltip: {
|
|
337
|
+
type: [
|
|
338
|
+
Object,
|
|
339
|
+
Function,
|
|
340
|
+
String,
|
|
341
|
+
Number,
|
|
342
|
+
null,
|
|
343
|
+
Boolean,
|
|
344
|
+
Array
|
|
345
|
+
],
|
|
346
|
+
required: false,
|
|
347
|
+
default: void 0
|
|
348
|
+
},
|
|
349
|
+
split: {
|
|
350
|
+
type: String,
|
|
351
|
+
required: false
|
|
352
|
+
},
|
|
353
|
+
direction: {
|
|
354
|
+
type: String,
|
|
355
|
+
required: false
|
|
356
|
+
},
|
|
357
|
+
colStyle: {
|
|
358
|
+
type: Object,
|
|
359
|
+
required: false
|
|
360
|
+
},
|
|
361
|
+
borderBeam: {
|
|
362
|
+
type: [Object, Boolean],
|
|
363
|
+
required: false,
|
|
364
|
+
default: void 0
|
|
365
|
+
},
|
|
366
|
+
layout: {
|
|
367
|
+
type: String,
|
|
368
|
+
required: false
|
|
369
|
+
},
|
|
370
|
+
boxShadow: {
|
|
371
|
+
type: Boolean,
|
|
372
|
+
required: false,
|
|
373
|
+
default: void 0
|
|
374
|
+
},
|
|
375
|
+
disabled: {
|
|
376
|
+
type: Boolean,
|
|
377
|
+
required: false,
|
|
378
|
+
default: void 0
|
|
379
|
+
},
|
|
380
|
+
headerBordered: {
|
|
381
|
+
type: Boolean,
|
|
382
|
+
required: false,
|
|
383
|
+
default: void 0
|
|
384
|
+
},
|
|
385
|
+
ghost: {
|
|
386
|
+
type: Boolean,
|
|
387
|
+
required: false,
|
|
388
|
+
default: void 0
|
|
389
|
+
},
|
|
390
|
+
collapsible: {
|
|
391
|
+
type: [String, Boolean],
|
|
392
|
+
required: false,
|
|
393
|
+
default: void 0
|
|
394
|
+
},
|
|
395
|
+
collapsed: {
|
|
396
|
+
type: Boolean,
|
|
397
|
+
required: false,
|
|
398
|
+
default: void 0
|
|
399
|
+
},
|
|
400
|
+
collapsibleIconRender: {
|
|
401
|
+
type: Function,
|
|
402
|
+
required: false
|
|
403
|
+
},
|
|
404
|
+
defaultCollapsed: {
|
|
405
|
+
type: Boolean,
|
|
406
|
+
required: false,
|
|
407
|
+
default: void 0
|
|
408
|
+
},
|
|
409
|
+
onCollapse: {
|
|
410
|
+
type: Function,
|
|
411
|
+
required: false
|
|
412
|
+
},
|
|
413
|
+
checked: {
|
|
414
|
+
type: Boolean,
|
|
415
|
+
required: false,
|
|
416
|
+
default: void 0
|
|
417
|
+
},
|
|
418
|
+
onChecked: {
|
|
419
|
+
type: Function,
|
|
420
|
+
required: false
|
|
421
|
+
},
|
|
422
|
+
colSpan: { required: false },
|
|
423
|
+
colOffset: { required: false },
|
|
424
|
+
colFlex: { required: false },
|
|
425
|
+
colOrder: { required: false },
|
|
426
|
+
colPull: { required: false },
|
|
427
|
+
colPush: { required: false },
|
|
428
|
+
colXs: { required: false },
|
|
429
|
+
colSm: { required: false },
|
|
430
|
+
colMd: { required: false },
|
|
431
|
+
colLg: { required: false },
|
|
432
|
+
colXl: { required: false },
|
|
433
|
+
colXxl: { required: false },
|
|
434
|
+
onClick: {
|
|
435
|
+
type: Function,
|
|
436
|
+
required: false
|
|
437
|
+
}
|
|
438
|
+
},
|
|
439
|
+
name: "InternalProCard",
|
|
440
|
+
inheritAttrs: false
|
|
441
|
+
});
|
|
442
|
+
//#endregion
|
|
443
|
+
export { InternalProCard as default };
|
package/dist/ProCard.d.ts
CHANGED
|
@@ -7,74 +7,84 @@ import { CustomSlotsType } from "@v-c/util/dist/type";
|
|
|
7
7
|
import { Gutter } from "antdv-next/dist/grid/row";
|
|
8
8
|
|
|
9
9
|
//#region src/ProCard.d.ts
|
|
10
|
-
|
|
11
|
-
/** 标题说明 */
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
split?: 'vertical' | 'horizontal';
|
|
15
|
-
/** 指定 Flex 方向,仅在嵌套子卡片时有效 */
|
|
16
|
-
direction?: 'column' | 'row';
|
|
17
|
-
/** 栅格间距 */
|
|
10
|
+
type ProCardProps = CardProps & RowProps & {
|
|
11
|
+
/** 标题说明 */tooltip?: VueNode; /** 拆分卡片方式 */
|
|
12
|
+
split?: 'vertical' | 'horizontal'; /** 指定 Flex 方向,仅在嵌套子卡片时有效 */
|
|
13
|
+
direction?: 'column' | 'row'; /** 栅格间距 */
|
|
18
14
|
gutter?: Gutter | [Gutter, Gutter];
|
|
19
|
-
colStyle?: CSSProperties;
|
|
20
|
-
/**
|
|
21
|
-
|
|
22
|
-
/** 布局,center 代表垂直居中 */
|
|
23
|
-
layout?: 'default' | 'center';
|
|
24
|
-
/** 是否有卡片阴影 */
|
|
15
|
+
colStyle?: CSSProperties; /** 边框流光 */
|
|
16
|
+
borderBeam?: BorderBeamProps | boolean; /** 布局,center 代表垂直居中 */
|
|
17
|
+
layout?: 'default' | 'center'; /** 是否有卡片阴影 */
|
|
25
18
|
boxShadow?: boolean;
|
|
26
|
-
disabled?: boolean;
|
|
27
|
-
/**
|
|
28
|
-
headerBordered?: boolean;
|
|
29
|
-
/** 幽灵模式,即是否取消卡片内容区域的 padding 和 背景颜色。 */
|
|
19
|
+
disabled?: boolean; /** 头部是否有分割线 */
|
|
20
|
+
headerBordered?: boolean; /** 幽灵模式,即是否取消卡片内容区域的 padding 和 背景颜色。 */
|
|
30
21
|
ghost?: boolean;
|
|
31
|
-
collapsible?: CollapsibleType;
|
|
32
|
-
|
|
33
|
-
collapsed?: boolean;
|
|
34
|
-
/** 折叠按钮自定义节点 */
|
|
22
|
+
collapsible?: CollapsibleType; /** 受控 collapsed 属性 */
|
|
23
|
+
collapsed?: boolean; /** 折叠按钮自定义节点 */
|
|
35
24
|
collapsibleIconRender?: ({
|
|
36
25
|
collapsed
|
|
37
26
|
}: {
|
|
38
27
|
collapsed: boolean;
|
|
39
|
-
}) => VueNode;
|
|
40
|
-
/**
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
|
|
48
|
-
/** 栅格占位格数,24 栅格,colSpan={6} */
|
|
49
|
-
colSpan?: ColProps['span'];
|
|
50
|
-
/** 栅格左侧的间隔格数,间隔内不可以有栅格 */
|
|
51
|
-
colOffset?: ColProps['offset'];
|
|
52
|
-
/** flex 布局填充 */
|
|
53
|
-
colFlex?: ColProps['flex'];
|
|
54
|
-
/** 栅格顺序,flex 布局模式下有效 */
|
|
55
|
-
colOrder?: ColProps['order'];
|
|
56
|
-
/** 栅格向左移动格数 */
|
|
28
|
+
}) => VueNode; /** 配置默认是否折叠 */
|
|
29
|
+
defaultCollapsed?: boolean; /** 收起卡片的事件 */
|
|
30
|
+
onCollapse?: (collapsed: boolean) => void; /** 是否展示选中样式 */
|
|
31
|
+
checked?: boolean; /** 选中改变 */
|
|
32
|
+
onChecked?: (e: MouseEvent) => void; /** 栅格占位格数,24 栅格,colSpan={6} */
|
|
33
|
+
colSpan?: ColProps['span']; /** 栅格左侧的间隔格数,间隔内不可以有栅格 */
|
|
34
|
+
colOffset?: ColProps['offset']; /** flex 布局填充 */
|
|
35
|
+
colFlex?: ColProps['flex']; /** 栅格顺序,flex 布局模式下有效 */
|
|
36
|
+
colOrder?: ColProps['order']; /** 栅格向左移动格数 */
|
|
57
37
|
colPull?: ColProps['pull'];
|
|
58
|
-
colPush?: ColProps['push'];
|
|
59
|
-
/**
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
|
|
63
|
-
/** ≥
|
|
64
|
-
colMd?: ColProps['md'];
|
|
65
|
-
/** ≥992px 响应式栅格,可为栅格数或一个包含其他属性的对象 */
|
|
66
|
-
colLg?: ColProps['lg'];
|
|
67
|
-
/** ≥1200px 响应式栅格,可为栅格数或一个包含其他属性的对象 */
|
|
68
|
-
colXl?: ColProps['xl'];
|
|
69
|
-
/** ≥1600px 响应式栅格,可为栅格数或一个包含其他属性的对象 */
|
|
38
|
+
colPush?: ColProps['push']; /** <576px 响应式栅格,可为栅格数或一个包含其他属性的对象 */
|
|
39
|
+
colXs?: ColProps['xs']; /** ≥576px 响应式栅格,可为栅格数或一个包含其他属性的对象 */
|
|
40
|
+
colSm?: ColProps['sm']; /** ≥768px 响应式栅格,可为栅格数或一个包含其他属性的对象 */
|
|
41
|
+
colMd?: ColProps['md']; /** ≥992px 响应式栅格,可为栅格数或一个包含其他属性的对象 */
|
|
42
|
+
colLg?: ColProps['lg']; /** ≥1200px 响应式栅格,可为栅格数或一个包含其他属性的对象 */
|
|
43
|
+
colXl?: ColProps['xl']; /** ≥1600px 响应式栅格,可为栅格数或一个包含其他属性的对象 */
|
|
70
44
|
colXxl?: ColProps['xxl'];
|
|
71
45
|
onClick?: (e: MouseEvent) => void;
|
|
72
|
-
}
|
|
46
|
+
};
|
|
73
47
|
declare const _ProCard: _$vue.DefineSetupFnComponent<ProCardProps, {}, CustomSlotsType<{
|
|
74
48
|
default?: () => VNode[];
|
|
75
49
|
extra?: () => VueNode;
|
|
76
50
|
title?: () => VueNode;
|
|
77
|
-
}>,
|
|
51
|
+
}>, CardProps & RowProps & {
|
|
52
|
+
/** 标题说明 */tooltip?: VueNode; /** 拆分卡片方式 */
|
|
53
|
+
split?: "vertical" | "horizontal"; /** 指定 Flex 方向,仅在嵌套子卡片时有效 */
|
|
54
|
+
direction?: "column" | "row"; /** 栅格间距 */
|
|
55
|
+
gutter?: Gutter | [Gutter, Gutter];
|
|
56
|
+
colStyle?: CSSProperties; /** 边框流光 */
|
|
57
|
+
borderBeam?: BorderBeamProps | boolean; /** 布局,center 代表垂直居中 */
|
|
58
|
+
layout?: "default" | "center"; /** 是否有卡片阴影 */
|
|
59
|
+
boxShadow?: boolean;
|
|
60
|
+
disabled?: boolean; /** 头部是否有分割线 */
|
|
61
|
+
headerBordered?: boolean; /** 幽灵模式,即是否取消卡片内容区域的 padding 和 背景颜色。 */
|
|
62
|
+
ghost?: boolean;
|
|
63
|
+
collapsible?: CollapsibleType; /** 受控 collapsed 属性 */
|
|
64
|
+
collapsed?: boolean; /** 折叠按钮自定义节点 */
|
|
65
|
+
collapsibleIconRender?: ({
|
|
66
|
+
collapsed
|
|
67
|
+
}: {
|
|
68
|
+
collapsed: boolean;
|
|
69
|
+
}) => VueNode; /** 配置默认是否折叠 */
|
|
70
|
+
defaultCollapsed?: boolean; /** 收起卡片的事件 */
|
|
71
|
+
onCollapse?: (collapsed: boolean) => void; /** 是否展示选中样式 */
|
|
72
|
+
checked?: boolean; /** 选中改变 */
|
|
73
|
+
onChecked?: (e: MouseEvent) => void; /** 栅格占位格数,24 栅格,colSpan={6} */
|
|
74
|
+
colSpan?: ColProps["span"]; /** 栅格左侧的间隔格数,间隔内不可以有栅格 */
|
|
75
|
+
colOffset?: ColProps["offset"]; /** flex 布局填充 */
|
|
76
|
+
colFlex?: ColProps["flex"]; /** 栅格顺序,flex 布局模式下有效 */
|
|
77
|
+
colOrder?: ColProps["order"]; /** 栅格向左移动格数 */
|
|
78
|
+
colPull?: ColProps["pull"];
|
|
79
|
+
colPush?: ColProps["push"]; /** <576px 响应式栅格,可为栅格数或一个包含其他属性的对象 */
|
|
80
|
+
colXs?: ColProps["xs"]; /** ≥576px 响应式栅格,可为栅格数或一个包含其他属性的对象 */
|
|
81
|
+
colSm?: ColProps["sm"]; /** ≥768px 响应式栅格,可为栅格数或一个包含其他属性的对象 */
|
|
82
|
+
colMd?: ColProps["md"]; /** ≥992px 响应式栅格,可为栅格数或一个包含其他属性的对象 */
|
|
83
|
+
colLg?: ColProps["lg"]; /** ≥1200px 响应式栅格,可为栅格数或一个包含其他属性的对象 */
|
|
84
|
+
colXl?: ColProps["xl"]; /** ≥1600px 响应式栅格,可为栅格数或一个包含其他属性的对象 */
|
|
85
|
+
colXxl?: ColProps["xxl"];
|
|
86
|
+
onClick?: (e: MouseEvent) => void;
|
|
87
|
+
} & {}, _$vue.PublicProps>;
|
|
78
88
|
declare const ProCard: typeof _ProCard & Plugin & {
|
|
79
89
|
isProCard?: boolean;
|
|
80
90
|
};
|