Skip to content

Commit a9a1dd7

Browse files
author
reco_luan
committed
fix: comments display rule
1 parent 5343fe7 commit a9a1dd7

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

components/Common.vue

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@
3535
<div :class="{ 'hide': !isHasPageKey }">
3636
<slot></slot>
3737
<ModuleTransition delay=".48">
38-
<Comments v-show="recoShowModule" :isShowComments="shouldShowComments"/>
38+
<div v-show="recoShowModule">
39+
<Comments :isShowComments="shouldShowComments"/>
40+
</div>
3941
</ModuleTransition>
4042
</div>
4143
</div>
@@ -67,9 +69,9 @@
6769
<Password v-if="!isHasPageKey" :isPage="true"></Password>
6870
<div v-else>
6971
<slot></slot>
70-
<ModuleTransition delay=".48">
71-
<Comments v-show="recoShowModule" :isShowComments="shouldShowComments"/>
72-
</ModuleTransition>
72+
<div v-show="recoShowModule">
73+
<Comments :isShowComments="shouldShowComments"/>
74+
</div>
7375
</div>
7476
</div>
7577
</transition>
@@ -118,6 +120,11 @@ export default {
118120
// 是否显示评论
119121
shouldShowComments () {
120122
const { isShowComments, home } = this.$frontmatter
123+
console.log(this.isComment, isShowComments, home, !(
124+
this.isComment == false ||
125+
isShowComments == false ||
126+
home == true
127+
))
121128
return !(
122129
this.isComment == false ||
123130
isShowComments == false ||

0 commit comments

Comments
 (0)