import { Statistic } from 'antd' import { ColumnsType } from 'antd/lib/table' import React from 'react' import './index.less' function columns() { let newArr: ColumnsType = [ { title: '投手', dataIndex: 'pitcher', key: 'pitcher', align: 'center', width: 80, }, { title: '消耗时间', dataIndex: 'cost_time', key: 'cost_time', align: 'center', width: 160, // sorter: true, }, { title: '充值时间', dataIndex: 'order_time', key: 'order_time', align: 'center', width: 90, // sorter: true, }, { title: '总消耗', dataIndex: `cost`, key: `cost`, align: 'center', width: 85, sorter: true, render: (a: any) => { return } }, { title: '总充值', dataIndex: `amount`, key: `amount`, align: 'center', width: 85, sorter: true, render: (a: any) => { return } }, { title: '回收率', dataIndex: `roi`, key: `roi`, width: 85, align: 'center', sorter: true, render: (a: any) => { return a === 999999999 ?
--
: a ?
= 1 ? { color: 'red' } : { color: '#0f990f' }}>{(a * 100).toFixed(2) + '%'}
: a === 0 ?
0
:
--
} } ] return newArr } export { columns }