mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-17 02:18:07 +08:00
25 lines
363 B
Markdown
25 lines
363 B
Markdown
# 总数
|
|
|
|
- order: 9
|
|
|
|
通过设置 `showTotal` 展示总共有多少数据。
|
|
|
|
---
|
|
|
|
````jsx
|
|
import { Pagination, Select } from 'antd';
|
|
|
|
function showTotal(total) {
|
|
return `共 ${total} 条`;
|
|
}
|
|
|
|
ReactDOM.render(
|
|
<Pagination
|
|
selectComponentClass={Select}
|
|
total={80}
|
|
showTotal={showTotal}
|
|
pageSize={20} defaultCurrent={1} />,
|
|
mountNode
|
|
);
|
|
````
|