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.
36 lines
1.9 KiB
36 lines
1.9 KiB
9 years ago
|
---
|
||
|
category: Components
|
||
|
chinese: 分页
|
||
9 years ago
|
type: Navigation
|
||
9 years ago
|
english: Pagination
|
||
|
---
|
||
10 years ago
|
|
||
10 years ago
|
采用分页的形式分隔长列表,每次只加载一个页面。
|
||
10 years ago
|
|
||
10 years ago
|
## 何时使用
|
||
10 years ago
|
|
||
10 years ago
|
- 当加载/渲染所有数据将花费很多时间时;
|
||
|
- 可切换页码浏览数据。
|
||
10 years ago
|
|
||
|
## API
|
||
|
|
||
9 years ago
|
```html
|
||
|
<Pagination onChange={onChange} total={50} />
|
||
|
```
|
||
10 years ago
|
|
||
9 years ago
|
| 参数 | 说明 | 类型 | 默认值 |
|
||
|
|------------------|------------------------------------|---------------|--------------------------|
|
||
8 years ago
|
| current | 当前页数 | Number | - |
|
||
9 years ago
|
| defaultCurrent | 默认的当前页数 | Number | 1 |
|
||
|
| total | 数据总数 | Number | 0 |
|
||
8 years ago
|
| defaultPageSize | 默认的每页条数 | Number | 10 |
|
||
|
| pageSize | 每页条数 | Number | - |
|
||
9 years ago
|
| onChange | 页码改变的回调,参数是改变后的页码 | Function | noop |
|
||
8 years ago
|
| showSizeChanger | 是否可以改变 pageSize | Boolean | false |
|
||
9 years ago
|
| pageSizeOptions | 指定每页可以显示多少条 | Array<String> | ['10', '20', '30', '40'] |
|
||
|
| onShowSizeChange | pageSize 变化的回调 | Function | noop |
|
||
8 years ago
|
| showQuickJumper | 是否可以快速跳转至某页 | Boolean | false |
|
||
9 years ago
|
| size | 当为「small」时,是小尺寸分页 | String | "" |
|
||
8 years ago
|
| simple | 当添加该属性时,显示为简单分页 | Object | - |
|
||
|
| showTotal | 用于显示总共有多少条数据 | Function | - |
|