我想更改滑动滑块的分数计数器的'/'符号。想要将此格式:“ 1/12”更改为“ 1..12”。这是分数计数器的代码:
renderFraction: function (currentClass, totalClass) {
return '<span class="' + currentClass + '"></span>' +
' of' +
'<span class="' + totalClass + '"></span>';
},
这是codepen:https://codepen.io/weddje/pen/jObmBWo带有工作滑块的页面:https://nonfiction.photos/flickity-test/
谢谢!
添加如下的自定义分页方法;
pagination: {
el: '.swiper-pagination',
type: 'fraction',
renderFraction: function (currentClass, totalClass) {
return '<span class="' + currentClass + '"></span>' +
' .. ' +
'<span class="' + totalClass + '"></span>';
},
},