From c6d4e052fc07b38f170adaadc5cacaa72675ef3e Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 14 Feb 2018 19:33:39 +0900 Subject: [PATCH] wip --- src/web/app/desktop/views/components/window.vue | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/web/app/desktop/views/components/window.vue b/src/web/app/desktop/views/components/window.vue index 3a7531a6f..414858a1e 100644 --- a/src/web/app/desktop/views/components/window.vue +++ b/src/web/app/desktop/views/components/window.vue @@ -82,13 +82,15 @@ export default Vue.extend({ }, mounted() { - const main = this.$refs.main as any; - main.style.top = '15%'; - main.style.left = (window.innerWidth / 2) - (main.offsetWidth / 2) + 'px'; + Vue.nextTick(() => { + const main = this.$refs.main as any; + main.style.top = '15%'; + main.style.left = (window.innerWidth / 2) - (main.offsetWidth / 2) + 'px'; - window.addEventListener('resize', this.onBrowserResize); + window.addEventListener('resize', this.onBrowserResize); - this.open(); + this.open(); + }); }, destroyed() {