From b84b981799882fbd598b596a481ceec4d5033f51 Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Sat, 14 Nov 2020 15:55:21 +0800 Subject: [PATCH] fix: statistic Countdown not update #3170 --- components/statistic/Number.tsx | 5 +++-- components/statistic/Statistic.tsx | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/components/statistic/Number.tsx b/components/statistic/Number.tsx index eb7d65a7e1..2a922f3bbe 100644 --- a/components/statistic/Number.tsx +++ b/components/statistic/Number.tsx @@ -6,7 +6,7 @@ interface NumberProps extends FormatConfig { value: valueType; } -const Number: FunctionalComponent = props => { +const StatisticNumber: FunctionalComponent = props => { const { value, formatter, precision, decimalSeparator, groupSeparator = '', prefixCls } = props; let valueNode: VNodeTypes; @@ -50,4 +50,5 @@ const Number: FunctionalComponent = props => { return {valueNode}; }; -export default Number; +StatisticNumber.displayName = 'StatisticNumber'; +export default StatisticNumber; diff --git a/components/statistic/Statistic.tsx b/components/statistic/Statistic.tsx index e9836bbcb4..d82faba800 100644 --- a/components/statistic/Statistic.tsx +++ b/components/statistic/Statistic.tsx @@ -52,7 +52,9 @@ export default defineComponent({ value, formatter, }; - let valueNode = ; + // data-for-update just for update component + // https://github.com/vueComponent/ant-design-vue/pull/3170 + let valueNode = ; if (valueRender) { valueNode = valueRender(valueNode); }