From e81d9521128d936ec78855ef34be853e59ea07e1 Mon Sep 17 00:00:00 2001 From: Hakadao Date: Wed, 19 Apr 2023 02:14:41 +0800 Subject: [PATCH] fix: #13 --- src/components/VideoCard.vue | 34 ++++++++++--------- .../Home/components/RecommendContent.vue | 16 ++++----- 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/src/components/VideoCard.vue b/src/components/VideoCard.vue index e649ca8d..e17a2491 100644 --- a/src/components/VideoCard.vue +++ b/src/components/VideoCard.vue @@ -3,15 +3,15 @@ import { removeHttpFromUrl } from '~/utils/main' import { calcCurrentTime, calcTimeSince, numFormatter } from '~/utils/dataFormatter' const props = defineProps<{ - duration: number + duration?: number title: string cover: string - author: string - authorFace: string - mid: number - view: number - danmaku: number - publishedTimestamp: number + author?: string + authorFace?: string + mid?: number + view?: number + danmaku?: number + publishedTimestamp?: number bvid?: string aid?: number }>() @@ -132,6 +132,7 @@ function gotoChannel(mid: number) {
{{ author }}
- - {{ + {{ $t('common.view', { count: numFormatter(view) }, view) }} - - - {{ $t('common.danmaku', { count: numFormatter(danmaku) }, danmaku) }} - +
- {{ calcTimeSince(publishedTimestamp * 1000) }} + {{ calcTimeSince(publishedTimestamp * 1000) }}
diff --git a/src/contentScripts/views/Home/components/RecommendContent.vue b/src/contentScripts/views/Home/components/RecommendContent.vue index 84f2d9f3..6aaf1c80 100644 --- a/src/contentScripts/views/Home/components/RecommendContent.vue +++ b/src/contentScripts/views/Home/components/RecommendContent.vue @@ -152,15 +152,15 @@ function jumpToLoginPage() {