fix: 修复更新的数字人播报字段展示错误的问题

This commit is contained in:
Reana 2025-01-22 08:35:55 +00:00
parent 3161a5ee27
commit 213074760d
2 changed files with 2 additions and 1 deletions

View File

@ -111,7 +111,7 @@ export default function ArticleEditModal(props: Props) {
if (typeof (props.id) != 'undefined') { if (typeof (props.id) != 'undefined') {
if (props.id > 0) { if (props.id > 0) {
article.getById(props.id).then(res => { 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) setTitle(res.title)
}) })
} else { } else {

1
src/types/core.d.ts vendored
View File

@ -31,6 +31,7 @@ declare interface ArticleContentGroup {
declare interface ArticleDetail { declare interface ArticleDetail {
id: number; id: number;
title: string; title: string;
metahuman_text: string;
content_group: BlockContent[][] content_group: BlockContent[][]
} }