保存一下
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user