- router-link 方式跳转
<router-link
target="_blank"
:to="{ path: '/task/xxxx', query: { id: 'un_sdg' } }"
>OPEN
</router-link>
- js获取路由跳转
<el-button
type="primary"
size="mini"
class="open-btn"
@click="openReference(item.id)">
OPEN
</el-button>
openReference(id) {
const { href } = this.$router.resolve({
path: "/task/xxxx",
query: { id: id }
});
window.open(href, "_blank");
},