diff --git a/src/views/homepage/leavingMessage.vue b/src/views/homepage/leavingMessage.vue
index 13b65ce1..62d27714 100644
--- a/src/views/homepage/leavingMessage.vue
+++ b/src/views/homepage/leavingMessage.vue
@@ -40,10 +40,15 @@
{{rep.content}}
+
+
+ 回复
+
@@ -137,7 +142,25 @@
});
},
showReplyInput(item,idx) {
- item.isReplys = true;
+ //关闭其它的
+ this.leavingList.forEach(top=>{
+ if(top.id!=item.id){
+ top.isReplys=false;
+ }
+
+ top.replyList.forEach(reply=>{
+ if(reply.id!=item.id){
+ reply.isReplys=false;
+ }
+
+ })
+ })
+ if(item.isReplys){
+ item.isReplys =false;
+ }else{
+ item.isReplys =true;
+ }
+
this.replysData.id = item.id;
//this.replysData.reply = item.replyList;
},
@@ -159,7 +182,7 @@
this.$message.success('回复留言成功');
p.isReplys = false;
res.result.authorInfo=$this.userInfo;
- p.replyList.push(res.result);
+ top.replyList.push(res.result);
//直接追加到列表后面
// this.leavingList.forEach(item=>{
// item.isReplys = false;
@@ -271,6 +294,7 @@
position: relative;
.lea-btn {
float: right;
+ cursor: pointer;
margin-top: 26px;
width: 80px;
height: 30px;
@@ -326,6 +350,7 @@
margin-top: 40px;
.replys-icon{
width: 50px;
+ cursor: pointer;
color: #6E7B84;
font-size: 12px;
margin-right: 22px;