style: 支持深色主题
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user