0

我添加了我想要更改的点的图片。

这是图片

我正在使用react-native-swiper

有没有办法改变 swiper 中点的样式(颜色,大小..)?

<Swiper
  style={styles.wrapper}
  showsButtons={false}
  onIndexChanged={this.onSwiperIndexChanged}
  index={this.state.initialIndex} //{list.length - this.state.initialIndex - 1}
>
  {list.map((item, index) => (
    <InfoTable
      key={index}
      headerInfo={item}
      approvers={approvers}
      settings={settings}
    />
  ))}
</Swiper>;
4

1 回答 1

1

是的你可以

参考文档swiper-pagination

允许自定义点元素。

<View
  style={{
    backgroundColor: "rgba(0,0,0,.2)",
    width: 8,
    height: 8,
    borderRadius: 4,
    marginLeft: 3,
    marginRight: 3,
    marginTop: 3,
    marginBottom: 3
  }}
/>;

于 2020-03-12T07:22:26.333 回答