From abc79f3d6e5e238fc242efe49b680b6346a42831 Mon Sep 17 00:00:00 2001 From: Hakadao Date: Tue, 27 Dec 2022 00:15:11 +0800 Subject: [PATCH] fix: video link --- src/components/VideoCard/VideoCard.vue | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/components/VideoCard/VideoCard.vue b/src/components/VideoCard/VideoCard.vue index 0e7ec3e5..0eb8e9ee 100644 --- a/src/components/VideoCard/VideoCard.vue +++ b/src/components/VideoCard/VideoCard.vue @@ -4,10 +4,14 @@ import { accessKey, language } from '~/logic/index' import { calcCurrentTime, calcTimeSince, numFormatter } from '~/utils' import { LanguageType } from '~/enums/appEnums' -defineProps<{ +const props = defineProps<{ videoData: Video }>() +const videoUrl = computed(() => { + return `/video/${props.videoData.bvid}` +}) + const isDislike = ref(false) const dislikeReasonId = ref(null) const showPopCtrl = ref(false) @@ -16,10 +20,6 @@ function gotoChannel(mid: number) { window.open(`//space.bilibili.com/${mid}`) } -function gotoVideo(param: string) { - window.open(`/video/av${param}`) -} - // function submitDislike( // reasonID: number, // goto: string, @@ -100,7 +100,7 @@ function gotoVideo(param: string) { border="solid $bew-fill-1" text="$bew-text-3 sm center" rounded="$bew-radius" - style="aspect-ratio: 16/9" + class="aspect-video" > {{ $t('home.video_removed') }}