Skip to content

Commit

Permalink
Merge pull request #139 from Kyutech-C3/develop
Browse files Browse the repository at this point in the history
[fix] スマホでページ表示後のヘッダーコンテンツのスタイル崩れが発生するバグの修正
  • Loading branch information
Simo-C3 authored Dec 15, 2022
2 parents b8dcc56 + bf5bc53 commit 936e4d4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,13 @@ export default {
},
mounted() {
this.initHeaderHeight()
this.handleResize()
window.addEventListener('resize', this.handleResize)
window.addEventListener('resize', this.initHeaderHeight)
},
beforeDestroy() {
window.removeEventListener('resize', this.handleResize)
window.removeEventListener('resize', this.initHeaderHeight)
},
methods: {
initHeaderHeight() {
Expand All @@ -228,7 +231,6 @@ export default {
this.$emit('masked-screen')
},
handleResize() {
this.initHeaderHeight()
this.width = window.innerWidth
if (this.width < 1000) {
this.isMobile = true
Expand Down

0 comments on commit 936e4d4

Please sign in to comment.