Sfoglia il codice sorgente

feat:修复图形暗黑模式获取错误

yanglzh 4 mesi fa
parent
commit
00e816078a
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      src/utils/dataUiOptions.ts

+ 1 - 1
src/utils/dataUiOptions.ts

@@ -1,6 +1,6 @@
 export function getTheme() {
   // ("zen" | "hack" | "concrete" | "")
-  return localStorage.isDark ? 'hack' : ''
+  return localStorage.isDark === '1' ? 'hack' : ''
 }
 
 export function getLineData({ xAxis = [] as any[], datas = [] as number[][], legend = [] as string[], suffix = '', width = 1000, height = 400, responsive = false, zoom = false, modulo = 10, padding = 30, useArea = true }) {