mirror of
https://github.com/cool-team-official/cool-admin-midway.git
synced 2025-12-10 16:12:50 +00:00
优化插件加载,提高速度
This commit is contained in:
parent
21d928167e
commit
d88a878856
@ -145,7 +145,19 @@ export class PluginCenterService {
|
|||||||
...condition,
|
...condition,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
const plugins = await this.pluginInfoEntity.findBy(find);
|
const plugins = await this.pluginInfoEntity.find({
|
||||||
|
where: find,
|
||||||
|
select: [
|
||||||
|
'id',
|
||||||
|
'name',
|
||||||
|
'description',
|
||||||
|
'keyName',
|
||||||
|
'hook',
|
||||||
|
'version',
|
||||||
|
'pluginJson',
|
||||||
|
'config',
|
||||||
|
],
|
||||||
|
});
|
||||||
for (const plugin of plugins) {
|
for (const plugin of plugins) {
|
||||||
const data = await this.pluginService.getData(plugin.keyName);
|
const data = await this.pluginService.getData(plugin.keyName);
|
||||||
if (!data) {
|
if (!data) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user