Improve pagination demo

pull/4939/head
afc163 8 years ago
parent 2512e6b5b5
commit e71807b732

@ -322,7 +322,6 @@ exports[`test renders ./components/pagination/demo/mini.md correctly 1`] = `
<a />
</li>
</ul>
<br />
<ul
class="ant-pagination mini"
unselectable="unselectable">
@ -410,7 +409,6 @@ exports[`test renders ./components/pagination/demo/mini.md correctly 1`] = `
</div>
</div>
</ul>
<br />
<ul
class="ant-pagination mini"
unselectable="unselectable">
@ -472,43 +470,55 @@ exports[`test renders ./components/pagination/demo/more.md correctly 1`] = `
class="ant-pagination "
unselectable="unselectable">
<li
class="ant-pagination-disabled ant-pagination-prev"
class=" ant-pagination-prev"
title="上一页">
<a />
</li>
<li
class="ant-pagination-item ant-pagination-item-1 ant-pagination-item-active"
class="ant-pagination-item ant-pagination-item-1"
title="1">
<a>
1
</a>
</li>
<li
class="ant-pagination-item ant-pagination-item-2"
title="2">
class="ant-pagination-jump-prev"
title="向前 5 页">
<a />
</li>
<li
class="ant-pagination-item ant-pagination-item-4 ant-pagination-item-after-jump-prev"
title="4">
<a>
2
4
</a>
</li>
<li
class="ant-pagination-item ant-pagination-item-3"
title="3">
class="ant-pagination-item ant-pagination-item-5"
title="5">
<a>
3
5
</a>
</li>
<li
class="ant-pagination-item ant-pagination-item-4"
title="4">
class="ant-pagination-item ant-pagination-item-6 ant-pagination-item-active"
title="6">
<a>
4
6
</a>
</li>
<li
class="ant-pagination-item ant-pagination-item-5 ant-pagination-item-before-jump-next"
title="5">
class="ant-pagination-item ant-pagination-item-7"
title="7">
<a>
5
7
</a>
</li>
<li
class="ant-pagination-item ant-pagination-item-8 ant-pagination-item-before-jump-next"
title="8">
<a>
8
</a>
</li>
<li

@ -23,10 +23,14 @@ function showTotal(total) {
ReactDOM.render(
<div>
<Pagination size="small" total={50} />
<br />
<Pagination size="small" total={50} showSizeChanger showQuickJumper />
<br />
<Pagination size="small" total={50} showTotal={showTotal} />
</div>
, mountNode);
````
<style>
#components-pagination-demo-mini .ant-pagination:not(:last-child) {
margin-bottom: 24px;
}
</style>

@ -17,6 +17,6 @@ More pages.
import { Pagination } from 'antd';
ReactDOM.render(
<Pagination defaultCurrent={1} total={500} />
<Pagination defaultCurrent={6} total={500} />
, mountNode);
````

@ -2,6 +2,7 @@
category: Components
type: Navigation
title: Pagination
cols: 1
---
A long list can be divided into several pages by `Pagination`, and only one page will be loaded at a time.

@ -3,6 +3,7 @@ category: Components
subtitle: 分页
type: Navigation
title: Pagination
cols: 1
---
采用分页的形式分隔长列表,每次只加载一个页面。

Loading…
Cancel
Save