What is the problem that the function executed by vue cannot be called without the component?

clipboard.png

the official website says that this is the function called after destroying the vue instance. Mine just left the routing interface and did not call it. This is because no vue scaffolding generated only one root instance that destroyed the page. Is there any way to call the function when leaving the vue component

?

beforeRouteLeave hook
see ide/advanced/navigation-guards.html-sharp%E7%BB%84%E4%BB%B6%E5%86%85%E7%9A%84%E5%AE%88%E5%8D%AB" rel=" nofollow noreferrer "> vue-router document

Menu