swiperImgs.vue 892 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <template>
  2. <view :style="{width:width+'rpx',height:height+'rpx'}">
  3. <swiper :style="{width:width+'rpx',height:height+'rpx'}" :indicator-dots="true"
  4. :autoplay="true"
  5. :interval="2000"
  6. indicator-color="rgba(0, 0, 0, 0.3)"
  7. indicator-active-color="#000000"
  8. :duration="1000"
  9. circular>
  10. <swiper-item v-for="(item,index) in imageList" :key="index">
  11. <view class="contentColumnC">
  12. <netImage :width="(width-56)" :height="Imgmargin(height)" bradius="0" :mysrc="item" mymode="scaleToFill"></netImage>
  13. </view>
  14. </swiper-item>
  15. </swiper>
  16. </view>
  17. </template>
  18. <script>
  19. export default {
  20. name:"swiperImgs",
  21. props:{
  22. imageList:'',
  23. width:0,
  24. height:0,
  25. },
  26. data() {
  27. return {
  28. };
  29. },
  30. methods:{
  31. Imgmargin(size){
  32. return (size-30);
  33. },
  34. },
  35. }
  36. </script>
  37. <style>
  38. .swiper-item{
  39. width: 100%;
  40. height: 100%;
  41. }
  42. </style>