diff --git a/src/components/post/tp-mention.vue b/src/components/post/tp-mention.vue index 01351d1d..4f486f7f 100644 --- a/src/components/post/tp-mention.vue +++ b/src/components/post/tp-mention.vue @@ -11,7 +11,7 @@ import TGClient from "../../utils/TGClient"; import showConfirm from "../func/confirm"; import showSnackbar from "../func/snackbar"; -interface TpMention { +export interface TpMention { insert: { mention: { uid: string; diff --git a/src/components/post/tp-parser.vue b/src/components/post/tp-parser.vue index 9e80a27f..0f7ff0f5 100644 --- a/src/components/post/tp-parser.vue +++ b/src/components/post/tp-parser.vue @@ -31,6 +31,11 @@ function getParsedData(data: TGApp.Plugins.Mys.SctPost.Base[]): TGApp.Plugins.My let cur: TGApp.Plugins.Mys.SctPost.Base | undefined; for (const tp of data) { const tpName = getTpName(tp); + // 单独处理 TpMention + if (tpName === TpMention) { + child.push(tp); + continue; + } if (tpName !== TpText) { cur = tp; child = []; diff --git a/src/components/post/tp-texts.vue b/src/components/post/tp-texts.vue index acbf1b0a..731ebbb7 100644 --- a/src/components/post/tp-texts.vue +++ b/src/components/post/tp-texts.vue @@ -1,15 +1,21 @@