🚧 Slider
已过时。 Use @react-native-community/slider instead.
用于选择一个范围值的组件。
文档
Props
style
Used to style and layout the Slider
. See StyleSheet.js
and ViewStylePropTypes.js
for more info.
类型 | 必需 |
---|---|
View.style | 否 |
disabled
如果为 true,用户就不能移动滑块。默认为 false。
类型 | 必需 |
---|---|
bool | 否 |
maximumValue
滑块的最大值(当滑块滑到最右端时表示的值)。默认为 1。
类型 | 必需 |
---|---|
number | 否 |
minimumTrackTintColor
滑块左侧轨道的颜色。在 iOS 上默认为一个蓝色的渐变色。
类型 | 必需 |
---|---|
color | 否 |
minimumValue
滑块的最小值(当滑块滑到最左端时表示的值)。默认为 0。
类型 | 必需 |
---|---|
number | 否 |
onSlidingComplete
用户松开滑块的时候调用此回调,无论值是否变化。回调值为当前值。
类型 | 必需 |
---|---|
function | 否 |