vue-router在新窗口打开页面

1. <router-link>标签实现新窗口打开:

<router-link target="_blank" :to="{path:'/app/dataManage/plant/environmentalData',query:{id:'1'}}">新页面打开home页</router-link>

2、编程式导航:

1  let routeUrl = this.$router.resolve({
2           path: "/share",
3           query: {id:96}
4      });
5      window.open(routeUrl.href, '_blank');

 

posted @ 2019-05-30 11:58  happiness86  阅读(2009)  评论(0编辑  收藏  举报