2016-03-31 09:40:55 +08:00
|
|
|
---
|
|
|
|
order: 2
|
2016-07-29 10:15:31 +08:00
|
|
|
title:
|
|
|
|
zh-CN: 改变
|
|
|
|
en-US: Changer
|
2016-03-31 09:40:55 +08:00
|
|
|
---
|
2015-07-13 01:04:05 +08:00
|
|
|
|
2016-07-29 10:15:31 +08:00
|
|
|
## zh-CN
|
|
|
|
|
2015-07-21 11:13:32 +08:00
|
|
|
改变每页显示条目数。
|
2015-07-13 01:04:05 +08:00
|
|
|
|
2016-07-29 10:15:31 +08:00
|
|
|
## en-US
|
|
|
|
|
|
|
|
Change `pageSize`.
|
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
```tsx
|
|
|
|
import type { PaginationProps } from 'antd';
|
2015-10-28 20:55:49 +08:00
|
|
|
import { Pagination } from 'antd';
|
2022-05-23 14:37:16 +08:00
|
|
|
import React from 'react';
|
2015-07-13 01:04:05 +08:00
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
const onShowSizeChange: PaginationProps['onShowSizeChange'] = (current, pageSize) => {
|
2015-09-23 13:58:56 +08:00
|
|
|
console.log(current, pageSize);
|
2022-05-19 09:46:26 +08:00
|
|
|
};
|
2015-09-23 13:58:56 +08:00
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
const App: React.FC = () => (
|
2020-07-07 21:33:07 +08:00
|
|
|
<>
|
2019-05-10 15:38:35 +08:00
|
|
|
<Pagination
|
|
|
|
showSizeChanger
|
|
|
|
onShowSizeChange={onShowSizeChange}
|
|
|
|
defaultCurrent={3}
|
|
|
|
total={500}
|
|
|
|
/>
|
|
|
|
<br />
|
|
|
|
<Pagination
|
|
|
|
showSizeChanger
|
|
|
|
onShowSizeChange={onShowSizeChange}
|
|
|
|
defaultCurrent={3}
|
|
|
|
total={500}
|
|
|
|
disabled
|
|
|
|
/>
|
2022-04-03 23:27:45 +08:00
|
|
|
</>
|
2018-11-28 15:00:03 +08:00
|
|
|
);
|
2022-05-19 09:46:26 +08:00
|
|
|
|
|
|
|
export default App;
|
2019-05-07 14:57:32 +08:00
|
|
|
```
|