Open tsauvajon opened 6 years ago
We've programmatically changed the slides using a ref and goSlide
.
methods: {
prevSlide () {
if (this.selectedProject === 0) {
return this.$refs.carousel.goSlide(this.slides.length - 1)
}
this.$refs.carousel.goSlide(this.slideIndex - 1)
},
nextSlide () {
this.$refs.carousel.goSlide(this.slideIndex + 1)
},
onBeforeSlideChange (index) {
this.slideIndex= index
}
}
It would be easier to simply pass in a Vue component than re implementing the logic of the slide changes (even though it is trivial)
I would like to pass a Vue component rather than a string to
controlsPrevHtml
andcontrolsNextHtml
.I've not found any way to dynamically render my component to a string in Vue, and that would anyway prevent me from dispatching events.