liyongli 2 年之前
父節點
當前提交
0c2b7e0300
共有 1 個文件被更改,包括 5 次插入0 次删除
  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')