farm.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <template>
  2. <div class="farm-page">
  3. <custom-header name="我的农场"></custom-header>
  4. <div class="farm-list">
  5. <div class="list-item" v-for="item in 3" :key="item">
  6. <div class="item-info">
  7. <div class="item-top">
  8. <div class="left-img"></div>
  9. <div class="left-content">
  10. <div class="content-title">
  11. <span>荔枝博览园</span>
  12. <div class="content-tag" v-if="item === 1">默认</div>
  13. <div class="content-text" v-else>设为默认</div>
  14. </div>
  15. <div class="content-desc">
  16. <div>服务作物:荔枝-妃子笑、桂味</div>
  17. <div>农场位置:广东省广州市从化区</div>
  18. </div>
  19. </div>
  20. </div>
  21. </div>
  22. <div class="item-btn">查看详情</div>
  23. </div>
  24. </div>
  25. </div>
  26. </template>
  27. <script setup>
  28. import customHeader from "@/components/customHeader.vue";
  29. import { ref } from "vue";
  30. </script>
  31. <style scoped lang="scss">
  32. .farm-page {
  33. width: 100%;
  34. height: 100vh;
  35. .farm-list {
  36. width: 100%;
  37. height: 100%;
  38. background-color: #f7f7f7;
  39. padding: 12px;
  40. box-sizing: border-box;
  41. .list-item {
  42. background-color: #fff;
  43. border-radius: 10px;
  44. padding: 10px;
  45. display: flex;
  46. justify-content: space-between;
  47. .item-info {
  48. .item-top {
  49. display: flex;
  50. align-items: center;
  51. gap: 12px;
  52. .left-img {
  53. width: 68px;
  54. height: 68px;
  55. border-radius: 8px;
  56. background-color: red;
  57. }
  58. .left-content {
  59. .content-title {
  60. display: flex;
  61. align-items: center;
  62. gap: 10px;
  63. margin-bottom: 4px;
  64. font-size: 16px;
  65. font-weight: 500;
  66. .content-tag {
  67. background-color: #2199f8;
  68. color: #fff;
  69. padding: 2px 8px;
  70. border-radius: 15px;
  71. font-size: 12px;
  72. font-weight: 400;
  73. }
  74. .content-text {
  75. font-size: 12px;
  76. color: #2199F8;
  77. font-weight: 400;
  78. }
  79. }
  80. .content-desc {
  81. font-size: 12px;
  82. color: #999999;
  83. line-height: 18px;
  84. }
  85. }
  86. }
  87. }
  88. .item-btn {
  89. color: #a8a8a8;
  90. }
  91. }
  92. .list-item + .list-item {
  93. margin-top: 12px;
  94. }
  95. }
  96. }
  97. </style>