mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-04 16:37:59 +08:00
24 lines
426 B
Markdown
24 lines
426 B
Markdown
# 改变
|
|
|
|
- order: 2
|
|
|
|
改变每页显示条目数。
|
|
|
|
---
|
|
|
|
````jsx
|
|
import { Pagination } from 'antd';
|
|
|
|
function onChange(page) {
|
|
console.log(page);
|
|
}
|
|
|
|
function onShowSizeChange(current, pageSize) {
|
|
console.log(current, pageSize);
|
|
}
|
|
|
|
ReactDOM.render(
|
|
<Pagination showSizeChanger onShowSizeChange={onShowSizeChange} onChange={onChange} total={500} />,
|
|
document.getElementById('components-pagination-demo-changer'));
|
|
````
|