fix checkbox and radio empty span

This commit is contained in:
afc163 2016-04-14 14:23:12 +08:00
parent be39bca93a
commit e59715f98d
2 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ export default class Checkbox extends React.Component {
return (
<label className={classString} style={style}>
<RcCheckbox {...restProps} prefixCls={prefixCls} children={null} />
<span>{children}</span>
{children ? <span>{children}</span> : null}
</label>
);
}

View File

@ -17,7 +17,7 @@ export default class Radio extends React.Component {
return (
<label className={classString} style={style}>
<RcRadio {...this.props} style={null} children={null} />
<span>{children}</span>
{children ? <span>{children}</span> : null}
</label>
);
}