2022-09-15 17:48:55 +00:00
|
|
|
<template>
|
|
|
|
|
<v-carousel
|
|
|
|
|
cycle
|
|
|
|
|
:interval="speed"
|
2022-09-15 18:08:04 +00:00
|
|
|
:height="height"
|
2022-09-15 17:48:55 +00:00
|
|
|
:show-arrows="false"
|
|
|
|
|
touchless
|
|
|
|
|
hide-delimiters
|
|
|
|
|
>
|
2022-09-15 18:08:04 +00:00
|
|
|
<v-carousel-item
|
|
|
|
|
v-for="url in urls"
|
|
|
|
|
:key="url"
|
|
|
|
|
:src="url"
|
|
|
|
|
:contain="contain"
|
|
|
|
|
/>
|
2022-09-15 17:48:55 +00:00
|
|
|
</v-carousel>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
|
import { Component, Prop, Vue } from "vue-property-decorator";
|
|
|
|
|
|
|
|
|
|
@Component
|
|
|
|
|
export default class ImageCarousel extends Vue {
|
|
|
|
|
@Prop({ default: 10000 })
|
|
|
|
|
private readonly speed!: number;
|
|
|
|
|
|
2022-09-15 18:08:04 +00:00
|
|
|
@Prop({ default: 300 })
|
|
|
|
|
private readonly height!: number;
|
|
|
|
|
|
|
|
|
|
@Prop({ default: false })
|
|
|
|
|
private readonly contain!: boolean;
|
|
|
|
|
|
2022-09-15 17:48:55 +00:00
|
|
|
@Prop({ required: true })
|
2022-09-15 19:08:15 +00:00
|
|
|
private readonly urls!: string[];
|
2022-09-15 17:48:55 +00:00
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.v-window {
|
|
|
|
|
&-x-transition,
|
|
|
|
|
&-x-reverse-transition,
|
|
|
|
|
&-y-transition,
|
|
|
|
|
&-y-reverse-transition {
|
|
|
|
|
&-enter-active,
|
|
|
|
|
&-leave-active {
|
|
|
|
|
transition: 1.5s cubic-bezier(0.25, 0.8, 0.5, 1) !important;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|