在提交列表也使用外窗口打开链接

This commit is contained in:
2024-07-03 08:33:22 +08:00
parent 8a4177cdfc
commit 7d547bfc14
2 changed files with 5 additions and 4 deletions

View File

@@ -109,14 +109,15 @@ async function rejudge(submissionID: string) {
function problemClicked(row: Submission) {
if (route.name === "contest submissions") {
router.push({
const path = router.resolve({
name: "contest problem",
params: {
problemID: row.problem,
},
})
window.open(path.href, "_blank")
} else {
router.push("/problem/" + row.problem)
window.open("/problem/" + row.problem, "_blank")
}
}
@@ -225,7 +226,7 @@ const columns = computed(() => {
h(
ButtonWithSearch,
{
onClick: () => router.push("/user?name=" + row.username),
onClick: () => window.open("/user?name=" + row.username, "_blank"),
onSearch: () => (query.username = row.username),
},
() => row.username,