uni-app修改默认的swiper 面板指示点的样式:
一、效果图

二、代码
02 | < swiper :indicator-dots = "true" :autoplay = "true" :interval = "3000" :duration = "1000" indicator-color = "rgba(255,255,255,0.5)" indicator-active-color = "#fff" > |
03 | < swiper-item v-for = '(item,index) in dataList' :key = 'index' > |
04 | < view >< image :src = "item.imgUrl" mode = "aspectFill" ></ image ></ view > |
三、修改样式在App.vue 中的style写
02 | @import "uview-ui/index.scss" ; |
04 | uni-swiper .uni-swiper-dot { width : 40 rpx; height : 4 rpx;} |
05 | uni-swiper .uni-swiper-dot-active { width : 40 rpx;border-radius: 6 rpx;} |
08 | wx-swiper .wx-swiper-dot { width : 40 rpx; height : 4 rpx;} |
09 | wx-swiper .wx-swiper-dot-active { width : 40 rpx; height : 4 rpx;border-radius: 6 rpx;} |