@antdv-next1/pro-card 2.0.13 → 2.0.14
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.js +2 -2
- package/dist/components/CheckCard/CheckCard.js +3 -3
- package/dist/components/CheckCard/Group.js +3 -3
- package/dist/components/Statistic/index.js +3 -3
- package/dist/components/StatisticCard/index.js +3 -3
- package/dist/pro-card.esm.js +521 -521
- package/dist/pro-card.js +11 -11
- package/package.json +2 -2
package/dist/Card.js
CHANGED
|
@@ -27,7 +27,7 @@ const InternalProCard = /* @__PURE__ */ defineComponent((props, { slots, expose,
|
|
|
27
27
|
const config = useConfig();
|
|
28
28
|
const prefixCls = computed(() => props.prefixCls || config.value.getPrefixCls("pro"));
|
|
29
29
|
const baseClassName = computed(() => `${prefixCls.value}-card`);
|
|
30
|
-
const {
|
|
30
|
+
const { hashId } = useStyle(baseClassName);
|
|
31
31
|
const screens = useBreakpoint();
|
|
32
32
|
const collapsed = shallowRef(props.defaultCollapsed || false);
|
|
33
33
|
/**
|
|
@@ -212,7 +212,7 @@ const InternalProCard = /* @__PURE__ */ defineComponent((props, { slots, expose,
|
|
|
212
212
|
"tooltip": props.tooltip
|
|
213
213
|
}, null) } : {}
|
|
214
214
|
});
|
|
215
|
-
return
|
|
215
|
+
return createVNode(Fragment, null, [typeof collapsible !== "boolean" ? hasBorderBeamDom ? createVNode(BorderBeam, typeof borderBeam === "boolean" ? {} : borderBeam, _isSlot(collapseCardDom) ? collapseCardDom : { default: () => [collapseCardDom] }) : collapseCardDom : hasBorderBeamDom ? createVNode(BorderBeam, typeof borderBeam === "boolean" ? {} : borderBeam, _isSlot(cardDom) ? cardDom : { default: () => [cardDom] }) : cardDom]);
|
|
216
216
|
};
|
|
217
217
|
}, {
|
|
218
218
|
props: {
|
|
@@ -18,7 +18,7 @@ const ProCheckCard = /* @__PURE__ */ defineComponent((props, { slots, attrs }) =
|
|
|
18
18
|
const baseClassName = computed(() => `${prefixCls.value}-checkcard`);
|
|
19
19
|
const multiple = ref(false);
|
|
20
20
|
const checkCardGroupProvide = useCheckCardGroupContextInject();
|
|
21
|
-
const {
|
|
21
|
+
const { hashId } = useStyle(baseClassName);
|
|
22
22
|
const checkCardProps = reactive({});
|
|
23
23
|
const [stateChecked, setStateChecked] = useMountMergeState(props.defaultChecked || false, {
|
|
24
24
|
value: toRef(() => props.checked),
|
|
@@ -68,7 +68,7 @@ const ProCheckCard = /* @__PURE__ */ defineComponent((props, { slots, attrs }) =
|
|
|
68
68
|
"src": avatar
|
|
69
69
|
}, null) : transformVueNodeType(avatar);
|
|
70
70
|
const headerDom = isNil(titleDom ?? extraDom) ? null : createVNode(Fragment, null, [titleDom && createVNode("div", { "class": classNames(`${baseClassName.value}-meta-header`, hashId.value) }, [createVNode("div", { "class": classNames(`${baseClassName.value}-meta-title`, `${baseClassName.value}-meta-title-with-ellipsis`, hashId.value) }, [titleDom])]), extraDom && createVNode("div", { "class": classNames(`${baseClassName.value}-meta-title-extra`, hashId.value) }, [extraDom])]);
|
|
71
|
-
return
|
|
71
|
+
return createVNode(ProCard, mergeProps({
|
|
72
72
|
"style": attrs.style,
|
|
73
73
|
"class": classNames(baseClassName.value, attrs.class, hashId.value, {
|
|
74
74
|
[`${baseClassName.value}-checked`]: propsChecked,
|
|
@@ -98,7 +98,7 @@ const ProCheckCard = /* @__PURE__ */ defineComponent((props, { slots, attrs }) =
|
|
|
98
98
|
}),
|
|
99
99
|
"avatar": avatarDom
|
|
100
100
|
}, null), slots.default?.() && createVNode("div", { "class": classNames(`${baseClassName.value}-body`, hashId.value) }, [slots.default?.()])])
|
|
101
|
-
})
|
|
101
|
+
});
|
|
102
102
|
};
|
|
103
103
|
}, {
|
|
104
104
|
props: {
|
|
@@ -29,7 +29,7 @@ const InternalCheckCardGroup = /* @__PURE__ */ defineComponent((props, { slots,
|
|
|
29
29
|
const prefixCls = computed(() => props.prefixCls || config.value.getPrefixCls("pro"));
|
|
30
30
|
const baseClassName = computed(() => `${prefixCls.value}-checkcard-group`);
|
|
31
31
|
const registerValueMap = shallowRef(/* @__PURE__ */ new Map());
|
|
32
|
-
const {
|
|
32
|
+
const { hashId } = useStyle$1(baseClassName);
|
|
33
33
|
const [stateValue, setStateValue] = useMountMergeState(props.defaultValue, {
|
|
34
34
|
value: toRef(() => props.value),
|
|
35
35
|
onChange: (value) => {
|
|
@@ -111,10 +111,10 @@ const InternalCheckCardGroup = /* @__PURE__ */ defineComponent((props, { slots,
|
|
|
111
111
|
registerValue,
|
|
112
112
|
cancelValue
|
|
113
113
|
})));
|
|
114
|
-
return () =>
|
|
114
|
+
return () => createVNode("div", {
|
|
115
115
|
"class": classNames(baseClassName.value, hashId.value),
|
|
116
116
|
"style": attrs.style
|
|
117
|
-
}, [children.value])
|
|
117
|
+
}, [children.value]);
|
|
118
118
|
}, {
|
|
119
119
|
props: {
|
|
120
120
|
prefixCls: {
|
|
@@ -9,12 +9,12 @@ const Statistic = /* @__PURE__ */ defineComponent((props, { attrs }) => {
|
|
|
9
9
|
const config = useConfig();
|
|
10
10
|
const prefixCls = computed(() => props.prefixCls || config.value.getPrefixCls("pro"));
|
|
11
11
|
const baseClassName = computed(() => `${prefixCls.value}-card-statistic`);
|
|
12
|
-
const {
|
|
12
|
+
const { hashId } = useStyle(baseClassName);
|
|
13
13
|
return () => {
|
|
14
14
|
const { layout = "inline", description, title, tooltip, status, trend, prefix, icon, ...rest } = props;
|
|
15
15
|
const tooltipDom = tooltip && createVNode(Tooltip, { "title": tooltip }, { default: () => [createVNode(QuestionCircleOutlined, { "class": classNames(`${baseClassName.value}-tip`, hashId.value) }, null)] });
|
|
16
16
|
const trendDom = trend && createVNode("div", { "class": classNames(`${baseClassName.value}-trend-icon`, hashId.value, { [`${baseClassName.value}-trend-icon-${trend}`]: trend }) }, null);
|
|
17
|
-
return
|
|
17
|
+
return createVNode("div", {
|
|
18
18
|
"class": classNames(baseClassName.value, attrs.class, hashId.value),
|
|
19
19
|
"style": attrs.style
|
|
20
20
|
}, [icon && createVNode("div", { "class": classNames(`${baseClassName.value}-icon`, hashId.value) }, [icon]), createVNode("div", { "class": classNames(`${baseClassName.value}-wrapper`, hashId.value) }, [status && createVNode("div", { "class": classNames(`${baseClassName.value}-status`, hashId.value) }, [createVNode(Badge, {
|
|
@@ -27,7 +27,7 @@ const Statistic = /* @__PURE__ */ defineComponent((props, { attrs }) => {
|
|
|
27
27
|
[`${baseClassName.value}-layout-${layout}`]: layout,
|
|
28
28
|
[`${baseClassName.value}-trend-${trend}`]: trend
|
|
29
29
|
})
|
|
30
|
-
}, rest), null), description && createVNode("div", { "class": classNames(`${baseClassName.value}-description`, hashId.value) }, [description])])])])
|
|
30
|
+
}, rest), null), description && createVNode("div", { "class": classNames(`${baseClassName.value}-description`, hashId.value) }, [description])])])]);
|
|
31
31
|
};
|
|
32
32
|
}, {
|
|
33
33
|
props: {
|
|
@@ -9,7 +9,7 @@ const StatisticCard = /* @__PURE__ */ defineComponent((props, { attrs, slots })
|
|
|
9
9
|
const config = useConfig();
|
|
10
10
|
const prefixCls = computed(() => props.prefixCls || config.value.getPrefixCls("pro"));
|
|
11
11
|
const baseClassName = computed(() => `${prefixCls.value}-statistic-card`);
|
|
12
|
-
const {
|
|
12
|
+
const { hashId } = useStyle(baseClassName);
|
|
13
13
|
return () => {
|
|
14
14
|
const { statistic, chart, chartPlacement, footer, ...restProps } = props;
|
|
15
15
|
const statisticDom = statistic && createVNode(Statistic, mergeProps({ "layout": "vertical" }, statistic), null);
|
|
@@ -19,14 +19,14 @@ const StatisticCard = /* @__PURE__ */ defineComponent((props, { attrs, slots })
|
|
|
19
19
|
}) }, [chart]);
|
|
20
20
|
const contentCls = classNames(`${baseClassName.value}-content `, hashId.value, { [`${baseClassName.value}-content-horizontal`]: chartPlacement === "left" || chartPlacement === "right" });
|
|
21
21
|
const contentDom = (chartDom || statisticDom) && (chartPlacement === "left" ? createVNode("div", { "class": contentCls }, [chartDom, statisticDom]) : createVNode("div", { "class": contentCls }, [statisticDom, chartDom]));
|
|
22
|
-
return
|
|
22
|
+
return createVNode(Fragment, null, [createVNode(ProCard, mergeProps({
|
|
23
23
|
"style": attrs.style,
|
|
24
24
|
"class": classNames(baseClassName.value, attrs.class, hashId.value)
|
|
25
25
|
}, restProps), { default: () => [
|
|
26
26
|
contentDom,
|
|
27
27
|
slots.default?.(),
|
|
28
28
|
footer && createVNode("div", { "class": classNames(`${baseClassName.value}-footer`, hashId.value) }, [footer])
|
|
29
|
-
] })])
|
|
29
|
+
] })]);
|
|
30
30
|
};
|
|
31
31
|
}, {
|
|
32
32
|
props: {
|