From a08fa6093033f8625bc887ca54d07e92ceef4553 Mon Sep 17 00:00:00 2001 From: Yuwei Ba Date: Wed, 23 Sep 2015 13:58:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20pageSize=20=E5=8F=91?= =?UTF-8?q?=E7=94=9F=E5=8F=98=E5=8C=96=E7=9A=84=E5=9B=9E=E8=B0=83=E3=80=82?= =?UTF-8?q?=20#317?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + components/pagination/demo/changer.md | 6 +++++- components/pagination/index.md | 21 +++++++++++---------- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5988f69e4a..9ab2f89c3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ ## 0.9.1 `not ready` +* 添加 Pagination pageSize 发生变化的回调。 * 升级依赖 rc-upload 到 1.6.x,修复 IE8/9 下的兼容性问题。 * 升级依赖 rc-steps 到 1.3.x。 * 新增 current 属性,方便配置当前的步骤。 diff --git a/components/pagination/demo/changer.md b/components/pagination/demo/changer.md index 54fa306f26..41ac883aec 100644 --- a/components/pagination/demo/changer.md +++ b/components/pagination/demo/changer.md @@ -13,7 +13,11 @@ function onChange(page) { console.log(page); } +function onShowSizeChange(current, pageSize) { + console.log(current, pageSize); +} + React.render( - , + , document.getElementById('components-pagination-demo-changer')); ```` diff --git a/components/pagination/index.md b/components/pagination/index.md index 30c3fb1e82..6bc0c3e8de 100644 --- a/components/pagination/index.md +++ b/components/pagination/index.md @@ -17,13 +17,14 @@ ### Pagination -| 参数 | 说明 | 类型 | 默认值 | -|-----------------|------------------------------------|----------|----------------| -| current | 当前页数 | Number | 1 | -| total | 数据总数 | Number | 0 | -| pageSize | 每页条数 | Number | 10 | -| onChange | 页码改变的回调,参数是改变后的页码 | Function | noop | -| showSizeChanger | 是否可以改变 pageSize | Bool | false | -| showQuickJumper | 是否可以快速跳转至某页 | Bool | false | -| className | 当为「mini」时,是小尺寸分页 | String | ant-pagination | -| simple | 当添加该属性时,显示为简单分页 | Object | 无 | +| 参数 | 说明 | 类型 | 默认值 | +|------------------|------------------------------------|----------|----------------| +| current | 当前页数 | Number | 1 | +| total | 数据总数 | Number | 0 | +| pageSize | 每页条数 | Number | 10 | +| onChange | 页码改变的回调,参数是改变后的页码 | Function | noop | +| showSizeChanger | 是否可以改变 pageSize | Bool | false | +| onShowSizeChange | pageSize 变化的回调 | Function | noop | +| showQuickJumper | 是否可以快速跳转至某页 | Bool | false | +| className | 当为「mini」时,是小尺寸分页 | String | ant-pagination | +| simple | 当添加该属性时,显示为简单分页 | Object | 无 |