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

@@ -6,6 +6,7 @@ import { getClassDetail } from "oj/api"
import { classLabel } from "oj/submission/utils"
import UserName from "shared/components/UserName.vue"
import { useAIStream } from "shared/composables/aiStream"
import { useBackClose } from "shared/composables/backClose"
import { useBreakpoints } from "shared/composables/breakpoints"
import { parseTime } from "utils/functions"
import { useRankPalette } from "../palette"
@@ -24,6 +25,8 @@ const message = useMessage()
const theme = useThemeVars()
const palette = useRankPalette()
const { isDesktop } = useBreakpoints()
// 手机上占满一屏:按返回键关掉它回到排名
useBackClose(show, () => !isDesktop.value)
const detail = ref<ClassDetail | null>(null)
const loading = ref(false)