vue2实现
const { href } = this.$router.resolve({
name: `print_schedule`,
params: {
id
}
});
window.open(href, "_blank");
vue3实现
const router = useRouter();
const { href } = router.resolve({
path: '/pc/articleDetail',
query: {
article_id: utils.encryptCode({ article_id })
}
});
window.open(href, "_blank");