mirror of https://github.com/fantasticit/think.git
fix: improve pagination
parent
6fba1e4394
commit
3826ec4a78
|
@ -18,6 +18,7 @@ const grid = {
|
|||
};
|
||||
|
||||
const { Title } = Typography;
|
||||
const PAGESIZE = 12;
|
||||
|
||||
const Page: NextPage = () => {
|
||||
const { data, loading, error, setPage } = useAllPublicWikis();
|
||||
|
@ -59,9 +60,11 @@ const Page: NextPage = () => {
|
|||
)}
|
||||
emptyContent={<Empty message={'暂无数据'} />}
|
||||
/>
|
||||
{data.total > PAGESIZE && (
|
||||
<div style={{ display: 'flex', justifyContent: 'center' }}>
|
||||
<Pagination total={data.total} pageSize={12} onPageChange={setPage} />
|
||||
<Pagination total={data.total} pageSize={PAGESIZE} onPageChange={setPage} />
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
|
|
Loading…
Reference in New Issue