tachybase_todo/docs/guide/plugin-development/pluggable-interfaces.md

44 lines
991 B
Markdown
Raw Normal View History

---
order: 2
---
# Pluggable Interfaces
2021-10-31 09:44:52 +08:00
Plugins are pluggable independent modules divided by functionality. In order to extend the functionality in the way of plugins, it is necessary to implement methods to add and remove extended functionality.
The main pluggable interfaces of NocoBase are.
2021-10-31 09:44:52 +08:00
## Middleware
2021-10-31 09:44:52 +08:00
- add: app.use()
- remove: app.unuse() is not yet implemented, you can directly manipulate the app.middleware array to remove
2021-10-31 09:44:52 +08:00
## Events
2021-10-31 09:44:52 +08:00
- Add: app.on()
- Remove: app.removeListener()
2021-10-31 09:44:52 +08:00
## Resources
2021-10-31 09:44:52 +08:00
- Add: app.resource()
- Remove: None
2021-10-31 09:44:52 +08:00
## Actions
2021-10-31 09:44:52 +08:00
- Add: app.actions()
- Delete: None
2021-10-31 09:44:52 +08:00
## Data Tables
2021-10-31 09:44:52 +08:00
- Add: app.collection()
- Delete: None
2021-10-31 09:44:52 +08:00
## Components (front-end)
2021-10-31 09:44:52 +08:00
- Add createRouteSwitch, createCollectionField, createSchemaComponent
- Remove: None at this time
2021-10-31 09:44:52 +08:00
<Alert title="Note">
2021-10-31 09:44:52 +08:00
Currently, NocoBase's plug-in mechanism is not perfect and cannot fully implement hot-plugging. Front-end extensions have to be manually handled by developers and then rebuilt.
</Alert>