fix(手机): 点开提交、班级详情、自学目录这类整屏的东西,按返回直接退出了整页,现在是先关掉它
Deploy / deploy (push) Canceled after 0s

- 提交列表:手机上点开一条,地址带上 ?id=,返回键就是关详情回到列表;刷新、转发链接
  也还停在这一条;上一条 / 下一条、翻页、滚动位置都在;详情里点「只看他」先关详情再筛选
- 看板讲错误、排名班级详情、自学目录、题目页底部抽屉:手机上按返回只关它(useBackClose);
  在自学目录里选一课,返回是回到上一课,不多一站
- 分页列表(提交、题目、比赛、后台几个列表)用浏览器后退翻回前一页时会多压一条历史,
  前进的记录被冲掉、返回要多按一次 —— 电脑上也是,一起修了

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
xuyueandClaude Opus 5.5 committed 2026-10-15 11:55:30 +08:00
1 parent c149b0a194
commit 90ce1ab0f5
7 files changed
+200 -15

No files matched your search

+3
View File
@@ -6,6 +6,7 @@ import type { Exercise } from "utils/types"
import { getExercises, getLearnProgress, getTutorial, getTutorials } from "../api"
import { parseLesson } from "./composables/useLessonParse"
import { useLearnTrace } from "./composables/useLearnTrace"
import { useBackClose } from "shared/composables/backClose"
import { useBreakpoints } from "shared/composables/breakpoints"
import { useUserStore } from "shared/store/user"
import {
@@ -52,6 +53,8 @@ const solvedIds = ref(new Set<number>())
const loading = ref(true)
const isEmpty = ref(false)
const menuOpen = ref(false)
// 手机上的目录是大半屏的底部抽屉:按返回键收起它,不是退出这一课
useBackClose(menuOpen, () => !isDesktop.value)
const groups = computed(() => groupByProject(titles.value))
const parsed = computed(() =>