Skip to content

组合API中使用onBeforeRouteUpdate和onBeforeRouteLeave触发时机 #1837

Closed Answered by posva
cismylove asked this question in Help and Questions
Discussion options

You must be logged in to vote

This is the intended behavior of these guards: https://router.vuejs.org/zh/guide/advanced/navigation-guards.html#%E5%8F%AF%E7%94%A8%E7%9A%84%E9%85%8D%E7%BD%AE-api

You can use a global navigation guard instead router.beforeResolve() or an after hook router.afterEach()

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by posva
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1836 on May 09, 2023 12:41.