From 0005e4eb74e3e8a3e7b5090ca1869f503d15a453 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9B=AE=E6=A3=83?= Date: Wed, 12 Feb 2025 13:47:14 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E4=BF=AE=E5=A4=8D=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/viewPost/tp-texts.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/viewPost/tp-texts.vue b/src/components/viewPost/tp-texts.vue index 9f98e9b4..2834a908 100644 --- a/src/components/viewPost/tp-texts.vue +++ b/src/components/viewPost/tp-texts.vue @@ -27,6 +27,7 @@ import type { Component } from "vue"; import TpImage from "./tp-image.vue"; import TpMention, { type TpMention as TpMentionType } from "./tp-mention.vue"; import TpText, { type TpText as TpTextType } from "./tp-text.vue"; +import TpUnknown from "./tp-unknown.vue"; type TpTexts = { children: Array } & TpTextType; type TpTextsProps = { data: TpTexts }; @@ -36,7 +37,8 @@ const props = defineProps(); function getComp(text: TpTextType | TpMentionType): Component { if (typeof text.insert === "string") return TpText; if ("image" in text.insert) return TpImage; - return TpMention; + if ("mention" in text.insert) return TpMention; + return TpUnknown; } function getTitle(): string {