Closed s349856186 closed 4 years ago
<View > <Checkbox Style={{backgroundColor:'black',width:width/2}} title='Meter' size='lg' titleStyle={{color:'white'}} checked={this.state.flag} onChange={(checked) =>{ this.setState({flag:true});}} /> </View> <View > <Checkbox Style={{backgroundColor:'black',width:width/2}} title='CT' size='lg' titleStyle={{color:'white'}} checked={!this.state.flag} onChange={(checked) =>{ this.setState({flag:false});}} /> </View>
我有两个CheckBox,想做成单选的效果,有办法吗?而且上面的代码选中的状态展示的也不对
搞错了,是上层组件问题
我有两个CheckBox,想做成单选的效果,有办法吗?而且上面的代码选中的状态展示的也不对