import { MiniArea } from '@/components/Charts'; import NumberInfo from '@/components/NumberInfo'; import Trend from '@/components/Trend'; import { Card, Col, Icon, Row, Table, Tooltip } from 'antd'; import { ColumnProps } from 'antd/es/table/interface'; import numeral from 'numeral'; import React, { memo } from 'react'; import { FormattedMessage } from 'umi-plugin-locale'; import styles from './Analysis.less'; const columns: Array> = [ { title: , dataIndex: 'index', key: 'index', }, { title: ( ), dataIndex: 'keyword', key: 'keyword', render: text => {text}, }, { title: , dataIndex: 'count', key: 'count', sorter: (a, b) => a.count - b.count, className: styles.alignRight, }, { title: , dataIndex: 'range', key: 'range', sorter: (a, b) => a.range - b.range, render: (text, record) => ( {text}% ), align: 'right', }, ]; interface TopSearchProps { loading: boolean; visitData2: any[]; searchData: any[]; dropdownGroup: JSX.Element; } const TopSearch: React.FC = ({ loading, visitData2, searchData, dropdownGroup, }) => ( } extra={dropdownGroup} style={{ marginTop: 24 }} > } > } gap={8} total={numeral(12321).format('0,0')} status="up" subTotal={17.1} /> } > } total={2.7} status="down" subTotal={26.2} gap={8} /> record.index} size="small" columns={columns} dataSource={searchData} pagination={{ style: { marginBottom: 0 }, pageSize: 5, }} /> ); export default memo(TopSearch);