vue-awesome-swiper icon indicating copy to clipboard operation
vue-awesome-swiper copied to clipboard

Swiper pagination selects wrong slide on click

Open Sidstumple opened this issue 7 years ago • 6 comments

中文用户注意:

  1. 尽量用英文描述你的 issue
  2. 不要把内容堆彻在标题上,逻辑清晰地写在内容区
  3. 贴代码要提前格式化好,有颜色高亮那种,贴文本,不要贴图片
  4. 提问题前,必须仔细阅读 REMADE.md + 在已关闭的问题中寻找与自身相关的问题,90% 的可能它已经被解决
  5. 如果无法做到提一个合格、优秀的问题,则问题会被 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: swiper-bug

Sidstumple avatar Jul 25 '18 13:07 Sidstumple

I also have the same problem on version of 3.1.3.

mujan5427 avatar Oct 02 '18 08:10 mujan5427

The same here. Looks like it's related to the breakpoints...

Pedroalexandrelopes avatar Oct 12 '18 16:10 Pedroalexandrelopes

Same here, even without breakpoints...

nonlinearcom avatar Oct 30 '18 08:10 nonlinearcom

Was this problem solved?

ralucaschera avatar Jan 10 '19 09:01 ralucaschera

This problem is still not solved. Is there any workaround or DIY fixes for this?

ITBDarky avatar May 27 '21 09:05 ITBDarky

Any solution for this? please help

noelou avatar Jan 06 '22 10:01 noelou