From bdc67a6a0e66a73f3ed386b0e6014b0604fb68c7 Mon Sep 17 00:00:00 2001 From: yangws <1607839436@qq.com> Date: Thu, 18 Jul 2024 16:00:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=B4=E6=94=B9=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E7=9A=84=E5=90=8C=E6=97=B6=E6=9B=B4=E6=94=B9=E5=A4=B4=E5=83=8F?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/layout/components/Header.vue | 5 ++++- src/renderer/src/views/profile/userAvatar.vue | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/layout/components/Header.vue b/src/renderer/src/layout/components/Header.vue index c63f241..32b5059 100644 --- a/src/renderer/src/layout/components/Header.vue +++ b/src/renderer/src/layout/components/Header.vue @@ -53,7 +53,7 @@ const { ipcRenderer } = window.electron || {} const isMaxSize = ref(false) const router = useRouter() const currentRoute = ref('') -const userImg = new URL(userStore.user.avatar, import.meta.url) +const userImg = ref(new URL(userStore.user.avatar, import.meta.url)) const menus = ref([ { @@ -128,6 +128,9 @@ const emits = defineEmits(['setLayout']) function setLayout() { emits('setLayout'); } +watch(()=> userStore.avatar,() => { + userImg.value = userStore.avatar; +},{deep:true})