From 27372b309f68bd86ae9fdc0d214167a3ad3c650a Mon Sep 17 00:00:00 2001 From: xlsea Date: Fri, 9 May 2025 16:34:53 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E4=BC=98=E5=8C=96=E6=B0=B4=E5=8D=B0?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/App.vue b/src/App.vue index e617af50..39d6f718 100644 --- a/src/App.vue +++ b/src/App.vue @@ -5,6 +5,7 @@ import type { WatermarkProps } from 'naive-ui'; import { useAppStore } from './store/modules/app'; import { useThemeStore } from './store/modules/theme'; import { naiveDateLocales, naiveLocales } from './locales/naive'; +import { useAuthStore } from './store/modules/auth'; defineOptions({ name: 'App' @@ -12,6 +13,7 @@ defineOptions({ const appStore = useAppStore(); const themeStore = useThemeStore(); +const { userInfo } = useAuthStore(); const naiveDarkTheme = computed(() => (themeStore.darkMode ? darkTheme : undefined)); @@ -24,17 +26,19 @@ const naiveDateLocale = computed(() => { }); const watermarkProps = computed(() => { + const appTitle = import.meta.env.VITE_APP_TITLE || 'RuoYi-Vue-Plus'; return { - content: themeStore.watermark.text, + content: userInfo.user?.userName ? `${userInfo.user?.nickName}@${appTitle} ${userInfo.user?.userName}` : appTitle, cross: true, fullscreen: true, - fontSize: 16, - lineHeight: 16, - width: 384, - height: 384, + fontSize: 14, + fontColor: themeStore.darkMode ? 'rgba(200, 200, 200, 0.03)' : 'rgba(200, 200, 200, 0.2)', + lineHeight: 14, + width: 200, + height: 300, xOffset: 12, yOffset: 60, - rotate: -15, + rotate: -18, zIndex: 9999 }; });