vue路由跳转

第一种方式 
 <router-link   :target="$store.getters.username ? '_blank' : '_self'" class="course-item-cont" :to="$store.getters.username ? {path: '/VirtualClass/Detail',query:{id:item.id,introductionPath:item.introductionPath,note:item.note,title:item.title}} :{path: '/TT'} " >        
第二种方式
   const routeUrl = this.$router.resolve({

path: "/targetUrl",

query: { id: 96 },

});

window.open(routeUrl.href, "_blank");
参考地址:https://www.cnblogs.com/bu1204/p/15432727.html
posted @ 2023-09-08 13:51  Fast & Furious  阅读(17)  评论(0)    收藏  举报