diff --git a/src/App.vue b/src/App.vue index ae338d1..b39f84d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -3,20 +3,26 @@ import { computed } from 'vue'; import type { WatermarkProps } from 'element-plus'; import { useAppStore } from './store/modules/app'; import { useThemeStore } from './store/modules/theme'; +import { useAuthStore } from './store/modules/auth'; import { UILocales } from './locales/ui'; defineOptions({ name: 'App' }); const appStore = useAppStore(); const themeStore = useThemeStore(); - +const authStore = useAuthStore(); const locale = computed(() => { return UILocales[appStore.locale]; }); const watermarkProps = computed(() => { + const content = + themeStore.watermark.enableUserName && authStore.userInfo.userName + ? authStore.userInfo.userName + : themeStore.watermark.text; + return { - content: themeStore.watermark.visible ? themeStore.watermark.text || 'SoybeanAdmin' : '', + content: themeStore.watermark.visible ? content : '', cross: true, fontSize: 16, lineHeight: 16, diff --git a/src/layouts/modules/theme-drawer/modules/page-fun.vue b/src/layouts/modules/theme-drawer/modules/page-fun.vue index 886b464..d0bb8d0 100644 --- a/src/layouts/modules/theme-drawer/modules/page-fun.vue +++ b/src/layouts/modules/theme-drawer/modules/page-fun.vue @@ -123,7 +123,10 @@ const isWrapperScrollMode = computed(() => themeStore.layout.scrollMode === 'wra - + + + +