react-native-rate-swiper
两边可以各种漏出一部分的swiper,当item移动的时候item的大小会进行缩放。
效果
install
npm install react-native-rate-swiper
说明
/** *支持参数: *startIndex:初始化时显示第几页,默认值0 *rate:左右显示的部分高度比例 默认值1 (0< x <=1) *width,height *placeHoldWidth 左右显示部分宽度 默认40 *loop 是否循环滚动 默认 true *autoPlay 自动播放 默认 true *autoplayInterval 默认 3000 *autoplayDelay 默认 0 *scrollTo(index) 0 <= index <children.lenght *item可用区域{w:width-placeHoldWidth*2,h:height}*/
Demo
;; { const imgWidth = 400; const imgHeigt = 200; const list = '11' '22' '33' '44' '55'; return <View style=stylesview> <Swiper width=imgWidth height=imgHeigt rate=09 loop=true autoPlay=false startIndex=1 placeHoldWidth=60 ref= { thisscroll = e; } onChanged= { console } > list </Swiper> <TouchableOpacity activeOpacity=09 onPress= { thisscroll } > <View style=stylesbutton> <Text>goto 3</Text> </View> </TouchableOpacity> </View> ; } { console; } const styles = StyleSheet