gpt4 book ai didi

javascript - Swiper.js 分页自定义项目符号不会点击移动到下一张幻灯片

转载 作者:行者123 更新时间:2023-12-01 16:16:51 25 4
gpt4 key购买 nike

从 swiper.js 单击时,我无法让自定义项目符号滑动。
这是我的stackblitz
我添加了配置属性

'clickable: true'


这是我的刷卡代码代码

private pagination: SwiperPaginationInterface = {
el: '.swiper-pagination',
type: 'bullets',
clickable: true,
renderBullet: function(index, className) {
return '<span class="' + className + '">' + (index === 0 ? 'info ' : 'students') + '</span>';
},
};
config: SwiperConfigInterface = {
observer: true,
observeParents: true,
observeSlideChildren: true,
direction: 'horizontal',
threshold: 50,
spaceBetween: 0,
slidesPerView: 1,
centeredSlides: true,
slideToClickedSlide: true,
pagination: this.pagination,
navigation: true,
// width: 200,
// setWrapperSize: true,
};

最佳答案

对我来说,这有效:

public config: SwiperOptions = {
pagination: {
el: '.swiper-pagination',
clickable: true
}
}

关于javascript - Swiper.js 分页自定义项目符号不会点击移动到下一张幻灯片,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63141466/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com