ant-design/components/pagination/demo/jump.md
2022-05-21 22:14:15 +08:00

611 B

order title
3
zh-CN en-US
跳转 Jumper

zh-CN

快速跳转到某一页。

en-US

Jump to a page directly.

import type { PaginationProps } from 'antd';
import { Pagination } from 'antd';
import React from 'react';

const onChange: PaginationProps['onChange'] = pageNumber => {
  console.log('Page: ', pageNumber);
};

const App: React.FC = () => (
  <>
    <Pagination showQuickJumper defaultCurrent={2} total={500} onChange={onChange} />
    <br />
    <Pagination showQuickJumper defaultCurrent={2} total={500} onChange={onChange} disabled />
  </>
);

export default App;