$route: 路由记录对象,获取与路由相关的信息
{
fullPath: "/my"
hash: ""
matched: [{…}]
meta: {}
name: "my"
params: {}
path: "/my"
query: {}
}
$router: 路由对象,用编程式导航的方式实现路由跳转
$router.push()
$router.replace()
$router.go()
$route: 路由记录对象,获取与路由相关的信息
{
fullPath: "/my"
hash: ""
matched: [{…}]
meta: {}
name: "my"
params: {}
path: "/my"
query: {}
}
$router: 路由对象,用编程式导航的方式实现路由跳转
$router.push()
$router.replace()
$router.go()