mirror of
https://github.com/nocobase/nocobase
synced 2024-11-16 12:37:02 +00:00
a6eebb940f
* feat: improve code * feat: update docs * feat: update docs * Update index.md * Update features.md * Update when.md * Update contributing.md * Update translations.md * feat: clean up * Add files via upload * Update the-first-app.md * Update plugins.md * Update a-b-c.md * Update blocks.md * feat: update docs * Add files via upload * Update charts.md * feat: update navs * Update index.md * Update index.md * Update features.md * Update index.md * Update docker-compose.md * Update create-nocobase-app.md * Update git-clone.md * Update contributing.md * Update translations.md * Update plugins.md * Update the-first-app.md * Add files via upload * Update charts.md * Update charts.md * Update a-b-c.md * Update collections.md * Update menus.md * Update menus.md Co-authored-by: Zhou <zhou.working@gmail.com>
28 lines
825 B
Markdown
28 lines
825 B
Markdown
# SchemaInitializer
|
|
|
|
用于各种 schema 的初始化。新增的 schema 可以插入到某个已有 schema 节点的任意位置,包括:
|
|
|
|
```ts
|
|
{
|
|
properties: {
|
|
// beforeBegin 在当前节点的前面插入
|
|
node1: {
|
|
properties: {
|
|
// afterBegin 在当前节点的第一个子节点前面插入
|
|
// ...
|
|
// beforeEnd 在当前节点的最后一个子节点后面
|
|
},
|
|
},
|
|
// afterEnd 在当前节点的后面
|
|
},
|
|
}
|
|
```
|
|
|
|
SchemaInitializer 的核心包括 `<SchemaInitializer.Button />` 和 `<SchemaInitializer.Item />` 两个组件。`<SchemaInitializer.Button />` 用于创建 Schema 的下拉菜单按钮,下拉菜单的菜单项为 `<SchemaInitializer.Item/>`。
|
|
|
|
### `<SchemaInitializerProvider />`
|
|
|
|
### `<SchemaInitializer.Button />`
|
|
|
|
### `<SchemaInitializer.Item/>`
|