mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-07 01:46:42 +08:00
修改评论的回复和笔记的回复 “更多”的处理
This commit is contained in:
@@ -113,50 +113,53 @@
|
||||
</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-top">
|
||||
<div class="comment-author">
|
||||
<authorInfo :aid="reply.sysCreateAid" :avatar="reply.avatar" :name="reply.sysCreateBy" :sex="reply.sex" :info="reply.orgInfo" :sign="reply.sign"></authorInfo>
|
||||
<span style="margin-left: 10px;color: #8590A6;font-size:14px; ">
|
||||
<!-- <svg-icon style="font-size: 10px;margin-right: 0;" icon-class="triangle"></svg-icon> -->
|
||||
<span>回复了</span>
|
||||
</span>
|
||||
<span style="margin-left: 6px;font-size:14px;" class="portal-title-tow" >{{reply.replyName || reply.toAname}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="comment-body" @mouseover="showButtons(reply.id)" @mouseout="hideButtons()">
|
||||
<div class="comment-info" >
|
||||
<div class="comment-content" @click="cancelReply()">
|
||||
<span class="portal-summary-text" style="color: #666666;" v-html="displayAll(reply)"></span>
|
||||
<span v-if="reply.content.length>170" @click="changeIsAll(reply)">
|
||||
{{reply.isAll?'收起':'全文'}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="comment-time portal-time">
|
||||
<showTime :time="reply.sysCreateTime"></showTime>
|
||||
<interactBar :type="praisesType" :shares="false" :data="reply" @addAnswers="showReply(reply)" :favorites="false" :views="false" :comments="false" :answers="true"></interactBar>
|
||||
</div>
|
||||
<div class="comment-btns">
|
||||
<!-- <a><svg-icon icon-class="like"></svg-icon><span>66</span></a> -->
|
||||
<div v-show="btnsShowRowId==reply.id">
|
||||
<a @click="showReply(reply)"><svg-icon icon-class="comment" style="margin-right: 0px;font-size: 16px;"></svg-icon><span>回复</span></a>
|
||||
<a v-if="userInfo.aid==reply.sysCreateAid" @click="delReply(com,reply,replyIdx)"><svg-icon icon-class="remove" style="margin-right: 0px;font-size: 16px;"></svg-icon><span>删除</span></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--发布回复-->
|
||||
<div v-if="replyInfo.parentId==reply.id" class="comment-reply" style="padding-bottom: 5px;">
|
||||
<div style="width:100%;display:flex;">
|
||||
<div style="flex: 1;">
|
||||
<el-input show-word-limit class="hideControl" type="textarea" v-model="replyInfo.content" maxlength="100" placeholder="回复内容..."></el-input>
|
||||
</div>
|
||||
<div style="width: 120px;display: flex;justify-content: flex-end;">
|
||||
<el-button @click="submitReply(com)" type="primary">发布回复</el-button>
|
||||
</div>
|
||||
<div v-for="(reply,replyIdx) in com.replyList" :key="reply.id" v-if="com.showAll || replyIdx<3">
|
||||
<div class="comment" :class="replyIdx===com.replyList.length-1 ? 'comment-last' : ''">
|
||||
<div class="comment-top">
|
||||
<div class="comment-author">
|
||||
<authorInfo :aid="reply.sysCreateAid" :avatar="reply.avatar" :name="reply.sysCreateBy" :sex="reply.sex" :info="reply.orgInfo" :sign="reply.sign"></authorInfo>
|
||||
<span style="margin-left: 10px;color: #8590A6;font-size:14px; ">
|
||||
<!-- <svg-icon style="font-size: 10px;margin-right: 0;" icon-class="triangle"></svg-icon> -->
|
||||
<span>回复了</span>
|
||||
</span>
|
||||
<span style="margin-left: 6px;font-size:14px;" class="portal-title-tow" >{{reply.replyName || reply.toAname}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="comment-body" @mouseover="showButtons(reply.id)" @mouseout="hideButtons()">
|
||||
<div class="comment-info" >
|
||||
<div class="comment-content" @click="cancelReply()">
|
||||
<span class="portal-summary-text" style="color: #666666;" v-html="displayAll(reply)"></span>
|
||||
<span v-if="reply.content.length>170" @click="changeIsAll(reply)">
|
||||
{{reply.isAll?'收起':'全文'}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="comment-time portal-time">
|
||||
<showTime :time="reply.sysCreateTime"></showTime>
|
||||
<interactBar :type="praisesType" :shares="false" :data="reply" @addAnswers="showReply(reply)" :favorites="false" :views="false" :comments="false" :answers="true"></interactBar>
|
||||
</div>
|
||||
<div class="comment-btns">
|
||||
<!-- <a><svg-icon icon-class="like"></svg-icon><span>66</span></a> -->
|
||||
<div v-show="btnsShowRowId==reply.id">
|
||||
<a @click="showReply(reply)"><svg-icon icon-class="comment" style="margin-right: 0px;font-size: 16px;"></svg-icon><span>回复</span></a>
|
||||
<a v-if="userInfo.aid==reply.sysCreateAid" @click="delReply(com,reply,replyIdx)"><svg-icon icon-class="remove" style="margin-right: 0px;font-size: 16px;"></svg-icon><span>删除</span></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--发布回复-->
|
||||
<div v-if="replyInfo.parentId==reply.id" class="comment-reply" style="padding-bottom: 5px;">
|
||||
<div style="width:100%;display:flex;">
|
||||
<div style="flex: 1;">
|
||||
<el-input show-word-limit class="hideControl" type="textarea" v-model="replyInfo.content" maxlength="100" placeholder="回复内容..."></el-input>
|
||||
</div>
|
||||
<div style="width: 120px;display: flex;justify-content: flex-end;">
|
||||
<el-button @click="submitReply(com)" type="primary">发布回复</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</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>
|
||||
@@ -380,6 +383,9 @@
|
||||
// })
|
||||
},
|
||||
methods: {
|
||||
loadReplyMore(item){
|
||||
item.showAll=true;
|
||||
},
|
||||
loadMore() {
|
||||
this.pageIndex +=1;
|
||||
this.loadData(true);
|
||||
@@ -449,6 +455,7 @@
|
||||
let ids=[];
|
||||
let allList=[];
|
||||
res.result.list.forEach(item=>{
|
||||
item.showAll=false;
|
||||
item.avatar='';
|
||||
item.orgInfo='';
|
||||
item.sign='';
|
||||
|
||||
@@ -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