mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-27 17:35:06 +08:00
feat: add cache key
This commit is contained in:
@ -4,7 +4,7 @@ import { isDark } from '@/utils/is'
|
||||
import { useAppStore } from '@/store/modules/app'
|
||||
import { useDesign } from '@/hooks/web/useDesign'
|
||||
import { ConfigGlobal } from '@/components/ConfigGlobal'
|
||||
import { useCache } from '@/hooks/web/useCache'
|
||||
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
|
||||
|
||||
const { getPrefixCls } = useDesign()
|
||||
const prefixCls = getPrefixCls('app')
|
||||
@ -15,8 +15,8 @@ const { wsCache } = useCache()
|
||||
|
||||
// 根据浏览器当前主题设置系统主题色
|
||||
const setDefaultTheme = () => {
|
||||
if (wsCache.get('isDark')) {
|
||||
if (wsCache.get('isDark') || wsCache.get('isDark') === 'true') {
|
||||
if (wsCache.get(CACHE_KEY.IS_DARK)) {
|
||||
if (wsCache.get(CACHE_KEY.IS_DARK) || wsCache.get(CACHE_KEY.IS_DARK) === 'true') {
|
||||
appStore.setIsDark(true)
|
||||
} else {
|
||||
appStore.setIsDark(false)
|
||||
|
Reference in New Issue
Block a user