vue中打开新页面以post形式传递参数
const href = this.$router.resolve({
name:'跳转路径',//此为Router路由配置文件中对应的name值
params:{
参数名:值,
参数名:值,
.....
}
})
window.open(href.href, '_blank')
vue中打开新页面以get形式传递参数
const href = this.$router.resolve({
path:'跳转路径',//此为Router路由配置文件中对应的name值 格式/path
query:{
参数名:值,
参数名:值,
.....
}
})
window.open(href.href, '_blank')
欢迎大家访问我的个人博客:http://blog.ycsn.xyz/