mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-06 07:56:28 +08:00
fix required prefixCls
This commit is contained in:
parent
51c33b9c51
commit
b4c997f016
@ -116,7 +116,7 @@ class FormItem extends React.Component {
|
|||||||
|
|
||||||
const className = classNames({
|
const className = classNames({
|
||||||
[this._getLayoutClass(labelCol)]: true,
|
[this._getLayoutClass(labelCol)]: true,
|
||||||
'label-required': required,
|
[`${props.prefixCls}-item-required`]: required,
|
||||||
});
|
});
|
||||||
|
|
||||||
return props.label ? (
|
return props.label ? (
|
||||||
|
@ -36,7 +36,7 @@ let Demo = React.createClass({
|
|||||||
<FormItem
|
<FormItem
|
||||||
label="您的性别:"
|
label="您的性别:"
|
||||||
labelCol={{ span: 6 }}
|
labelCol={{ span: 6 }}
|
||||||
wrapperCol={{ span: 14 }}d>
|
wrapperCol={{ span: 14 }}>
|
||||||
<RadioGroup {...getFieldProps('gender', { initialValue: 'female' })}>
|
<RadioGroup {...getFieldProps('gender', { initialValue: 'female' })}>
|
||||||
<Radio value="male">男的</Radio>
|
<Radio value="male">男的</Radio>
|
||||||
<Radio value="female">女的</Radio>
|
<Radio value="female">女的</Radio>
|
||||||
@ -50,7 +50,7 @@ let Demo = React.createClass({
|
|||||||
<Input type="textarea" placeholder="随便写" {...getFieldProps('remark')} />
|
<Input type="textarea" placeholder="随便写" {...getFieldProps('remark')} />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
wrapperCol={{ span: 14, offset: 6 }} >
|
wrapperCol={{ span: 14, offset: 6 }}>
|
||||||
<label>
|
<label>
|
||||||
<Checkbox {...getFieldProps('agreement')} />同意
|
<Checkbox {...getFieldProps('agreement')} />同意
|
||||||
</label>
|
</label>
|
||||||
|
@ -11,7 +11,7 @@ label {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.label-required:before {
|
.@{css-prefix}form-item-required:before {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
content: "*";
|
content: "*";
|
||||||
|
Loading…
Reference in New Issue
Block a user