diff --git a/apps/web/src/oj/problem/components/CaseBlocks.vue b/apps/web/src/oj/problem/components/CaseBlocks.vue index e94e973..ee753eb 100644 --- a/apps/web/src/oj/problem/components/CaseBlocks.vue +++ b/apps/web/src/oj/problem/components/CaseBlocks.vue @@ -71,8 +71,8 @@ const label = computed(() => { } .block { - width: 20px; - height: 20px; + width: 22px; + height: 22px; border-radius: 4px; box-sizing: border-box; display: inline-flex; diff --git a/apps/web/src/oj/problem/components/CompileErrorExplain.vue b/apps/web/src/oj/problem/components/CompileErrorExplain.vue index 38e14ca..edfc338 100644 --- a/apps/web/src/oj/problem/components/CompileErrorExplain.vue +++ b/apps/web/src/oj/problem/components/CompileErrorExplain.vue @@ -6,6 +6,7 @@ import { applyFixes, clearErrorMark, currentCode, showErrorMark, showPunctuation import { explainCCompileError } from 'oj/problem/utils/cError' import { explainPythonCompileError } from 'utils/pythonError' import { stripJudgePath } from 'utils/judge' +import SectionHead from './SectionHead.vue' /** * 编译错误的中文说明卡片:Python 的语法错误走 pythonError.ts,C / C++ 的 gcc 报错走 @@ -80,17 +81,17 @@ onUnmounted(clearErrorMark) diff --git a/apps/web/src/oj/problem/components/SampleRunResult.vue b/apps/web/src/oj/problem/components/SampleRunResult.vue index bc56c74..e6cefb4 100644 --- a/apps/web/src/oj/problem/components/SampleRunResult.vue +++ b/apps/web/src/oj/problem/components/SampleRunResult.vue @@ -103,22 +103,14 @@ const current = computed(() => sampleRuns.value[selected.value] ?? null)
- + - - - - - - - + + +
+ 语法要求 +
    +
  • + {{ rule.description }} 当前 {{ rule.actual }} 次 - - - +
  • +
+
{{ msg }}
@@ -386,7 +395,10 @@ const columns: DataTableColumn[] = [ 问过之后,AI 的回答才放进卡片 -->
- 让 AI 分析我的代码 + + + 让 AI 分析我的代码 + {{ customRunHint }} @@ -425,7 +437,24 @@ const columns: DataTableColumn[] = [ align-items: center; flex-wrap: wrap; gap: 8px 16px; - margin-top: 12px; + margin-top: 16px; +} + +.ast-rules { + margin: 0; + padding: 0; + list-style: none; + display: flex; + flex-direction: column; + gap: 4px; + font-size: 16px; + line-height: 1.6; +} + +.ast-rules li { + display: flex; + align-items: center; + gap: 8px; } /* 手机上「让 AI 分析我的代码」占满一行、44px 高,好按 */ diff --git a/apps/web/src/oj/problem/components/WrongAnswerExplain.vue b/apps/web/src/oj/problem/components/WrongAnswerExplain.vue index 3f89265..faa3f81 100644 --- a/apps/web/src/oj/problem/components/WrongAnswerExplain.vue +++ b/apps/web/src/oj/problem/components/WrongAnswerExplain.vue @@ -6,6 +6,7 @@ import { useProblemStore } from 'oj/store/problem' import { markdownToText } from 'oj/problem/utils/plainText' import { JUDGE_STATUS, SubmissionStatus } from 'utils/constants' import { classifyDiff, explainDiff, firstDifferentLine, type SampleCheck } from 'utils/wrongAnswer' +import SectionHead from './SectionHead.vue' /** * 答案错误时的样例对比(数据见后端 judge/run.ts 的 checkSamples)。 @@ -31,6 +32,12 @@ const props = defineProps<{ * 提示句全是对学生说的第二人称,整句换掉人称就读得通 */ peer?: boolean + /** + * 题目页结果页签的样子(设计稿「题目页观感」结果 X):黄色小节标题说哪里不对,说明用正文大小, + * 输入 / 正确输出 / 你的输出竖着排成灰、绿、红三格,和题面的例子一个样子。 + * 不给的话是原来那张浅灰卡片(提交详情页还在用) + */ + section?: boolean }>() const theme = useThemeVars() @@ -114,21 +121,30 @@ function lines(text: string) {