继承
FieldBase
用法
{
this.state.fruits.map(fruit => {
return (
<div key={fruit}>
<RadioButton
inputId={fruit}
value={fruit}
groupValue={this.state.fruit}
onChange={(checked) => this.handleChange(fruit, checked)}
/>
<Label htmlFor={fruit} style={{ margin: '0 5px' }}>{fruit}</Label>
</div>
)
})
}
属性
名称 |
类型 |
描述 |
默认 |
value |
string,number |
绑定到组件的值 |
null |
groupValue |
string,number |
绑定到组件的一组值。 |
null |
名称 |
string |
字段组名称 |
null |
disabled |
boolean |
定义是否禁用该字段。 |
false |
inputId |
string |
单选按钮的id属性值。 |
null |
事件
名称 |
参数 |
描述 |
onChange |
checked |
在检查或未选中组件时触发 |