From cdd69764c4eca50f27a2ec97f093e67ea6bbc617 Mon Sep 17 00:00:00 2001 From: yuetsh <517252939@qq.com> Date: Sat, 10 Oct 2026 14:42:48 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E9=A2=98=E7=9B=AE=E5=88=97=E8=A1=A8):=20?= =?UTF-8?q?=E5=90=8C=E6=A0=B7=E4=B8=A4=E4=B8=AA=E7=9F=A5=E8=AF=86=E7=82=B9?= =?UTF-8?q?=EF=BC=8C=E6=9C=89=E7=9A=84=E9=A2=98=E5=86=99=E3=80=8C=E5=8F=96?= =?UTF-8?q?=E4=BD=99=20=C2=B7=20=E9=80=89=E6=8B=A9=E7=BB=93=E6=9E=84?= =?UTF-8?q?=E3=80=8D=EF=BC=8C=E6=9C=89=E7=9A=84=E5=86=99=E3=80=8C=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E7=BB=93=E6=9E=84=20=C2=B7=20=E5=8F=96=E4=BD=99?= =?UTF-8?q?=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 --- apps/web/src/oj/problem/list.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/web/src/oj/problem/list.vue b/apps/web/src/oj/problem/list.vue index 6959e9a..984c199 100644 --- a/apps/web/src/oj/problem/list.vue +++ b/apps/web/src/oj/problem/list.vue @@ -361,8 +361,14 @@ const emptyText = computed(() => { return `${where}没有同时符合这些条件的题` }) +// 按左栏的顺序(题数多的在前)排,同样几个知识点在每道题上的先后才一致 function knowledgeOf(row: ProblemRow) { - return row.tags.filter((name) => tagByName.value.get(name)?.category === "knowledge").join(" · ") + return row.tags + .map((name) => tagByName.value.get(name)) + .filter((tag): tag is Tag => tag?.category === "knowledge") + .sort((a, b) => b.problemCount - a.problemCount) + .map((tag) => tag.name) + .join(" · ") } function mustDo(row: ProblemRow) {