this.$router实现新窗口打开页面

当我们需要用路由的本地路径打开新标签页时,我们可以用router中的resolve方法

let path  =     this.$router.resolce({
    path:'路径地址',
    query:{
       obj:{
           name:'张三'
       }
    }
 })

window.open(path.herf,'_blank')

猜你喜欢

转载自blog.csdn.net/m0_70547044/article/details/129432584