carousel.vue 1.0 KB

1234567891011121314151617181920212223242526272829
  1. <template>
  2. <v-carousel cycle hide-delimiter-background :show-arrows="false" style="height: 100%; min-width: 1184px;">
  3. <v-carousel-item v-for="(item, i) in carouselList" :key="i">
  4. <!-- <v-img :src="item.imgUrl" :lazy-src="item.imgUrl" style="width: 100%; height: auto;">
  5. <template v-slot:placeholder>
  6. <v-row align="center" class="fill-height ma-0" justify="center">
  7. <v-progress-circular color="grey-lighten-5" indeterminate></v-progress-circular>
  8. </v-row>
  9. </template>
  10. </v-img> -->
  11. <figure>
  12. <img :src="item.imgUrl" :lazy-src="item.imgUrl" style="width: 100%;" />
  13. </figure>
  14. </v-carousel-item>
  15. </v-carousel>
  16. </template>
  17. <script setup>
  18. defineOptions({ name: 'mall-home-carousel'})
  19. import { ref } from 'vue'
  20. const props = defineProps({ templateData: Object })
  21. const carouselList = ref([])
  22. const Carousel = props.templateData?.home?.components.find(item => item.id === 'Carousel')
  23. carouselList.value = Carousel.property.items
  24. </script>
  25. <style scoped lang="scss">
  26. </style>