From 4ef27945526d5a509650e22cce1e07591cb7f314 Mon Sep 17 00:00:00 2001 From: yuetsh <517252939@qq.com> Date: Fri, 9 Oct 2026 20:14:36 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=90=8E=E5=8F=B0):=20=E5=87=BA=E9=A2=98?= =?UTF-8?q?=E9=A1=B5=E8=AF=BB=E5=9B=9E=E6=9D=A5=E7=9A=84=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=AF=8F=E7=BB=84=E5=A4=9A=E4=B8=80=E8=A1=8C?= =?UTF-8?q?=E7=A9=BA=E7=99=BD=EF=BC=9B=E5=AF=BC=E5=85=A5=E5=A4=A7=E5=8C=85?= =?UTF-8?q?=E5=90=8E=E5=8E=9F=E6=9D=A5=E7=9A=84=E4=BE=8B=E5=AD=90=E4=B8=A2?= =?UTF-8?q?=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 测试点文件末尾的换行读回来时去掉(上传时补回去),比对改没改过也按去掉后的比,没改的题不会白白重传 - 导入超过 100 组的 zip 时先把例子拿下来再切成「不展开」,例子不再丢 - 「不展开」时保存栏改说「加一个例子」;刚导入还没保存时不给「下载 zip」(下到的是库里的旧数据) Co-Authored-By: Claude Opus 5.5 --- .../admin/problem/components/CodePreview.vue | 6 +++++- .../src/admin/problem/components/caseRows.ts | 13 ++++++++++++- apps/web/src/admin/problem/detail.vue | 19 ++++++++++++++----- 3 files changed, 31 insertions(+), 7 deletions(-) diff --git a/apps/web/src/admin/problem/components/CodePreview.vue b/apps/web/src/admin/problem/components/CodePreview.vue index fe6d743..4e70cdb 100644 --- a/apps/web/src/admin/problem/components/CodePreview.vue +++ b/apps/web/src/admin/problem/components/CodePreview.vue @@ -27,6 +27,8 @@ const props = defineProps<{ examples: { input: string; output: string }[] /** 例子来自哪几组,比如「测试数据第 1–4 组」 */ examplesNote: string + /** 测试数据太大不展开、例子单独写的时候 */ + bigData?: boolean languages: LANGUAGE[] templates: Partial> astRules: AstRules | null @@ -196,7 +198,9 @@ onMounted(() => nextTick(render))
{{ sample.output }}
-

在左边的测试数据里勾几组「当例子」

+

+ {{ bigData ? "在左边加一个例子" : "在左边的测试数据里勾几组「当例子」" }} +