You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please add the same functionality but for an after() step function. A callback for that specific step.
There are some cases where I would like to make XHR requests or modify the page contents after a step has loaded, not before. My current workaround is so:
//in case we have an after at the start, make sure it's triggeredonStartCallback(){this.runAnAfter();}previousStepCallback(){--this.vueTour.currentPageStep;this.runAnAfter();}nextStepCallback(){++this.vueTour.currentPageStep;this.runAnAfter();}runAnAfter(){conststep=this.vueTour.currentPageStep;if(this.vueTour.steps[step].after){// @ts-ignorethis.vueTour.steps[step].after();}}
Then I've expanded the steps object to include that function
{target: '.not-found-wrapper',content: this.$t('vueTour.welcome.page.home.step2')asstring,params: {placement: VueTourPlacement.Top},before: ()=>newPromise((resolve)=>{//some logic hereresolve(true);}),after: ()=>newPromise((resolve)=>{//some logic here - e.g. xhr request prepares content for the next step without delaying the experience of loading the current stepresolve(true);})},
The text was updated successfully, but these errors were encountered:
Before step is described here: https://github.com/pulsardev/vue-tour/wiki/Features
Please add the same functionality but for an after() step function. A callback for that specific step.
There are some cases where I would like to make XHR requests or modify the page contents after a step has loaded, not before. My current workaround is so:
Then I've expanded the steps object to include that function
The text was updated successfully, but these errors were encountered: