From e5f0a5f7e187d0451b4a417f06457bde8a5ee540 Mon Sep 17 00:00:00 2001 From: tanjinzhou <415800467@qq.com> Date: Thu, 26 Mar 2020 17:26:23 +0800 Subject: [PATCH] fix: countdown remove cloneElement --- components/locale-provider/LocaleReceiver.jsx | 1 + components/statistic/Countdown.jsx | 9 +-------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/components/locale-provider/LocaleReceiver.jsx b/components/locale-provider/LocaleReceiver.jsx index 2d659ce94..0251b7042 100644 --- a/components/locale-provider/LocaleReceiver.jsx +++ b/components/locale-provider/LocaleReceiver.jsx @@ -2,6 +2,7 @@ import PropTypes from '../_util/vue-types'; import defaultLocaleData from './default'; export default { + name: 'LocaleReceiver', props: { componentName: PropTypes.string.def('global'), defaultLocale: PropTypes.oneOfType([PropTypes.object, PropTypes.func]), diff --git a/components/statistic/Countdown.jsx b/components/statistic/Countdown.jsx index e333e61e6..79137efdb 100644 --- a/components/statistic/Countdown.jsx +++ b/components/statistic/Countdown.jsx @@ -1,6 +1,5 @@ import * as moment from 'moment'; import interopDefault from '../_util/interopDefault'; -import { cloneElement } from '../_util/vnode'; import { initDefaultProps, getListeners } from '../_util/props-util'; import Statistic, { StatisticProps } from './Statistic'; import { formatCountdown } from './utils'; @@ -70,13 +69,7 @@ export default { return formatCountdown(value, { ...config, format }); }, - // Countdown do not need display the timestamp - valueRenderHtml: node => - cloneElement(node, { - props: { - title: undefined, - }, - }), + valueRenderHtml: node => node, }, render() {