fix: schema Initializer demos

This commit is contained in:
chenos 2022-02-22 23:53:51 +08:00
parent 98076d628d
commit e140227798
2 changed files with 5 additions and 3 deletions

View File

@ -91,9 +91,10 @@ const AddBlockButton = observer((props: any) => {
export default function App() {
return (
<SchemaComponentProvider designable components={{ TableBlockInitializer, Hello, AddBlockButton }}>
<SchemaComponentProvider designable>
<SchemaInitializerProvider initializers={initializers}>
<SchemaComponent
components={{ TableBlockInitializer, Hello, AddBlockButton }}
schema={{
type: 'void',
name: 'page',

View File

@ -5,11 +5,12 @@ import {
SchemaComponent,
SchemaComponentProvider,
SchemaInitializer,
SchemaInitializerItemOptions
SchemaInitializerItemOptions,
SchemaInitializerProvider,
useSchemaInitializer
} from '@nocobase/client';
import { Input } from 'antd';
import React from 'react';
import { SchemaInitializerProvider, useSchemaInitializer } from '..';
const useFormItemInitializerFields = () => {
return [