Item.vue 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <template>
  2. <van-swipe-cell>
  3. <div class="relative flex mb-10 border-[#fff] space-x-10 p-10 rounded-xl bg-[#FFF]">
  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="flex w-0 flex-1 flex-col justify-between">
  11. <div class="mt-15">
  12. <div class="line-clamp-1 truncate break-all text-base font-semibold text-black-3">
  13. {{ data?.projectTitle || '未命名草稿' }}
  14. </div>
  15. <div class="mt-2 text-sm text-black-3">
  16. {{ $dayjs(data?.updateTime).format('YYYY/MM/DD') }}
  17. </div>
  18. </div>
  19. <div class="absolute top-1/2 right-0 -translate-y-1/2 z-1 w-11 h-10">
  20. <img class="w-full h-full" :src="left_arrow" alt="" />
  21. </div>
  22. </div>
  23. </div>
  24. <template #right>
  25. <van-button
  26. square
  27. text="撤销审核"
  28. @click="$emit('onRevoke')"
  29. type="warning"
  30. class="delete-button"
  31. />
  32. </template>
  33. </van-swipe-cell>
  34. </template>
  35. <script setup>
  36. import noteDraftCoverBg from '~/assets/img/note-create/note_draft_cover_bg.jpg'
  37. import left_arrow from '~/assets/img/note-create/left.svg'
  38. const props = defineProps({
  39. data: {
  40. type: Object,
  41. default: () => ({})
  42. }
  43. })
  44. defineEmits(['onRevoke'])
  45. function handleWrite() {
  46. navigateTo({
  47. path: '/note-create',
  48. query: {
  49. id: props.data.id
  50. }
  51. })
  52. }
  53. </script>
  54. <style lang="scss" scoped>
  55. .delete-button {
  56. height: 100%;
  57. }
  58. </style>