item.vue 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <template>
  2. <div class="list">
  3. <div
  4. class="containerBox animated fadeInDown"
  5. v-for="(item, index) in list"
  6. :key="index"
  7. >
  8. <div class="left">
  9. <p class="title">{{ item.名称 }}</p>
  10. <p>种植数量:{{ item.已种植 }}</p>
  11. <p>目标完成率:{{ item.完成率 }}%</p>
  12. <p>地址:{{ item.地址 }}</p>
  13. </div>
  14. <div class="right">
  15. <img :src="item.图片[0]" alt="风景图" />
  16. </div>
  17. </div>
  18. </div>
  19. </template>
  20. <script>
  21. export default {
  22. name: `LayoutExample`,
  23. data() {
  24. return {}
  25. },
  26. props: {
  27. list: {
  28. type: Array,
  29. default: () => [],
  30. },
  31. },
  32. async created() {},
  33. }
  34. </script>
  35. <style scoped lang="less">
  36. .list {
  37. padding: 16px;
  38. width: 357px;
  39. height: 750px;
  40. overflow: auto;
  41. .containerBox {
  42. cursor: pointer;
  43. margin-bottom: 15px;
  44. display: flex;
  45. justify-content: space-between;
  46. align-items: center;
  47. color: #fff;
  48. background: rgba(168, 168, 168, 0.15);
  49. backdrop-filter: blur(8px);
  50. padding: 10px;
  51. .left {
  52. .title {
  53. font-size: 20px;
  54. line-height: 1.2em;
  55. color: #fff;
  56. }
  57. p {
  58. padding: 0;
  59. margin: 0;
  60. color: #bec1cc;
  61. line-height: 1.5em;
  62. font-size: 14px;
  63. margin-bottom: 5px;
  64. }
  65. }
  66. .right {
  67. padding-left: 10px;
  68. img {
  69. width: 105px;
  70. height: 105px;
  71. border-radius: 10px;
  72. }
  73. }
  74. }
  75. }
  76. </style>