保存一下

This commit is contained in:
2025-08-19 16:59:58 +08:00
parent 9c9387f6c2
commit e8749e3efa
8 changed files with 94 additions and 55 deletions

View File

@@ -72,7 +72,8 @@ export class DesktopProcess extends AppProcess {
}
public mount(dom: HTMLDivElement) {
if (this._isMounted) return;
console.log('DesktopProcess: start mount')
if (this._isMounted) return
this._width = window.innerWidth
this._height = window.innerHeight
window.addEventListener(
@@ -80,18 +81,18 @@ export class DesktopProcess extends AppProcess {
debounce(() => {
this.width = window.innerWidth
this.height = window.innerHeight
}, 300),
}, 300)
)
dom.style.zIndex = '0';
dom.style.width = `${this._width}px`
dom.style.height = `${this._height}px`
this._desktopRootDom = dom;
this._desktopRootDom = dom
const app = createApp(DesktopComponent, { process: this })
app.use(naiveUi)
app.mount(dom)
this._isMounted = true;
this._isMounted = true
}
}