2016-11-07 69 views
0

我使用的是React Native Swiper组件:https://github.com/leecade/react-native-swiper#custom-basic-style--content如何更改React Native Swiper组件的默认颜色?

我无法将点颜色更改为除默认蓝色之外的任何其他颜色。有人知道怎么做吗?

这里是我的代码:

<Swiper style={styles.wrapper} loop={true}> 
     {rows.map(function(obj, index) { 
      return(
      <View style={styles.main} key={index}> 
       <Image 
       source={{uri: obj.url}} 
       style={styles.main} /> 
      </View>) 
     })} 
    </Swiper> 
+0

请发布您已有的代码。 –

+0

@MichaelRadionov将我的代码添加到原始帖子 –

回答

0

该组件有一个名为“点”的道具,你可以改变点的样式。

<View style={{ 
     backgroundColor:'rgba(0,0,0,.2)', 
     width: 8, 
     height: 8,  
     borderRadius: 4, 
     marginLeft: 3, 
     marginRight: 3, 
     marginTop: 3, 
     marginBottom: 3,}} 
/> 
相关问题