Wlada / vue-carousel-3d

Vue Carousel 3D - Beautiful, flexible and touch supported 3D Carousel for Vue.js
MIT License
968 stars 203 forks source link

How to use the onMainSlideClick event? #131

Open L-K-Mist opened 4 years ago

L-K-Mist commented 4 years ago

Couldn't find an example where onMainSlideClick event is used. Would you mind pasting an example snippet here?

flavou45 commented 4 years ago

Hello,

Here is a link with an example of use: https://jsfiddle.net/fx3azq9u/

Berkmann18 commented 4 years ago

I wonder why :on-main-slide-click works when the other event handlers are using @.

gutisalex commented 4 years ago

is it possible to pass the index or the item that I have clicked on?

kashyappiyush1998 commented 4 years ago

@gutisalex I don't think you can pass index but you can get the index of the main slide - <carousel-3d ref="carousel" :on-main-slide-click="onSelect">


         onSelect() {

                let vm=this;
                console.log(this.$refs.carousel.currentIndex)
                    }