From 890920775aa25a60b80cbe8b34f17c4d775c30cd Mon Sep 17 00:00:00 2001 From: falling Date: Fri, 19 Apr 2024 21:57:37 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E5=AE=89=E5=8D=93=E6=89=8B=E6=9C=BA?= =?UTF-8?q?=E7=AB=AFhover=E4=BA=8B=E4=BB=B6=E8=A2=ABVCard=E7=9A=84click?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E8=A6=86=E7=9B=96=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/cards/MediaCard.vue | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/components/cards/MediaCard.vue b/src/components/cards/MediaCard.vue index fd56e5f3..5bfdb879 100644 --- a/src/components/cards/MediaCard.vue +++ b/src/components/cards/MediaCard.vue @@ -364,14 +364,16 @@ function getExistText(season: number) { } // 打开详情页 -function goMediaDetail() { - router.push({ - path: '/media', - query: { - mediaid: getMediaId(), - type: props.media?.type, - }, - }) +function goMediaDetail(isHovering = false) { + if (isHovering) { + router.push({ + path: '/media', + query: { + mediaid: getMediaId(), + type: props.media?.type, + }, + }) + } } // 开始搜索 @@ -440,7 +442,7 @@ function getYear(airDate: string) { 'transition transform-cpu duration-300 scale-105 shadow-lg': hover.isHovering, 'ring-1': isImageLoaded, }" - @click.stop="goMediaDetail" + @click.stop="goMediaDetail(hover.isHovering)" >