0๐
If you want to re-render/reload a component:
- call
this.$forceUpdate();
on the event onclick on your tab.
Or you can link a variable to your component by using the :key attribute.
<component :key="changingVariable" @click="reRenderComponent()"/>
export default () {
data() {
return {
changingVariable: 0,
}
},
methods: {
reRenderComponent() {
this.changingVariable += 1
}
}
}
and everytime you click, the variable will be incremented and vuejs will re render the component linked to changingVariable
.
- [Vuejs]-How can I select the input value after clicking on a button?
- [Vuejs]-Add custom error page for static directory in nuxt 2
Source:stackexchange.com