个人路由总结,待更新……
效果:地址+id
1、path固定,直接填地址
this.$router.push({
path:'/roles',
query:{
id:item2.id
}
})
2、path地址通过接口获取,例如配合使用循环来展示的菜单栏
this.$router.push({
path:'/' + item2.path,
query:{
id:item2.id
}
})