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