antoniandre / vueper-slides

A touch ready and responsive slideshow / carousel for Vue 2 & 3.
https://antoniandre.github.io/vueper-slides
MIT License
568 stars 50 forks source link

more then 3 or 4 visible slides. active slide issue when move one by one slide #206

Open ghost opened 10 months ago

ghost commented 10 months ago

there is an issue with when visible slides is 4 or more, slider should be move when click on arrow or bullets . issue occurs when last 2,3 bullets. when i go to last. slide that is visible the arrow did'nt show that it is last slide because it moves one by one slide and it connot hide arrows on edges until unless it go through the last slide in my case i have 15 slides and visible slides is 4 and 5th one is half <vueper-slides class="no-shadow" :visible-slides="4" :dragging-distance="70" :slide-ratio="1 / 4" :gap="-2" :breakpoints="breakPoints" disable-arrows-on-edges

bullets: <template #bullets="{ bulletIndexes, goToSlide, currentSlide }"> <span v-for="(slideIndex, i) in bulletIndexes.slice(2, -2)" :key="i" class="rounded-full w-3 h-3 text-white" :class="[ currentSlide === slideIndex ? ' bg-white' : 'bg-transparent border border-white', ]" @click="goToSlide(slideIndex)"

i have use slice method so that on 1st click it goes to next slide and remove last 2 bullets so that when go to end the bullet active will be last i know this approach is not good but i con't find the proper solution yet.