fix: 修复手机看的时候,点开左边侧边栏,点空白的地方不会隐藏的bug

This commit is contained in:
2020-07-15 15:44:25 +08:00
parent 47fad8167a
commit a82d2fb4ca
3 changed files with 27 additions and 6 deletions

View File

@ -150,6 +150,7 @@ footer .footer
height 100%
width 295px
float left
box-shadow 8px 0px 11px 0px #fff
#rightContent
margin-left 300px
@ -531,7 +532,7 @@ input:-moz-placeholder
padding-top 6px
cursor pointer
#leftBackgroundColor, #LeftMenu
#LeftMenu
display none
#rightContent

View File

@ -19,7 +19,7 @@
.page-container
#LeftMenu(:style="'display: '+ showLeftMenuValue + ';' + isPhone")
LeftContent
#rightContent(@click='showLeftMenu(false)')
#rightContent(@click='hiddenLeftMenu')
nuxt
Footer
v-dialog
@ -61,12 +61,17 @@ export default {
}
},
methods: {
showLeftMenu (show) {
if (this.showLeftMenuValue === 'block' || show === false) {
showLeftMenu () {
if (this.showLeftMenuValue === 'block') {
this.showLeftMenuValue = 'none'
} else {
this.showLeftMenuValue = 'block'
}
},
hiddenLeftMenu () {
if (document.body.clientWidth < 768) {
this.showLeftMenuValue = 'none'
}
}
}
}