import { Row, Col, } from 'antd' import React from 'react' class Statistics extends React.Component { constructor(props) { super(props); } getTriangleIcon(tag) { if (tag > 0) { return (); } else if (tag < 0) { return (); } } getPercent(tag, percent) { if (tag > 0) { return ({percent}); } else if (tag < 0) { return ({percent}); } else { return ({percent}); } } render() { const { countDatas, getIcons, isNeedLink, linkIndex, setVisible } = this.props; return (
{ countDatas.map( (data,index) => { const { showname, num, isChange, percent, changetype } = data; return (
{ getIcons(index) }
{showname}
{ (isNeedLink && linkIndex === index ) ? setVisible('5', true)}>{num} : num }
{this.getTriangleIcon(isChange)} {this.getPercent(isChange,percent)} {changetype}
) }) }
) } } export default Statistics