feat: 项目结构重构优化

This commit is contained in:
Ray.Hao
2025-12-26 12:35:37 +08:00
parent 65ad4fe59f
commit aa374dd2ba
164 changed files with 11305 additions and 3103 deletions

View File

@@ -1,9 +1,9 @@
<template>
<el-config-provider :locale="locale" :size="size">
<!-- 开启水印 -->
<!-- å¼å<EFBFBD>¯æ°´å<EFBFBD>?-->
<el-watermark
:font="{ color: fontColor }"
:content="showWatermark ? defaultSettings.watermarkContent : ''"
:content="showWatermark ? watermarkContent : ''"
:z-index="9999"
class="wh-full"
>
@@ -17,7 +17,7 @@
<script setup lang="ts">
import { useAppStore, useSettingsStore, useUserStore } from "@/store";
import { defaultSettings } from "@/settings";
import { appConfig } from "@/settings";
import { ThemeMode, ComponentSize } from "@/enums";
import AiAssistant from "@/components/AiAssistant/index.vue";
@@ -28,9 +28,10 @@ const userStore = useUserStore();
const locale = computed(() => appStore.locale);
const size = computed(() => appStore.size as ComponentSize);
const showWatermark = computed(() => settingsStore.showWatermark);
const watermarkContent = appConfig.name;
// 只有在启用 AI 助手且用户已登录时才显示
// 使用 userInfo 作为响应式依赖,当用户退出登录时会自动更新
// å<EFBFBD>ªæœ‰åœ¨å<EFBFBD>¯ç”?AI 助æ‰ä¸”用户已登录时æ‰<C3A6>显示
// 使用 userInfo 作为å“<EFBFBD>应å¼<EFBFBD>ä¾<EFBFBD>èµï¼Œå½“ç”¨æˆ·é€€å‡ºç™»å½•æ—¶ä¼šè‡ªåŠ¨æ´æ?
const enableAiAssistant = computed(() => {
const isEnabled = settingsStore.enableAiAssistant;
const isLoggedIn = userStore.userInfo && Object.keys(userStore.userInfo).length > 0;