refactoring

This commit is contained in:
Philipp Kühn
2021-02-04 11:08:56 +01:00
parent 035139064a
commit a835938503
3 changed files with 24 additions and 6 deletions

View File

@@ -144,7 +144,11 @@ export default {
computed: {
menuPortal() {
if (this.windowWidth && this.windowWidth < 800) {
if (!this.windowWidth) {
return
}
if (this.windowWidth < 800) {
return 'mobile-menu'
}
@@ -152,7 +156,11 @@ export default {
},
sidebarPortal() {
if (this.windowWidth && this.windowWidth < 800) {
if (!this.windowWidth) {
return
}
if (this.windowWidth < 800) {
return 'mobile-sidebar'
}
@@ -213,7 +221,7 @@ export default {
setTimeout(() => {
this.handleResize()
this.initSearch()
}, 0)
}, 10)
window.addEventListener('resize', this.handleResize)
},