Skip to content

Commit

Permalink
feat(buttons): support global and per step button configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Outpox committed Jan 16, 2020
1 parent e176c7b commit 86fd9b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/VStep.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down Expand Up @@ -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 () {
Expand Down
1 change: 1 addition & 0 deletions src/shared/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 86fd9b8

Please sign in to comment.