fix: add new blocks

This commit is contained in:
chenos 2023-03-05 11:59:08 +08:00
parent 5769925757
commit 3904aa7c11

View File

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