render(){
return (
<Swiper
style={styles.wrapper}
width = {200}
height = {300}
horizonal={true} //水平轮播
loop = {true} //若为false,滑动到最后一张就不再滑到第一张,待会测试
index = 0 // 开始显示的图片
autoplay = {false} //是否自动轮播
autoplayTime = {2} //轮播的时间
autoplayDirection = {true} //控制轮播是否循环
showButtoms = {false} //是否显示控制按钮
onIndexChanged = {(index) => {}} //图片轮播调用的回调
loadMinimalLoader = {() => <ActivityIndicator /> }
showsPagination = {true} //是否显示dot
dot = {<View style={
{width:8,height:8,backgroundColor:'red'}}/>} //指定dot
paginationStyle = {
{bottom: 10}} //dot的位置
activeDot = {<View style={
{width:8,height:8,backg
react native中Swiper属性
最新推荐文章于 2024-05-10 10:01:53 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)