From 7e68e1137152ff95c2a0e5f60f7a23ef4b77338a Mon Sep 17 00:00:00 2001 From: yuetsh <517252939@qq.com> Date: Tue, 13 Oct 2026 22:56:02 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E9=A2=98=E7=9B=AE=E9=A1=B5):=20=E6=89=8B?= =?UTF-8?q?=E6=9C=BA=E4=B8=8A=E5=86=99=E4=BB=A3=E7=A0=81=E9=A1=BA=E6=89=8B?= =?UTF-8?q?=E5=A4=9A=E4=BA=86=EF=BC=9A=E9=94=AE=E7=9B=98=E4=B8=8A=E9=9D=A2?= =?UTF-8?q?=E5=A4=9A=E4=B8=80=E6=8E=92=E5=B8=B8=E7=94=A8=E7=AC=A6=E5=8F=B7?= =?UTF-8?q?=EF=BC=88=E6=8B=AC=E5=8F=B7=E3=80=81=E5=BC=95=E5=8F=B7=E3=80=81?= =?UTF-8?q?=E5=86=92=E5=8F=B7=E3=80=81=E7=BC=A9=E8=BF=9B=E2=80=A6=E7=82=B9?= =?UTF-8?q?=E4=B8=80=E4=B8=8B=E5=B0=B1=E8=BF=9B=E5=8E=BB=EF=BC=8C=E6=8B=AC?= =?UTF-8?q?=E5=8F=B7=E8=87=AA=E5=8A=A8=E9=85=8D=E5=AF=B9=EF=BC=89=EF=BC=8C?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=AD=97=E5=8F=B7=E6=94=B9=E5=B0=8F=E3=80=81?= =?UTF-8?q?=E9=95=BF=E8=A1=8C=E6=8A=98=E8=A1=8C=E4=B8=8D=E5=86=8D=E7=9C=8B?= =?UTF-8?q?=E4=B8=8D=E8=A7=81=E5=8F=B3=E5=8D=8A=E6=88=AA=EF=BC=9B=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E8=BE=93=E5=87=BA=E8=AF=B4=E6=98=8E=E4=B8=8A=E4=B8=8B?= =?UTF-8?q?=E6=8E=92=E3=80=81=E4=BE=8B=E5=AD=90=E4=B8=8D=E5=86=8D=E8=A2=AB?= =?UTF-8?q?=E5=B7=A6=E8=BE=B9=E4=B8=A4=E5=88=97=E6=A0=87=E7=AD=BE=E6=8C=A4?= =?UTF-8?q?=E7=AA=84=EF=BC=9B=E9=A2=98=E5=8D=95=E9=87=8C=E9=82=A3=E6=9D=A1?= =?UTF-8?q?=E4=B8=8D=E5=86=8D=E8=B6=85=E5=87=BA=E5=B1=8F=E5=B9=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- .../src/oj/learn/components/CodeRunBlock.vue | 2 +- .../src/oj/learn/components/ExerciseDebug.vue | 2 +- .../src/oj/learn/components/ExerciseFill.vue | 2 +- .../src/oj/learn/components/ExerciseSort.vue | 2 +- .../src/oj/problem/components/ContextBar.vue | 7 +- .../oj/problem/components/MobileActionBar.vue | 4 +- .../oj/problem/components/ProblemContent.vue | 45 +++++++- .../oj/problem/components/ProblemEditor.vue | 10 +- .../src/oj/problem/components/SymbolKeys.vue | 108 ++++++++++++++++++ apps/web/src/oj/problem/detail.vue | 2 + apps/web/src/oj/problem/utils/errorMark.ts | 5 + apps/web/src/oj/problem/utils/symbolKeys.ts | 75 ++++++++++++ .../learn => shared/extensions}/hangIndent.ts | 14 ++- 13 files changed, 262 insertions(+), 16 deletions(-) create mode 100644 apps/web/src/oj/problem/components/SymbolKeys.vue create mode 100644 apps/web/src/oj/problem/utils/symbolKeys.ts rename apps/web/src/{oj/learn => shared/extensions}/hangIndent.ts (72%) diff --git a/apps/web/src/oj/learn/components/CodeRunBlock.vue b/apps/web/src/oj/learn/components/CodeRunBlock.vue index 3aa3bee..295adde 100644 --- a/apps/web/src/oj/learn/components/CodeRunBlock.vue +++ b/apps/web/src/oj/learn/components/CodeRunBlock.vue @@ -10,7 +10,7 @@ import { explainRuntimeError } from "oj/problem/utils/runtimeError" import { useAuthModalStore } from "shared/store/authModal" import { useUserStore } from "shared/store/user" import { mainWrapExtensions, wrapMain } from "../wrapMain" -import { hangWrapExtensions } from "../hangIndent" +import { hangWrapExtensions } from "shared/extensions/hangIndent" import { useBreakpoints } from "shared/composables/breakpoints" const CodeEditor = defineAsyncComponent(() => import("shared/components/CodeEditor.vue")) diff --git a/apps/web/src/oj/learn/components/ExerciseDebug.vue b/apps/web/src/oj/learn/components/ExerciseDebug.vue index bc96d16..ae9936d 100644 --- a/apps/web/src/oj/learn/components/ExerciseDebug.vue +++ b/apps/web/src/oj/learn/components/ExerciseDebug.vue @@ -2,7 +2,7 @@ import ExerciseResult from "./ExerciseResult.vue" import type { Exercise, ExerciseDebugData } from "utils/types" import { highlightLines } from "shared/highlight" -import { hangStyle } from "../hangIndent" +import { hangStyle } from "shared/extensions/hangIndent" const props = defineProps<{ exercise: Exercise; lang?: string }>() const emit = defineEmits<{ diff --git a/apps/web/src/oj/learn/components/ExerciseFill.vue b/apps/web/src/oj/learn/components/ExerciseFill.vue index 776c34b..bc717ff 100644 --- a/apps/web/src/oj/learn/components/ExerciseFill.vue +++ b/apps/web/src/oj/learn/components/ExerciseFill.vue @@ -2,7 +2,7 @@ import ExerciseResult from "./ExerciseResult.vue" import type { Exercise, ExerciseFillData } from "utils/types" import { highlightWithHoles } from "shared/highlight" -import { hangStyle } from "../hangIndent" +import { hangStyle } from "shared/extensions/hangIndent" const props = defineProps<{ exercise: Exercise; lang?: string }>() const emit = defineEmits<{ diff --git a/apps/web/src/oj/learn/components/ExerciseSort.vue b/apps/web/src/oj/learn/components/ExerciseSort.vue index 1620e07..758b225 100644 --- a/apps/web/src/oj/learn/components/ExerciseSort.vue +++ b/apps/web/src/oj/learn/components/ExerciseSort.vue @@ -4,7 +4,7 @@ import type { Exercise, ExerciseSortData } from "utils/types" import { shuffle } from "../composables/useShuffle" import { highlightLines } from "shared/highlight" import { useBreakpoints } from "shared/composables/breakpoints" -import { hangStyle } from "../hangIndent" +import { hangStyle } from "shared/extensions/hangIndent" const props = defineProps<{ exercise: Exercise; lang?: string }>() const emit = defineEmits<{ diff --git a/apps/web/src/oj/problem/components/ContextBar.vue b/apps/web/src/oj/problem/components/ContextBar.vue index c47257f..6359980 100644 --- a/apps/web/src/oj/problem/components/ContextBar.vue +++ b/apps/web/src/oj/problem/components/ContextBar.vue @@ -311,7 +311,8 @@ onSolvedHere(() => { ‹ {{ setBar.title }} -