mirror of
https://gitee.com/lijingbo-2021/open-anylink-web.git
synced 2025-12-30 11:02:25 +00:00
头像更新联动bug
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script setup>
|
||||
import { ref, computed, nextTick } from 'vue'
|
||||
import { ref, computed, nextTick, watch } from 'vue'
|
||||
import {
|
||||
Close,
|
||||
Male,
|
||||
@@ -135,12 +135,18 @@ const onVideoCall = () => {
|
||||
ElMessage.warning('功能开发中')
|
||||
}
|
||||
|
||||
const showAvatar = ref(userCardData.userInfo.avatarThumb || default_avatar)
|
||||
const showAvatar = ref(userCardData.userInfo.avatarThumb)
|
||||
|
||||
const handleAvatarError = () => {
|
||||
console.log('handleAvatarError')
|
||||
showAvatar.value = default_avatar
|
||||
}
|
||||
|
||||
watch(
|
||||
() => userCardData.userInfo.avatarThumb,
|
||||
(newValue) => {
|
||||
showAvatar.value = newValue
|
||||
}
|
||||
)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
@@ -43,6 +43,13 @@ const handleAvatarError = () => {
|
||||
showAvatar.value = default_avatar
|
||||
}
|
||||
|
||||
watch(
|
||||
() => userData.user.avatarThumb,
|
||||
(newValue) => {
|
||||
showAvatar.value = newValue
|
||||
}
|
||||
)
|
||||
|
||||
watch(
|
||||
() => props.isShow,
|
||||
(newValue) => {
|
||||
|
||||
Reference in New Issue
Block a user