item.vue 919 B

123456789101112131415161718192021222324252627282930313233
  1. <script lang='ts' setup>
  2. defineProps({
  3. item: Object as any,
  4. })
  5. </script>
  6. <template>
  7. <div>
  8. <div class="pos-relative b-rd-12px bg-#fff shadow-item overflow-hidden">
  9. <img :src="item.img" alt="" srcset="" class="w-100% h-310px object-cover">
  10. <div class="p-30px">
  11. <h3
  12. class="!mb-10px fw-800 text-24px text-#333 line-clamp-2 custom-title-font"
  13. >
  14. {{ item.title }}
  15. </h3>
  16. <div class="text-16px text-#999 lh-22px line-clamp-2 mb-20px">
  17. {{ item.description }}
  18. </div>
  19. <el-button class="!bg-#9B6CFF !text-#fff !b-#9B6CFF !h-40px px-24px" @click="$emit('select', item)">
  20. Download
  21. <svgo-arrow-line-r class="w-16px h-16px ml-10px !text-#fff" />
  22. </el-button>
  23. </div>
  24. </div>
  25. </div>
  26. </template>
  27. <style lang='less' scoped>
  28. .shadow-item{
  29. box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.1);
  30. }
  31. </style>