liyongli 2 years ago
parent
commit
0c2b7e0300
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/view/qh/index.vue

+ 5 - 0
src/view/qh/index.vue

@@ -175,6 +175,11 @@ function saveText() {
   //   const idnex = chatlist.value.length === 0 ? 0 : chatlist.value.length - 1;
   const t = inputText.value;
   inputText.value = '';
+  
+  if(chatlist.value.length > 12){
+    chatlist.value.shift();
+    chatlist.value.shift();
+  }
   createSocket(ws => {
     const data = ws.data || {};
     if (data.msg == 'send_hash')