rotation.vue 763 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <template>
  2. <div class='rotation'>
  3. <a-carousel autoplay>
  4. <div v-for='(item,index) in rotationImg' :key='index'>
  5. <img :src='item' alt />
  6. </div>
  7. </a-carousel>
  8. </div>
  9. </template>
  10. <script>
  11. export default {
  12. data() {
  13. return {}
  14. },
  15. props: ['rotationImg']
  16. }
  17. </script>
  18. <style lang="less" scoped>
  19. .rotation {
  20. width: 100%;
  21. height: 100%;
  22. img {
  23. // width: 100%;
  24. // height: 100%;
  25. }
  26. }
  27. </style>
  28. <style lang="less">
  29. .rotation {
  30. .ant-carousel .slick-slide {
  31. width: 100%;
  32. height: 487px;
  33. text-align: center;
  34. line-height: 487px;
  35. overflow: hidden;
  36. }
  37. .ant-carousel .slick-slide h3 {
  38. color: #fff;
  39. }
  40. }
  41. </style>