Files
myprojplanet_vite/src/components/CGalleryImages/CGalleryImages.ts

59 lines
1.4 KiB
TypeScript
Raw Normal View History

2023-04-07 21:22:04 +02:00
import { defineComponent, ref, PropType, watch, onMounted, computed } from 'vue'
import { useI18n } from '@src/boot/i18n'
import { useUserStore } from '@store/UserStore'
import { useQuasar } from 'quasar'
import { IGallery, IImgGallery } from 'model'
import { CMyPage } from '@/components/CMyPage'
import { tools } from '@store/Modules/tools'
import { useGlobalStore } from '@store/globalStore'
import { costanti } from '@costanti'
export default defineComponent({
name: 'CGalleryImages',
props: {
imgGallery: {
type: Object as PropType<IImgGallery[] | string | undefined | null>,
required: true,
},
directory: {
type: String,
required: true,
}
},
components: { CMyPage },
setup(props, { emit }) {
const $q = useQuasar()
const { t } = useI18n()
const userStore = useUserStore()
const globalStore = useGlobalStore()
const slide = ref(0)
const autoplay = ref(5000)
2024-02-28 23:56:33 +01:00
const dialogVisible = ref(false);
const selectedImage = ref(null);
const showImage = (item: any) => {
selectedImage.value = item;
dialogVisible.value = true;
};
const closeDialog = () => {
selectedImage.value = null;
dialogVisible.value = false;
}
2023-04-07 21:22:04 +02:00
return {
2024-02-28 23:56:33 +01:00
showImage,
closeDialog,
selectedImage,
dialogVisible,
2023-04-07 21:22:04 +02:00
tools,
costanti,
slide,
autoplay,
t,
2023-04-07 21:22:04 +02:00
}
}
})