import * as React from 'react' import Countdown from 'react-countdown'; import { BaseComponent,handleComponentClickLog } from '../base-component' import { padding } from '../utils/format'; import { Props, State, } from './type' import { rem } from "../style/function.style"; import * as Styled from './index.style' enum StatusMap { 已删除 = -2, 已过期, 领取, 已领取, } export class CountDown extends React.Component { static defaultProps = new Props() state = new State() render() { const { style, backgroundColor, clockBackgroundColor, fontColor, time } = this.props; console.log('CountDown', style, backgroundColor, time); return (
( props.completed ? null :
{props.days}
{padding(props.hours)}小时
{padding(props.minutes)}
{padding(props.seconds)}
)} > { null }
) } }