Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wanjj_1210
ant-design
提交
15b2e92d
A
ant-design
项目概览
wanjj_1210
/
ant-design
与 Fork 源项目一致
从无法访问的项目Fork
通知
10
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
ant-design
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
15b2e92d
编写于
1月 11, 2016
作者:
A
afc163
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' into new-design-spec
上级
32ca98c2
8fca14fd
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
31 addition
and
22 deletion
+31
-22
components/pagination/index.md
components/pagination/index.md
+13
-12
components/table/demo/paging.md
components/table/demo/paging.md
+3
-0
components/table/index.jsx
components/table/index.jsx
+13
-7
components/time-picker/index.jsx
components/time-picker/index.jsx
+0
-1
style/components/timepicker/Picker.less
style/components/timepicker/Picker.less
+1
-1
style/core/base.less
style/core/base.less
+1
-1
未找到文件。
components/pagination/index.md
浏览文件 @
15b2e92d
...
...
@@ -19,15 +19,16 @@
<Pagination
onChange=
{onChange}
total=
{50}
/>
```
| 参数 | 说明 | 类型 | 默认值 |
|------------------|------------------------------------|----------|----------------|
| current | 当前页数 | Number | 无 |
| defaultCurrent | 默认的当前页数 | Number | 1 |
| total | 数据总数 | Number | 0 |
| pageSize | 每页条数 | Number | 10 |
| onChange | 页码改变的回调,参数是改变后的页码 | Function | noop |
| showSizeChanger | 是否可以改变 pageSize | Bool | false |
| onShowSizeChange | pageSize 变化的回调 | Function | noop |
| showQuickJumper | 是否可以快速跳转至某页 | Bool | false |
| size | 当为「small」时,是小尺寸分页 | String | "" |
| simple | 当添加该属性时,显示为简单分页 | Object | 无 |
| 参数 | 说明 | 类型 | 默认值 |
|------------------|------------------------------------|---------------|--------------------------|
| current | 当前页数 | Number | 无 |
| defaultCurrent | 默认的当前页数 | Number | 1 |
| total | 数据总数 | Number | 0 |
| pageSize | 每页条数 | Number | 10 |
| onChange | 页码改变的回调,参数是改变后的页码 | Function | noop |
| showSizeChanger | 是否可以改变 pageSize | Bool | false |
| pageSizeOptions | 指定每页可以显示多少条 | Array
<String>
| ['10', '20', '30', '40'] |
| onShowSizeChange | pageSize 变化的回调 | Function | noop |
| showQuickJumper | 是否可以快速跳转至某页 | Bool | false |
| size | 当为「small」时,是小尺寸分页 | String | "" |
| simple | 当添加该属性时,显示为简单分页 | Object | 无 |
components/table/demo/paging.md
浏览文件 @
15b2e92d
...
...
@@ -39,6 +39,9 @@ const pagination = {
showSizeChanger
:
true
,
onShowSizeChange
:
function
(
current
,
pageSize
)
{
console
.
log
(
'
Current:
'
,
current
,
'
; PageSize:
'
,
pageSize
);
},
onChange
:
function
(
current
)
{
console
.
log
(
'
Current:
'
,
current
);
}
};
...
...
components/table/index.jsx
浏览文件 @
15b2e92d
...
...
@@ -19,6 +19,13 @@ const defaultLocale = {
emptyText
:
'
暂无数据
'
,
};
const
defaultPagination
=
{
pageSize
:
10
,
current
:
1
,
onChange
:
noop
,
onShowSizeChange
:
noop
,
};
let
AntTable
=
React
.
createClass
({
getInitialState
()
{
return
{
...
...
@@ -30,10 +37,9 @@ let AntTable = React.createClass({
sortOrder
:
''
,
sorter
:
null
,
radioIndex
:
null
,
pagination
:
this
.
hasPagination
()
?
objectAssign
({
pageSize
:
10
,
current
:
1
},
this
.
props
.
pagination
)
:
{}
pagination
:
this
.
hasPagination
()
?
objectAssign
({},
defaultPagination
,
this
.
props
.
pagination
)
:
{},
};
},
...
...
@@ -253,6 +259,8 @@ let AntTable = React.createClass({
}
else
{
pagination
.
current
=
pagination
.
current
||
1
;
}
pagination
.
onChange
(
pagination
.
current
);
const
newState
=
{
selectionDirty
:
false
,
pagination
...
...
@@ -423,9 +431,7 @@ let AntTable = React.createClass({
handleShowSizeChange
(
current
,
pageSize
)
{
const
pagination
=
this
.
state
.
pagination
;
if
(
pagination
.
onShowSizeChange
)
{
pagination
.
onShowSizeChange
(
current
,
pageSize
);
}
pagination
.
onShowSizeChange
(
current
,
pageSize
);
let
nextPagination
=
objectAssign
(
pagination
,
{
pageSize
:
pageSize
...
...
components/time-picker/index.jsx
浏览文件 @
15b2e92d
...
...
@@ -15,7 +15,6 @@ const AntTimePicker = React.createClass({
align
:
{
offset
:
[
0
,
-
2
],
},
open
:
false
,
disabled
:
false
,
disabledHours
:
undefined
,
disabledMinutes
:
undefined
,
...
...
style/components/timepicker/Picker.less
浏览文件 @
15b2e92d
.@{timepicker-prefix-cls}-panel {
m
in
-width: 168px;
m
ax
-width: 168px;
z-index: 1070;
position: absolute;
...
...
style/core/base.less
浏览文件 @
15b2e92d
...
...
@@ -70,7 +70,7 @@ a {
}
&[disabled] {
// color: @grey-200
;
color: #ccc
;
cursor: not-allowed;
pointer-events: none;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录