feat: 支持Dark Mode

This commit is contained in:
shaw
2025-08-22 22:09:38 +08:00
parent 8328b6ddac
commit d2f0ac37a9
37 changed files with 3226 additions and 1155 deletions

View File

@@ -11,14 +11,22 @@
<script setup>
import { onMounted, ref } from 'vue'
import { useAuthStore } from '@/stores/auth'
import { useThemeStore } from '@/stores/theme'
import ToastNotification from '@/components/common/ToastNotification.vue'
import ConfirmDialog from '@/components/common/ConfirmDialog.vue'
const authStore = useAuthStore()
const themeStore = useThemeStore()
const toastRef = ref()
const confirmRef = ref()
onMounted(() => {
// 初始化主题
themeStore.initTheme()
// 监听系统主题变化
themeStore.watchSystemTheme()
// 检查本地存储的认证状态
authStore.checkAuth()