car.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <template>
  2. <view>
  3. <view class="car-box">
  4. <uni-swiper-dot :info="info" :current="current" field="content" mode="default" :dots-styles="dotsStyles">
  5. <swiper class="swiper-box" @change="change">
  6. <swiper-item v-for="(item ,index) in info" :key="index">
  7. <view class="swiper-item">
  8. <view class="top">
  9. <view>渝SUT5U8</view>
  10. <view><image src="../../static/icon-car.png"></image></view>
  11. </view>
  12. <view class="bottom">
  13. <view class="carpic"><image src="../../static/car.jpg"></image></view>
  14. <view class="list">
  15. <view>车型:</view><view>陕汽S5000自卸车</view>
  16. </view>
  17. <view class="list">
  18. <view>VIN码:</view><view>LSPRR083929778273</view>
  19. </view>
  20. <view class="list">
  21. <view>累计行驶里程:</view><view>7463km</view>
  22. </view>
  23. <view class="list">
  24. <view>累计换电:</view><view>520次</view>
  25. </view>
  26. <view class="list">
  27. <view>累计换电量:</view><view>10890(kW/h)</view>
  28. </view>
  29. </view>
  30. </view>
  31. </swiper-item>
  32. </swiper>
  33. </uni-swiper-dot>
  34. </view>
  35. <tab-bar></tab-bar>
  36. </view>
  37. </template>
  38. <script>
  39. export default {
  40. data() {
  41. return {
  42. info: [{
  43. content: '内容 A'
  44. }, {
  45. content: '内容 B'
  46. }, {
  47. content: '内容 C'
  48. }],
  49. current: 0,
  50. dotsStyles:{
  51. backgroundColor: 'rgba(88, 190, 107,0.6)',
  52. selectedBackgroundColor: 'rgba(88, 190, 107,0.9)',
  53. }
  54. }
  55. },
  56. methods: {
  57. change(e) {
  58. this.current = e.detail.current;
  59. }
  60. }
  61. }
  62. </script>
  63. <style lang="scss" scoped>
  64. .car-box{
  65. padding: 0 30rpx;
  66. .swiper-box{
  67. width: 100%;
  68. display: flex;
  69. background-color:#fff;
  70. border-radius: 20rpx;
  71. border-top-right-radius: 40rpx;
  72. min-height: 1050rpx;
  73. margin-top: 15rpx;
  74. .swiper-item{
  75. display: flex;
  76. flex-direction: column;
  77. .top{
  78. display: flex;
  79. padding-left: 50rpx;
  80. justify-content: space-between;
  81. view:first-child{
  82. padding-top: 40rpx;
  83. font-size: 30rpx;
  84. font-weight: bold;
  85. }
  86. image{
  87. width: 110rpx;
  88. height: 98rpx;
  89. }
  90. }
  91. .bottom{
  92. padding:0 30rpx;
  93. display: flex;
  94. flex-direction: column;
  95. .carpic{
  96. text-align: center;
  97. margin-bottom: 30rpx;
  98. }
  99. image{
  100. width: 630rpx;
  101. height: 480rpx;
  102. border-radius:28rpx;
  103. }
  104. .list{
  105. width: 100%;
  106. padding: 0 30rpx;
  107. box-sizing: border-box;
  108. display: flex;
  109. height: 80rpx;
  110. justify-content: space-between;
  111. font-size: 30rpx;
  112. view:first-child{
  113. color: #86909c;
  114. }
  115. view:last-child{
  116. color: #1d2129;
  117. }
  118. }
  119. }
  120. }
  121. }
  122. }
  123. </style>