fix: comments display rule

This commit is contained in:
reco_luan 2020-03-16 11:09:32 +08:00
parent 5343fe7e91
commit a9a1dd7447

View File

@ -35,7 +35,9 @@
<div :class="{ 'hide': !isHasPageKey }">
<slot></slot>
<ModuleTransition delay=".48">
<Comments v-show="recoShowModule" :isShowComments="shouldShowComments"/>
<div v-show="recoShowModule">
<Comments :isShowComments="shouldShowComments"/>
</div>
</ModuleTransition>
</div>
</div>
@ -67,9 +69,9 @@
<Password v-if="!isHasPageKey" :isPage="true"></Password>
<div v-else>
<slot></slot>
<ModuleTransition delay=".48">
<Comments v-show="recoShowModule" :isShowComments="shouldShowComments"/>
</ModuleTransition>
<div v-show="recoShowModule">
<Comments :isShowComments="shouldShowComments"/>
</div>
</div>
</div>
</transition>
@ -118,6 +120,11 @@ export default {
//
shouldShowComments () {
const { isShowComments, home } = this.$frontmatter
console.log(this.isComment, isShowComments, home, !(
this.isComment == false ||
isShowComments == false ||
home == true
))
return !(
this.isComment == false ||
isShowComments == false ||