React Native 复选框显示为红点
React Native checkbox showing up as red dot
React Native 复选框在 android 中显示正常,但在 ios 中显示为一个小红点。复选框在 ios 中有效还是仅在 android 中有效?
<CheckBox
label='I accept the Terms and Conditions'
value={this.state.checked}
onValueChange={() => this.setState({ checked: !this.state.checked })}
/>
由 react-native
提供的 CheckBox
组件仅适用于 Android,因为它在 documentation
中非常清楚地说明了以下内容
Renders a boolean input (Android only).
它也没有 label
道具。
其列出的道具是:
- View props..
disabled
onChange
onValueChange
testID
value
React Native 复选框在 android 中显示正常,但在 ios 中显示为一个小红点。复选框在 ios 中有效还是仅在 android 中有效?
<CheckBox
label='I accept the Terms and Conditions'
value={this.state.checked}
onValueChange={() => this.setState({ checked: !this.state.checked })}
/>
由 react-native
提供的 CheckBox
组件仅适用于 Android,因为它在 documentation
Renders a boolean input (Android only).
它也没有 label
道具。
其列出的道具是:
- View props..
disabled
onChange
onValueChange
testID
value