Item.vue 2.2 KB

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