router 与 route 的区别,以及 push 方法的使用
router——所有路由,route——当前路由
router-link相当于是内嵌了一个 this.$router.push 方法。path遇到params,params会失效,相当于只有path
this.$route属性理解
this.$route.matched:里面保存了每一级的路径
this.$route.fullpath或者this.$route.path 保存了完整路径
路由传参
组件接收
router 与 route 的区别,以及 push 方法的使用
router——所有路由,route——当前路由
router-link相当于是内嵌了一个 this.$router.push 方法。path遇到params,params会失效,相当于只有path
this.$route属性理解
this.$route.matched:里面保存了每一级的路径
this.$route.fullpath或者this.$route.path 保存了完整路径
组件接收