import * as React from 'react'; import { PureComponent } from 'react'; import { PaginationPageSizeOption } from 'zent/es/pagination/components/PageSizeChanger'; import Head from './modules/Head'; import Foot from './modules/Foot'; export declare type TablePaginationType = 'default' | 'lite' | 'mini'; export interface ITablePageInfo { current?: number; total?: number; formatTotal?: (total: number) => React.ReactNode; totalItem?: number; pageSize?: number; limit?: number; pageSizeOptions?: PaginationPageSizeOption[]; } export interface ITableCellPos { row: number; column: number; } export interface ITableColumn { title: string; name: string; width?: number | string; isMoney?: boolean; needSort?: boolean; bodyRender?: (data: any, pos?: ITableCellPos, name?: string) => React.ReactNode; textAlign?: 'left' | 'right' | 'center'; } export interface ITableChangeConfig { sortBy: string; sortType: 'asc' | 'desc'; current: number; pageSize: number; } declare type TableSortType = 'desc' | 'asc'; export interface ITableProps { columns: ITableColumn[]; datasets: Array<{}>; rowKey?: string; sortBy?: string; sortType?: TableSortType; defaultSortType?: TableSortType; onChange?: (conf: ITableChangeConfig) => void; emptyLabel?: string; selection?: { selectedRowKeys?: string[]; indeterminateRowKeys?: string[]; isSingleSelection?: boolean; needCrossPage?: boolean; onSelect?: (selectedKeys: string[], selectedRows: any[], currentRow: number) => void; canRowSelect?: boolean; }; loading?: boolean; getRowConf?: (data: {}, index: number) => { canSelect: boolean; rowClass: string; }; expandation?: { isExpanded?: (record: any, index: number) => boolean; expandRender?: (data: any) => React.ReactNode; }; batchComponents?: any[]; batchComponentsAutoFixed?: boolean; autoStick?: boolean; autoScroll?: boolean; className?: string; prefix?: string; pageInfo?: ITablePageInfo; paginationType: TablePaginationType; } export declare class Table extends PureComponent { static defaultProps: { prefix: string; paginationType: string; className: string; datasets: any[]; columns: any[]; emptyLabel: string; rowKey: string; loading: boolean; autoScroll: boolean; autoStick: boolean; selection: any; batchComponentsAutoFixed: boolean; batchComponents: any; }; tableRect: any; relativeTop: number; mounted: boolean; tableRectTop: number; tableRectHeight: number; foot: Foot | null; constructor(props: any); selectedRowKeys: string[]; selectedRows: any[]; head: Head | null; componentWillReceiveProps(nextProps: any): void; componentDidMount(): void; componentWillUnmount(): void; setBatchComponents: () => void; setRectParam(): void; toggleBatchComponents(): void; wrapPropsOnChange(conf: any): void; onChange: (conf: any) => void; onSort: (conf: any) => void; onPageChange: (data: any) => void; setSelection(): void; onSelectAllRows: (isSelect: any) => void; onSelectOneRow: (rowKey: any, isSelect: any) => void; getCurrentRow(key: any): any; isTableInView(): boolean; isFootInView(): boolean; getSelectedRowsByKeys(rowKeys: any): any[]; scrollToTop(scrollDuration: any): void; render(): JSX.Element; } export default Table;