banner.vue 865 B

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