From a51af0328a2f458f1e8150514677834b361f8f1c Mon Sep 17 00:00:00 2001 From: BTMuli Date: Fri, 29 Dec 2023 22:18:07 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E4=BF=AE=E5=A4=8D=E6=92=AD?= =?UTF-8?q?=E6=94=BE=E6=95=B0=E9=87=8F=20undefined?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/post/tp-vod.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/post/tp-vod.vue b/src/components/post/tp-vod.vue index 0ff9c09c..26cd148a 100644 --- a/src/components/post/tp-vod.vue +++ b/src/components/post/tp-vod.vue @@ -34,7 +34,7 @@ interface TpVod { format: "MP4"; // 待补充 label: "480P" | "720P" | "1080P" | "2K"; // 待补充 }>; - view_num: number; + view_num?: number; transcode_status: number; review_status: number; }; @@ -93,8 +93,10 @@ onMounted(async () => { name: "subtitle", index: 100, position: "left", - html: `${props.data.insert.vod.view_num}`, - tooltip: `播放数:${props.data.insert.vod.view_num}`, + html: `${ + props.data.insert.vod?.view_num ?? 0 + }`, + tooltip: `播放数:${props.data.insert.vod?.view_num ?? 0}`, }, ], };