黑暗模式下全屏不需要设置背景

This commit is contained in:
RuoYi
2026-03-24 16:03:49 +08:00
parent 59b03b6fc5
commit 46cbbb6bea

View File

@@ -85,6 +85,7 @@ const isFullscreen = ref(false)
const { proxy } = getCurrentInstance()
const route = useRoute()
const router = useRouter()
const settingsStore = useSettingsStore()
const visitedViews = computed(() => useTagsViewStore().visitedViews)
const routes = computed(() => usePermissionStore().routes)
@@ -247,7 +248,7 @@ function toggleFullscreen() {
function onFullscreenChange() {
isFullscreen.value = !!document.fullscreenElement
const appMain = document.querySelector('.app-main')
if (appMain) {
if (appMain && !settingsStore.isDark) {
appMain.style.backgroundColor = document.fullscreenElement ? '#fff' : ''
appMain.style.overflowY = document.fullscreenElement ? 'auto' : ''
}