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.

25 lines
674 B

8 months ago
7 months ago
8 months ago
  1. <template>
  2. <div class="carousel" v-if="show_carousel">
  3. <a-carousel autoplay>
  4. <div class="img" v-for="imgdata in imgdatas"><img :src="imgdata" alt=""></div>
  5. </a-carousel>
  6. </div>
  7. </template>
  8. <script setup lang='ts'>
  9. import { homePageStore } from '@/stores';
  10. import { toRefs } from 'vue';
  11. const { idShow } = homePageStore()
  12. const { show_carousel } = toRefs(idShow)
  13. const imgdatas: string[] = [
  14. "https://www.wuruilin.cn/personself/nav01.jpg",
  15. "https://www.wuruilin.cn/personself/nav02.jpg",
  16. "https://www.wuruilin.cn/personself/nav03.jpg"
  17. ]
  18. </script>
  19. <style scoped>
  20. .carousel img {
  21. height: 100vh;
  22. width: 100vw;
  23. }
  24. </style>