mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-19 14:04:28 +00:00
refactor: 限制引擎 init 只能调用一次
This commit is contained in:
parent
44d93de9e9
commit
a68eaf902f
@ -175,7 +175,10 @@ plugins.register((ctx: ILowCodePluginContext) => {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
let engineInited = false;
|
||||||
export async function init(container?: HTMLElement, options?: EngineOptions) {
|
export async function init(container?: HTMLElement, options?: EngineOptions) {
|
||||||
|
if (engineInited) return;
|
||||||
|
engineInited = true;
|
||||||
let engineOptions = null;
|
let engineOptions = null;
|
||||||
let engineContainer = null;
|
let engineContainer = null;
|
||||||
if (isPlainObject(container)) {
|
if (isPlainObject(container)) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user