import classNames from 'classnames'; import React from 'react'; import 'simplebar-react/dist/simplebar.min.css'; import TableHeader from './header'; import './index.less'; import TableRow from './row'; export interface ColumnProps { title: string; key: string; width?: string | number; style?: React.CSSProperties; render?: (data: { dataIndex: string; dataList?: any[]; row: any; rowIndex?: number; colIndex?: number; }) => any; locale?: boolean; colSpan?: (params: { row: any; rowIndex: number; colIndex: number; dataIndex: string; dataList: any[]; }) => number; rowSpan?: (params: { row: any; rowIndex: number; colIndex: number; dataIndex: string; dataList: any[]; }) => number; } interface SimpleTableProps { theme?: 'dark' | 'light'; maxHeight?: number | string; columns: ColumnProps[]; dataSource: any[]; bordered?: boolean; rowKey: string; } const SimpleTabel: React.FC = (props) => { const { columns, dataSource, rowKey, theme, bordered = true } = props; return (
{dataSource.map((item: any, index: number) => { return ( ); })}
); }; export default SimpleTabel;