We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
error
1 parent ec605f9 commit a79fc71Copy full SHA for a79fc71
packages/nuxt/src/runtime/components/UnLazyImage.vue
@@ -66,6 +66,7 @@ const props = withDefaults(
66
67
const emit = defineEmits<{
68
(event: 'loaded', image: HTMLImageElement): void
69
+ (event: 'error', error: Event): void
70
}>()
71
72
const unlazy = useRuntimeConfig().public.unlazy as ModuleOptions
@@ -145,6 +146,7 @@ onBeforeUnmount(() => {
145
146
:data-srcset="srcSet"
147
:data-sizes="autoSizes ? 'auto' : undefined"
148
loading="lazy"
149
+ @error="emit('error', $event)"
150
>
151
</picture>
152
<img
@@ -156,5 +158,6 @@ onBeforeUnmount(() => {
156
158
157
159
160
161
162
163
</template>
0 commit comments