在 vue2.0 里页面参数是 this.$route.query 或者 this.$route.params 接收 router-link 传的参数.
在路由跳转的时候除了用 router-link 标签以外需要在 script 标签在事件里面跳转, 所以有个方法就是在 script 标签里面写 this.$router.push('要跳转的路径名'),
在写的时候发现这两个为什么不同, 在控制台打出 this 的时候, 发现 $route 和 $router 同时存在
$route 为当前 router 跳转对象里面可以获取 name,path,query,params 等
$router 为 VueRouter 实例, 想要导航到不同 URL, 则使用 $router.push 方法
返回上一个 history 也是使用 $router.go 方法
来源: http://www.bubuko.com/infodetail-2946953.html