为MessageCard组件添加图片加载事件,更新MessageView以处理图片加载完成后的滚动事件

This commit is contained in:
jxxghp
2025-06-15 07:59:35 +08:00
parent 17ee5f456a
commit 9c386f8533
2 changed files with 10 additions and 1 deletions

View File

@@ -10,6 +10,9 @@ const props = defineProps({
height: String,
})
// 定义事件
const emit = defineEmits(['imageload'])
// 图片是否加载完成
const isImageLoaded = ref(false)
@@ -19,6 +22,7 @@ const imageLoadError = ref(false)
// 图片加载完成
async function imageLoaded() {
isImageLoaded.value = true
emit('imageload')
}
// 链接打开新窗口