...
|
...
|
@@ -7,7 +7,11 @@ |
|
|
<p class="comment-user-name">{{parentComment.userName || ' '}}</p>
|
|
|
<p class="comment-time">{{parentComment.createTime | time}}</p>
|
|
|
</div>
|
|
|
<WidgetFav class="comment-fav" :num="parentComment.praiseTotal"></WidgetFav>
|
|
|
<WidgetFav
|
|
|
class="comment-fav"
|
|
|
:comment-id="parentComment.id"
|
|
|
:num="parentComment.praiseTotal"
|
|
|
:option="favOption"></WidgetFav>
|
|
|
</div>
|
|
|
|
|
|
<div class="comment-cont" @click="replyComment(parentComment.id)" :data-parent-id="parentComment.parentId" :data-root-id="parentComment.rootId">
|
...
|
...
|
@@ -51,10 +55,15 @@ export default { |
|
|
data() {
|
|
|
return {
|
|
|
isShowAllReply: false,
|
|
|
limitNum: 2
|
|
|
limitNum: 2,
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
favOption() {
|
|
|
return {
|
|
|
selected: this.parentComment.isPraise === 'Y'
|
|
|
};
|
|
|
},
|
|
|
replayShowList() {
|
|
|
if (this.childrenComments.length <= this.limitNum) {
|
|
|
return this.childrenComments;
|
...
|
...
|
@@ -71,8 +80,6 @@ export default { |
|
|
return this.isShowAllReply ? '收起' : `查看${this.moreReplyNum}条回复`;
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
},
|
|
|
methods: {
|
|
|
...mapActions(['postComment']),
|
|
|
onShowMore() {
|
...
|
...
|
@@ -142,6 +149,10 @@ export default { |
|
|
}
|
|
|
}
|
|
|
|
|
|
.comment-fav {
|
|
|
padding-right: 20px;
|
|
|
}
|
|
|
|
|
|
.comment-cont {
|
|
|
font-size: 28px;
|
|
|
color: #444;
|
...
|
...
|
|