v0.7.0
Breaking
-
Exact match class (
.v-link-active-exact) has been removed. Instead, you can now use theexactoption to specify the active class matching mode for a givenv-link:<a v-link="{ path: '/', exact: true }"></a>
This link will only have the
.v-link-activeclass when the path matches/exactly.
New
-
v-linknow has a few extra options:-
replace
A link with
replace: truewill callrouter.replace()instead ofrouter.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: truealways append the relative path to the current path. For example, assuming we are navigating from/ato a relative linkb, withoutappend: truewe will end up at/b, but withappend: truewe 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
linkActiveClassoption and have its own active class.<a v-link="{ path: '/abc', activeClass: 'special-active' }">
-
-
router.go()now also supports theappendoption for relative paths:router.go({ path: 'relative/path', append: true })
-
The
$routeobject now also exposes thematchedproperty, 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.debugis set totrue.
Fixed
- Compatibility with Vue.js 1.0.0-beta.4
- Invalid component warning showing
undefined - Relative path resolution edge cases