头像给默认值

This commit is contained in:
bob
2025-03-21 09:57:17 +08:00
parent e73ba1185d
commit b0f17bac22
2 changed files with 2 additions and 2 deletions

View File

@@ -144,7 +144,7 @@ const handleAvatarError = () => {
watch(
() => userCardData.userInfo.avatarThumb,
(newValue) => {
showAvatar.value = newValue
showAvatar.value = newValue || default_avatar
}
)
</script>

View File

@@ -37,7 +37,7 @@ const onClickAvatar = () => {
router.push('/setting/personal')
}
const showAvatar = ref(userData.user.avatarThumb)
const showAvatar = ref(userData.user.avatarThumb || default_avatar)
const handleAvatarError = () => {
showAvatar.value = default_avatar