海南旅游项目 前端仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

143 lines
2.7 KiB

  1. <template>
  2. <view>
  3. <u-waterfall v-model="list">
  4. <template v-slot:left="{leftList}">
  5. <view class="list-warter" v-for="(item, index) in leftList" :key="index" @click="onClick">
  6. <u-lazy-load threshold="-450" :image="item.image" :index="index">
  7. <view class="list-label">已售8777</view>
  8. </u-lazy-load>
  9. <view class="lf-p-20">
  10. <view class="list-title">
  11. {{item.title}}
  12. </view>
  13. <view class="list-price">
  14. <text>{{item.price}}</text>
  15. <text class="lf-m-l-20 lf-font-24 lf-color-666 lf-line-through">¥399.00</text>
  16. </view>
  17. </view>
  18. </view>
  19. </template>
  20. <template v-slot:right="{rightList}">
  21. <view class="list-warter" v-for="(item, index) in rightList" :key="index" @click="onClick">
  22. <u-lazy-load threshold="-450" :image="item.image" :index="index">
  23. <view class="list-label">已售8777</view>
  24. </u-lazy-load>
  25. <view class="lf-p-20">
  26. <view class="list-title">
  27. {{item.title}}
  28. </view>
  29. <view class="list-price">
  30. <text>{{item.price}}</text>
  31. <text class="lf-m-l-20 lf-font-24 lf-color-666 lf-line-through">¥399.00</text>
  32. </view>
  33. </view>
  34. </view>
  35. </template>
  36. </u-waterfall>
  37. </view>
  38. </template>
  39. <script>
  40. export default {
  41. props: {
  42. list: {
  43. type: Array,
  44. default: []
  45. }
  46. },
  47. data(){
  48. return {
  49. }
  50. },
  51. onLoad(){
  52. },
  53. methods: {
  54. onClick(){
  55. console.log("aaaa");
  56. this.$emit('click');
  57. }
  58. }
  59. }
  60. </script>
  61. <style lang="scss" scoped="scoped">
  62. // ====
  63. .list-warter {
  64. border-radius: 8px;
  65. margin: 10px 5px;
  66. margin-top: 0px;
  67. background-color: #ffffff;
  68. // padding: 8px;
  69. position: relative;
  70. overflow: hidden;
  71. }
  72. .u-close {
  73. position: absolute;
  74. top: 32rpx;
  75. right: 32rpx;
  76. }
  77. .list-image {
  78. width: 100%;
  79. border-radius: 4px;
  80. }
  81. .list-title {
  82. font-size: 28rpx;
  83. font-weight: bold;
  84. color: $u-main-color;
  85. }
  86. .list-label{
  87. position: absolute;
  88. bottom: 0;
  89. right: 0;
  90. background-color: rgba(0,0,0,0.5);
  91. width: 140rpx;
  92. height: 48rpx;
  93. border-radius: 20rpx 0rpx 0rpx 0rpx;
  94. font-size: 22rpx;
  95. color: #FFFFFF;
  96. line-height: 48rpx;
  97. text-align: center;
  98. }
  99. .list-tag {
  100. display: flex;
  101. margin-top: 5px;
  102. }
  103. .list-tag-owner {
  104. background-color: $u-type-error;
  105. color: #FFFFFF;
  106. display: flex;
  107. align-items: center;
  108. padding: 4rpx 14rpx;
  109. border-radius: 50rpx;
  110. font-size: 20rpx;
  111. line-height: 1;
  112. }
  113. .list-tag-text {
  114. border: 1px solid $u-type-primary;
  115. color: $u-type-primary;
  116. margin-left: 10px;
  117. border-radius: 50rpx;
  118. line-height: 1;
  119. padding: 4rpx 14rpx;
  120. display: flex;
  121. align-items: center;
  122. border-radius: 50rpx;
  123. font-size: 20rpx;
  124. }
  125. .list-price {
  126. font-size: 30rpx;
  127. color: $u-type-error;
  128. margin-top: 5px;
  129. }
  130. // ====
  131. </style>