mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-07 00:36:41 +08:00
feat(MediaCard): 添加媒体卡详情展示,优化悬停效果
This commit is contained in:
@@ -422,7 +422,6 @@ function onRemoveSubscribe() {
|
|||||||
aspect-ratio="2/3"
|
aspect-ratio="2/3"
|
||||||
:src="getImgUrl"
|
:src="getImgUrl"
|
||||||
class="object-cover aspect-w-2 aspect-h-3"
|
class="object-cover aspect-w-2 aspect-h-3"
|
||||||
:class="hover.isHovering ? 'on-hover' : ''"
|
|
||||||
cover
|
cover
|
||||||
@load="isImageLoaded = true"
|
@load="isImageLoaded = true"
|
||||||
@error="imageLoadError = true"
|
@error="imageLoadError = true"
|
||||||
@@ -433,6 +432,24 @@ function onRemoveSubscribe() {
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</VImg>
|
</VImg>
|
||||||
|
<!-- 详情 -->
|
||||||
|
<VCardText
|
||||||
|
v-show="hover.isHovering || imageLoadError"
|
||||||
|
class="w-full h-full flex flex-col flex-wrap justify-end align-left text-white absolute bottom-0 cursor-pointer pa-2"
|
||||||
|
style="background: linear-gradient(rgba(45, 55, 72, 40%) 0%, rgba(45, 55, 72, 90%) 100%)"
|
||||||
|
>
|
||||||
|
<span class="font-bold">{{ props.media?.year }}</span>
|
||||||
|
<h1 class="mb-1 text-white font-extrabold text-xl line-clamp-2 overflow-hidden text-ellipsis ...">
|
||||||
|
{{ props.media?.title }}
|
||||||
|
</h1>
|
||||||
|
<p class="leading-4 line-clamp-4 overflow-hidden text-ellipsis ...">
|
||||||
|
{{ props.media?.overview }}
|
||||||
|
</p>
|
||||||
|
<div class="flex align-center justify-between">
|
||||||
|
<IconBtn icon="mdi-magnify" color="white" @click.stop="handleSearch" />
|
||||||
|
<IconBtn icon="mdi-heart" :color="isSubscribed ? 'error' : 'white'" @click.stop="handleSubscribe" />
|
||||||
|
</div>
|
||||||
|
</VCardText>
|
||||||
<!-- 类型角标 -->
|
<!-- 类型角标 -->
|
||||||
<VChip
|
<VChip
|
||||||
v-show="isImageLoaded"
|
v-show="isImageLoaded"
|
||||||
@@ -455,23 +472,7 @@ function onRemoveSubscribe() {
|
|||||||
>
|
>
|
||||||
{{ props.media?.vote_average }}
|
{{ props.media?.vote_average }}
|
||||||
</VChip>
|
</VChip>
|
||||||
<!-- 详情 -->
|
<!--来源图标-->
|
||||||
<VCardText
|
|
||||||
v-show="hover.isHovering || imageLoadError"
|
|
||||||
class="w-full flex flex-col flex-wrap justify-end align-left text-white absolute bottom-0 cursor-pointer pa-2"
|
|
||||||
>
|
|
||||||
<span class="font-bold">{{ props.media?.year }}</span>
|
|
||||||
<h1 class="mb-1 text-white font-extrabold text-xl line-clamp-2 overflow-hidden text-ellipsis ...">
|
|
||||||
{{ props.media?.title }}
|
|
||||||
</h1>
|
|
||||||
<p class="leading-4 line-clamp-4 overflow-hidden text-ellipsis ...">
|
|
||||||
{{ props.media?.overview }}
|
|
||||||
</p>
|
|
||||||
<div class="flex align-center justify-between">
|
|
||||||
<IconBtn icon="mdi-magnify" color="white" @click.stop="handleSearch" />
|
|
||||||
<IconBtn icon="mdi-heart" :color="isSubscribed ? 'error' : 'white'" @click.stop="handleSubscribe" />
|
|
||||||
</div>
|
|
||||||
</VCardText>
|
|
||||||
<VAvatar
|
<VAvatar
|
||||||
size="24"
|
size="24"
|
||||||
density="compact"
|
density="compact"
|
||||||
@@ -551,9 +552,3 @@ function onRemoveSubscribe() {
|
|||||||
@remove="onRemoveSubscribe"
|
@remove="onRemoveSubscribe"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
.on-hover img {
|
|
||||||
@apply brightness-50;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user