From bdf848b237ee109f79cf3e1b93bb9220fcc585cc Mon Sep 17 00:00:00 2001 From: ogerly Date: Fri, 21 Oct 2022 12:50:13 +0200 Subject: [PATCH] set this.windowWidth, and change computed showMobileMenu --- webapp/layouts/default.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/webapp/layouts/default.vue b/webapp/layouts/default.vue index f1fbd839b..6e709a6d9 100644 --- a/webapp/layouts/default.vue +++ b/webapp/layouts/default.vue @@ -259,6 +259,7 @@ export default { return firstRoute && firstRoute.name === 'index' }, showMobileMenu() { + if (!this.windowWidth) return false return this.windowWidth < 810 }, }, @@ -268,6 +269,7 @@ export default { }, }, mounted() { + this.windowWidth = window.innerWidth window.addEventListener('resize', () => { this.windowWidth = window.innerWidth })