优化
This commit is contained in:
@@ -66,12 +66,18 @@ export default class ProcessImpl implements IProcess {
|
||||
try {
|
||||
const wf = this._windowForms.get(id);
|
||||
if (!wf) throw new Error(`未找到窗体:${id}`);
|
||||
wf.destroy();
|
||||
this.windowForms.delete(id)
|
||||
if(this.windowForms.size === 0) {
|
||||
this.destroy()
|
||||
processManager.removeProcess(this)
|
||||
}
|
||||
} catch (e) {
|
||||
console.log('关闭窗体失败', e)
|
||||
}
|
||||
}
|
||||
|
||||
public destroy() {
|
||||
this._event.destroy()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user