<template>
  <NuxtLink
    :to="`/yj/${itemData.id}`"
    class="bg-white p-10 box-border flex space-x-10 rounded-xl"
  >
    <van-image
      :src="formatImgSrc(itemData.tourismUrlsAfterConvert)"
      width="155px"
      height="115px"
      radius="10px"
      class="shrink-0"
    ></van-image>
    <div class="flex-1 w-0">
      <div class="truncate text-black-3 text-xl">
        {{ itemData.projectTitle }}
      </div>
      <div class="line-clamp-3 mt-5 text-sm text-black-6">
        {{ itemData.remarks }}
      </div>
      <div
        @click.prevent="$emit('onCancel')"
        class="flex items-center justify-center h-25 border-current text-[#FF4242] text-sm border w-64 rounded-md mt-10"
      >
        取消收藏
      </div>
    </div>
  </NuxtLink>
</template>

<script setup>
defineProps({
  itemData: {
    type: Object,
    default: () => {},
  },
});

const emit = defineEmits(["onCancel"]);
</script>

<style lang="scss" scoped></style>
