React native参考手册
Components: Switch
Switch
呈现布尔输入。
这是一个受控组件,需要一个onValueChange
回调来更新value
prop以便组件反映用户操作。如果value
道具没有更新,组件将继续渲染提供的value
道具,而不是任何用户操作的预期结果。
@keyword复选框@keyword切换
道具
ViewPropTypes道具...
disabled?: bool
如果为true,用户将无法切换开关。默认值为false。
onTintColor?: color
开关打开时的背景颜色。
onValueChange?: function
值改变时用新值调用。
testID?: string
用于在端到端测试中定位此视图。
thumbTintColor?: color
前景开关手柄的颜色。
tintColor?: color
当开关关闭时,iOS上的边框颜色和Android上的背景颜色。
value?: bool
交换机的值。如果为true,则开关将打开。默认值为false。
Components: Switch相关
React Native 是一个 JavaScript 的框架,用来撰写实时的、可原生呈现 iOS 和 Android 的应用。
主页 | https://facebook.github.io/react-native/ |
源码 | https://github.com/facebook/react-native |
发布版本 | 0.49 |