dingdanliang.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <template>
  2. <view>
  3. <uni-table stripe emptyText="暂无更多数据" >
  4. <!-- 表头行 -->
  5. <uni-tr>
  6. <uni-th align="center">排行</uni-th>
  7. <uni-th align="center">民宿名称</uni-th>
  8. <uni-th align="center">订单量(个)</uni-th>
  9. </uni-tr>
  10. <!-- 表格数据行 -->
  11. <uni-tr v-for="(item,index) in shuju" :key="index">
  12. <uni-td align="center">
  13. <view class="uni-group">
  14. <button class="uni-button" v-if="item.pai==1">{{item.pai}}</button>
  15. <button class="uni-button2" v-if="item.pai==2">{{item.pai}}</button>
  16. <button class="uni-button3" v-if="item.pai==3">{{item.pai}}</button>
  17. <button class="uni-button4" v-if="item.pai>3">{{item.pai}}</button>
  18. </view>
  19. <!-- <view>{{item.measureTime.slice(11,19)}}</view> -->
  20. </uni-td>
  21. <uni-td align="center">{{item.name}}
  22. <!-- <template v-if="item.status==0">
  23. 空腹
  24. </template> -->
  25. </uni-td>
  26. <uni-td align="center">{{item.shu}}
  27. </uni-td>
  28. </uni-tr>
  29. </uni-table>
  30. </view>
  31. </template>
  32. <script>
  33. export default {
  34. props: {
  35. // beforeFan:{
  36. // type: Array,
  37. // // 定义是否必须传
  38. // required: false,
  39. // // 定义默认值
  40. // default: []
  41. // },
  42. },
  43. mounted() {
  44. },
  45. data() {
  46. return {
  47. shuju:[
  48. {pai:1,name:'怡人民宿',shu:26},
  49. {pai:2,name:'怡人民宿',shu:26},
  50. {pai:3,name:'怡人民宿',shu:26},
  51. {pai:5,name:'怡人民宿',shu:26},
  52. ],//订单量数据
  53. }
  54. },
  55. methods: {},
  56. }
  57. </script>
  58. <style>
  59. /* >>>.uni-table-tr[data-v-c2c83a8e] {
  60. margin-top: 18rpx;
  61. display: table-row;
  62. transition: all 0.3s;
  63. box-sizing: border-box;
  64. height: 103rpx;
  65. opacity: 1;
  66. background: rgba(242, 246, 250, 1);
  67. }
  68. >>>.uni-table-th[data-v-511e81f9] {
  69. padding: 12px 10px;
  70. display: table-cell;
  71. box-sizing: border-box;
  72. font-size: 28rpx;
  73. font-weight: 500;
  74. color: rgba(0, 0, 0, 1);
  75. border-bottom: 1px #ebeef5 solid;
  76. }
  77. >>>.uni-table-td[data-v-321f8e79] {
  78. display: table-cell;
  79. border-bottom: 1px #EBEEF5 solid;
  80. font-size: 24px;
  81. transform: scale(0.6);
  82. font-weight: 500;
  83. color: rgba(0, 0, 0, 1);
  84. line-height: 24px;
  85. box-sizing: border-box;
  86. } */
  87. /* 排行图标 */
  88. .uni-group {
  89. display: flex;
  90. align-items: center;
  91. }
  92. .uni-button{
  93. color:#FFFFFF;
  94. /* width: 30px;
  95. height: 30px; */
  96. box-shadow: rgba(255, 255, 255, 0) 0px 0px 1px;
  97. transition: unset;
  98. color:#FFFFFF;
  99. font-size: 28rpx;
  100. background: linear-gradient(183deg, #d93f52 0%, #f6909c 100%);
  101. border-radius:50%;
  102. }
  103. .uni-button2{
  104. color:#FFFFFF;
  105. box-shadow: rgba(255, 255, 255, 0) 0px 0px 1px;
  106. transition: unset;
  107. color:#FFFFFF;
  108. font-size: 28rpx;
  109. background: linear-gradient(183deg, #7ebc1c 0%, #c4eb88 100%);
  110. border-radius:50%;
  111. }
  112. .uni-button3{
  113. color:#FFFFFF;
  114. box-shadow: rgba(255, 255, 255, 0) 0px 0px 1px;
  115. transition: unset;
  116. color:#FFFFFF;
  117. font-size: 28rpx;
  118. background: linear-gradient(183deg, #ef9237 0%, #efaa66 100%);
  119. border-radius:50%;
  120. }
  121. .uni-button4{
  122. color:#FFFFFF;
  123. box-shadow: rgba(255, 255, 255, 0) 0px 0px 1px;
  124. transition: unset;
  125. color:#FFFFFF;
  126. font-size: 28rpx;
  127. background-color:rgba(165, 165, 165, 255);
  128. border-radius:50%;
  129. }
  130. </style>