vue 打开新窗口,并传值

论坛 期权论坛 编程之家     
选择匿名的用户   2021-5-29 16:41   11   0

直接上代码

openPage (e) {
      
     toUrl = this.$router.resolve({ path: '/imageView', query: { id: "1" } })
     
      window.open(toUrl.href, '_blank', `height=${h},width=${w},toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no`)

    },

window.open(toUrl.href, '_blank', `height=${h},width=${w},toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no`

这里面是新窗口一些配置,可以自行配置

接口参数

created () {
    const id = this.$route.query.id
    console.log('传值', id)
  },

分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:3875789
帖子:775174
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP