mirror of
https://gitcode.com/yangzongzhuan/RuoYi-Vue3.git
synced 2026-05-23 03:18:36 +00:00
暗黑模式下主题样式优化
This commit is contained in:
@@ -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)
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user