企业官网
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

44 lines
796 B

<template>
<ClientOnly>
<div class="carousel-container">
<swiper-container ref="containerRef" :init="false">
<slot></slot>
</swiper-container>
</div>
</ClientOnly>
</template>
<script setup>
const containerRef = ref(null)
useSwiper(containerRef, {
effect: 'coverflow',
grabCursor: true,
centeredSlides: true,
loop: true,
initialSlide: 2,
slidesPerView: 'auto',
coverflowEffect: {
rotate: 0,
stretch: 0,
depth: 100,
modifier: 2.5,
},
pagination: {
el: '.swiper-pagination',
clickable: true,
},
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
},
})
</script>
<style scoped>
.carousel-container {
width: 100%;
position: relative;
overflow: hidden;
height: 100%;
}
</style>