From 7de0b73e6d53c78a3fad92395f371118fd9ab4c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9B=AE=E6=A3=83?= Date: Sat, 9 Mar 2024 19:52:33 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E6=8D=A2=E8=A1=8C=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/post/tp-parser.vue | 4 ++-- src/components/post/tp-text.vue | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/post/tp-parser.vue b/src/components/post/tp-parser.vue index daf2ccbc..ce15dd9f 100644 --- a/src/components/post/tp-parser.vue +++ b/src/components/post/tp-parser.vue @@ -2,7 +2,7 @@ @@ -25,7 +25,7 @@ interface TpParserProps { const props = defineProps(); -function getTpName(tp: TGApp.Plugins.Mys.SctPost.Base, index: number) { +function getTpName(tp: TGApp.Plugins.Mys.SctPost.Base) { if (typeof tp.insert === "string") { return TpText; } else if ("image" in tp.insert) { diff --git a/src/components/post/tp-text.vue b/src/components/post/tp-text.vue index 73ae9bbf..f604dff7 100644 --- a/src/components/post/tp-text.vue +++ b/src/components/post/tp-text.vue @@ -102,8 +102,10 @@ function getTextStyle(): StyleValue { const style = >[]; let data: TpText; if (props.data.insert === "\n") { - style.push("display: inline"); - return style; + if (props.data.attributes?.align || props.data.attributes?.header) { + return "display: none"; + } + return "display: inline"; } if (props.next?.insert === "\n") { data = {