Browse Source

Merge branch 'develop-0.11.0' into component-transfer

pull/735/head
afc163 9 years ago
parent
commit
ec95e2fb5b
  1. 1
      components/popconfirm/index.jsx
  2. 3
      components/slider/demo/event.md
  3. 8
      components/slider/demo/tip-formatter.md
  4. 3
      components/slider/index.md
  5. 5
      components/table/demo/paging.md
  6. 15
      components/table/index.jsx
  7. 14
      package.json

1
components/popconfirm/index.jsx

@ -36,7 +36,6 @@ export default React.createClass({
onCancel: noop,
okText: '确定',
cancelText: '取消',
visible: false,
onVisibleChange() {},
};
},

3
components/slider/demo/event.md

@ -2,7 +2,7 @@
- order: 4
当 Slider 的值发生改变时,会触发 onChange 事件,并把改变后的值作为参数传入。
当 Slider 的值发生改变时,会触发 `onChange` 事件,并把改变后的值作为参数传入。`onmouseup` 时,会触发 `onAfterChange` 事件,并把当前值作为参数传入。
---
@ -17,6 +17,7 @@ ReactDOM.render(
<div>
<Slider defaultValue={30} onChange={log} />
<Slider range step={10} defaultValue={[20, 50]} onChange={log} />
<Slider defaultValue={30} onAfterChange={log} />
</div>
, document.getElementById('components-slider-demo-event'));
````

8
components/slider/demo/tip-formatter.md

@ -2,7 +2,7 @@
- order: 5
使用 `tipFormatter` 可以格式化 `Tooltip` 的内容。
使用 `tipFormatter` 可以格式化 `Tooltip` 的内容,设置 `tipFormatter={null}`,则隐藏 `Tooltip`
---
@ -13,6 +13,8 @@ function formatter(value) {
return '$' + value;
}
ReactDOM.render(<Slider tipFormatter={formatter} />
, document.getElementById('components-slider-demo-tip-formatter'));
ReactDOM.render(<div>
<Slider tipFormatter={formatter} />
<Slider tipFormatter={null} />
</div>, document.getElementById('components-slider-demo-tip-formatter'));
````

3
components/slider/index.md

@ -26,4 +26,5 @@
| disabled | Boolean | false | 值为 `true` 时,滑块为禁用状态
| allowCross | Boolean | true | 当 `range``true` 时,该属性可以设置是否允许两个滑块交换位置。
| onChange | Function | NOOP | 当 Slider 的值发生改变时,会触发 onChange 事件,并把改变后的值作为参数传入。
| tipFormatter | Function | | Slider 会把当前值传给 `tipFormatter`,并在 Tooltip 中显示 `tipFormatter` 的返回值。
| onAfterChange | Function | NOOP | 与 `onmouseup` 触发时机一致,把当前值作为参数传入。
| tipFormatter | Function or null | IDENTITY | Slider 会把当前值传给 `tipFormatter`,并在 Tooltip 中显示 `tipFormatter` 的返回值,若为 null,则隐藏 Tooltip。

5
components/table/demo/paging.md

@ -36,7 +36,10 @@ for (let i = 0; i < 46; i++) {
const pagination = {
total: data.length,
current: 1,
showSizeChanger: true
showSizeChanger: true,
onShowSizeChange: function(current, pageSize) {
console.log('Current: ', current, '; PageSize: ', pageSize);
}
};
ReactDOM.render(<Table columns={columns} dataSource={data} pagination={pagination} />

15
components/table/index.jsx

@ -410,10 +410,15 @@ let AntTable = React.createClass({
},
handleShowSizeChange(current, pageSize) {
let pagination = objectAssign(this.state.pagination, {
const pagination = this.state.pagination;
if (pagination.onShowSizeChange) {
pagination.onShowSizeChange(current, pageSize);
}
let nextPagination = objectAssign(pagination, {
pageSize: pageSize
});
this.setState({ pagination });
this.setState({ pagination: nextPagination });
},
renderPagination() {
@ -427,12 +432,12 @@ let AntTable = React.createClass({
});
let total = this.state.pagination.total || this.getLocalData().length;
return (total > 0) ?
<Pagination className={classString}
<Pagination {...this.state.pagination}
className={classString}
onChange={this.handlePageChange}
total={total}
pageSize={10}
onShowSizeChange={this.handleShowSizeChange}
{...this.state.pagination} /> : null;
onShowSizeChange={this.handleShowSizeChange} /> : null;
},
prepareParamsArguments(state) {

14
package.json

@ -1,6 +1,6 @@
{
"name": "antd",
"version": "0.11.0-beta2",
"version": "0.11.0-beta3",
"stableVersion": "0.10.4",
"title": "Ant Design",
"description": "一个 UI 设计语言",
@ -41,25 +41,25 @@
"rc-animate": "~2.0.2",
"rc-calendar": "~4.0.0",
"rc-checkbox": "~1.1.1",
"rc-collapse": "~1.4.3",
"rc-collapse": "~1.4.4",
"rc-dialog": "~5.2.2",
"rc-dropdown": "~1.4.3",
"rc-form-validation": "~2.5.0",
"rc-input-number": "~2.4.1",
"rc-menu": "~4.8.1",
"rc-notification": "~1.3.0",
"rc-notification": "~1.3.1",
"rc-pagination": "~1.3.5",
"rc-progress": "~1.0.4",
"rc-queue-anim": "~0.11.2",
"rc-radio": "~2.0.0",
"rc-select": "~5.4.0",
"rc-slider": "~3.2.0",
"rc-slider": "~3.3.0",
"rc-steps": "~1.4.1",
"rc-switch": "~1.3.1",
"rc-table": "~3.6.2",
"rc-tabs": "~5.5.0",
"rc-time-picker": "1.0.0-alpha9",
"rc-tooltip": "~3.2.0",
"rc-tooltip": "~3.3.0",
"rc-tree": "~0.19.0",
"rc-trigger": "~1.0.6",
"rc-upload": "~1.7.0",
@ -91,7 +91,7 @@
"eslint-plugin-react": "^3.3.1",
"extract-text-webpack-plugin": "^0.9.1",
"gh-pages": "^0.5.0",
"history": "~1.13.1",
"history": "^1.17.0",
"jest-cli": "~0.8.0",
"json-loader": "^0.5.1",
"less": "~2.5.3",
@ -104,7 +104,7 @@
"react-addons-test-utils": "~0.14.2",
"react-copy-to-clipboard": "^3.0.4",
"react-dom": "~0.14.2",
"react-router": "~1.0.0",
"react-router": "~1.0.3",
"react-stateless-wrapper": "~1.0.2",
"reqwest": "~2.0.5",
"webpack": "^1.10.1",

Loading…
Cancel
Save