Browse Source

fix: countdown remove cloneElement

pull/1965/head
tanjinzhou 5 years ago
parent
commit
e5f0a5f7e1
  1. 1
      components/locale-provider/LocaleReceiver.jsx
  2. 9
      components/statistic/Countdown.jsx

1
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]),

9
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() {

Loading…
Cancel
Save