生命周期
mounted: function() {
console.log('$route.path', this.$route.path);
console.log('$route.query', this.$route.query);
console.log('$route.router', this.$route.router);
console.log('$route.matched', this.$route.matched);
console.log('$route.name', this.$route.name);
// $route.path 当前路由对象的路径,如'/vi
// $route.query 请求参数,如/foo?user=1获取到query.user = 1
// $route.router 所属度路由器以及所属组件信息
// $route.matched 数组,包含当前匹配的路径中所包含的所有片段所对应的配置参数对象。
// $route.name 当前路径名字
},