|
@@ -7,7 +7,11 @@ |
|
@@ -7,7 +7,11 @@ |
7
|
<p class="comment-user-name">{{parentComment.userName || ' '}}</p>
|
7
|
<p class="comment-user-name">{{parentComment.userName || ' '}}</p>
|
8
|
<p class="comment-time">{{parentComment.createTime | time}}</p>
|
8
|
<p class="comment-time">{{parentComment.createTime | time}}</p>
|
9
|
</div>
|
9
|
</div>
|
10
|
- <WidgetFav class="comment-fav" :num="parentComment.praiseTotal"></WidgetFav>
|
10
|
+ <WidgetFav
|
|
|
11
|
+ class="comment-fav"
|
|
|
12
|
+ :comment-id="parentComment.id"
|
|
|
13
|
+ :num="parentComment.praiseTotal"
|
|
|
14
|
+ :option="favOption"></WidgetFav>
|
11
|
</div>
|
15
|
</div>
|
12
|
|
16
|
|
13
|
<div class="comment-cont" @click="replyComment(parentComment.id)" :data-parent-id="parentComment.parentId" :data-root-id="parentComment.rootId">
|
17
|
<div class="comment-cont" @click="replyComment(parentComment.id)" :data-parent-id="parentComment.parentId" :data-root-id="parentComment.rootId">
|
|
@@ -51,10 +55,15 @@ export default { |
|
@@ -51,10 +55,15 @@ export default { |
51
|
data() {
|
55
|
data() {
|
52
|
return {
|
56
|
return {
|
53
|
isShowAllReply: false,
|
57
|
isShowAllReply: false,
|
54
|
- limitNum: 2
|
58
|
+ limitNum: 2,
|
55
|
};
|
59
|
};
|
56
|
},
|
60
|
},
|
57
|
computed: {
|
61
|
computed: {
|
|
|
62
|
+ favOption() {
|
|
|
63
|
+ return {
|
|
|
64
|
+ selected: this.parentComment.isPraise === 'Y'
|
|
|
65
|
+ };
|
|
|
66
|
+ },
|
58
|
replayShowList() {
|
67
|
replayShowList() {
|
59
|
if (this.childrenComments.length <= this.limitNum) {
|
68
|
if (this.childrenComments.length <= this.limitNum) {
|
60
|
return this.childrenComments;
|
69
|
return this.childrenComments;
|
|
@@ -71,8 +80,6 @@ export default { |
|
@@ -71,8 +80,6 @@ export default { |
71
|
return this.isShowAllReply ? '收起' : `查看${this.moreReplyNum}条回复`;
|
80
|
return this.isShowAllReply ? '收起' : `查看${this.moreReplyNum}条回复`;
|
72
|
}
|
81
|
}
|
73
|
},
|
82
|
},
|
74
|
- created() {
|
|
|
75
|
- },
|
|
|
76
|
methods: {
|
83
|
methods: {
|
77
|
...mapActions(['postComment']),
|
84
|
...mapActions(['postComment']),
|
78
|
onShowMore() {
|
85
|
onShowMore() {
|
|
@@ -142,6 +149,10 @@ export default { |
|
@@ -142,6 +149,10 @@ export default { |
142
|
}
|
149
|
}
|
143
|
}
|
150
|
}
|
144
|
|
151
|
|
|
|
152
|
+ .comment-fav {
|
|
|
153
|
+ padding-right: 20px;
|
|
|
154
|
+ }
|
|
|
155
|
+
|
145
|
.comment-cont {
|
156
|
.comment-cont {
|
146
|
font-size: 28px;
|
157
|
font-size: 28px;
|
147
|
color: #444;
|
158
|
color: #444;
|