Closed HugoSbl closed 6 months ago
Excuse me, did you solve it? I also encountered the same problem.
I didn't ! That's too bad, but I had to did it custom
ok,thanks
Hey, I was able to get it working with Nuxt 3 and Vue.js Composition API.
You need to wrap each <img>
tag with an <a>
tag. You'll also need to make sure the data-src
and data-lg-size
are set.
Here's an example of my setup using NuxtImg:
<a v-for="image in images"
:data-src="image.url"
:data-lg-size="image.width + '-' + image.height"
>
<NuxtImg
:key="image.id"
:id="image.id"
:src="image.url"
:alt="image.name"/>
</a>
I hope this helps!
hey, I really hope it will be usefull for someone, thanks a lot !
Description
The lightgallery doesn't works in vue 3 with nuxt 3 with composition api.
Steps to reproduce
JS code that you use to initialize lightGallery.
Additional Context