diff --git a/components/form/FormItem.jsx b/components/form/FormItem.jsx index d9c248f776..6c8cfd10ca 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, - required: required, + 'label-required': required, }); return props.label ? ( diff --git a/style/components/form.less b/style/components/form.less index a2901ecce7..ad306cc78f 100644 --- a/style/components/form.less +++ b/style/components/form.less @@ -4,14 +4,6 @@ label { position: relative; - &.required:before { - display: inline-block; - margin-right: 4px; - content: "*"; - font-family: SimSun; - font-size: @font-size-base; - color: @label-required-color; - } > .@{iconfont-css-prefix} { vertical-align: top; @@ -19,6 +11,15 @@ label { } } +.label-required:before { + display: inline-block; + margin-right: 4px; + content: "*"; + font-family: SimSun; + font-size: @font-size-base; + color: @label-required-color; +} + // Input styles .@{css-prefix}input { .input;