fix(自学): 手机上代码折行看着像另起了一行,改回整行横着滑

正文的代码块、填空、排序、找错四处都不折行了,和桌面一样。排序和找错是整组一起滑,
每行卡片一样宽(= 最长那行)。题目页编辑器的折行不动。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
xuyueandClaude Opus 5.5 committed 2026-10-15 13:39:27 +08:00
1 parent 18b11e3730
commit 395be1a19b
5 files changed
+65 -96

No files matched your search

@@ -10,8 +10,6 @@ import { explainRuntimeError } from "oj/problem/utils/runtimeError"
import { useAuthModalStore } from "shared/store/authModal"
import { useUserStore } from "shared/store/user"
import { mainWrapExtensions, wrapMain } from "../wrapMain"
import { hangWrapExtensions } from "shared/extensions/hangIndent"
import { useBreakpoints } from "shared/composables/breakpoints"
const CodeEditor = defineAsyncComponent(() => import("shared/components/CodeEditor.vue"))
@@ -37,12 +35,8 @@ const message = useMessage()
const { copy } = useClipboard({ legacy: true })
const original = computed(() => (props.wrapMain ? wrapMain(props.code) : props.code))
const { isDesktop } = useBreakpoints()
// 手机上折行(见 hangIndent.ts);桌面正文 720 宽,长行少,照旧横着滚
const extensions = computed(() => [
...(props.wrapMain ? mainWrapExtensions : []),
...(isDesktop.value ? [] : hangWrapExtensions),
])
// 手机上也不折行,长行横着滚:折下来的那截看着像另起了一行代码
const extensions = computed(() => (props.wrapMain ? mainWrapExtensions : []))
const value = ref(original.value)
const input = ref("")
const running = ref(false)