mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-12 17:08:14 +00:00
feat: project 支持 onSimulatorReady 的事件
This commit is contained in:
parent
26793c8ef4
commit
79d0c33109
@ -267,12 +267,20 @@ export class Project {
|
||||
// TODO: 多设备 simulator 支持
|
||||
this._simulator = simulator;
|
||||
this.designer.editor.set('simulator', simulator);
|
||||
this.emitter.emit('lowcode_engine_simulator_ready', simulator);
|
||||
}
|
||||
|
||||
setRendererReady(renderer: any) {
|
||||
this.emitter.emit('lowcode_engine_renderer_ready', renderer);
|
||||
}
|
||||
|
||||
onSimulatorReady(fn: (args: any) => void): () => void {
|
||||
this.emitter.on('lowcode_engine_simulator_ready', fn);
|
||||
return () => {
|
||||
this.emitter.removeListener('lowcode_engine_simulator_ready', fn);
|
||||
};
|
||||
}
|
||||
|
||||
onRendererReady(fn: (args: any) => void): () => void {
|
||||
this.emitter.on('lowcode_engine_renderer_ready', fn);
|
||||
return () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user