feat(题目): 工具栏加「运行例子」、结果页签加「自己输入」,去掉每个例子旁的「测试」和顶栏的分栏切换
Deploy / deploy (push) Canceled after 0s

- 工具栏「运行例子」:一键用全部例子试跑(Judge0,不算提交),结果进「结果 › 运行例子」,
  每个例子 ✓ / ✕,没对上的沿用答案错误那套中文说明;比赛里只摆输出、不给提示句
  (后端在比赛里故意不做例子对比);SQL 题不给
- 「结果」页签分成提交结果 / 运行例子 / 自己输入三段;「自己输入」顶替顶栏「自测」模式
  那个单独的编辑器
- 试跑出错(编译、运行、超时)给中文说明,Judge0 的英文原文折叠起来
- 例子比对两边都去掉末尾空白:原来只 trim 了运行输出,样例末尾带空格的题永远「不通过」
- 去掉题面里每个例子旁的「测试」、顶栏的「双栏 / 自测 / 题目」切换、EditorForTest 和
  screenMode store

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
xuyueandClaude Opus 5.5 committed 2026-09-28 14:35:58 +08:00
1 parent f4db7dc81c
commit 45505e8384
16 files changed
+562 -374

No files matched your search

@@ -2,13 +2,11 @@
import { Icon } from "@iconify/vue"
import { useBreakpoints } from "shared/composables/breakpoints"
import { useCollabStore } from "shared/store/collab"
import { useScreenModeStore } from "shared/store/screenMode"
/** 由顶栏的姓名下拉菜单打开 */
const show = defineModel<boolean>("show", { default: false })
const collabStore = useCollabStore()
const screenModeStore = useScreenModeStore()
const router = useRouter()
const route = useRoute()
const message = useMessage()
@@ -69,11 +67,6 @@ const handleAccept = (studentId: number, problemId: string, status: string) => {
return
}
collabStore.accept(studentId)
// 协作用的是右侧那个编辑器,而「题目」「自测」两种分屏模式下它根本没挂出来 ——
// 落进那样一个页面就是:学生显示「老师正在帮你」,老师这边什么都没有。
// 跳到另一道题时 detail.vue 的 init() 会重置分屏模式,**停在同一道题上接单
// 不会**(路由没变、组件不重建),所以这里显式重置一次。
screenModeStore.resetScreenMode()
show.value = false
// 已经在这道题的页面上就不跳了(老师正投影着这道题时就是这种)。
// 重复导航在 vue-router 里是一个 rejected promise,不拦一下控制台会报