fix: 修复导入在线插件不生效的bug

This commit is contained in:
xiaojunnuo
2025-05-16 08:38:38 +08:00
parent 76b19a4980
commit fcf8309c23
5 changed files with 98 additions and 38 deletions

View File

@@ -48,6 +48,11 @@ export class Registry<T = any> {
logger.info(`注册插件:${this.type}:${key}`);
}
unRegister(key: string) {
delete this.storage[key];
logger.info(`反注册插件:${this.type}:${key}`);
}
get(name: string): RegistryItem<T> {
if (!name) {
throw new Error("插件名称不能为空");