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