fix: details block is not displayed

This commit is contained in:
chenos 2023-03-05 07:51:22 +08:00
parent c360d957d0
commit 5769925757

View File

@ -55,7 +55,10 @@ export const FormBlockProvider = (props) => {
const { __collection } = record;
const currentCollection = useCollection();
const { designable } = useDesignable();
const detailFlag = (Object.keys(record).length > 0 && designable) || __collection === collection;
let detailFlag = true;
if (!designable && __collection) {
detailFlag = __collection === collection;
}
const createFlag = (currentCollection.name === collection && !Object.keys(record).length) || !currentCollection.name;
return (
(detailFlag || createFlag) && (