From cb2fb57fdbee6733c01fc3e89e1fa910bf970bc5 Mon Sep 17 00:00:00 2001 From: yuetsh <517252939@qq.com> Date: Wed, 30 Sep 2026 08:47:57 +0800 Subject: [PATCH] =?UTF-8?q?style(=E6=8F=90=E4=BA=A4=E5=88=97=E8=A1=A8):=20?= =?UTF-8?q?=E3=80=8C=E9=87=8D=E6=96=B0=E5=88=A4=E9=A2=98=E3=80=8D=E6=98=AF?= =?UTF-8?q?=E5=8F=B3=E4=B8=8A=E8=A7=92=E6=9C=80=E6=98=BE=E7=9C=BC=E7=9A=84?= =?UTF-8?q?=E6=8C=89=E9=92=AE=EF=BC=8C=E4=B8=8A=E8=AF=BE=E5=8D=B4=E6=9C=80?= =?UTF-8?q?=E7=94=A8=E4=B8=8D=E4=B8=8A=EF=BC=8C=E6=94=B6=E8=BF=9B=E3=80=8C?= =?UTF-8?q?=E2=8B=AF=E3=80=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- .../submission/components/SubmissionPane.vue | 97 +++++++++++-------- 1 file changed, 58 insertions(+), 39 deletions(-) diff --git a/apps/web/src/oj/submission/components/SubmissionPane.vue b/apps/web/src/oj/submission/components/SubmissionPane.vue index caec23b..52272de 100644 --- a/apps/web/src/oj/submission/components/SubmissionPane.vue +++ b/apps/web/src/oj/submission/components/SubmissionPane.vue @@ -210,12 +210,27 @@ function caseColor(result: number) { } const canRejudge = computed(() => props.teacher && !props.contest) -const moreOptions = computed(() => [ - { label: "复制回到题目", key: "problem" }, - ...(shown.value?.language !== "SQL" ? [{ label: "复制到自测猫", key: "cat" }] : []), -]) +/** + * 老师的「⋯」:复制两项 + 重新判题。重判不常用、点错了会真的重判,所以不放在外面当最显眼的 + * 那个按钮。代码还没拉下来时只有重判一项 —— 代码拉不下来的那条,恰恰可能要重判 + */ +const moreOptions = computed(() => { + const copy = shown.value + ? [ + { label: "复制回到题目", key: "problem" }, + ...(shown.value.language !== "SQL" ? [{ label: "复制到自测猫", key: "cat" }] : []), + ] + : [] + if (!canRejudge.value) return copy + return [ + ...copy, + ...(copy.length ? [{ type: "divider", key: "divider" }] : []), + { label: "重新判题", key: "rejudge" }, + ] +}) function handleMore(key: string) { + if (key === "rejudge") return emit("rejudge", props.row.id) if (!shown.value) return if (key === "problem") copyToProblem(shown.value) else copyToCat(shown.value) @@ -285,46 +300,50 @@ function openStandalone() { 题单 {{ row.problemSet.title }}
- - - - 重新判题 - -