From 1c1bf9945a7fbc95e3cd35d70a0046b9d307f52c Mon Sep 17 00:00:00 2001 From: SimaQ Date: Sat, 31 Oct 2015 08:43:38 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=86=E8=8A=82=E4=BF=AE=E6=94=B9=EF=BC=8C?= =?UTF-8?q?=E4=BF=9D=E6=8C=81=20dom=20=E7=BB=93=E6=9E=84=E7=A8=B3=E5=AE=9A?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/form/FormItem.jsx | 10 +++++----- components/form/Input.jsx | 6 +++--- style/mixins/input.less | 1 + 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/components/form/FormItem.jsx b/components/form/FormItem.jsx index 182144bbdf..5c63713065 100644 --- a/components/form/FormItem.jsx +++ b/components/form/FormItem.jsx @@ -22,11 +22,11 @@ class FormItem extends React.Component { renderHelp() { const prefixCls = this.props.prefixCls; - return this.props.help ? ( -
+ return ( +
{this.props.help}
- ) : null; + ); } renderValidateWrapper(children) { @@ -51,11 +51,11 @@ class FormItem extends React.Component { renderWrapper(children) { const wrapperCol = this.props.wrapperCol; - return wrapperCol ? ( + return (
{children}
- ) : children; + ); } renderLabel() { diff --git a/components/form/Input.jsx b/components/form/Input.jsx index a9673cde3f..4fb35f472f 100644 --- a/components/form/Input.jsx +++ b/components/form/Input.jsx @@ -43,13 +43,13 @@ class Input extends React.Component { ) : null; - return addonBefore || addonAfter ? ( -
+ return ( +
{addonBefore} {children} {addonAfter}
- ) : children; + ); } renderInput() { diff --git a/style/mixins/input.less b/style/mixins/input.less index 0f1b20982e..a944f569f4 100644 --- a/style/mixins/input.less +++ b/style/mixins/input.less @@ -152,6 +152,7 @@ } // Reset rounded corners + > div > .@{inputClass}:first-child, > .@{inputClass}:first-child, &-addon:first-child { border-bottom-right-radius: 0;