diff --git a/components/date-picker/demo/locale.md b/components/date-picker/demo/locale.md index 3dc6764871..8e0f493f6d 100644 --- a/components/date-picker/demo/locale.md +++ b/components/date-picker/demo/locale.md @@ -2,30 +2,24 @@ - order: 10 -通过 `locale` 配置时区、语言等, 默认支持 en_US, zh_CN +通过 `locale` 配置时区、语言等, 默认支持 `en_US`,`zh_CN`。 --- ````jsx import { DatePicker } from 'antd'; import enUS from 'antd/lib/date-picker/locale/en_US'; -import assign from 'object-assign'; const App = React.createClass({ - getInitialState() { - return { - locale: assign({}, enUS, { - timezoneOffset: 0 * 60, - firstDayOfWeek: 0, - minimalDaysInFirstWeek: 1, - }) - }; - }, render() { - return ; + const customLocale = { + timezoneOffset: 0 * 60, + firstDayOfWeek: 0, + minimalDaysInFirstWeek: 1, + }; + return ; } }); ReactDOM.render(, mountNode); ```` - diff --git a/components/form/FormItem.jsx b/components/form/FormItem.jsx index 52d41e801b..dc5480b30a 100644 --- a/components/form/FormItem.jsx +++ b/components/form/FormItem.jsx @@ -47,6 +47,11 @@ class FormItem extends React.Component { ); } + renderExtra() { + const { prefixCls, extra } = this.props; + return
{extra}
; + } + getValidateStatus() { const { isFieldValidating, getFieldError, getFieldValue } = this.context.form; const field = this.getId(); @@ -142,7 +147,7 @@ class FormItem extends React.Component { this.renderValidateWrapper( children, this.renderHelp(), - props.extra + this.renderExtra() ) ), ]; diff --git a/components/table/demo/row-selection.md b/components/table/demo/row-selection.md index 88cd4b68d1..5f5780c5b5 100644 --- a/components/table/demo/row-selection.md +++ b/components/table/demo/row-selection.md @@ -49,7 +49,7 @@ const rowSelection = { }, onSelectAll(selected, selectedRows, changeRows) { console.log(selected, selectedRows, changeRows); - } + }, }; ReactDOM.render( diff --git a/components/table/index.jsx b/components/table/index.jsx index 72d7c96755..1dbf5c03ad 100644 --- a/components/table/index.jsx +++ b/components/table/index.jsx @@ -13,6 +13,11 @@ import { flatArray } from './util'; function noop() { } +function stopPropagation(e) { + e.stopPropagation(); + e.nativeEvent.stopImmediatePropagation(); +} + const defaultLocale = { filterTitle: '筛选', filterConfirm: '确定', @@ -31,7 +36,7 @@ let AntTable = React.createClass({ getInitialState() { return { // 减少状态 - selectedRowKeys: this.props.selectedRowKeys || [], + selectedRowKeys: (this.props.rowSelection || {}).selectedRowKeys || [], filters: {}, selectionDirty: false, sortColumn: '', @@ -305,7 +310,7 @@ let AntTable = React.createClass({ this.getDefaultSelection().indexOf(rowIndex) >= 0); } return ( - ); @@ -325,7 +330,7 @@ let AntTable = React.createClass({ props = this.props.rowSelection.getCheckboxProps.call(this, record); } return ( - ); }, diff --git a/style/components/collapse.less b/style/components/collapse.less index 28ad62448e..6a5cce230b 100644 --- a/style/components/collapse.less +++ b/style/components/collapse.less @@ -48,12 +48,15 @@ } } + &-anim-active { + transition: height .2s @ease-out; + } + &-content { overflow: hidden; color: @text-color; padding: 0 16px; background-color: #fff; - transition: height .2s @ease-out; & > &-box { padding-top: 16px; diff --git a/style/components/form.less b/style/components/form.less index 37c85b98df..9943c88341 100644 --- a/style/components/form.less +++ b/style/components/form.less @@ -102,6 +102,11 @@ input[type="checkbox"] { margin-top: 3px; } +.@{css-prefix}form-explain, +.@{css-prefix}form-extra { + color: #999; +} + .@{css-prefix}form-text { display: inline-block; padding-right: 8px; diff --git a/style/themes/default/custom.less b/style/themes/default/custom.less index 9871a70bca..836d30aa81 100644 --- a/style/themes/default/custom.less +++ b/style/themes/default/custom.less @@ -22,7 +22,7 @@ // ICONFONT @iconfont-css-prefix : anticon; -@icon-url : "//at.alicdn.com/t/font_1457169990_5499172"; +@icon-url : "//at.alicdn.com/t/font_1461567603_8950496"; // LINK @link-color : #2db7f5;