diff --git a/src/core/XSystem.ts b/src/core/XSystem.ts index 10a92c1..a36ae27 100644 --- a/src/core/XSystem.ts +++ b/src/core/XSystem.ts @@ -31,7 +31,6 @@ export default class XSystem { public initialization(dom: HTMLDivElement) { this.run('basic-system', BasicSystemProcess).then(() => { this.run('desktop', DesktopProcess).then((proc) => { - console.log(proc) proc.mount(dom) }) }) diff --git a/src/core/desktop/DesktopProcess.ts b/src/core/desktop/DesktopProcess.ts index edae0ae..09d9d83 100644 --- a/src/core/desktop/DesktopProcess.ts +++ b/src/core/desktop/DesktopProcess.ts @@ -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 } } \ No newline at end of file diff --git a/src/core/desktop/ui/DesktopComponent.vue b/src/core/desktop/ui/DesktopComponent.vue index b00e84a..c427a23 100644 --- a/src/core/desktop/ui/DesktopComponent.vue +++ b/src/core/desktop/ui/DesktopComponent.vue @@ -1,8 +1,12 @@