From 3266e405c7325d123a178686b7ed83c3914053d7 Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Mon, 22 Jul 2024 17:38:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E6=B6=88=E5=A4=B1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/components/login-layout/index.vue | 14 ++++++-------- .../components/top-bar/avatar/AboutDialog.vue | 11 +++++++---- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/ui/src/components/login-layout/index.vue b/ui/src/components/login-layout/index.vue index efd88c993..9d9b87dca 100644 --- a/ui/src/components/login-layout/index.vue +++ b/ui/src/components/login-layout/index.vue @@ -3,7 +3,7 @@
- + @@ -16,6 +16,7 @@ import { computed } from 'vue' import { getThemeImg } from '@/utils/theme' import useStore from '@/stores' +import { request } from '@/request' defineOptions({ name: 'LoginLayout' }) const { user } = useStore() @@ -31,15 +32,12 @@ const fileURL = computed(() => { } }) -const loginImageStyle = computed(() => { +const loginImage = computed(() => { if (user.themeInfo?.loginImage) { - return { - backgroundImage: `url(${fileURL.value})` - } + return `${fileURL.value}` } else { - return { - backgroundImage: `url(src/assets/theme/${getThemeImg(user.themeInfo?.theme)}.jpg)` - } + return new URL(`../../assets/theme/${getThemeImg(user.themeInfo?.theme)}.jpg`, import.meta.url) + .href } }) diff --git a/ui/src/layout/components/top-bar/avatar/AboutDialog.vue b/ui/src/layout/components/top-bar/avatar/AboutDialog.vue index c5bef4e56..fc8bd380a 100644 --- a/ui/src/layout/components/top-bar/avatar/AboutDialog.vue +++ b/ui/src/layout/components/top-bar/avatar/AboutDialog.vue @@ -2,7 +2,7 @@