当页面有一个跳转时
const {
href } = this.$router.resolve({
name: "router-name",
query: {
id: 1
}
});
window.open(href, '_blank');
当页面有多个跳转时
let routeOne = this.$router.resolve({
name: "router-one",
query: {
id: 1
}
});
window.open(routeOne.href, '_blank');
let routeTwo = this.$router.resolve({
name: "router-two",
query: {
id: 1
}
});
window.open(routeTwo.href, '_blank');