ragnarlotus / vue-flux

Image slider which comes with 20 cool transitions
https://ragnarlotus.github.io/vue-flux-docs/demos/demos
MIT License
542 stars 49 forks source link

How would i set the height conditionally? #83

Closed micos7 closed 4 years ago

micos7 commented 4 years ago

I have a series of vertical divs in a loop with vue-flux in each. The problem is that the height is constant even if that particular div has no images. How would I set the height conditionally so height is 0 when there are no images? Thanks for your time.

Screenshot from 2020-08-04 17-56-00

ragnarlotus commented 4 years ago

Hello, the size of the slider is calculated based in the parent when rendered, and is not recalculated if the windows is not resized. But you can call resize to force it to resize.

Let me know that works for you.

Regards!

micos7 commented 4 years ago

Thanks for answering.Resize didn`t do anything in my situation so I used a v-if to only show the component if there are images.

ragnarlotus commented 4 years ago

Oh, I think I missunderstood your question but I'm glad to see that you already achieved what you wanted.

Regards!