-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: update development documentation #8
Conversation
@@ -0,0 +1,85 @@ | |||
# SchemaSettings 设置器 | |||
|
|||
激活 UI 配置之后,鼠标放到指定区块、表单、操作上方时,会显示对应的 Schema 工具栏,工具栏的设置图标就是当前 Schema 的设置器。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- “操作上方” 改为 "操作按钮上方"
- "工具栏的设置图标" 语言太干涩,如果只是这样说,别人也不知道什么是工具栏的设置图标,还是建议截个图放在最上面
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 操作是名称的,
鼠标放到指定区块、字段、操作上方时
字打错了,区块、字段、操作是三个特指,都是名称,UI 配置里最核心单独三个东西 - 这里还缺个截图
|
||
## 常用的设置器 | ||
|
||
<img src="./SchemaSettings.png" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个图感觉不是很有必要,写在这里几乎没啥用
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
有用的,这样划分之后,看起来会清晰很多(这个图还没梳理完整)
还有就是图里的标识也还没补充(现在有的也没有),有标识了可以快速定位到是哪个 settings
没有标识,扩展的时候都不知道 name 要填的啥
也会加个链接,快速的看到所有 settings 的标识和 item 标识,
|
||
## 向已有的设置器里添加设置项 | ||
|
||
使用 `schemaSettingsManager.addItem()` 方法添加 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里可以把 hello 的那个截图添加到这里
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里打算加个 demo 示例的
```ts | ||
class PluginSampleSchemaInitializer extends Plugin { | ||
async load() { | ||
const myInitializer = new SchemaInitializer({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 建议将 new 的逻辑放到 Plugin 外面,都写在 load 里不太好
- 这里写的是 Initializer 不是 settings,这篇是 settings 的文章
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不合适的,因为插件是实例化的,放外面会造成全局污染
} | ||
``` | ||
|
||
### 在特定 Schema 中使用 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
应该把这个章节放到 "自主渲染设置器按钮" 下面,标题改为 “内置 Settings 渲染器的组件”
@@ -0,0 +1,86 @@ | |||
# SchemaInitializer 初始化器 | |||
|
|||
当激活 UI 配置之后,界面上直观可见的各种橙色按钮就是 SchemaInitializer 初始化器,用于向界面内添加各种区块、字段、操作等。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
“操作” 改为 “操作按钮”,操作是动词
|
||
## 向已有的初始化器里添加项 | ||
|
||
使用 `schemaInitializerManager.addItem()` 方法添加 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
添加一个截图
} | ||
``` | ||
|
||
### 在特定 Schema 中使用 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
放到 “自主渲染” 的下面,标题改为 “内置 Initializer 渲染器的组件”
# Conflicts: # docs/en-US/development/index.md # docs/zh-CN/development/index.md
No description provided.