vue-awesome-swiper
vue-awesome-swiper copied to clipboard
Swiper pagination selects wrong slide on click
中文用户注意:
- 尽量用英文描述你的 issue
- 不要把内容堆彻在标题上,逻辑清晰地写在内容区
- 贴代码要提前格式化好,有颜色高亮那种,贴文本,不要贴图片
- 提问题前,必须仔细阅读 REMADE.md + 在已关闭的问题中寻找与自身相关的问题,90% 的可能它已经被解决
- 如果无法做到提一个合格、优秀的问题,则问题会被 close + block
BUG REPORT TEMPLATE
Vue.js version and component version
2.9.3
Reproduction Link
- A minimal JSBin, JSFiddle, Codepen, or a GitHub repository that can reproduce the bug.
- You could start with this template: https://jsfiddle.net/39epgLj0/
Steps to reproduce
I am using vue-awesome-swiper in my vue/nuxt project. I added pagination like this:
pagination: {
el: '.swiper__paging',
type: 'bullets',
bulletClass: 'swiper__paging-number',
bulletActiveClass: 'swiper__paging-number--active',
clickable: true,
renderBullet: function (index, className) {
return '<h5 class="number-'+ (index + 1) + ' ' + className + '"' + 'index="' + (index + 1) +'">' + (index + 1) + '</h5>';
}
},
All settings:
homepageSwiperOptions: {
slidesPerView: 1,
resizeReInit: true,
direction: 'vertical',
spaceBetween: 100,
wrapperClass: 'swiper__wrapper',
fadeEffect: {
crossFade: true
},
grabCursor: true,
navigation: {
nextEl: '.icon--next',
prevEl: '.icon--prev'
},
pagination: {
el: '.swiper__paging',
type: 'bullets',
bulletClass: 'swiper__paging-number',
bulletActiveClass: 'swiper__paging-number--active',
clickable: true,
renderBullet: function (index, className) {
return '<h5 class="number-'+ (index + 1) + ' ' + className + '"' + 'index="' + (index + 1) +'">' + (index + 1) + '</h5>';
},
breakpoints: {
960: {
direction: 'horizontal'
}
}
}
What is Expected?
Pagination by clicking on a number
What is actually happening?
Swiper pagination selects wrong slide on click
Very buggy:

I also have the same problem on version of 3.1.3.
The same here. Looks like it's related to the breakpoints...
Same here, even without breakpoints...
Was this problem solved?
This problem is still not solved. Is there any workaround or DIY fixes for this?
Any solution for this? please help