tachybase_todo/packages/plugins/@nocobase/plugin-sample-custom-block/src/client/HelloDesigner.tsx

19 lines
525 B
TypeScript
Raw Normal View History

2022-09-30 12:38:38 +08:00
import { useFieldSchema } from '@formily/react';
import { GeneralSchemaDesigner, SchemaSettings, useCollection } from '@nocobase/client';
import React from 'react';
export const HelloDesigner = () => {
const { name, title } = useCollection();
const fieldSchema = useFieldSchema();
return (
<GeneralSchemaDesigner title={title || name}>
<SchemaSettings.Remove
removeParentsIfNoChildren
breakRemoveOn={{
'x-component': 'Grid',
}}
/>
</GeneralSchemaDesigner>
);
};