import { Bar } from '@/components/Charts'; import { Card, Col, DatePicker, Row, Tabs } from 'antd'; import { RangePickerValue } from 'antd/es/date-picker/interface'; import numeral from 'numeral'; import React, { memo } from 'react'; import { formatMessage, FormattedMessage } from 'umi-plugin-locale'; import styles from './Analysis.less'; 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, }); } interface SalesCard { rangePickerValue: RangePickerValue; salesData: Array<{ x: string; y: number; }>; isActive: (type: string) => string; handleRangePickerChange: (dates: RangePickerValue, dateStrings: [string, string]) => void; loading: boolean; selectDate: (type: string) => void; } const SalesCard: React.FC = ({ 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 memo(SalesCard);