Item.vue 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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="w-152 flex justify-between break-words">
  11. <div class="w-full mt-15">
  12. <div class="truncate 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. <div class="pl-2 h-full">
  26. <van-button
  27. square
  28. text="撤销审核"
  29. @click="$emit('onRevoke')"
  30. type="warning"
  31. class="delete-button"
  32. />
  33. </div>
  34. </template>
  35. </van-swipe-cell>
  36. </template>
  37. <script setup>
  38. import noteDraftCoverBg from '~/assets/img/note-create/note_draft_cover_bg.jpg'
  39. import left_arrow from '~/assets/img/note-create/left.svg'
  40. const props = defineProps({
  41. data: {
  42. type: Object,
  43. default: () => ({})
  44. }
  45. })
  46. defineEmits(['onRevoke'])
  47. function handleWrite() {
  48. navigateTo({
  49. path: '/note-create',
  50. query: {
  51. id: props.data.id
  52. }
  53. })
  54. }
  55. </script>
  56. <style lang="scss" scoped>
  57. .delete-button {
  58. height: 100%;
  59. }
  60. .van-button--warning {
  61. border: none;
  62. }
  63. </style>