ant-design/components/pagination/demo/total.md

25 lines
363 B
Markdown
Raw Normal View History

2016-02-25 10:36:58 +08:00
# 总数
- 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
);
````