import { Card, Col, DatePicker, Row, Tabs } from 'antd'; import { FormattedMessage, formatMessage } from 'umi-plugin-react/locale'; import { RangePickerValue } from 'antd/es/date-picker/interface'; import React from 'react'; import numeral from 'numeral'; import { VisitDataType } from '../data.d'; import { Bar } from './Charts'; import styles from '../style.less'; const { RangePicker } = DatePicker; const { TabPane } = Tabs; const rankingListData: { title: string; total: number }[] = []; for (let i = 0; i < 7; i += 1) { rankingListData.push({ title: formatMessage({ id: 'dashboard-analysis.analysis.test' }, { no: i }), total: 323234, }); } const SalesCard = ({ rangePickerValue, salesData, isActive, handleRangePickerChange, loading, selectDate, }: { rangePickerValue: RangePickerValue; isActive: (key: 'today' | 'week' | 'month' | 'year') => string; salesData: VisitDataType[]; loading: boolean; handleRangePickerChange: (dates: RangePickerValue, dateStrings: [string, string]) => void; selectDate: (key: 'today' | 'week' | 'month' | 'year') => void; }) => (
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;