mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-13 12:56:43 +08:00
修改评论的回复和笔记的回复 “更多”的处理
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
</div>
|
||||
<!--回复内容-->
|
||||
<div v-if="com.replyList && com.replyList.length>0">
|
||||
<div class="comment" v-for="(reply,replyIdx) in com.replyList" :key="reply.id" :class="replyIdx===com.replyList.length-1 ? 'comment-last' : ''">
|
||||
<div class="comment" v-for="(reply,replyIdx) in com.replyList" :key="reply.id" v-if="com.showAll || replyIdx<3" :class="replyIdx===com.replyList.length-1 ? 'comment-last' : ''">
|
||||
<div class="comment-top">
|
||||
<div class="comment-author">
|
||||
<authorInfo :avatar="reply.avatar" :name="reply.sysCreateBy" :sex="reply.sex" :info="reply.orgInfo" :sign="reply.sign"></authorInfo>
|
||||
@@ -81,9 +81,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!com.showAll" style="padding-left: 45px;padding-bottom: 10px;" @click="loadReplyMore(com)"><span style="color: #9e9e9e;cursor: pointer; border-radius: 5px;border:1px solid #cccccc;padding: 5px 10px;font-size: 14px;">加载更多>></span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pagination-div">
|
||||
<!-- v-if="moreState == 1 -->
|
||||
@@ -278,7 +279,10 @@
|
||||
this.loadData();
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
methods: {
|
||||
loadReplyMore(item){
|
||||
item.showAll=true;
|
||||
},
|
||||
loadMore() {
|
||||
this.pageIndex +=1;
|
||||
this.loadData(true);
|
||||
@@ -337,6 +341,7 @@
|
||||
let ids=[];
|
||||
let allList=[];
|
||||
res.result.list.forEach(item=>{
|
||||
item.showAll=false;
|
||||
item.title = this.name;
|
||||
item.replyList = [];
|
||||
item.avatar='';
|
||||
|
||||
Reference in New Issue
Block a user