fix required prefixCls

pull/986/head
afc163 9 years ago
parent 51c33b9c51
commit b4c997f016

@ -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 ? (

@ -36,7 +36,7 @@ let Demo = React.createClass({
<FormItem
label="您的性别:"
labelCol={{ span: 6 }}
wrapperCol={{ span: 14 }}d>
wrapperCol={{ span: 14 }}>
<RadioGroup {...getFieldProps('gender', { initialValue: 'female' })}>
<Radio value="male">男的</Radio>
<Radio value="female">女的</Radio>
@ -50,7 +50,7 @@ let Demo = React.createClass({
<Input type="textarea" placeholder="随便写" {...getFieldProps('remark')} />
</FormItem>
<FormItem
wrapperCol={{ span: 14, offset: 6 }} >
wrapperCol={{ span: 14, offset: 6 }}>
<label>
<Checkbox {...getFieldProps('agreement')} />同意
</label>

@ -11,7 +11,7 @@ label {
}
}
.label-required:before {
.@{css-prefix}form-item-required:before {
display: inline-block;
margin-right: 4px;
content: "*";

Loading…
Cancel
Save