Files
ojnext/src/shared/composables/switchScreen.ts
2025-10-05 20:07:41 +08:00

19 lines
412 B
TypeScript

import { ScreenMode } from "utils/constants"
export const { state: screenMode, next: switchScreenMode } = useCycleList(
Object.values(ScreenMode),
{
initialValue: ScreenMode.both,
},
)
export function resetScreenMode() {
screenMode.value = ScreenMode.both
}
export const bothAndProblem = computed(
() =>
screenMode.value === ScreenMode.both ||
screenMode.value === ScreenMode.problem,
)