vue-owl-carousel icon indicating copy to clipboard operation
vue-owl-carousel copied to clipboard

Owl not work in a v-for loop

Open aboutsam opened this issue 6 years ago • 4 comments

how do i insert the images via v-for loop?

i tried:

carousel v-for="(image,index) in images"
img :src="image.url"

and:

img v-for="(image, index) in images" :src="image.url"

both not work.

aboutsam avatar Jul 21 '19 00:07 aboutsam

If you load the images dinamically, the carousel component dont wait until data is loaded.

Try this:

<carousel v-if="loaded">
    <img v-for="(image, index) in images" :src="image.url">
</carousel>

And after load 'images' data you need to set loaded to true;

50l3r avatar Jul 30 '19 10:07 50l3r

oh ! it works..

mounted () { if(this.getImages !== null) { this.loaded = true; } }

thx a lot!

aboutsam avatar Aug 01 '19 20:08 aboutsam

it works!!!1

Juanver avatar Oct 05 '20 06:10 Juanver

didn't work for me! :'(

Achraffawzi avatar Jul 18 '21 09:07 Achraffawzi