动态路由跳转

186 阅读1分钟
  1. push传字符串 ,也可以传对象 this.$router.push('/heroes/edit')
  2. this.$router.push({name:'路由名称',params:{})
  3. 需要在路由定义中指定name,并且匹配规则也必须改变 {path:'/luyo/:id',name:'路由名称',component:组件}