71 lines
1.9 KiB
Vue
71 lines
1.9 KiB
Vue
<template>
|
|
<DocSectionText v-bind="$attrs">
|
|
<p>Theming is implemented with the pass through properties in unstyled mode. Example below demonstrates the built-in Tailwind theme.</p>
|
|
</DocSectionText>
|
|
<DocSectionCode :code="code" embedded />
|
|
<DocSectionCode :code="code" :service="['PhotoService']" embedded />
|
|
</template>
|
|
|
|
<script>
|
|
import { PhotoService } from '@/service/PhotoService';
|
|
export default {
|
|
data() {
|
|
return {
|
|
code: {
|
|
composition: `
|
|
<template>
|
|
<div class="card md:flex md:justify-center">
|
|
<Galleria :value="images" :responsiveOptions="responsiveOptions" :numVisible="5" containerStyle="max-width: 640px">
|
|
<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>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { ref, onMounted } from "vue";
|
|
import { PhotoService } from '@/service/PhotoService';
|
|
|
|
onMounted(() => {
|
|
PhotoService.getImages().then((data) => (images.value = data));
|
|
});
|
|
|
|
const images = ref();
|
|
const responsiveOptions = ref([
|
|
{
|
|
breakpoint: '991px',
|
|
numVisible: 4
|
|
},
|
|
{
|
|
breakpoint: '767px',
|
|
numVisible: 3
|
|
},
|
|
{
|
|
breakpoint: '575px',
|
|
numVisible: 1
|
|
}
|
|
]);
|
|
<\/script>`,
|
|
data: `
|
|
/* PhotoService */
|
|
{
|
|
itemImageSrc: 'https://primefaces.org/cdn/primevue/images/galleria/galleria1.jpg',
|
|
thumbnailImageSrc: 'https://primefaces.org/cdn/primevue/images/galleria/galleria1s.jpg',
|
|
alt: 'Description for Image 1',
|
|
title: 'Title 1'
|
|
},
|
|
...
|
|
`
|
|
}
|
|
};
|
|
},
|
|
mounted() {
|
|
PhotoService.getImages().then((data) => (images.value = data));
|
|
}
|
|
};
|
|
</script>
|