mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-03-05 09:47:20 +00:00
fix: 修复 demo 问题
This commit is contained in:
parent
5312614d30
commit
5d5af1db2c
@ -27,7 +27,7 @@ const logger = getLogger({ level: 'warn', bizName: 'designer:pluginManager' });
|
||||
export class LowCodePluginManager implements ILowCodePluginManager {
|
||||
private plugins: ILowCodePlugin[] = [];
|
||||
|
||||
private pluginsMap: Map<string, ILowCodePlugin> = new Map();
|
||||
pluginsMap: Map<string, ILowCodePlugin> = new Map();
|
||||
|
||||
private pluginPreference?: PluginPreference = new Map();
|
||||
|
||||
|
||||
@ -83,7 +83,7 @@ const config = engineConfig;
|
||||
const event = new Event(editor, { prefix: 'common' });
|
||||
const logger = getLogger({ level: 'warn', bizName: 'common' });
|
||||
const common = new Common(editor, innerSkeleton);
|
||||
let plugins: any;
|
||||
let plugins: Plugins;
|
||||
|
||||
const pluginContextApiAssembler: ILowCodePluginContextApiAssembler = {
|
||||
assembleApis: (context: ILowCodePluginContextPrivate) => {
|
||||
|
||||
@ -10,7 +10,7 @@ import { pluginsSymbol } from './symbols';
|
||||
const innerPluginsSymbol = Symbol('plugin');
|
||||
export default class Plugins implements IPublicApiPlugins {
|
||||
private readonly [innerPluginsSymbol]: LowCodePluginManager;
|
||||
get [pluginsSymbol]() {
|
||||
get [pluginsSymbol](): LowCodePluginManager {
|
||||
if (this.workspaceMode) {
|
||||
return this[innerPluginsSymbol];
|
||||
}
|
||||
@ -34,6 +34,14 @@ export default class Plugins implements IPublicApiPlugins {
|
||||
await this[pluginsSymbol].register(pluginConfigCreator, options, registerOptions);
|
||||
}
|
||||
|
||||
async init(registerOptions: any) {
|
||||
await this[pluginsSymbol].init(registerOptions);
|
||||
}
|
||||
|
||||
async getPluginPreference(pluginName: string) {
|
||||
await this[pluginsSymbol].getPluginPreference(pluginName);
|
||||
}
|
||||
|
||||
toProxy() {
|
||||
return new Proxy(this, {
|
||||
get(target, prop, receiver) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user