banner.vue 793 B

123456789101112131415161718192021222324252627282930313233343536
  1. <template>
  2. <view>
  3. <swiper class="home-swiper-banner" indicator-color="rgba(255, 255, 255, 0.3)" indicator-active-color="#FFFFFF" :indicator-dots="true" :autoplay="true" :interval="3000" :duration="500">
  4. <swiper-item v-for="(item,index) in banners" :key="index">
  5. <navigator :url="item.link">
  6. <image :src="item.src" mode="aspectFill" style="border-radius: 16rpx"></image>
  7. </navigator>
  8. </swiper-item>
  9. </swiper>
  10. </view>
  11. </template>
  12. <script>
  13. export default{
  14. props: ['banners'],
  15. data(){
  16. return {
  17. banners1:[],
  18. }
  19. },
  20. }
  21. </script>
  22. <style>
  23. .home-swiper-banner{
  24. height: 350rpx;
  25. box-shadow: 0rpx 4rpx 32rpx 0rpx rgba(0, 0, 0, 0.04);
  26. border-radius: 10rpx;
  27. overflow: hidden;
  28. }
  29. .home-swiper-banner image{
  30. width: 100%;
  31. height: 350rpx;
  32. }
  33. </style>