fix(题目列表): 选了知识点后题目改成按题号排,和平时看惯的「最新的在前」不一样——默认一律按最新创建

排序下拉固定三项:最新创建(默认)/ 按题号 / 最多人做对。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
xuyueandClaude Opus 5.5 committed 2026-10-09 12:57:14 +08:00
1 parent 74af88046e
commit 97426f0895
3 files changed
+10 -13

No files matched your search

+6 -9
View File
@@ -179,15 +179,12 @@ const countText = computed(() => {
return { kind: "total" as const, n: total.value }
})
// ---- 排序:默认随知识点走(选了按题号,全部按最新创建),下拉里显示的是实际生效的那个 ----
const sortOptions = computed(() => {
const byId = !!query.tag
return [
{ label: byId ? "按题号" : "最新创建", value: "" },
{ label: byId ? "最新创建" : "按题号", value: byId ? "new" : "id" },
{ label: "最多人做对", value: "popular" },
]
})
// ---- 排序:默认按最新创建(选了知识点也一样) ----
const sortOptions = [
{ label: "最新创建", value: "" },
{ label: "按题号", value: "id" },
{ label: "最多人做对", value: "popular" },
]
// ---- 出题者 ----
const authorOptions = ref<{ label: string; value: string }[]>([])