Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

415
Views
Showing multiple images in Vue3-carousel

I've searched the web far and wide for answers, but to no avail.

Could a kind soul please explain to me, a novice, how I get three separate images shown using Vue3-carousel?

I've had a look at the Vue3-carousel docs, but if the solution is there, I'm not seeing it.

<template>
  <section class="productOverview">
    <Carousel :itemsToShow="3" :wrapAround="true">
      <Slide v-for="slide in 3" :key="slide">
        <div class="carousel__item">{{ slide }}</div>
      </Slide>
    </Carousel>
  </section>
</template>

I assume the magic happens somewhere in the script area...

<script>
 import { defineComponent } from "vue";
 import { Carousel, Slide } from "vue3-carousel";
 import "vue3-carousel/dist/carousel.css";
    
 export default defineComponent({
  name: "Autoplay",
  components: {
    Carousel,
    Slide,
  },
});
</script>

Thanks in advance.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Try to create data object with your images url's:

export default defineComponent({
  name: "Autoplay",
  components: {
    Carousel,
    Slide,
  },
  data() {
    return {
      images: [{id: 1,url:'img1url'}, {id: 2,url:'img2url'}, {id: 3,url:'img3url'}]
    }
  }

Then i template loop thru images

 <Slide v-for="(image, index) in images" :key="image.id">
    <img :src="getImage(image.url)" />
    <button v-if="slidesCount > 1" @click="deleteImage(index)">x</button>
  </Slide>

Method for images:

methods: {
  getImage(imagePath) {
    return require(imagePath);
  }
}
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!