diff --git a/src/components/VStep.vue b/src/components/VStep.vue index 98b7804..78ca832 100644 --- a/src/components/VStep.vue +++ b/src/components/VStep.vue @@ -58,6 +58,9 @@ export default { }, highlight: { type: Boolean + }, + debug: { + type: Boolean } }, data () { @@ -77,8 +80,9 @@ export default { }, methods: { createStep () { - // TODO: debug mode - // console.log('[Vue Tour] The target element ' + this.step.target + ' of .v-step[id="' + this.hash + '"] is:', targetElement) + if (this.debug) { + console.log('[Vue Tour] The target element ' + this.step.target + ' of .v-step[id="' + this.hash + '"] is:', this.targetElement) + } if (this.targetElement) { this.enableScrolling() @@ -91,7 +95,9 @@ export default { this.params ) } else { - console.error('[Vue Tour] The target element ' + this.step.target + ' of .v-step[id="' + this.hash + '"] does not exist!') + if (this.debug) { + console.error('[Vue Tour] The target element ' + this.step.target + ' of .v-step[id="' + this.hash + '"] does not exist!') + } this.$emit('targetNotFound', this.step) } }, @@ -113,7 +119,9 @@ export default { } }, isHighlightEnabled () { - console.log(`[Vue Tour] Highlight is ${this.params.highlight ? 'enabled' : 'disabled'} for .v-step[id="${this.hash}"]`) + if (this.debug) { + console.log(`[Vue Tour] Highlight is ${this.params.highlight ? 'enabled' : 'disabled'} for .v-step[id="${this.hash}"]`) + } return this.params.highlight }, createHighlight () { diff --git a/src/components/VTour.vue b/src/components/VTour.vue index 890cfc4..ac52235 100644 --- a/src/components/VTour.vue +++ b/src/components/VTour.vue @@ -10,6 +10,7 @@ :is-last="isLast" :labels="customOptions.labels" :highlight="customOptions.highlight" + :debug="customOptions.debug" >