<template>
    <div class="carousel" v-if="show_carousel">
        <a-carousel autoplay>
            <div class="img" v-for="imgdata in imgdatas"><img :src="imgdata" alt=""></div>
        </a-carousel>
    </div>
</template>

<script setup lang='ts'>
import { homePageStore } from '@/stores';
import { toRefs } from 'vue';
const { idShow } = homePageStore()
const { show_carousel } = toRefs(idShow)
const imgdatas: string[] = [
    "https://www.wuruilin.cn/personself/nav01.jpg",
    "https://www.wuruilin.cn/personself/nav02.jpg",
    "https://www.wuruilin.cn/personself/nav03.jpg"
]
</script>

<style scoped>
.carousel img {
    height: 100vh;
    width: 100vw;
}
</style>