After adding v-if to the component, the component will not be destroyed if the condition is false.
MeiM13 opened this issue · 2 comments
After adding v-if to the component, the component will not be destroyed if the condition is false.
Because the step configuration information is generated dynamically, an error occurs during the initial parsing:
<v-tour name="myTour" :steps="guideInfo.steps" :options="guideInfo.options" :callbacks="guideInfo.callbacks" />

So, an if statement is added:
<v-tour v-if="showTour" name="myTour" :steps="guideInfo.steps" :options="guideInfo.options" :callbacks="guideInfo.callbacks" />
There are no errors now.
But I found that in the console, there was no way to destroy <div class='v-tour'/>

One more question, can the name in the v-tour be dynamically bound?
like:
<v-tour :name="guideInfo.name" :steps="guideInfo.steps" :options="guideInfo.options" :callbacks="guideInfo.callbacks" />
and:
this.$tours[guideInfo.name].start()