From b4c997f0165b5da29e7b4c97017f9b92162d21db Mon Sep 17 00:00:00 2001 From: afc163 Date: Wed, 3 Feb 2016 14:00:38 +0800 Subject: [PATCH] fix required prefixCls --- components/form/FormItem.jsx | 2 +- components/form/demo/horizontal-form.md | 4 ++-- style/components/form.less | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/form/FormItem.jsx b/components/form/FormItem.jsx index 6c8cfd10ca..2b7a03524e 100644 --- a/components/form/FormItem.jsx +++ b/components/form/FormItem.jsx @@ -116,7 +116,7 @@ class FormItem extends React.Component { const className = classNames({ [this._getLayoutClass(labelCol)]: true, - 'label-required': required, + [`${props.prefixCls}-item-required`]: required, }); return props.label ? ( diff --git a/components/form/demo/horizontal-form.md b/components/form/demo/horizontal-form.md index c7b7a260a4..7e6bd219ca 100644 --- a/components/form/demo/horizontal-form.md +++ b/components/form/demo/horizontal-form.md @@ -36,7 +36,7 @@ let Demo = React.createClass({ + wrapperCol={{ span: 14 }}> 男的 女的 @@ -50,7 +50,7 @@ let Demo = React.createClass({ + wrapperCol={{ span: 14, offset: 6 }}> diff --git a/style/components/form.less b/style/components/form.less index ad306cc78f..6ba8d870cf 100644 --- a/style/components/form.less +++ b/style/components/form.less @@ -11,7 +11,7 @@ label { } } -.label-required:before { +.@{css-prefix}form-item-required:before { display: inline-block; margin-right: 4px; content: "*";