File size: 1,232 Bytes
dfa6264
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<template>
  <NuxtLink :to="`/vod/${vod.id}`" class="group block cursor-pointer">
    <div class="aspect-[2/3] rounded-lg overflow-hidden bg-gray-800 relative">
      <img
        v-if="vod.cover"
        :src="vod.cover"
        :alt="vod.name"
        loading="lazy"
        class="w-full h-full object-cover group-hover:scale-105 transition-transform duration-300"
      />
      <div v-else class="w-full h-full flex items-center justify-center text-gray-600 text-xs">
        {{ vod.name }}
      </div>
      <span
        v-if="vod.remarks"
        class="absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/80 to-transparent px-2 py-1 text-xs text-white truncate"
      >
        {{ vod.remarks }}
      </span>
    </div>
    <div class="mt-2 px-0.5">
      <p class="text-sm text-white truncate group-hover:text-emerald-400 transition">{{ vod.name }}</p>
      <p class="text-xs text-gray-500 mt-0.5">
        <span v-if="vod.score" class="text-amber-400">{{ vod.score }}分</span>
        <span v-if="vod.year" class="ml-1">{{ vod.year }}</span>
      </p>
    </div>
  </NuxtLink>
</template>

<script setup lang="ts">
import type { VodUserItem } from '~/types/vod'
defineProps<{ vod: VodUserItem }>()
</script>