import React, { memo } from 'react'; import { Row, Col, Card, Tabs, DatePicker } from 'antd'; import { FormattedMessage, formatMessage } from 'umi-plugin-react/locale'; import numeral from 'numeral'; import { Charts } from 'ant-design-pro'; import styles from '../style.less'; const { Bar } = Charts; const { RangePicker } = DatePicker; const { TabPane } = Tabs; const rankingListData = []; for (let i = 0; i < 7; i += 1) { rankingListData.push({ title: formatMessage({ id: 'BLOCK_NAME.analysis.test' }, { no: i }), total: 323234, }); } const SalesCard = memo( ({ rangePickerValue, salesData, isActive, handleRangePickerChange, loading, selectDate }) => (
selectDate('today')}> selectDate('week')}> selectDate('month')}> selectDate('year')}>
} size="large" tabBarStyle={{ marginBottom: 24 }} > } key="sales" >
} data={salesData} />

    {rankingListData.map((item, i) => (
  • {i + 1} {item.title} {numeral(item.total).format('0,0')}
  • ))}
} key="views" >
} data={salesData} />

    {rankingListData.map((item, i) => (
  • {i + 1} {item.title} {numeral(item.total).format('0,0')}
  • ))}
) ); export default SalesCard;