primevue-mirror/apps/showcase/doc/galleria/pt/PTViewer.vue

46 lines
1.3 KiB
Vue
Raw Normal View History

2024-09-19 07:36:09 +00:00
<template>
<DocSectionText v-bind="$attrs" />
<DocPTViewer :docs="docs">
2024-09-19 12:27:14 +00:00
<Galleria :value="images" :responsiveOptions="responsiveOptions" showItemNavigators :numVisible="5" containerStyle="max-width: 640px">
2024-09-19 07:36:09 +00:00
<template #item="slotProps">
<img :src="slotProps.item.itemImageSrc" :alt="slotProps.item.alt" style="width: 100%" />
</template>
<template #thumbnail="slotProps">
<img :src="slotProps.item.thumbnailImageSrc" :alt="slotProps.item.alt" />
</template>
</Galleria>
</DocPTViewer>
</template>
<script>
import { getPTOptions } from '@/components/doc/helpers';
import { PhotoService } from '@/service/PhotoService';
export default {
data() {
return {
images: null,
responsiveOptions: [
{
breakpoint: '1300px',
numVisible: 4
},
{
breakpoint: '575px',
numVisible: 1
}
],
docs: [
{
data: getPTOptions('Galleria'),
key: 'Galleria'
}
]
};
},
mounted() {
PhotoService.getImages().then((data) => (this.images = data));
}
};
</script>