Caption displays a description for an item.
{{ item.alt }}
<Galleria :value="images" :responsiveOptions="responsiveOptions" :numVisible="5" containerStyle="max-width: 640px">
<template #item="{item}">
<img :src="item.itemImageSrc" :alt="item.alt" style="width: 100%; display: block;" />
</template>
<template #thumbnail="{item}">
<div class="grid grid-nogutter justify-content-center">
<img :src="item.thumbnailImageSrc" :alt="item.alt" style="display: block;" />
</div>
</template>
<template #caption="{item}">
<h4 style="margin-bottom: .5rem;">{{item.title}}</h4>
<p>{{item.alt}}</p>
</template>
</Galleria>
import PhotoService from '../../service/PhotoService';
export default {
data() {
return {
images: null,
responsiveOptions: [
{
breakpoint: '1024px',
numVisible: 5
},
{
breakpoint: '768px',
numVisible: 3
},
{
breakpoint: '560px',
numVisible: 1
}
]
}
},
galleriaService: null,
created() {
this.galleriaService = new PhotoService();
},
mounted() {
this.galleriaService.getImages().then(data => this.images = data);
}
}