nocobase/docs/guide/plugin-development/pluggable-interfaces.zh-CN.md
chenos ca7af9c8cc
feat: new version of the documentation (#95)
* feat: new version of the documentation

* feat: add English catalog translation

* Update quickstart.md

* Update quickstart.zh-CN.md

* Update quickstart.zh-CN.md

* Update quickstart.zh-CN.md

* Update quickstart.zh-CN.md

* feat: update quickstart

* update doc

* update pepository api doc

Co-authored-by: ChengLei Shao <chareice@live.com>
2021-10-28 22:55:51 +08:00

47 lines
893 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
order: 2
---
# 插件化接口有哪些?
插件是按功能划分的可插拔的独立模块,为了以插件的方式扩展功能,需要实现扩展功能的添加和删除方法。
NocoBase 的插件化接口主要有:
## 中间件
- 添加app.use()
- 删除app.unuse() 暂未实现,可以直接操作 app.middleware 数组来移除
## 事件
- 添加app.on()
- 删除app.removeListener()
## 资源
- 添加app.resource()
- 删除:暂无
## 操作
- 添加app.actions()
- 删除:暂无
## 数据表
- 添加app.collection()
- 删除:暂无
## 组件(前端)
- 添加 createRouteSwitch、createCollectionField、createSchemaComponent
- 删除:暂无
<Alert title="注意">
目前 NocoBase 的插件化机制还不完善,不能完全实现热插拔。前端的扩展还得依赖开发手动处理再重新构建。
</Alert>