mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-16 01:29:11 +08:00
35 lines
611 B
Markdown
35 lines
611 B
Markdown
---
|
|
order: 3
|
|
title:
|
|
zh-CN: 跳转
|
|
en-US: Jumper
|
|
---
|
|
|
|
## zh-CN
|
|
|
|
快速跳转到某一页。
|
|
|
|
## en-US
|
|
|
|
Jump to a page directly.
|
|
|
|
```tsx
|
|
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;
|
|
```
|