Преглед на файлове

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
Floyd Li преди 2 години
родител
ревизия
bbc764601e
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      src/App.vue

+ 1 - 1
src/App.vue

@@ -20,7 +20,7 @@ const { wsCache } = useCache()
 
 // 根据浏览器当前主题设置系统主题色
 const setDefaultTheme = () => {
-  if (wsCache.get('isDark')) {
+  if (wsCache.get('isDark') !== null) {
     appStore.setIsDark(wsCache.get('isDark'))
     return
   }