Skip to content

v0.7.0

Compare
Choose a tag to compare
@yyx990803 yyx990803 released this 12 Oct 00:30
· 1467 commits to dev since this release

Breaking

  • Exact match class (.v-link-active-exact) has been removed. Instead, you can now use the exact option to specify the active class matching mode for a given v-link:

    <a v-link="{ path: '/', exact: true }"></a>

    This link will only have the .v-link-active class when the path matches / exactly.

New

  • v-link now has a few extra options:

    • replace

      A link with replace: true will call router.replace() instead of router.go() when clicked, so the navigation will not leave a history record.

      <a v-link="{ path: '/abc', replace: true }"></a>
    • append

      A relative link with append: true always append the relative path to the current path. For example, assuming we are navigating from /a to a relative link b, without append: true we will end up at /b, but with append: true we will end up at /a/b.

      <a v-link="{ path: 'relative/path', append: true }"></a>
    • activeClass

      This option allows a specific link to override the router's global linkActiveClass option and have its own active class.

      <a v-link="{ path: '/abc', activeClass: 'special-active' }">
  • router.go() now also supports the append option for relative paths:

    router.go({
      path: 'relative/path',
      append: true
    })
  • The $route object now also exposes the matched property, which is an array containing all the configuration objects for matched segments in the current route.

  • Router-related warnings now will also print stack traces when Vue.config.debug is set to true.

Fixed

  • Compatibility with Vue.js 1.0.0-beta.4
  • Invalid component warning showing undefined
  • Relative path resolution edge cases