vue新頁面打開

傳參: 
this.$router.push({
        name:'xxx',
        params:{
          id:id
        }
      })
  
接收參數:
this.$route.params.id

 

傳參: 
this.$router.push({
        path:'/xxx',
        query:{
          id:id
        }
      })
  
接收參數:
this.$route.query.id
window.open(href, '_blank')
<router-link tag="a" :to="{}" target="_blank"></router-link>

 

 <router-link target="_blank"></router-link>

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章