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

86 lines
1.6 KiB

  1. <template>
  2. <view>
  3. <lf-nav title="家具专场" :showIcon="true" bgColor="transparent" :spreadOut="false"></lf-nav>
  4. <view class="head">
  5. <image class="img" mode="widthFix" src="https://picsum.photos/200/300?grayscale"></image>
  6. </view>
  7. <view class="content">
  8. <view class="card" v-for="(item, index) in 14" :key="index">
  9. <image class="goods-img"></image>
  10. <view class="goods-info">
  11. <view class="goods-title lf-line-2">房间装饰品套装-简约风格</view>
  12. <view class="goods-price">598</view>
  13. </view>
  14. </view>
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. export default {
  20. data(){
  21. return {
  22. }
  23. },
  24. onLoad(){
  25. },
  26. methods: {
  27. }
  28. }
  29. </script>
  30. <style lang="scss" scoped="scoped">
  31. .head{
  32. width: 750rpx;
  33. height: 430rpx;
  34. position: relative;
  35. .img{
  36. width: 100%;
  37. height: 100%;
  38. }
  39. }
  40. .content{
  41. padding: 30rpx 32rpx;
  42. display: flex;
  43. flex-wrap: wrap;
  44. .card{
  45. width: 220rpx;
  46. height: max-content;
  47. background: #FFFFFF;
  48. box-shadow: 0rpx 2rpx 8rpx 1rpx rgba(0, 0, 0, 0.1);
  49. border-radius: 0rpx 0rpx 10rpx 10rpx;
  50. display: flex;
  51. flex-direction: column;
  52. margin-right: 13rpx;
  53. &:nth-child(3n){
  54. margin-right: 0rpx;
  55. }
  56. &:nth-child(n+4){
  57. margin-top: 13rpx;
  58. }
  59. .goods-img{
  60. width: 220rpx;
  61. height: 220rpx;
  62. background-color: #EEEEEE;
  63. border-radius: 10rpx 10rpx 0rpx 0rpx;
  64. }
  65. .goods-info{
  66. padding: 15rpx;
  67. .goods-title{
  68. font-size: 26rpx;
  69. color: #222222;
  70. margin-bottom: 10rpx;
  71. }
  72. .goods-price{
  73. font-size: 32rpx;
  74. color: #222222;
  75. margin-bottom: 5rpx;
  76. }
  77. }
  78. }
  79. }
  80. </style>