Does a vue, route jump from the current page trigger a life-cycle hook function?

does the vue, route jump from the current page trigger the hook function that declares the period

Aug.12,2021

triggers the hook function that enters the page. If the current page does not take action, there is no hook triggered

There are many cases of

this,
the first: the route to which you jump is a child of the current route and there are < router-view > < / router-view > hook functions in the current page that do not trigger the life cycle at this time.
second: in addition to the first routing relationship, keep-alive is set, so the hook function of the life cycle will not be triggered at this time.

<keep-alive>
  <router-view></router-view>
</keep-alive>

other conditions trigger life cycle beforeDestroy , destroyed


beforeRouteLeave,beforeDestroy,destroyed will trigger
if you jump to a tag or location.href, these will not trigger

.
Menu