carousel.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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-img :src="item.imgUrl" :lazy-src="item.imgUrl" style="width: 100%">
  15. <template v-slot:placeholder>
  16. <v-row align="center" class="fill-height ma-0" justify="center">
  17. <v-progress-circular color="grey-lighten-5" indeterminate></v-progress-circular>
  18. </v-row>
  19. </template>
  20. </v-img>
  21. </v-carousel-item>
  22. </v-carousel>
  23. </template>
  24. <script setup>
  25. defineOptions({ name: 'mall-home-carousel'})
  26. import { ref } from 'vue'
  27. const props = defineProps({ templateData: Object })
  28. const carouselList = ref([])
  29. const Carousel = props.templateData?.home?.components.find(item => item.id === 'Carousel')
  30. carouselList.value = Carousel?.property?.items || []
  31. </script>
  32. <style scoped lang="scss">
  33. </style>