金诚优选前端代码
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.

94 lines
1.7 KiB

  1. <template>
  2. <view class="content">
  3. <view class="shop">
  4. <image class="img" src="https://picsum.photos/seed/picsum/200/300" mode="aspectFill"></image>
  5. </view>
  6. <scroll-view class="scroll-view" :scroll-x="true">
  7. <view class="scroll-content">
  8. <view class="goods-item" v-for="(item, index) in 5" :key="index">
  9. <image class="goods-img"></image>
  10. <view class="goods-info">
  11. <view class="lf-line-1">猪大肠卖咯 5毛钱一斤咯</view>
  12. <view>0.5</view>
  13. </view>
  14. </view>
  15. <view class="goods-item">
  16. <view class="more-box">
  17. <text>查看更多</text>
  18. <text class="lf-iconfont icon--2 lf-text-vertical"></text>
  19. </view>
  20. </view>
  21. </view>
  22. </scroll-view>
  23. </view>
  24. </template>
  25. <script>
  26. export default {
  27. data(){
  28. return {
  29. }
  30. },
  31. created(){
  32. },
  33. methods: {
  34. }
  35. }
  36. </script>
  37. <style lang="scss" scoped="scoped">
  38. .content{
  39. width: 750rpx;
  40. height: max-content;
  41. box-sizing: border-box;
  42. padding: 0rpx 32rpx;
  43. .shop{
  44. width: 100%;
  45. height: 245rpx;
  46. .img{
  47. width: 100%;
  48. height: 100%;
  49. }
  50. }
  51. .scroll-view{
  52. height: 280rpx;
  53. width: 100%;
  54. margin-top: 20rpx;
  55. .scroll-content{
  56. display: flex;
  57. width: 100%;
  58. .goods-item{
  59. margin-right: 15rpx;
  60. width: 180rpx;
  61. }
  62. .goods-img{
  63. width: 180rpx;
  64. height: 180rpx;
  65. background-color: #EEEEEE;
  66. }
  67. .goods-info{
  68. text-align: center;
  69. color: #222222;
  70. &>view:nth-child(1n){
  71. font-size: 24rpx;
  72. }
  73. &>view:nth-child(2n){
  74. font-size: 28rpx;
  75. font-weight: bold;
  76. }
  77. }
  78. .more-box{
  79. width: 180rpx;
  80. height: 180rpx;
  81. background-color: #EEEEEE;
  82. text-align: center;
  83. line-height: 180rpx;
  84. font-size: 24rpx;
  85. }
  86. }
  87. }
  88. }
  89. </style>