import React, { Component } from 'react'; import { Tooltip, Icon } from 'antd'; import { PageComponent,} from '../../types/index'; type configType = { title: string; transFunc: Function; tooltip?: string | React.ReactNode; } export default class OverviewCard extends Component>{ render() { const { data, config } = this.props; return (
{config['title']} {config['tooltip'] && }
{config['transFunc'](data)} {config['title'].includes('率') && (data || data === 0 ) ? ' %' : ''}
) } }