mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
set this.windowWidth, and change computed showMobileMenu
This commit is contained in:
parent
b467e6846a
commit
bdf848b237
@ -259,6 +259,7 @@ export default {
|
|||||||
return firstRoute && firstRoute.name === 'index'
|
return firstRoute && firstRoute.name === 'index'
|
||||||
},
|
},
|
||||||
showMobileMenu() {
|
showMobileMenu() {
|
||||||
|
if (!this.windowWidth) return false
|
||||||
return this.windowWidth < 810
|
return this.windowWidth < 810
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -268,6 +269,7 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.windowWidth = window.innerWidth
|
||||||
window.addEventListener('resize', () => {
|
window.addEventListener('resize', () => {
|
||||||
this.windowWidth = window.innerWidth
|
this.windowWidth = window.innerWidth
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user