item.vue 796 B

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