mirror of
https://github.com/cool-team-official/cool-admin-midway.git
synced 2025-12-15 20:22:50 +00:00
如果是单例插件,不再初始化
This commit is contained in:
parent
985146d401
commit
545942ea25
@ -149,11 +149,11 @@ export class PluginService extends BaseService {
|
|||||||
instance = this.pluginCenterService.plugins.get(key);
|
instance = this.pluginCenterService.plugins.get(key);
|
||||||
} else {
|
} else {
|
||||||
instance = new (await this.pluginCenterService.plugins.get(key))();
|
instance = new (await this.pluginCenterService.plugins.get(key))();
|
||||||
|
await instance.init(pluginInfo, this.ctx, this.app, {
|
||||||
|
cache: this.midwayCache,
|
||||||
|
pluginService: this,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
await instance.init(pluginInfo, this.ctx, this.app, {
|
|
||||||
cache: this.midwayCache,
|
|
||||||
pluginService: this,
|
|
||||||
});
|
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user