item.vue 719 B

123456789101112131415161718192021222324252627282930313233
  1. <script lang='ts' setup>
  2. defineProps({
  3. item: Object as any,
  4. })
  5. </script>
  6. <template>
  7. <div>
  8. <div class="custom-main mx-auto overflow-hidden pos-relative">
  9. <h2 class="!mb-20px text-30px fw-800 text-#333 line-clamp-1">
  10. {{ item.contentTitle }}
  11. </h2>
  12. <img
  13. :src="item.bannerImg"
  14. alt=""
  15. srcset=""
  16. class="w-260px h-260px object-cover"
  17. >
  18. </div>
  19. </div>
  20. </template>
  21. <style lang="less" scoped>
  22. .custom-main{
  23. background: url('~/assets/images/swiper_bg.png') no-repeat center center;
  24. background-size: cover;
  25. width: 360px;
  26. height: 360px;
  27. border-radius: 10px;
  28. padding: 20px 50px;
  29. box-shadow: 0px 8px 32px 0px rgba(0, 0, 0, 0.16);
  30. }
  31. </style>