fix: dark mode toggle
if isDark is set to false, it will jump this judgement and use the system prefers if isDark is not set to wsCache it will return null by default
This commit is contained in:
parent
9b8f3234db
commit
bbc764601e
|
@ -20,7 +20,7 @@ const { wsCache } = useCache()
|
||||||
|
|
||||||
// 根据浏览器当前主题设置系统主题色
|
// 根据浏览器当前主题设置系统主题色
|
||||||
const setDefaultTheme = () => {
|
const setDefaultTheme = () => {
|
||||||
if (wsCache.get('isDark')) {
|
if (wsCache.get('isDark') !== null) {
|
||||||
appStore.setIsDark(wsCache.get('isDark'))
|
appStore.setIsDark(wsCache.get('isDark'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue