item.vue 971 B

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