/** * @author linhd * @date 2022/12/13 2:19 PM * @description 分页组件 */ import React, { FunctionComponent } from 'react'; import './index.scss'; /** * sizes: 总数 * pageRow:每页行数 * pager: 切换页数 * jumper: 跳转到 * */ export type PaginationLayout = 'sizes' | 'pageRow' | 'pager' | 'jumper'; export type PaginationFlippingArrow = 'prev' | 'next'; export interface PaginationProps { /** class名称 */ className?: string; /** style */ style?: React.CSSProperties; /** 模式 */ type?: 'simple' | 'complex' | PaginationLayout[]; /** 分页模式 按钮/数字 */ pagerType?: 'btn' | 'num'; /** 方向键layout,默认全有 */ flippingArrow?: PaginationFlippingArrow[]; /** 自适应模式 只有type=complex生效,默认true */ autoType?: boolean; /** 重新计算换行不换行 只有type=complex生效 */ resizeLine?: string | number; /** 总数 */ total?: number; /** 每页行数 */ rowsPerPage?: number[]; /** 当前选中每页行数 */ currentRowsPerPage?: number; /** 当前页数 */ page?: number; /** 当前页数最大限制, * true 默认限制,不超过总页数 * */ pageMaxLimit?: boolean; /** 跳转页数 */ skipFunc?: (num?: number, skipValue?: number) => void; /** 下拉框弹窗内容 */ getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement; /** 改变页数 */ changePage?: (num?: number) => void; /** 改变每页行数 */ changeRowsPerPage?: (num: number) => void; } export declare const Pagination: FunctionComponent; export default Pagination;