vue跳转页面传参取参
//传参this.$router.push({path:'/Show_blog',//地址,路由跳转index里面的地址query:{//传的参数id:id,userName:name}})//取参//在跳转到的那个页面const id = this.$route.query.idconst userName = this.$route.query.use...
·
//传参
this.$router.push({
path:'/Show_blog',//地址,路由跳转 index里面的地址
query:{//传的参数
id:id,
userName:name
}
})
//取参
//在跳转到的那个页面
const id = this.$route.query.id
const userName = this.$route.query.userName
更多推荐
已为社区贡献3条内容
所有评论(0)