海南旅游项目 前端仓库
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.

144 lines
2.8 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.$url('/pages/goodsDetail/index');
  57. this.$emit('click');
  58. }
  59. }
  60. }
  61. </script>
  62. <style lang="scss" scoped="scoped">
  63. // ====
  64. .list-warter {
  65. border-radius: 8px;
  66. margin: 10px 5px;
  67. margin-top: 0px;
  68. background-color: #ffffff;
  69. // padding: 8px;
  70. position: relative;
  71. overflow: hidden;
  72. }
  73. .u-close {
  74. position: absolute;
  75. top: 32rpx;
  76. right: 32rpx;
  77. }
  78. .list-image {
  79. width: 100%;
  80. border-radius: 4px;
  81. }
  82. .list-title {
  83. font-size: 28rpx;
  84. font-weight: bold;
  85. color: $u-main-color;
  86. }
  87. .list-label{
  88. position: absolute;
  89. bottom: 0;
  90. right: 0;
  91. background-color: rgba(0,0,0,0.5);
  92. width: 140rpx;
  93. height: 48rpx;
  94. border-radius: 20rpx 0rpx 0rpx 0rpx;
  95. font-size: 22rpx;
  96. color: #FFFFFF;
  97. line-height: 48rpx;
  98. text-align: center;
  99. }
  100. .list-tag {
  101. display: flex;
  102. margin-top: 5px;
  103. }
  104. .list-tag-owner {
  105. background-color: $u-type-error;
  106. color: #FFFFFF;
  107. display: flex;
  108. align-items: center;
  109. padding: 4rpx 14rpx;
  110. border-radius: 50rpx;
  111. font-size: 20rpx;
  112. line-height: 1;
  113. }
  114. .list-tag-text {
  115. border: 1px solid $u-type-primary;
  116. color: $u-type-primary;
  117. margin-left: 10px;
  118. border-radius: 50rpx;
  119. line-height: 1;
  120. padding: 4rpx 14rpx;
  121. display: flex;
  122. align-items: center;
  123. border-radius: 50rpx;
  124. font-size: 20rpx;
  125. }
  126. .list-price {
  127. font-size: 30rpx;
  128. color: $u-type-error;
  129. margin-top: 5px;
  130. }
  131. // ====
  132. </style>