Vue3 使用router打开并跳转到一个新窗口

const router = useRouter()

const url = router.resolve({
  path: '/home',
  query: {
    userId: '12345'
  }
})
 window.open(url.href, '_blank')
posted @ 2022-05-12 15:45  CherishTheYouth  阅读(50)  评论(0编辑  收藏  举报