GlobalHive / vuejs-tour

VueJS Tour is a lightweight, simple and customizable tour plugin. It provides a quick and easy way to guide your users through your application.
https://globalhive.github.io/vuejs-tour/
MIT License
79 stars 6 forks source link

Hide Previous button on #actions overwrite #25

Closed svenphilipsen closed 1 year ago

svenphilipsen commented 1 year ago

When overwriting the #actions template to get your own labels on button, the hiding of the "previous button" on first step is not activated anymore. To hide it the same way as in the VTour.vue file we would have to be able to access the currentStep prop value - can it therefor be made available?

<VTour :steps="steps" startDelay='1000' autoStart highlight>
    <template #actions="{ nextStep, prevStep }">
        <div class="vjt-actions">
            <button type="button" @click.prevent="prevStep">Go back</button>
            <button type="button" @click.prevent="nextStep">Go on</button>
        </div>
    </template>
</VTour>
svenphilipsen commented 1 year ago

The same is the case for my "Go on" button, when I want it to become a "Finish" button.

GlobalHive commented 1 year ago

Good catch 👍 I'll add it as soon as i'm back from vacation

GlobalHive commented 1 year ago

Fixed I added a new prop "buttonLabel" if you just want to change the labels (See documentation -> Props) Else you have now access to the "step" variable, which contains the "currentStep"

You should be able to update the package right now