From 7d547bfc14cf53e6755db9e613723983d60581b1 Mon Sep 17 00:00:00 2001 From: yuetsh <517252939@qq.com> Date: Wed, 3 Jul 2024 08:33:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E6=8F=90=E4=BA=A4=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E4=B9=9F=E4=BD=BF=E7=94=A8=E5=A4=96=E7=AA=97=E5=8F=A3=E6=89=93?= =?UTF-8?q?=E5=BC=80=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/oj/submission/components/SubmissionLink.vue | 2 +- src/oj/submission/list.vue | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/oj/submission/components/SubmissionLink.vue b/src/oj/submission/components/SubmissionLink.vue index 058ca4e..d2e332f 100644 --- a/src/oj/submission/components/SubmissionLink.vue +++ b/src/oj/submission/components/SubmissionLink.vue @@ -26,6 +26,6 @@ const props = defineProps() defineEmits(["showCode"]) function goto() { - router.push("/submission/" + props.submission.id) + window.open("/submission/" + props.submission.id, "_blank") } diff --git a/src/oj/submission/list.vue b/src/oj/submission/list.vue index 0474a79..190183e 100644 --- a/src/oj/submission/list.vue +++ b/src/oj/submission/list.vue @@ -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,