diff --git a/src/components/VideoCard-Perf.vue.bak b/src/components/VideoCard-Perf.vue.bak deleted file mode 100644 index 8dc62f5f..00000000 --- a/src/components/VideoCard-Perf.vue.bak +++ /dev/null @@ -1,367 +0,0 @@ - - - - - - - - - {{ $t('home.video_removed') }} - - - - - - - - - {{ calcCurrentTime(duration) }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ title }} - - - - - - - - - - - - - - - {{ author }} - - - {{ - $t('common.view', { count: numFormatter(view) }, view) - }} - - • - {{ $t('common.danmaku', { count: numFormatter(danmaku) }, danmaku) }} - - - {{ calcTimeSince(publishedTimestamp * 1000) }} - - - - - - - - - - - - - - - - - - - - - - hello world - - - - - - - - diff --git a/src/components/VideoCard.vue b/src/components/VideoCard.vue index c5d789c4..7df4007b 100644 --- a/src/components/VideoCard.vue +++ b/src/components/VideoCard.vue @@ -26,6 +26,8 @@ const isDislike = ref(false) const isInWatchLater = ref(false) // const dislikeReasonId = ref(null) const showPopCtrl = ref(false) +const contentVisibility = ref<'auto' | 'visible'>('auto') +const mouseLeaveTimeOut = ref() function gotoChannel(mid: number) { window.open(`//space.bilibili.com/${mid}`) @@ -56,6 +58,17 @@ function toggleWatchLater() { } } +function handleMouseMove() { + contentVisibility.value = 'visible' +} + +function handelMouseLeave() { + clearTimeout(mouseLeaveTimeOut.value) + mouseLeaveTimeOut.value = setTimeout(() => { + contentVisibility.value = 'auto' + }, 300) +} + // function submitDislike( // reasonID: number, // goto: string, @@ -113,29 +126,33 @@ function toggleWatchLater() { - - - - - {{ $t('home.video_removed') }} - + + + {{ $t('home.video_removed') }} + + - - - - - - {{ calcCurrentTime(duration) }} - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - {{ title }} - + {{ calcCurrentTime(duration) }} + - + + + + + + + + + + + + + + {{ title }} + + + - - - - + + + + - - + - + + + + {{ author }} + + + {{ + $t('common.view', { count: numFormatter(view) }, view) + }} + + • + {{ $t('common.danmaku', { count: numFormatter(danmaku) }, danmaku) }} + + + {{ calcTimeSince(publishedTimestamp * 1000) }} + - - {{ author }} + + + + + + + + + + + + + - - {{ - $t('common.view', { count: numFormatter(view) }, view) - }} - - • - {{ $t('common.danmaku', { count: numFormatter(danmaku) }, danmaku) }} - - - {{ calcTimeSince(publishedTimestamp * 1000) }} + + + + + + hello world