diff --git a/src/views/home/chatTest.vue b/src/views/home/chatTest.vue
index 7df1c2df..fe215efd 100644
--- a/src/views/home/chatTest.vue
+++ b/src/views/home/chatTest.vue
@@ -5,10 +5,16 @@
新建聊天
-
-
{{ item.title }}
-
-
+
+
+
{{ item.title }}
+
+
+
+
+
+
+
@@ -29,9 +35,9 @@
@@ -46,7 +52,7 @@ export default {
data() {
return {
userName: "",
- listData:[{id:1,title:'前端有哪些性能优化?',}],
+ listData:[{id:1,title:'前端有哪些性能优化?',isEdit:false}],
originData:[
{id:1,data:[
{chat_text:'前端有哪些性能优化?',chat_time:'2022-08-18 10:00:00',chat_type:'myself'},
@@ -121,6 +127,25 @@ export default {
}
})
},
+ deleteListItem(id,index){
+
+ },
+ editListItem(id,index){
+ this.listData[index].isEdit = true;
+ },
+ saveListItem(id,index){
+ // this.$API
+ this.listData[index].isEdit = false;
+ },
+ sendQuestion(){
+ let date = new Date();
+ let id = date.getTime();
+ this.chatData.push({chat_text:this.newQuestion,chat_time:date,chat_type:'myself'});
+ this.newQuestion = '';
+ this.$nextTick(()=>{
+ //接口请求
+ })
+ },
},
};
@@ -200,6 +225,12 @@ export default {
border-color: rgb(75, 158, 95);
background-color :rgb(245, 245, 245)
}
+.listItem>.listItemIcons{
+ display: none;
+}
+.listItem.active>.listItemIcons{
+ display: block;
+}
.listItemTitle{
width: 160px;
overflow: hidden;