暗黑模式下主题样式优化

This commit is contained in:
RuoYi
2026-04-18 12:01:14 +08:00
parent f118c7d24f
commit 9f831e1689
4 changed files with 39 additions and 7 deletions
+4
View File
@@ -1,6 +1,7 @@
import defaultSettings from '@/settings'
import { useDark, useToggle } from '@vueuse/core'
import { useDynamicTitle } from '@/utils/dynamicTitle'
import { handleThemeStyle } from '@/utils/theme'
const isDark = useDark()
const toggleDark = useToggle(isDark)
@@ -46,6 +47,9 @@ const useSettingsStore = defineStore(
toggleTheme() {
this.isDark = !this.isDark
toggleDark()
nextTick(() => {
handleThemeStyle(this.theme)
})
}
}
})