vue-carousel-3d icon indicating copy to clipboard operation
vue-carousel-3d copied to clipboard

Previous / Next as Vue components

Open tsauvajon opened this issue 8 years ago • 2 comments

I would like to pass a Vue component rather than a string to controlsPrevHtml and controlsNextHtml.

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.

tsauvajon avatar Nov 21 '17 11:11 tsauvajon

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
    }
  }

tsauvajon avatar Nov 21 '17 11:11 tsauvajon

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)

tsauvajon avatar Nov 21 '17 11:11 tsauvajon