微信小程序---swiper轮播图的页面,样式及逻辑的详细用法

swiper轮播图在小程序中是比较常见的功能,包括:页面顶部产品、活动的内容展示,或者是底部广告推广, swiper —点击蓝色字跳转到小程序官方文档解释。

详细见Demo:

1. wxml页面:

<view class="swiperStyle" wx:if="{
  
   
   {showSwiper}}">
      <swiper class="swiper-item" indicator-dots="{
  
   
   {indicatorDots}}" autoplay="{
  
   
   {autoplay}}" interval="{
  
   
   {interval}}" duration="{
  
   
   {duration}}" circular="{
  
   
   {circular}}" indicator-color="{
  
   
   {indicatorColor}}" indicator-active-color="{
  
   
   {activeColor}}">
        <block wx:for="{
  
   
   {adsImgList}}" wx:key="index">
          <swiper-item>
            <view class="swiper-box"><image 

猜你喜欢

转载自blog.csdn.net/m0_61916157/article/details/125082743