mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-07 02:46:55 +08:00
add more custom item in index
This commit is contained in:
34
src/components/SimpleVideoCard.vue
Normal file
34
src/components/SimpleVideoCard.vue
Normal file
@@ -0,0 +1,34 @@
|
||||
<script setup lang="ts">
|
||||
import { VideoCollectVideo } from '@/api/api-models'
|
||||
import { NCard, NEllipsis, NImage, NText } from 'naive-ui'
|
||||
|
||||
const props = defineProps<{
|
||||
video: VideoCollectVideo
|
||||
width?: number
|
||||
}>()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NCard size="small" hoverable :style="`max-width: ${width ?? 300}px;`">
|
||||
<template #cover>
|
||||
<NImage :src="video.cover" :img-props="{ referrerpolicy: 'no-referrer' }" />
|
||||
</template>
|
||||
<template #header>
|
||||
<a :href="`https://bilibili.com/video/${video.id}`" target="_blank">
|
||||
<NText>
|
||||
<NEllipsis>{{ video.title }}</NEllipsis>
|
||||
</NText>
|
||||
</a>
|
||||
</template>
|
||||
<NText depth="3" style="white-space: pre-line">
|
||||
<NEllipsis>
|
||||
{{ video.description }}
|
||||
<template #tooltip>
|
||||
<div style="white-space: pre-line; max-width: 300px">
|
||||
{{ video.description }}
|
||||
</div>
|
||||
</template>
|
||||
</NEllipsis>
|
||||
</NText>
|
||||
</NCard>
|
||||
</template>
|
||||
Reference in New Issue
Block a user