问题描述:
原本:
问题:
解决方法:
const [resetPageSize, setResetPageSize] = useState(10);
setResetPageSize(10)
pageSize={resetPageSize}pageSizeChange
//初始化
const [resetPageSize, setResetPageSize] = useState(10);
//重置方法
const resetScreeningForm = () => {
// 重置 pageSizeOptions
setRzTableList({
"createTime": null,
"pageNum": 1,
"pageSize": 10,
"param": null
});
setResetPageSize(10)
screeningForm.resetFields();
};
const pageSizeChange = (current, pageSize) => {
setResetPageSize(pageSize)
}
<Pagination
style={{float: "right"}}
total={tableSource.total}
current={currentPage}
defaultPageSize={10}
defaultCurrent={1}
onChange={onPageChange}
pageSize={resetPageSize}
onShowSizeChange={pageSizeChange}
showSizeChanger={true}
/>