mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-13 04:03:07 +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];
|
const val = this.config?.[key];
|
||||||
if (val !== undefined) {
|
if (val !== undefined) {
|
||||||
fn(val);
|
fn(val);
|
||||||
return () => {};
|
}
|
||||||
} else {
|
|
||||||
this.setWait(key, fn);
|
this.setWait(key, fn);
|
||||||
return () => {
|
return () => {
|
||||||
this.delWait(key, fn);
|
this.delWait(key, fn);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
notifyGot(key: string): void {
|
notifyGot(key: string): void {
|
||||||
let waits = this.waits.get(key);
|
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);
|
const x = this.context.get(keyOrType);
|
||||||
if (x !== undefined) {
|
if (x !== undefined) {
|
||||||
fn(x);
|
fn(x);
|
||||||
return () => { };
|
}
|
||||||
} else {
|
|
||||||
this.setWait(keyOrType, fn);
|
this.setWait(keyOrType, fn);
|
||||||
return () => {
|
return () => {
|
||||||
this.delWait(keyOrType, fn);
|
this.delWait(keyOrType, fn);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
register(data: any, key?: IPublicTypeEditorValueKey): void {
|
register(data: any, key?: IPublicTypeEditorValueKey): void {
|
||||||
this.context.set(key || data, data);
|
this.context.set(key || data, data);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user