Browse Source

merge master

pull/829/head
afc163 9 years ago
parent
commit
cf92a79529
  1. 6
      CHANGELOG.md
  2. 22
      components/form/demo/validate.md
  3. 25
      components/pagination/index.md
  4. 1
      components/select/demo/search.md
  5. 1
      components/select/index.md
  6. 3
      components/table/demo/paging.md
  7. 20
      components/table/index.jsx
  8. 1
      components/time-picker/index.jsx
  9. 2
      style/components/timepicker/Picker.less
  10. 2
      style/core/base.less

6
CHANGELOG.md

@ -4,6 +4,12 @@
---
## 0.11.3 `fixing`
- 修复 TimePicker 受控模式点选即关闭面板的问题。[#818](https://github.com/ant-design/ant-design/issues/818)
- 修复一个两栏的 TimePicker 点击右边空白处无法关闭面板的问题。[#826](https://github.com/ant-design/ant-design/issues/826)
- 修复 Table `pagination.onChange` 指定无效的问题。[#824](https://github.com/ant-design/ant-design/issues/824)
## 0.11.2 `2015-01-03`
- 新增了[贡献文档](https://github.com/ant-design/ant-design/blob/master/CONTRIBUTING.md)。

22
components/form/demo/validate.md

@ -76,7 +76,8 @@ ReactDOM.render(
<FormItem
label="Datepicker:"
labelCol={{span: 5}}
validateStatus="error">
validateStatus="error"
help>
<Col span="6">
<DatePicker />
</Col>
@ -90,6 +91,25 @@ ReactDOM.render(
<p className="ant-form-explain">请输入正确选项</p>
</Col>
</FormItem>
<FormItem
label="Datepicker:"
labelCol={{span: 5}}>
<Col span="6">
<FormItem validateStatus="error">
<DatePicker />
<p className="ant-form-explain">请输入正确选项</p>
</FormItem>
</Col>
<Col span="1">
<p className="ant-form-split">-</p>
</Col>
<Col span="6">
<FormItem>
<DatePicker />
</FormItem>
</Col>
</FormItem>
</Form>
, mountNode);
````

25
components/pagination/index.md

@ -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 | 无 |

1
components/select/demo/search.md

@ -16,6 +16,7 @@ function handleChange(value) {
ReactDOM.render(
<Select defaultValue="lucy" showSearch style={{width: 200}}
notFoundContent="找不到呐!"
searchPlaceholder="输入"
onChange={handleChange}>
<Option value="jack">jack</Option>

1
components/select/index.md

@ -36,6 +36,7 @@
| onSearch | 文本框值变化时回调 | function(value: String) | |
| placeholder | 选择框默认文字 | string | 无 |
| searchPlaceholder | 搜索框默认文字 | string | 无 |
| notFoundContent | 当下拉列表为空时显示的内容 | string | 'Not Found' |
| dropdownMatchSelectWidth | 下拉菜单和选择器同宽 | boolean | true |
| optionFilterProp | 输入项过滤对应的 option 属性 | string | value |
| combobox | 输入框自动提示模式 | boolean | false |

3
components/table/demo/paging.md

@ -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);
}
};

20
components/table/index.jsx

@ -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) :
{},
};
},
@ -257,6 +263,8 @@ let AntTable = React.createClass({
} else {
pagination.current = pagination.current || 1;
}
pagination.onChange(pagination.current);
const newState = {
selectionDirty: false,
pagination
@ -440,9 +448,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,

1
components/time-picker/index.jsx

@ -15,7 +15,6 @@ const AntTimePicker = React.createClass({
align: {
offset: [0, -2],
},
open: false,
disabled: false,
disabledHours: undefined,
disabledMinutes: undefined,

2
style/components/timepicker/Picker.less

@ -1,5 +1,5 @@
.@{timepicker-prefix-cls}-panel {
min-width: 168px;
max-width: 168px;
z-index: 1070;
position: absolute;

2
style/core/base.less

@ -70,7 +70,7 @@ a {
}
&[disabled] {
// color: @grey-200;
color: #ccc;
cursor: not-allowed;
pointer-events: none;
}

Loading…
Cancel
Save