Merge branch 'master' into develop-1.0.0

This commit is contained in:
afc163 2016-04-25 16:26:59 +08:00
commit 5f75a63e8e
2 changed files with 11 additions and 1 deletions

View File

@ -82,6 +82,11 @@ export default class FormItem extends React.Component {
) : null; ) : null;
} }
renderExtra() {
const { prefixCls, extra } = this.props;
return <div className={prefixClsFn(prefixCls, 'extra')}>{extra}</div>;
}
getValidateStatus() { getValidateStatus() {
const { isFieldValidating, getFieldError, getFieldValue } = this.context.form; const { isFieldValidating, getFieldError, getFieldValue } = this.context.form;
const field = this.getId(); const field = this.getId();
@ -178,7 +183,7 @@ export default class FormItem extends React.Component {
this.renderValidateWrapper( this.renderValidateWrapper(
children, children,
this.renderHelp(), this.renderHelp(),
props.extra this.renderExtra(),
) )
), ),
]; ];

View File

@ -102,6 +102,11 @@ input[type="checkbox"] {
margin-top: 3px; margin-top: 3px;
} }
.@{css-prefix}form-explain,
.@{css-prefix}form-extra {
color: #999;
}
.@{css-prefix}form-text { .@{css-prefix}form-text {
display: inline-block; display: inline-block;
padding-right: 8px; padding-right: 8px;