-1👍
If you are using vue-router
you can use router guards in the component (as well as in the router file) where you have beforeRouteLeave
obviously only works where there is a change in route, see here:
https://router.vuejs.org/guide/advanced/navigation-guards.html#in-component-guards
- [Vuejs]-Vue JS How to remove zombie event?
- [Vuejs]-How to make subsequent axios call for the array result of the first axios call?
Source:stackexchange.com