This commit is contained in:
2025-09-28 12:05:59 +08:00
parent 972e76e655
commit b77a20f9b0
5 changed files with 27 additions and 139 deletions

View File

@@ -9,7 +9,22 @@ import { EventCommunicationService } from './EventCommunicationService'
import { ApplicationSandboxEngine } from './ApplicationSandboxEngine'
import { ApplicationLifecycleManager } from './ApplicationLifecycleManager'
import { externalAppDiscovery } from './ExternalAppDiscovery'
import type { IWindowFormDataUpdateParams } from '@/events/WindowFormEventManager'
import type { TWindowFormState } from '@/ui/types/WindowFormTypes'
export interface IWindowFormDataUpdateParams {
/** 窗口id */
id: string
/** 窗口状态 */
state: TWindowFormState
/** 窗口宽度 */
width: number
/** 窗口高度 */
height: number
/** 窗口x坐标(左上角) */
x: number
/** 窗口y坐标(左上角) */
y: number
}
/**
* 系统服务配置接口
@@ -112,7 +127,7 @@ export class SystemServiceIntegration {
}
this.startTime = new Date()
this.eventBus = new EventBuilderImpl()
this.eventBus = new EventBuilderImpl<any>()
this.setupGlobalErrorHandling()
}
@@ -627,17 +642,17 @@ export class SystemServiceIntegration {
case 'move':
// 实现窗体移动功能
const window = this.windowService.getWindow(windowId);
const window = this.windowService.getWindow(windowId)
if (window && window.element) {
// 更新窗体位置
window.config.x = data.x;
window.config.y = data.y;
window.element.style.left = `${data.x}px`;
window.element.style.top = `${data.y}px`;
window.element.style.transform = 'none'; // 确保移除transform
return true;
window.config.x = data.x
window.config.y = data.y
window.element.style.left = `${data.x}px`
window.element.style.top = `${data.y}px`
window.element.style.transform = 'none' // 确保移除transform
return true
}
return false;
return false
case 'minimize':
return this.windowService.minimizeWindow(windowId)
@@ -939,4 +954,4 @@ export class SystemServiceIntegration {
console.log(`[SystemService] ${message}`, data)
}
}
}
}