advert.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <template>
  2. <view class="main">
  3. <u-subsection class="subsection" :list="list" :current="current" @change="sectionChange" height="100"
  4. button-color="#EBC384" active-color="#fff" inactive-color="#FFFFFF" bg-color="#36373F"></u-subsection>
  5. <view class="lists" v-for="(item,k) in 10" key="k">
  6. <u-row gutter="16">
  7. <u-col span="6">
  8. <view class="custom">A用户</view>
  9. <view class="custom">2021-04-05 12:50:00</view>
  10. <!-- <view class="custom">2021-04-05 12:50:00</view> -->
  11. </u-col>
  12. <u-col span="6" style="text-align: right;">
  13. <view>
  14. <u-row gutter="16">
  15. <u-col span="4">
  16. </u-col>
  17. <u-col span="8" class="upturn" style="text-align: right;">
  18. <text>¥100</text>
  19. </u-col>
  20. </u-row>
  21. </view>
  22. <!-- <view style="font-size: 50rpx; font-weight: bold;">0</view> -->
  23. <view>0.9078976976786</view>
  24. </u-col>
  25. </u-row>
  26. </view>
  27. <!-- 与包裹页面所有内容的元素u-page同级,且在它的下方 -->
  28. <tabbars :currentIndex="4"></tabbars>
  29. </view>
  30. </view>
  31. </template>
  32. <script>
  33. import tabbars from "@/components/tabbar.vue"
  34. export default {
  35. components: {
  36. tabbars
  37. },
  38. data() {
  39. return {
  40. list: [{
  41. name: '购买订单'
  42. },
  43. {
  44. name: '出售订单'
  45. }
  46. ],
  47. current: 0
  48. };
  49. },
  50. methods: {
  51. sectionChange(index) {
  52. this.current = index;
  53. console.log(index);
  54. }
  55. }
  56. }
  57. </script>
  58. <style lang="scss">
  59. .subsection {
  60. margin: 28rpx 50rpx 40rpx 40rpx;
  61. border-radius: 20rpx;
  62. }
  63. .lists {
  64. color: #FFFFFF;
  65. margin: 20rpx 40rpx;
  66. padding: 20rpx;
  67. border-radius: 20rpx;
  68. // background-color: #36373F;
  69. background: linear-gradient(275deg, rgba(45, 45, 53, 0.1) 0%, #505058 100%);
  70. }
  71. .custom {
  72. margin: 10rpx 0rpx;
  73. }
  74. .upturn {
  75. color: #bb955e;
  76. font-weight: bold;
  77. }
  78. </style>