修改评论的回复和笔记的回复 “更多”的处理

This commit is contained in:
daihh
2022-10-31 16:30:55 +08:00
parent 29adce40d3
commit 9d3fd71061
2 changed files with 57 additions and 45 deletions

View File

@@ -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;">加载更多&gt;&gt;</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='';