|
16 | 16 | :steps="steps" |
17 | 17 | :options="{ highlight: true }" |
18 | 18 | :callbacks="tourCallbacks" |
19 | | - ></v-tour> |
| 19 | + > |
| 20 | + <template slot-scope="tour"> |
| 21 | + <v-step |
| 22 | + v-for="(step, index) of tour.steps" |
| 23 | + v-if="tour.currentStep === index" |
| 24 | + :key="index" |
| 25 | + :step="step" |
| 26 | + :previous-step="tour.previousStep" |
| 27 | + :next-step="tour.nextStep" |
| 28 | + :stop="tour.stop" |
| 29 | + :is-first="tour.isFirst" |
| 30 | + :is-last="tour.isLast" |
| 31 | + :labels="tour.labels" |
| 32 | + :highlight="tour.highlight" |
| 33 | + > |
| 34 | + <template v-if="tour.isFirst"> |
| 35 | + <div slot="actions"> |
| 36 | + <button |
| 37 | + @click="tour.stop" |
| 38 | + class="v-step__button v-step__button-skip" |
| 39 | + > |
| 40 | + {{ $t('buttons.skipTutorial') }} |
| 41 | + </button> |
| 42 | + <button |
| 43 | + @click="tour.nextStep" |
| 44 | + class="v-step__button v-step__button-next" |
| 45 | + > |
| 46 | + {{ $t('buttons.nextStep') }} |
| 47 | + </button> |
| 48 | + </div> |
| 49 | + </template> |
| 50 | + <template v-if="!tour.isFirst && !tour.isLast"> |
| 51 | + <div slot="actions"> |
| 52 | + <button |
| 53 | + @click="tour.stop" |
| 54 | + class="v-step__button v-step__button-skip" |
| 55 | + > |
| 56 | + {{ $t('buttons.skipTutorial') }} |
| 57 | + </button> |
| 58 | + <button |
| 59 | + @click="tour.previousStep" |
| 60 | + class="v-step__button v-step__button-previous" |
| 61 | + > |
| 62 | + {{ $t('buttons.previousStep') }} |
| 63 | + </button> |
| 64 | + <button |
| 65 | + @click="tour.nextStep" |
| 66 | + class="v-step__button v-step__button-next" |
| 67 | + > |
| 68 | + {{ $t('buttons.nextStep') }} |
| 69 | + </button> |
| 70 | + </div> |
| 71 | + </template> |
| 72 | + <template v-if="tour.isLast"> |
| 73 | + <div slot="actions"> |
| 74 | + <button |
| 75 | + @click="tour.previousStep" |
| 76 | + class="v-step__button v-step__button-previous" |
| 77 | + > |
| 78 | + {{ $t('buttons.previousStep') }} |
| 79 | + </button> |
| 80 | + <button |
| 81 | + @click="tour.stop" |
| 82 | + class="v-step__button v-step__button-stop" |
| 83 | + > |
| 84 | + {{ $t('buttons.finishTour') }} |
| 85 | + </button> |
| 86 | + </div> |
| 87 | + </template> |
| 88 | + </v-step> |
| 89 | + </template> |
| 90 | + </v-tour> |
20 | 91 | </div> |
21 | 92 | </template> |
22 | 93 | <script lang="ts"> |
|
0 commit comments