TA的每日心情 | 开心 2020-9-22 16:12 |
---|
签到天数: 1 天 [LV.1]初来乍到
新手上路
- 积分
- 13
|
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;
}
}
我是这么定义的样式,效果和想象的一样 |
|