mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-03-05 17:57:13 +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 {
|
export class LowCodePluginManager implements ILowCodePluginManager {
|
||||||
private plugins: ILowCodePlugin[] = [];
|
private plugins: ILowCodePlugin[] = [];
|
||||||
|
|
||||||
private pluginsMap: Map<string, ILowCodePlugin> = new Map();
|
pluginsMap: Map<string, ILowCodePlugin> = new Map();
|
||||||
|
|
||||||
private pluginPreference?: PluginPreference = new Map();
|
private pluginPreference?: PluginPreference = new Map();
|
||||||
|
|
||||||
|
|||||||
@ -83,7 +83,7 @@ const config = engineConfig;
|
|||||||
const event = new Event(editor, { prefix: 'common' });
|
const event = new Event(editor, { prefix: 'common' });
|
||||||
const logger = getLogger({ level: 'warn', bizName: 'common' });
|
const logger = getLogger({ level: 'warn', bizName: 'common' });
|
||||||
const common = new Common(editor, innerSkeleton);
|
const common = new Common(editor, innerSkeleton);
|
||||||
let plugins: any;
|
let plugins: Plugins;
|
||||||
|
|
||||||
const pluginContextApiAssembler: ILowCodePluginContextApiAssembler = {
|
const pluginContextApiAssembler: ILowCodePluginContextApiAssembler = {
|
||||||
assembleApis: (context: ILowCodePluginContextPrivate) => {
|
assembleApis: (context: ILowCodePluginContextPrivate) => {
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import { pluginsSymbol } from './symbols';
|
|||||||
const innerPluginsSymbol = Symbol('plugin');
|
const innerPluginsSymbol = Symbol('plugin');
|
||||||
export default class Plugins implements IPublicApiPlugins {
|
export default class Plugins implements IPublicApiPlugins {
|
||||||
private readonly [innerPluginsSymbol]: LowCodePluginManager;
|
private readonly [innerPluginsSymbol]: LowCodePluginManager;
|
||||||
get [pluginsSymbol]() {
|
get [pluginsSymbol](): LowCodePluginManager {
|
||||||
if (this.workspaceMode) {
|
if (this.workspaceMode) {
|
||||||
return this[innerPluginsSymbol];
|
return this[innerPluginsSymbol];
|
||||||
}
|
}
|
||||||
@ -34,6 +34,14 @@ export default class Plugins implements IPublicApiPlugins {
|
|||||||
await this[pluginsSymbol].register(pluginConfigCreator, options, registerOptions);
|
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() {
|
toProxy() {
|
||||||
return new Proxy(this, {
|
return new Proxy(this, {
|
||||||
get(target, prop, receiver) {
|
get(target, prop, receiver) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user