按需显示大拇指图片,但大拇指本身不动,我的大拇指比显示的要多,当我点击大拇指时,她必须像单击下一个按钮一样移动**
let galleryThumbs = new Swiper('.gallery-thumbs', {
spaceBetween: 10,
slidesPerView: 2,
loop: true,
freeMode: false,
watchSlidesVisibility: true,
watchSlidesProgress: true,
slideToClickedSlide: true,
loopedSlides: 5
});
let galleryTop = new Swiper('.gallery-top', {
spaceBetween: 10,
loopedSlides: 5,
loop:true,
thumbs: {
swiper: galleryThumbs,
},
});
这是我的html(呈现简单的swiper-slide)
<div class="swiper-container gallery-top">
<div class="swiper-wrapper">
[[getImageList?
&docid=`[[*id]]`
&limit=`0`
&tvname=`img-slider`
&tpl=`@CODE: <div class="swiper-slide"><img src="/[[+home_img]]" alt="[[*pagetitle]]"></div>`
]]
</div>
</div>
<div class='swiper-container gallery-thumbs'>
<div class="swiper-wrapper">
[[getImageList?
&docid=`[[*id]]`
&limit=`0`
&tvname=`img-slider`
&tpl=`@CODE: <div class="swiper-slide"><div class="small_body"><img src="/[[+home_img]]" alt="[[*pagetitle]]"></div></div>`
]]
</div>
</div>
Easy bro_))将此行添加到代码中,并将其移动! galleryTop.controller.control = galleryThumbs;