<template>
<v-carousel hide-delimiters>
<v-carousel-item
v-for="(item,i) in items"
:key="i"
:src="item.src"
></v-carousel-item>
</v-carousel>
</template>
<script>
export default {
data () {
return {
items: [
{
src: '@/assets/img1.jpg',
},
{
src: '@/assets/img2.jpg',
},
],
}
},
}
import image1 from '../assets/img1.jpg'; // Путь прямой, не через @
import image2 from '../assets/img1.jpg';
export default {
data: () => ({
items: [image1, image2]
})
}
<v-carousel-item
v-for="(item,i) in items"
:key="i"
:src=" `http://***/img${i}.jpg` "
></v-carousel-item>
</v-carousel>