Skip to content

v2.5.0

Compare
Choose a tag to compare
@yyx990803 yyx990803 released this 24 Apr 07:24
· 914 commits to dev since this release

New

  • New method: router.beforeResolve(). Registers a global route guard similar to router.beforeEach(), except that it is called right before a navigation is confirmed, after all other guards and async components have been resolved.

  • router.beforeEach, router.beforeResolve and router.afterEach now return a function that removes the registered guard/hook when called.

  • A router-link now also automatically gets a router-link-exact-active class when the current route is an exact match with its destination. The class can also be configured via the exact-active-class prop or the global linkExactActiveClass router option. (@caikan via #1361)

Fixed

  • Ensure consistent path matching priority in all JavaScript environments
  • #1176 ensure wildcard routes are always matched last
  • #1320 avoid triggering beforeRouteUpdate and beforeRouteLeave for instances that are not created yet
  • #1322, #1338 fix hooks losing instance reference when same component is used for mutiple routes
  • #1323 fix active class priority (@posva via #1324)
  • #1329 avoid resolving async components before guards have been resolved