From 213074760d89895291853fc8d3888b9177c6f6bf Mon Sep 17 00:00:00 2001 From: Reana Date: Wed, 22 Jan 2025 08:35:55 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E7=9A=84=E6=95=B0=E5=AD=97=E4=BA=BA=E6=92=AD=E6=8A=A5=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E5=B1=95=E7=A4=BA=E9=94=99=E8=AF=AF=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/article/edit-modal.tsx | 2 +- src/types/core.d.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/article/edit-modal.tsx b/src/components/article/edit-modal.tsx index 744aac3..9c8ee7c 100644 --- a/src/components/article/edit-modal.tsx +++ b/src/components/article/edit-modal.tsx @@ -111,7 +111,7 @@ export default function ArticleEditModal(props: Props) { if (typeof (props.id) != 'undefined') { if (props.id > 0) { article.getById(props.id).then(res => { - setGroups(rebuildGroups(res.content_group)) + setGroups(rebuildGroups([[{content: res.metahuman_text, type: "text"}], ...res.content_group])) setTitle(res.title) }) } else { diff --git a/src/types/core.d.ts b/src/types/core.d.ts index 9022610..dc8f558 100644 --- a/src/types/core.d.ts +++ b/src/types/core.d.ts @@ -31,6 +31,7 @@ declare interface ArticleContentGroup { declare interface ArticleDetail { id: number; title: string; + metahuman_text: string; content_group: BlockContent[][] }