You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
545 B

---
order: 8
title:
zh-CN: 受控
en-US: Controlled
---
## zh-CN
9 years ago
受控制的页码。
## en-US
Controlled page number.
```tsx
import type { PaginationProps } from 'antd';
import { Pagination } from 'antd';
import React, { useState } from 'react';
const App: React.FC = () => {
const [current, setCurrent] = useState(3);
const onChange: PaginationProps['onChange'] = page => {
9 years ago
console.log(page);
setCurrent(page);
};
return <Pagination current={current} onChange={onChange} total={50} />;
};
9 years ago
export default App;
```