diff --git a/packages/vue/src/components/UnLazyImage.vue b/packages/vue/src/components/UnLazyImage.vue index 0307b24..2b4494c 100644 --- a/packages/vue/src/components/UnLazyImage.vue +++ b/packages/vue/src/components/UnLazyImage.vue @@ -30,6 +30,7 @@ const props = defineProps<{ const emit = defineEmits<{ (event: 'loaded', image: HTMLImageElement): void + (event: 'error', error: Event): void }>() const target = ref() @@ -69,5 +70,6 @@ onBeforeUnmount(() => { :data-srcset="srcSet" :data-sizes="autoSizes ? 'auto' : undefined" loading="lazy" + @error="emit('error', $event)" >