From 86fd9b813fa6416f2c99b45a3f781384361eb162 Mon Sep 17 00:00:00 2001 From: Outpox Date: Thu, 16 Jan 2020 23:02:32 +0100 Subject: [PATCH] feat(buttons): support global and per step button configuration --- src/components/VStep.vue | 3 ++- src/shared/constants.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/VStep.vue b/src/components/VStep.vue index 6906d64..d1313bd 100644 --- a/src/components/VStep.vue +++ b/src/components/VStep.vue @@ -77,6 +77,7 @@ export default { return { ...DEFAULT_STEP_OPTIONS, ...{ highlight: this.highlight }, // Use global tour highlight setting first + ...{ enabledButtons: this.enabledButtons }, ...this.step.params // Then use local step parameters if defined } } @@ -159,7 +160,7 @@ export default { } }, isButtonEnabled (name) { - return this.enabledButtons.hasOwnProperty(name) ? this.enabledButtons[name] : true + return this.params.enabledButtons.hasOwnProperty(name) ? this.params.enabledButtons[name] : true } }, mounted () { diff --git a/src/shared/constants.js b/src/shared/constants.js index 5b78c7b..3d9ece8 100644 --- a/src/shared/constants.js +++ b/src/shared/constants.js @@ -38,6 +38,7 @@ export const HIGHLIGHT = { export const DEFAULT_STEP_OPTIONS = { enableScrolling: true, highlight: DEFAULT_OPTIONS.highlight, // By default use the global tour setting + enabledButtons: DEFAULT_OPTIONS.enabledButtons, modifiers: { arrow: { element: '.v-step__arrow'