<Pagination {...paginationProps} />
const paginationProps = {
showQuickJumper: {
goButton: <Button>确定</Button>,
},
pageSizeOptions:['10','20','50','80'], //指定每页可以显示多少条
showSizeChanger: true, //显示(切换每页多少条)
hideOnSinglePage: (Number(total) === 0), //只有一页时是否隐藏分页器
pageSize: Number(pagein.rowsperpage),
current: Number(pagein.currentpagenum) || 1,
total: Number(total),
showTotal: total => `${pagein.rowsperpage}条/页 共 ${total} 条`,
onChange(page, pageSize) { //点击页面刷新数据
console.log(page, pageSize);
},
onShowSizeChange(page, pageSize) { //点击每页多少条刷新数据
console.log(page, pageSize);
}
}
网友评论