-
Notifications
You must be signed in to change notification settings - Fork 35
docs: plugin block template #327
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
Merged
Merged
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
4fe159b
docs: plugin block template
gchust 157d2c2
Merge branch 'main' into plugin-block-template
gchust a1593da
chore: upload screenshot to cdn
gchust 0c01444
chore: update
gchust 774f29c
chore: update
gchust 51b4d22
chore: update
gchust 4483fda
chore: update
gchust File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| # 区块模板 | ||
|
|
||
| <PluginInfo name="block-template"></PluginInfo> | ||
|
|
||
| ## 介绍 | ||
|
|
||
| 区块模板用于为区块提供模板能力, 可用于模板的集中管理及通过模板创建区块。通过模板创建的区块, 与模板是继承关系, 可以在模板基础上增加自己的配置。 | ||
|
|
||
| ## 安装 | ||
|
|
||
| 内置插件, 无需安装。 | ||
|
|
||
| ## 使用说明 | ||
|
|
||
|  | ||
|
|
||
| ### 模板管理 | ||
|
|
||
| #### 创建模板 | ||
|
|
||
| 点击 "新增" 按钮, 输入相关信息, 点击 "提交" 按钮, 即可创建模板。 | ||
|
|
||
|  | ||
|
|
||
| #### 配置模板 | ||
|
|
||
| 选择模板, 点击 "配置" 按钮, 即可进入模板配置界面, 配置模板数据区块。 | ||
|
|
||
|  | ||
|
|
||
| :::info{title=注意} | ||
| 目前模板仅支持添加一个数据区块, 未配置数据区块时, 将无法使用该模板创建区块。 | ||
| ::: | ||
|
|
||
| #### 编辑模板 | ||
|
|
||
| 选择模板, 点击 "编辑" 按钮, 即可进入模板编辑界面修改模板标题、描述。 | ||
|
|
||
|  | ||
|
|
||
| #### 复制模板 | ||
|
|
||
| 选择模板, 点击 "复制" 按钮, 输入新模板标题, 点击 "提交" 按钮, 即可复制模板。 | ||
| 模板复制后可以进行编辑以适应新的需求场景。 | ||
|
|
||
|  | ||
|
|
||
| #### 删除模板 | ||
|
|
||
| 选择模板, 点击 "删除" 按钮, 点击 "提交" 按钮, 即可删除模板。 | ||
|
|
||
|  | ||
|
|
||
| 删除可以选择是否"保留已创建的区块": | ||
| - 若选择保留, 则模板被删除后, 已创建的区块会被转换成普通的页面区块。 | ||
| - 若选择不保留, 则模板被删除后, 已创建的区块也会被删除。 | ||
|
|
||
| ### 模板使用 | ||
|
|
||
| #### 创建区块 | ||
|
|
||
| 在页面中创建区块时, 选择对应区块的模板, 即可使用模板创建区块。 | ||
|
|
||
|  | ||
|
|
||
| 从模板创建的区块与普通区块有以下几点不同: | ||
| 1. 该区块与模板是继承关系, 可以在模板基础上增加自己的配置, 未修改的配置会与模板保持同步。 | ||
| 2. 继承自模板的 UI 组件无法从页面中删除。 | ||
|  | ||
|
|
||
| 3. 区块新增的字段、操作会以不同的背景色展示, 以便区分。 | ||
|  | ||
|
|
||
| 4. 区块及继承自模板的 UI 组件均会多一个 "恢复到模板" 的配置项, 用于恢复到模板完全一致的状态。 | ||
|  | ||
|
|
||
| :::info{title=注意} | ||
| 区块内部的 UI 组件的位置以页面为准, 创建后不能自动同步模板的中对应的位置, 需要同步模板只能将整个区块恢复到模板。 | ||
| ::: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| # 区块模板 | ||
|
||
|
|
||
| <PluginInfo name="block-template"></PluginInfo> | ||
|
|
||
| ## 介绍 | ||
|
|
||
| 区块模板用于为区块提供模板能力, 可用于模板的集中管理及通过模板创建区块。通过模板创建的区块, 与模板是继承关系, 可以在模板基础上增加自己的配置。 | ||
|
|
||
| ## 安装 | ||
|
|
||
| 内置插件, 无需安装。 | ||
|
|
||
| ## 使用说明 | ||
|
|
||
|  | ||
|
|
||
| ### 模板管理 | ||
|
|
||
| #### 创建模板 | ||
|
|
||
| 点击 "新增" 按钮, 输入相关信息, 点击 "提交" 按钮, 即可创建模板。 | ||
|
|
||
|  | ||
|
|
||
| #### 配置模板 | ||
|
|
||
| 选择模板, 点击 "配置" 按钮, 即可进入模板配置界面, 配置模板数据区块。 | ||
|
|
||
|  | ||
|
|
||
| :::info{title=注意} | ||
| 目前模板仅支持添加一个数据区块, 未配置数据区块时, 将无法使用该模板创建区块。 | ||
| ::: | ||
|
|
||
| #### 编辑模板 | ||
|
|
||
| 选择模板, 点击 "编辑" 按钮, 即可进入模板编辑界面修改模板标题、描述。 | ||
|
|
||
|  | ||
|
|
||
| #### 复制模板 | ||
|
|
||
| 选择模板, 点击 "复制" 按钮, 输入新模板标题, 点击 "提交" 按钮, 即可复制模板。 | ||
| 模板复制后可以进行编辑以适应新的需求场景。 | ||
|
|
||
|  | ||
|
|
||
| #### 删除模板 | ||
|
|
||
| 选择模板, 点击 "删除" 按钮, 点击 "提交" 按钮, 即可删除模板。 | ||
|
|
||
|  | ||
|
|
||
| 删除可以选择是否"保留已创建的区块": | ||
| - 若选择保留, 则模板被删除后, 已创建的区块会被转换成普通的页面区块。 | ||
| - 若选择不保留, 则模板被删除后, 已创建的区块也会被删除。 | ||
|
|
||
| ### 模板使用 | ||
|
|
||
| #### 创建区块 | ||
|
|
||
| 在页面中创建区块时, 选择对应区块的模板, 即可使用模板创建区块。 | ||
|
|
||
|  | ||
|
|
||
| 从模板创建的区块与普通区块有以下几点不同: | ||
| 1. 该区块与模板是继承关系, 可以在模板基础上增加自己的配置, 未修改的配置会与模板保持同步。 | ||
| 2. 继承自模板的 UI 组件无法从页面中删除。 | ||
|  | ||
|
|
||
| 3. 区块新增的字段、操作会以不同的背景色展示, 以便区分。 | ||
|  | ||
|
|
||
| 4. 区块及继承自模板的 UI 组件均会多一个 "恢复到模板" 的配置项, 用于恢复到模板完全一致的状态。 | ||
|  | ||
|
|
||
| :::info{title=注意} | ||
| 区块内部的 UI 组件的位置以页面为准, 创建后不能自动同步模板的中对应的位置, 需要同步模板只能将整个区块恢复到模板。 | ||
| ::: | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The sentence ending with '在新增数据和编辑数据的界面里它' appears grammatically incomplete. Consider revising it to include an action verb (e.g., '引用该模板') for clarity.