mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-07 00:36:41 +08:00
fix(discover): stabilize media card hover
This commit is contained in:
@@ -493,14 +493,14 @@ onBeforeUnmount(() => {
|
|||||||
<template>
|
<template>
|
||||||
<VHover>
|
<VHover>
|
||||||
<template #default="hover">
|
<template #default="hover">
|
||||||
<div ref="mediaCardRef">
|
<!-- Hover 命中区域保持静止,避免卡片上浮后底边反复触发 mouseleave。 -->
|
||||||
|
<div ref="mediaCardRef" v-bind="hover.props" class="media-card-hover-area">
|
||||||
<VCard
|
<VCard
|
||||||
v-bind="hover.props"
|
|
||||||
:height="props.height"
|
:height="props.height"
|
||||||
:width="props.width"
|
:width="props.width"
|
||||||
class="outline-none ring-gray-500 media-card"
|
class="outline-none ring-gray-500 media-card"
|
||||||
:class="{
|
:class="{
|
||||||
'transition transform-cpu duration-300 -translate-y-1': hover.isHovering,
|
'transition transform-cpu duration-300 -translate-y-1': hover.isHovering,
|
||||||
'ring-1': isImageLoaded,
|
'ring-1': isImageLoaded,
|
||||||
}"
|
}"
|
||||||
@click.stop="goMediaDetail(hover.isHovering ?? false)"
|
@click.stop="goMediaDetail(hover.isHovering ?? false)"
|
||||||
@@ -591,6 +591,10 @@ onBeforeUnmount(() => {
|
|||||||
</VHover>
|
</VHover>
|
||||||
</template>
|
</template>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.media-card-hover-area {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.media-card-title {
|
.media-card-title {
|
||||||
font-size: 1.125rem;
|
font-size: 1.125rem;
|
||||||
line-height: 1.25rem;
|
line-height: 1.25rem;
|
||||||
|
|||||||
Reference in New Issue
Block a user