From e923965f70b1e0c248fce98ee4b479b710b7b7d7 Mon Sep 17 00:00:00 2001 From: yuetsh <517252939@qq.com> Date: Tue, 13 Oct 2026 01:07:46 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8F=90=E4=BA=A4=E8=AF=A6=E6=83=85):=20?= =?UTF-8?q?=E3=80=8C=E8=BF=99=E9=81=93=E9=A2=98=E4=BA=A4=E4=BA=86=E5=87=A0?= =?UTF-8?q?=E6=AC=A1=E3=80=8D=E6=98=AF=E7=AB=96=E7=9D=80=E6=8E=92=E7=9A=84?= =?UTF-8?q?=EF=BC=8C=E7=BF=BB=E4=B8=8A=E4=B8=80=E6=AC=A1=E3=80=81=E4=B8=8B?= =?UTF-8?q?=E4=B8=80=E6=AC=A1=E6=94=B9=E7=94=A8=20=E2=86=91=20=E2=86=93?= =?UTF-8?q?=EF=BC=8C=E5=92=8C=E6=8F=90=E4=BA=A4=E5=88=97=E8=A1=A8=E4=B8=80?= =?UTF-8?q?=E6=A0=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- apps/web/src/oj/submission/detail.vue | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/apps/web/src/oj/submission/detail.vue b/apps/web/src/oj/submission/detail.vue index 8d8eb15..fa75b6b 100644 --- a/apps/web/src/oj/submission/detail.vue +++ b/apps/web/src/oj/submission/detail.vue @@ -28,7 +28,7 @@ import { classLabel, submissionTimeText } from "./utils" /** * 单独打开的一条提交(设计稿「提交详情重设计」B):左边代码,右边为什么错 + 这道题交的几次。 * 入口是提交列表右栏的「新页面打开」、统计页的方块、后台卡点分析 —— 多半是老师在看某个学生 - * 怎么一次次改对的,所以「这道题交了几次」常驻右栏,← → 一次次翻。 + * 怎么一次次改对的,所以「这道题交了几次」常驻右栏,↑ ↓ 一次次翻。 */ const props = defineProps<{ submissionID: string }>() @@ -126,12 +126,12 @@ function attemptTime(time: string) { return submissionTimeText(time) } -/** 除了正在看的这次,还有别的能点开的才提 ← → */ +/** 除了正在看的这次,还有别的能点开的才提 ↑ ↓ */ const canStep = computed(() => attempts.value.some((item) => item.showLink && item.id !== shown.value?.id), ) -/** 「← →」一次次往前往后翻,跳过题单藏着的那几次 */ +/** 「↑ ↓」一次次往前往后翻,跳过题单藏着的那几次 */ function step(delta: -1 | 1) { const list = attempts.value for (let i = attemptIndex.value + delta; i >= 0 && i < list.length; i += delta) { @@ -148,11 +148,12 @@ function typing(event: KeyboardEvent) { return !!el && (["INPUT", "TEXTAREA", "SELECT"].includes(el.tagName) || el.isContentEditable) } -onKeyStroke(["ArrowLeft", "ArrowRight"], (event) => { +// 和提交列表一样只用 ↑ ↓(用户定的):这几次是竖着排的 +onKeyStroke(["ArrowUp", "ArrowDown"], (event) => { if (typing(event) || event.altKey || event.ctrlKey || event.metaKey || attempts.value.length < 2) return event.preventDefault() - step(event.key === "ArrowLeft" ? -1 : 1) + step(event.key === "ArrowUp" ? -1 : 1) }) const problemLink = computed(() => { @@ -344,7 +345,7 @@ function handleMore(key: string) {

{{ who }}这道题交了 {{ attempts.length }} 次

- ←→ 换一次 + ↑↓ 换一次