From db045c61d2cdc79de9748b25a8caa1e16f54ade3 Mon Sep 17 00:00:00 2001 From: katherinehhh Date: Fri, 8 Mar 2024 12:00:59 +0800 Subject: [PATCH] fix: view collection interface missing (#3658) --- .../templates/components/PreviewFields.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/core/client/src/collection-manager/templates/components/PreviewFields.tsx b/packages/core/client/src/collection-manager/templates/components/PreviewFields.tsx index b7ca62c28..b3b71c560 100644 --- a/packages/core/client/src/collection-manager/templates/components/PreviewFields.tsx +++ b/packages/core/client/src/collection-manager/templates/components/PreviewFields.tsx @@ -60,12 +60,12 @@ const PreviewCom = (props) => { const children = collection.fields .filter((v) => !['hasOne', 'hasMany', 'belongsToMany'].includes(v?.type)) ?.map((v) => { - return { value: v.name, key: v.name, label: t(v.uiSchema?.title) }; + return { value: v.name, key: v.name, label: t(v.uiSchema?.title || v.name) }; }) .concat(result); data.push({ value: item, - label: t(collection.title), + label: t(collection.title || collection.name), children, }); }); @@ -187,7 +187,7 @@ const PreviewCom = (props) => { {data.map((group) => ( {group.children.map((item) => ( - + {compile(item.label)} ))}