自定义分页器究竟如何使用(custom)
为什么我使用自定义分页器的时候无法使用pagination: {
el: '.gallery-pagination',
type : 'custom',
renderCustom: function (swiper, current, total) {
const html = `<div class="swiper-dots">
<span class="swiper-dot ${current === 1 && 'active'}"></span>
<span class="swiper-dot ${current === 2 && 'active'}"></span>
<span class="swiper-dot ${current === 3 && 'active'}"></span>
<span class="swiper-dot ${current === 4 && 'active'}"></span>
</div>`;
return html;
}
}
我是这么定义的样式,效果和想象的一样 用的swiper版本是 5.3
用的swiper版本是 5.3 6.x如何自定义,求助 花花 发表于 2021-8-18 16:38
6.x如何自定义,求助
和5.x不是一样的吗?
页:
[1]