diff --git a/demo/src/App.vue b/demo/src/App.vue index 3768b62..55e35ba 100644 --- a/demo/src/App.vue +++ b/demo/src/App.vue @@ -77,7 +77,8 @@ export default defineComponent({ }, content: { title: 'Nice to see you here!', - description: 'You can use v-onboarding to show some information about your app, or to explain how to use it', + description: 'You can use v-onboarding to show some information about your app, or to explain how to use it', + html: true } }, { diff --git a/docs/pages/3.props/1.steps.md b/docs/pages/3.props/1.steps.md index ec3b271..6d6c739 100644 --- a/docs/pages/3.props/1.steps.md +++ b/docs/pages/3.props/1.steps.md @@ -13,6 +13,7 @@ title: steps content: { title: "..." description: "..." + html: false }, on: { beforeStep: function (options) { ... }, @@ -29,6 +30,7 @@ title: steps | `content` | `Object` | **Optional** | | `content.title` | `String` | **Optional** | Title to use in onboarding step | | `content.description` | `String` | **Optional** | Description to use in onboarding step | +| `content.html` | `Boolean` | **Optional** | If its set to `true`, the `content.description` will be rendered in the default template using [`v-html`](https://vuejs.org/guide/essentials/template-syntax.html#raw-html) | | `on` | `Object` | **Optional** | | `on.beforeStep` | `Function` `AsyncFunction` | **Optional** | Function to run before showing the step ([More information](/props/hooks#onBeforeStep)) | | `on.afterStep ` | `Function` `AsyncFunction` | **Optional** | Function to run after showing the step ([More information](/props/hooks#onAfterStep)) | diff --git a/docs/pages/3.props/2.options.md b/docs/pages/3.props/2.options.md index b78b93c..fb3c857 100644 --- a/docs/pages/3.props/2.options.md +++ b/docs/pages/3.props/2.options.md @@ -19,7 +19,8 @@ You can override `VOnboardingWrapper`'s options by passing options to `VOnboardi overlay: { enabled: true, padding: 0, - borderRadius: 0 + borderRadius: 0, + preventOverlayInteraction: true }, scrollToStep: { enabled: true, @@ -39,7 +40,8 @@ You can override `VOnboardingWrapper`'s options by passing options to `VOnboardi previousButton: 'Previous', nextButton: 'Next', finishButton: 'Finish' - } + }, + hideNextStepDuringHook: false } ``` --- @@ -50,6 +52,7 @@ You can override `VOnboardingWrapper`'s options by passing options to `VOnboardi | `overlay.enabled` | `Boolean` | `true` | | `overlay.padding` | `Number` `{ top: 0, right: 0, bottom: 0, left: 0 }` | `0` | | `overlay.borderRadius` | `Number` `{ leftTop: 0, rightTop: 0, rightBottom: 0, leftBottom: 0 }` | `0` | +| `overlay.preventOverlayInteraction` | `Boolean` | `true` | | `scrollToStep` | | | | `scrollToStep.enabled` | `Boolean` | `true` | | `scrollToStep.options` | [Scroll Into View Options](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView) | `{ behavior: 'smooth', block: 'center', inline: 'center' }` | @@ -62,7 +65,7 @@ You can override `VOnboardingWrapper`'s options by passing options to `VOnboardi | `labels.previousButton` | `String` | `Previous` | | `labels.nextButton` | `String` | `Next` | | `labels.finishButton` | `String` | `Finish` | - +| `hideNextStepDuringHook` | `Boolean` | `false` | diff --git a/docs/pages/3.props/3.hooks.md b/docs/pages/3.props/3.hooks.md index c1cad5f..4b7e862 100644 --- a/docs/pages/3.props/3.hooks.md +++ b/docs/pages/3.props/3.hooks.md @@ -32,7 +32,7 @@ It runs before the step is 'closed'. ```js { on: { - beforeStep: function (options) { + afterStep: function (options) { // The logic written here will run before hiding the step, and it can be customized with settings } } diff --git a/src/components/VOnboardingStep.vue b/src/components/VOnboardingStep.vue index a71c103..01c0892 100644 --- a/src/components/VOnboardingStep.vue +++ b/src/components/VOnboardingStep.vue @@ -29,7 +29,12 @@

+

{{ step.content.description }}

@@ -93,7 +98,7 @@ export default defineComponent({ if (element && stepElement.value) { show.value = true if (mergedOptions.value?.scrollToStep?.enabled) { - element.scrollIntoView(mergedOptions.value?.scrollToStep?.options) + element.scrollIntoView?.(mergedOptions.value?.scrollToStep?.options) } createPopper(element, stepElement.value, mergedOptions.value.popper); if (mergedOptions.value?.overlay?.enabled) { diff --git a/src/components/VOnboardingWrapper.vue b/src/components/VOnboardingWrapper.vue index f379616..3f8a874 100644 --- a/src/components/VOnboardingWrapper.vue +++ b/src/components/VOnboardingWrapper.vue @@ -1,6 +1,7 @@