暗黑模式去除
This commit is contained in:
parent
e550642f0a
commit
d575852b50
|
|
@ -4,7 +4,6 @@ import Cookies from 'js-cookie'
|
|||
|
||||
import ElementPlus from 'element-plus'
|
||||
import 'element-plus/dist/index.css'
|
||||
import 'element-plus/theme-chalk/dark/css-vars.css'
|
||||
import locale from 'element-plus/es/locale/lang/zh-cn'
|
||||
|
||||
import '@/assets/styles/index.scss' // global css
|
||||
|
|
|
|||
|
|
@ -1,10 +1,6 @@
|
|||
import defaultSettings from '@/settings'
|
||||
import { useDark, useToggle } from '@vueuse/core'
|
||||
import { useDynamicTitle } from '@/utils/dynamicTitle'
|
||||
|
||||
const isDark = useDark()
|
||||
const toggleDark = useToggle(isDark)
|
||||
|
||||
const { sideTheme, showSettings, topNav, tagsView, fixedHeader, sidebarLogo, dynamicTitle } = defaultSettings
|
||||
|
||||
const storageSetting = JSON.parse(localStorage.getItem('layout-setting')) || ''
|
||||
|
|
@ -22,7 +18,8 @@ const useSettingsStore = defineStore(
|
|||
fixedHeader: storageSetting.fixedHeader === undefined ? fixedHeader : storageSetting.fixedHeader,
|
||||
sidebarLogo: storageSetting.sidebarLogo === undefined ? sidebarLogo : storageSetting.sidebarLogo,
|
||||
dynamicTitle: storageSetting.dynamicTitle === undefined ? dynamicTitle : storageSetting.dynamicTitle,
|
||||
isDark: isDark.value
|
||||
// 关闭跟随系统的暗黑模式,默认使用亮色模式
|
||||
isDark: false
|
||||
}),
|
||||
actions: {
|
||||
// 修改布局设置
|
||||
|
|
@ -39,8 +36,8 @@ const useSettingsStore = defineStore(
|
|||
},
|
||||
// 切换暗黑模式
|
||||
toggleTheme() {
|
||||
// 如果后续仍需保留“主题模式”按钮,仅切换内部标记,不再操作系统/HTML 的暗黑类名
|
||||
this.isDark = !this.isDark
|
||||
toggleDark()
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue