feat: 新增主题跟随系统

新增主题跟随系统
This commit is contained in:
theo
2025-12-25 17:06:39 +08:00
parent 39859aebd5
commit 3b7a1b0254
4 changed files with 38 additions and 3 deletions

View File

@@ -23,7 +23,7 @@
<script setup lang="ts">
import { useSettingsStore } from "@/store";
import { ThemeMode } from "@/enums";
import { Moon, Sunny } from "@element-plus/icons-vue";
import { Moon, Sunny, Monitor } from "@element-plus/icons-vue";
const { t } = useI18n();
const settingsStore = useSettingsStore();
@@ -31,6 +31,7 @@ const settingsStore = useSettingsStore();
const theneList = [
{ label: t("login.light"), value: ThemeMode.LIGHT, component: Sunny },
{ label: t("login.dark"), value: ThemeMode.DARK, component: Moon },
{ label: t("login.auto"), value: ThemeMode.AUTO, component: Monitor },
];
const handleDarkChange = (theme: ThemeMode) => {