style: 支持深色主题

This commit is contained in:
ccnetcore
2026-01-13 22:55:43 +08:00
parent 6b6ddcf550
commit c2f074cb08
8 changed files with 1484 additions and 24 deletions

View File

@@ -1,13 +1,18 @@
<!-- 欢迎提示词 -->
<script setup lang="ts">
import { Typewriter } from 'vue-element-plus-x';
import { useColorMode } from '@vueuse/core';
import { useTimeGreeting } from '@/hooks/useTimeGreeting';
import { useUserStore } from '@/stores';
const greeting = useTimeGreeting();
const userStore = useUserStore();
const mode = useColorMode();
const username = computed(() => userStore.userInfo?.username ?? '意心Ai一心只为打造更良心的Ai平台');
// 根据主题动态设置雾化背景色
const fogBgColor = computed(() => mode.value === 'dark' ? '#111827' : '#fff');
</script>
<template>
@@ -22,7 +27,7 @@ const username = computed(() => userStore.userInfo?.username ?? '意心Ai
interval: 45,
}"
:is-fog="{
bgColor: '#fff',
bgColor: fogBgColor,
}"
/>
</div>