继承
FieldBase
用法
{
this.state.fruits.map(fruit => {
return (
<div key={fruit}>
<CheckBox inputId={fruit} multiple value={fruit} values={this.state.values}
onChange={this.handleChange.bind(this)}></CheckBox>
<Label htmlFor={fruit} style={{margin:'0 5px'}}>{fruit}</Label>
</div>
)
})
}
属性
名称 |
类型 |
描述 |
默认 |
value |
string |
值绑定到组件 |
null |
values |
array |
当多行设置为true时,此属性是生效的。 |
null |
名称 |
string |
字段组的名称 |
null |
disabled |
boolean |
定义是否禁用该字段。 |
false |
inputId |
string |
复选框的id属性值。 |
null |
multiple |
boolean |
为True时,绑定多个值 |
false |
事件
名称 |
参数 |
描述 |
onChange |
checked |
检查或未选中组件时触发 |