alexandreDavid / vue3-tour

Vue-tour in Vue3
MIT License
47 stars 21 forks source link

Using Composition API, how to handle the callbacks? #20

Open 1Saurus2Saurus opened 9 months ago

1Saurus2Saurus commented 9 months ago

Using the composition API, how do you handle the callbacks for Skip, Finish and Stopped? There do not seem to be any examples for the events

1Saurus2Saurus commented 9 months ago

Got it to work by: having a property 'callbacks' on the v-tour element.

<v-tour name="bipTour" :steps="steps" :callbacks="callBacks">

var callBacks = { onStop: function () { onStop('Stopped') }, onFinish: function () { onFinish('Finished') }, onSkip: function () { onSkip('Skipped') } }