nocobase/docs/en-US/api/client/schema-designer/schema-initializer.md

28 lines
887 B
Markdown
Raw Normal View History

# SchemaInitializer
2023-02-18 15:42:55 +00:00
Used for the initialization of various schemas. Newly added schema can be inserted anywhere in an existing schema node, including:
```ts
{
properties: {
2023-02-18 15:42:55 +00:00
// beforeBegin - Insert in front of the current node
node1: {
properties: {
2023-02-18 15:42:55 +00:00
// afterBegin - Insert in front of the first child node of the current node
// ...
2023-02-18 15:42:55 +00:00
// beforeEnd - After the last child node of the current node
},
},
2023-02-18 15:42:55 +00:00
// afterEnd - After the current node
},
}
```
2023-02-18 15:42:55 +00:00
The core of SchemaInitializer includes `<SchemaInitializer.Button />` and `<SchemaInitializer.Item />` the two components. `<SchemaInitializer.Button />` is used to create the dropdown menu button of schema, and the options of the dropdown menu is `<SchemaInitializer.Item/>`.
### `<SchemaInitializerProvider />`
### `<SchemaInitializer.Button />`
### `<SchemaInitializer.Item/>`