Closed
Description
Really simple code:
<nuxt-img format="webp" src="/img/sleepiest-background.png" width="1593" height="717" :class="[backgroundLoaded == true ? 'opacity-100' : 'opacity-0', 'transition-opacity duration-200 ease-in-out']" @load="backgroundLoadComplete" />
<script>
export default {
data() {
return {
backgroundLoaded: false,
};
},
methods: {
backgroundLoadComplete() {
console.log('Background did load!');
this.backgroundLoaded = true;
},
},
};
</script>
Unfortunately the @load event isn't firing, and I'm not sure why.
Using Nuxt 3 (3.0.0) and @nuxt/image-edge (^1.0.0-27827328.bc9ddc0).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment