完善和修复一下DraggableResizableWindow的bug

This commit is contained in:
2025-09-07 15:23:04 +08:00
parent fcf3c2933c
commit d43664c945
2 changed files with 120 additions and 33 deletions

View File

@@ -56,6 +56,9 @@ export default class WindowFormImpl implements IWindowForm {
bt1.innerText = '最小化';
bt1.addEventListener('click', () => {
win.minimize();
setTimeout(() => {
win.restore();
}, 2000)
})
div.appendChild(bt1)
const bt2 = document.createElement('button');
@@ -73,6 +76,15 @@ export default class WindowFormImpl implements IWindowForm {
processManager.removeProcess(this.proc!)
})
div.appendChild(bt3)
const bt4 = document.createElement('button');
bt4.innerText = '恢复';
bt4.addEventListener('click', (e) => {
e.preventDefault();
e.stopPropagation()
win.restore();
})
div.appendChild(bt4)
const win = new DraggableResizableWindow({
target: dom,