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

This commit is contained in:
yi-ge 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'
}
}
}
}

View File

@ -54,12 +54,20 @@
.comment-avatar
img(:src="'https://picsum.photos/100/100/?blur=1'")
.comment-nickname 张三
.comment-logout 退出
.comment-btn 发布
.comment-logout(@click="commentLogout") 退出
.comment-btn(@click="commentCommit") 发布
.comment-reply-commit(id="comment-reply-commit", v-show="replyID")
.login(v-show="!visitorToken", @click="login")
img(src="https://cdn.wyr.me/imgs/GitHub-Login.png")
#editor-reply
.comment-toolbar
.comment-no-userinfo(v-if="!visitorToken") 尚未登陆
.comment-userinfo(v-else)
.comment-avatar
img(:src="'https://picsum.photos/100/100/?blur=1'")
.comment-nickname 张三
.comment-logout(@click="commentLogout") 退出
.comment-btn(@click="commentCommit") 发布
ins.adsbygoogle(style="display:block; text-align:center; margin-top:20px;", data-ad-layout="in-article", data-ad-format="fluid", data-ad-client="ca-pub-2143583075951360", data-ad-slot="4741804954")
.articelRightToc(v-show="articels.post_toc_show && showRightToc", @click="articelRightTocClick")
.articelTitle 目录
@ -440,6 +448,13 @@ export default {
})
}
},
commentCommit () {
},
commentLogout () {
window.localStorage.visitorToken = null
this.visitorToken = null
},
login () {
window.open('https://github.com/login/oauth/authorize?client_id=ce1673a37333e47e482d&redirect_uri=https://www.wyr.me/auth', 'Github授权', 'scrollbars=yes,resizable=yes,status=no,location=yes,toolbar=no,menubar=no,width=800,height=600,left=0,top=0')
}