import React, { memo } from 'react'; import { Row, Col, Card, Tabs, DatePicker } from 'antd'; import { FormattedMessage, formatMessage } from 'umi/locale'; import numeral from 'numeral'; import styles from './Analysis.less'; import { Bar } from '@/components/Charts'; const { RangePicker } = DatePicker; const { TabPane } = Tabs; const rankingListData = []; for (let i = 0; i < 7; i += 1) { rankingListData.push({ title: formatMessage({ id: 'app.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;