# jk-plugin-core **Repository Path**: jacktancc/jk-plugin-core ## Basic Information - **Project Name**: jk-plugin-core - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-12-21 - **Last Updated**: 2021-12-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # **jk-plugin-core** [English document](./readme.en.md) jk-plugin-core 是jk-weapp的插件系统核心,用于插件的注册、注销、将插件绑定到指定对象上,具体如下: 1.插件必须遵循IPlugin接口 ```typescript export interface IPlugin { name: string; uuid: string; version: string; [key: string]: any; } ``` 2.插件核心导出类 ```typescript export default class PluginCore { private constructor(); /** 作用域,用于绑定在全局对象的属性名称 */ private scope; /** 插件核心实例 */ private static Instance; /** 插件列表 */ private Plugins; /** 获取插件核心实例 */ static getInstance(scope?: string): PluginCore | null; /** 挂在到某个对象上面 */ static bind(target: IKV): void; /** 注册插件 */ register(plugin: IPlugin): void; /** 销毁插件 */ unRegister(plugin: IPlugin): void; } ```