v0.7.0
Breaking
-
Exact match class (
.v-link-active-exact
) has been removed. Instead, you can now use theexact
option 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-active
class when the path matches/
exactly.
New
-
v-link
now has a few extra options:-
replace
A link with
replace: true
will 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: true
always append the relative path to the current path. For example, assuming we are navigating from/a
to a relative linkb
, withoutappend: true
we will end up at/b
, but withappend: 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 theappend
option for relative paths:router.go({ path: 'relative/path', append: true })
-
The
$route
object now also exposes thematched
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 totrue
.
Fixed
- Compatibility with Vue.js 1.0.0-beta.4
- Invalid component warning showing
undefined
- Relative path resolution edge cases