Item.vue 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <template>
  2. <van-swipe-cell>
  3. <div class="relative group flex border-box p-10 mb-10 bg-[#fff] rounded-xl">
  4. <div class="w-147 h-109 border-box">
  5. <img
  6. :src="formatImgSrc(data.tourismUrlsAfterConvert) || noteDraftCoverBg"
  7. class="w-full h-full shrink-0 object-cover"
  8. />
  9. </div>
  10. <div class="w-152 ml-15">
  11. <div class="min-h-70">
  12. <NuxtLink
  13. :title="data?.projectTitle"
  14. :to="`/yj/${data?.id}`"
  15. class="w-full cursor-pointer line-clamp-1 truncate break-all text-base font-bold text-black-3 text-bold"
  16. >
  17. {{ data?.projectTitle }}
  18. </NuxtLink>
  19. <div class="line-clamp-3 text-sm leading-[17px] break-all text-black-6">
  20. {{ data?.remarks }}
  21. </div>
  22. </div>
  23. <div class="flex space-x-4 text-sm text-[#FD9A00]">
  24. <div class="flex items-center space-x-2">
  25. <span class="iconfont icon-eye-fill text-[#FD9A00]" style="font-size: 15px"></span>
  26. <div>{{ data?.pageViewCount ?? 0 }}</div>
  27. </div>
  28. <div class="pl-20 flex items-center space-x-2">
  29. <van-icon @click="$emit('onShare')" name="share-o" color="#FD9A00" />
  30. </div>
  31. <!-- <div v-if="data?.endPlaceDictMap" class="flex items-center space-x-2">
  32. <span class="iconfont icon-location-fill text-black-9" style="font-size: 15px"></span>
  33. <div>{{ data?.endPlaceDictMap?.name }}</div>
  34. </div> -->
  35. </div>
  36. </div>
  37. <div class="absolute top-1/2 right-0 -translate-y-1/2 z-1 w-11 h-10">
  38. <img class="w-full h-full" :src="left_arrow" alt="" />
  39. </div>
  40. </div>
  41. <template #right>
  42. <van-button
  43. square
  44. text="下架"
  45. @click="$emit('onNoteDown')"
  46. type="danger"
  47. class="delete-button"
  48. />
  49. </template>
  50. </van-swipe-cell>
  51. </template>
  52. <script setup>
  53. import noteDraftCoverBg from '~/assets/img/note-create/note_draft_cover_bg.jpg'
  54. import left_arrow from '~/assets/img/note-create/left.svg'
  55. const props = defineProps({
  56. data: {
  57. type: Object,
  58. default: () => ({})
  59. }
  60. })
  61. defineEmits(['onNoteDown', 'onShare'])
  62. //
  63. </script>
  64. <style lang="scss" scoped>
  65. .delete-button {
  66. height: 100%;
  67. }
  68. </style>