Home  >  Article  >  WeChat Applet  >  How to implement click jump in mini program in carousel chart

How to implement click jump in mini program in carousel chart

angryTom
angryTomOriginal
2020-03-25 11:37:137393browse

How to implement click jump in mini program in carousel chart

How the applet implements click-to-jump in the carousel chart

The carousel chart can be implemented using the swiper component. Click to jump to the page. This can be achieved using the navigator component, so the way to achieve clicking on the carousel chart to jump to the page is to nest a navigator in the swiper-item component of the swiper component.

The specific implementation code is as follows:

1, WXML code

  
  
    
      
        
          
         
      
    
  

2, WXSS code

/* 轮播 */
.swiperBanner{
  width:100%;
  height:420rpx !important;
  margin:0 auto; 
}
.swiperBanner image{
  width:100%;
  height:420rpx !important;
}
swiper {
  width:100%;
  height:420rpx !important;
}

3, JS code

indicatorDots:false,
   autoplay:true,
   interval:3000,
   duration: 800,
   circular:true,
    // 轮播图
   imgUrls: [
     {
       link:'../activity/washCar1/index/index',
       url:'https://localhost/static/ttcf/img/banner8.png',
 
     },
     {
       link: '../activity/Odysseus/index/index',
       url: 'https://localhost/static/ttcf/img/banner9.png',
 
     },
 
   ],

PHP Chinese website, a large number of free small program development tutorials, welcome to learn!

The above is the detailed content of How to implement click jump in mini program in carousel chart. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn