Vue-carousel: Custom forward/next-slide button?

Created on 3 Mar 2020  路  2Comments  路  Source: SSENSE/vue-carousel

I have created a standalone button on the slide. How does one trigger a slide change forward?

Currently I have created a method, but it breaks the order of the slides:

const first = this.slides.shift()
this.slides = this.slides.concat(first)

:octocat:

Most helpful comment

Reference the carousel and call its handleNavigation method.

for eg:

next() {
 this.$refs.carousel.handleNavigation()
},

prev() {
 this.$refs.carousel.handleNavigation('backward')
}

note: your carousel component should have ref attribute set to 'carousel' for this example

All 2 comments

Reference the carousel and call its handleNavigation method.

for eg:

next() {
 this.$refs.carousel.handleNavigation()
},

prev() {
 this.$refs.carousel.handleNavigation('backward')
}

note: your carousel component should have ref attribute set to 'carousel' for this example

You legend!! 猸愶笍 Thank you

bitmoji

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lggwettmann picture lggwettmann  路  5Comments

blackforestcode picture blackforestcode  路  4Comments

power-cut picture power-cut  路  5Comments

roni-estein picture roni-estein  路  4Comments

midlantica picture midlantica  路  4Comments