2

I use carousel component from https://vuetifyjs.com/en/components/carousels

<section v-show="artistImagesList.length > 0">
    <v-carousel>
        <v-carousel-item v-for="(nextArtistImage,i) in artistImagesList" :src="nextArtistImage.image_url" :key="nextArtistImage.id" :alt="nextArtistImage.image_url">
            <div class="carousel_image_title">{{ concatStr(nextArtistImage.description, 100) }}</div>
        </v-carousel-item>
    </v-carousel>
</section>

Using it I need more options to control some images like

1) If images are too big in width/height I want to show images with size ratio of carousel size. Is it possibel?

2) How set max width/height for image area?

3) When I open page with seconds interval default I see empty carousel area and only after interval default seconds first image is opened. I set valid list of images, without empty elements. But looks like some empty image is opened at first.

Is it wrapper of some library? Can I get access to its options? Please give reference to example how to make it...

Packages used

vue.js2.5.7

vuetify,1.0.8

2

1 Answer 1

2

For number 2) to set the carousel to 400px width and height, I'm currently using the following code. But to answer 1) you can set these values to whatever you want.

   <v-flex xs12 style="width:100%; max-width:400px; margin: auto 0">
        <v-carousel cycle hide-delimiters style="width:100%; max-height:400px" class="white">
          <v-carousel-item v-for="(item,i) in images" :src="baseUrl+item.url" :key="i"></v-carousel-item>
        </v-carousel>
      </v-flex>

And for 3, if you're getting this error because you're loading images through axios (like i was) it can be fixed with adding a v-if to the carousel. v-if="myloadedimages.length > 0". This way the carousel will only be shown once the images have been loaded, and the first image will display.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.