vue 路由resolve参数
多个参数传递 编程式导航方式使用this.$router.resolve方法
dofunc () {
showDetail(row) {
const query = {
ajbh: row.ajbh,
xtbh: row.xtbh
}
const { href } = this.$router.resolve({
name: 'casedetail', // 或path: '/casedetail',
query: query
})
window.open(href, '_blank')
}
}
blank跳转的方式是不支持params传递参数的
需要传递的参数很多,通过query传递参数不现实
需要传的参数内的唯一标识符通过query传递到新开的页面。vue 路由resolve参数 多个参数传递 编程式导航方式使用this.$router.resolve方法
dofunc () {
let routeUrl = this.$router.resolve(
{
path: '/abc',
query: {id : 22}
})
window.open(routeUrl.href, '_blank)
}
blank跳转的方式是不支持params传递参数的
需要传递的参数很多,通过query传递参数不现实
需要传的参数内的唯一标识符通过query传递到新开的页面。