fix: 🐛 不显示头像时,头像图片请求一直发送

This commit is contained in:
log1997
2025-12-31 12:10:33 +08:00
parent ae73097e1a
commit a907a0dad6

View File

@@ -125,15 +125,20 @@ export function useViewModel() {
detail.style.display = 'none'
element.appendChild(detail)
if (isShowAvatar.value) {
const avatar = document.createElement('img')
avatar.className = 'card-avatar'
avatar.src = tableData.value[i].avatar
avatar.alt = 'avatar'
avatar.style.width = '140px'
avatar.style.height = '140px'
if (!isShowAvatar.value)
avatar.style.display = 'none'
element.appendChild(avatar)
}
else {
const avatarEmpty = document.createElement('div')
avatarEmpty.style.display = 'none'
element.appendChild(avatarEmpty)
}
element = useElementStyle(element, tableData.value[i], i, patternList.value, patternColor.value, cardColor.value, cardSize.value, textSize.value)
const object = new CSS3DObject(element)