diff --git a/components/statistic/Countdown.jsx b/components/statistic/Countdown.jsx
index c78564540..3f5c21c4f 100644
--- a/components/statistic/Countdown.jsx
+++ b/components/statistic/Countdown.jsx
@@ -77,11 +77,9 @@ export default {
);
diff --git a/components/statistic/Number.jsx b/components/statistic/Number.jsx
index 7d8a8ff30..ac104f8cd 100644
--- a/components/statistic/Number.jsx
+++ b/components/statistic/Number.jsx
@@ -1,7 +1,7 @@
import padEnd from 'lodash/padEnd';
import { createVNode } from 'vue';
-export default (_, { attrs }) => {
+const Number = (_, { attrs }) => {
const { value, formatter, precision, decimalSeparator, groupSeparator = '', prefixCls } = attrs;
let valueNode;
@@ -46,5 +46,5 @@ export default (_, { attrs }) => {
return {valueNode};
};
-const name = 'AStatisticNumber';
-export { name };
+Number.name = 'AStatisticNumber';
+export default Number;
diff --git a/components/statistic/Statistic.jsx b/components/statistic/Statistic.jsx
index edc08c2ea..38f1f8858 100644
--- a/components/statistic/Statistic.jsx
+++ b/components/statistic/Statistic.jsx
@@ -17,6 +17,7 @@ export const StatisticProps = {
prefix: PropTypes.any,
suffix: PropTypes.any,
title: PropTypes.any,
+ onFinish: PropTypes.func,
};
export default {
@@ -25,9 +26,6 @@ export default {
decimalSeparator: '.',
groupSeparator: ',',
}),
- inject: {
- configProvider: { default: () => ConfigConsumerProps },
- },
setup() {
return {
@@ -44,9 +42,13 @@ export default {
let prefix = getComponent(this, 'prefix');
let suffix = getComponent(this, 'suffix');
const formatter = getComponent(this, 'formatter', {}, false);
- let valueNode = (
-
- );
+ const props = {
+ ...this.$props,
+ prefixCls,
+ value,
+ formatter,
+ };
+ let valueNode = ;
if (valueRender) {
valueNode = valueRender(valueNode);
}