@@ -3,8 +3,7 @@ import { useDark, useToggle } from '@vueuse/core'
import { useDynamicTitle } from '@/utils/dynamicTitle'
const isDark = useDark()
-//默认暗黑模式
-isDark.value=true;
+if(isDark.value) isDark.value=false; //固定为深色模式
const toggleDark = useToggle(isDark)
const { sideTheme, showSettings, topNav, tagsView, fixedHeader, sidebarLogo, dynamicTitle } = defaultSettings
@@ -40,7 +39,8 @@ const useSettingsStore = defineStore(
},
// 切换暗黑模式
toggleTheme() {
- this.isDark = !this.isDark
+ if(this.isDark.value) return //深色模式时不切换,保持深色模式
+ this.isDark = !this.isDark
toggleDark()
}
@@ -861,6 +861,7 @@ onMounted(() => {
width: 100%;
height: calc(100vh - 60px);
position: relative;
+ background-color: rgb(42, 42, 42) !important;
.alarm_list{
position: absolute;
z-index: 10;