t-i-banner.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <template>
  2. <view>
  3. <view class="banner">
  4. <swiper class="box" autoplay circular>
  5. <swiper-item v-for="(item,index) in banner" :key="item.id">
  6. <view class="item">
  7. <view class="img">
  8. <image :src="item.imgURL"></image>
  9. </view>
  10. <view class="title">
  11. <view>{{item.title}}</view>
  12. <view class="num">
  13. - <text> {{index+1}} </text> -
  14. </view>
  15. </view>
  16. </view>
  17. </swiper-item>
  18. </swiper>
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. export default {
  24. name:"t-i-banner",
  25. props: [
  26. "banner"
  27. ],
  28. data() {
  29. return {
  30. }
  31. },
  32. }
  33. </script>
  34. <style lang="scss">
  35. .banner{
  36. margin-top: -40rpx;
  37. .box{
  38. width: 750rpx;
  39. height: 600rpx;
  40. .item{
  41. width: 750rpx;
  42. .img{
  43. image{
  44. width: 750rpx;
  45. height: 500rpx;
  46. }
  47. }
  48. .title{
  49. box-sizing: border-box;
  50. padding: 0 25rpx;
  51. width: 750rpx;
  52. height: 120rpx;
  53. line-height: 1.5;
  54. font-size: 28rpx;
  55. position: relative;
  56. .num{
  57. position: absolute;
  58. bottom: 35rpx;
  59. right: 25rpx;
  60. color: #ACB0AC;
  61. text{
  62. color: #23A2EE;
  63. }
  64. }
  65. }
  66. }
  67. }
  68. }
  69. </style>