mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-12 03:01:16 +00:00
fix:修改config.onGot 和 editor.onGot 方法与文档不一致的问题
This commit is contained in:
parent
33a4192e2c
commit
65a040390f
@ -288,14 +288,12 @@ export class EngineConfig implements IEngineConfig {
|
||||
const val = this.config?.[key];
|
||||
if (val !== undefined) {
|
||||
fn(val);
|
||||
return () => {};
|
||||
} else {
|
||||
}
|
||||
this.setWait(key, fn);
|
||||
return () => {
|
||||
this.delWait(key, fn);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
notifyGot(key: string): void {
|
||||
let waits = this.waits.get(key);
|
||||
|
||||
@ -190,14 +190,12 @@ export class Editor extends (EventEmitter as any) implements IPublicModelEditor
|
||||
const x = this.context.get(keyOrType);
|
||||
if (x !== undefined) {
|
||||
fn(x);
|
||||
return () => { };
|
||||
} else {
|
||||
}
|
||||
this.setWait(keyOrType, fn);
|
||||
return () => {
|
||||
this.delWait(keyOrType, fn);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
register(data: any, key?: IPublicTypeEditorValueKey): void {
|
||||
this.context.set(key || data, data);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user