fix(user): bug

- 通过 `用户管理` 修改头像后,切换到 `个人信息` 时头像不同步。
This commit is contained in:
Aqr-K
2024-10-16 23:13:59 +08:00
parent a47d3f10f9
commit 4366fdd4a6
2 changed files with 10 additions and 0 deletions

View File

@@ -184,6 +184,11 @@ onMounted(() => {
fetchUserInfo()
}
})
// 监听 localStorage 中的头像变化
watch(() => store.state.auth.avatar, () => {
nowAvatar.value = store.state.auth.avatar
})
</script>
<template>