保存一下
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import { v4 as uuidV4 } from 'uuid';
|
||||
import XSystem from '../../XSystem.ts'
|
||||
import WindowForm from '../../window/WindowForm.ts'
|
||||
import WindowFormImpl from '../../window/impl/WindowFormImpl.ts'
|
||||
import type { IProcess } from '@/core/process/IProcess.ts'
|
||||
import type { IProcessInfo } from '@/core/process/IProcessInfo.ts'
|
||||
import type { IWindowForm } from '@/core/window/IWindowForm.ts'
|
||||
|
||||
/**
|
||||
* 进程
|
||||
@@ -11,7 +12,7 @@ export default class ProcessImpl implements IProcess {
|
||||
private readonly _id: string = uuidV4();
|
||||
private readonly _processInfo: IProcessInfo;
|
||||
// 当前进程的窗体集合
|
||||
private _windowForms: Map<string, WindowForm> = new Map();
|
||||
private _windowForms: Map<string, IWindowForm> = new Map();
|
||||
|
||||
public get id() {
|
||||
return this._id;
|
||||
@@ -37,7 +38,9 @@ export default class ProcessImpl implements IProcess {
|
||||
}
|
||||
|
||||
public openWindowForm(startName: string) {
|
||||
const window = new WindowForm(this, startName);
|
||||
const info = this._processInfo.windowFormConfigs.find(item => item.name === startName);
|
||||
if (!info) throw new Error(`未找到窗体:${startName}`);
|
||||
const window = new WindowFormImpl(this, info);
|
||||
this._windowForms.set(window.id, window);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user