Fix bug: images not being displayed correctly

This commit is contained in:
2023-04-28 16:27:44 +02:00
parent 9176f13798
commit 22f7c330ff

View File

@@ -1,13 +1,14 @@
<template> <template>
<v-dialog v-model="show" class="d-flex align-center justify-center"> <v-dialog v-model="show">
<v-carousel <v-carousel
:model-value="index" :model-value="index"
:show-arrows="images.length > 1" :show-arrows="images.length > 1"
hide-delimiters hide-delimiters
class="ma-auto"
:height="carouselHeight"
> >
<v-carousel-item v-for="image of images" :key="image" <v-carousel-item v-for="image of images" :key="image"
:src="image" :src="image"
class="ma-auto"
></v-carousel-item> ></v-carousel-item>
</v-carousel> </v-carousel>
</v-dialog> </v-dialog>
@@ -20,6 +21,11 @@ export default {
show: false, show: false,
images: [], images: [],
index: 0 index: 0
}) }),
computed: {
carouselHeight () {
return window.innerHeight * 0.9
}
}
} }
</script> </script>