import { ReactElement } from 'react'; import 'swiper/css/pagination'; import './index.less'; export type TextAlign = 'center' | 'left' | 'right'; export type Column = { title: string; dataIndex: string; id?: number | string; width?: number; flex?: number; /** 文字对齐方式 */ textAlign?: TextAlign; render?: (data: T, index: number) => ReactElement; }; export type CustomTableProps = { /** 列数据 */ columns: Column[]; /** 数据源 */ data: T[]; /** 容器高度 */ height?: number; /** 每屏显示几条数据 */ pageSize: number; /** 速度(ms) */ speed?: number; /** 自动轮播 */ autoplay?: boolean; /** 是否在弹窗中 */ inModal?: boolean; /** 背景颜色 */ colors?: [string, string] | [string, string, string]; /** 表头的类 */ headerClass?: string; /** 内容的class */ contentClass?: string; }; declare function Table>({ columns, data, height, pageSize, speed, autoplay, inModal, colors, headerClass, contentClass, }: CustomTableProps): JSX.Element; export default Table;