nocobase/docs/en-US/api/server/plugin-manager.md
chenos a6eebb940f
feat: update docs (#990)
* 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>
2022-10-31 11:52:17 +08:00

737 B

PluginManager

应用插件管理器的实例,由应用自动创建,可以通过 app.pm 访问。

实例方法

create()

在本地创建一个插件脚手架

签名

create(name, options): void;

addStatic()

签名

addStatic(plugin: any, options?: PluginOptions): Plugin;

示例

pm.addStatic('nocobase');

add()

签名

async add(plugin: any, options?: PluginOptions): Promise<Plugin>;
async add(plugin: string[], options?: PluginOptions): Promise<Plugin[]>;

示例

await pm.add(['test'], {
  builtIn: true,
  enabled: true,
});

get()

获取插件实例

enable()

disable()

remove()

upgrade()