fix: 完成管理端类型安全收口
This commit is contained in:
1 parent
2712517e64
commit
665a88eb30
5 files changed
+38
-18
No files matched your search
@@ -65,9 +65,9 @@ export function TrustContentPage() {
|
||||
? {
|
||||
type: item.type,
|
||||
title: item.title,
|
||||
summary: item.summary ?? undefined,
|
||||
...(item.summary ? { summary: item.summary } : {}),
|
||||
content: item.content,
|
||||
coverUrl: item.coverUrl ?? undefined,
|
||||
...(item.coverUrl ? { coverUrl: item.coverUrl } : {}),
|
||||
isPublished: item.isPublished,
|
||||
}
|
||||
: { type: "profile", isPublished: false },
|
||||
@@ -97,7 +97,11 @@ export function TrustContentPage() {
|
||||
),
|
||||
},
|
||||
{ title: "标题", dataIndex: "title" },
|
||||
{ title: "摘要", dataIndex: "summary", render: (value) => value || "未填写" },
|
||||
{
|
||||
title: "摘要",
|
||||
dataIndex: "summary",
|
||||
render: (value) => (typeof value === "string" && value ? value : "未填写"),
|
||||
},
|
||||
{
|
||||
title: "状态",
|
||||
dataIndex: "isPublished",
|
||||
|
||||
Reference in new issue
Block a user