From 273633bda487e1a9fe3693f6f04a25bd7f98a419 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A7=89?= Date: Thu, 19 Oct 2023 00:01:58 +0800 Subject: [PATCH] =?UTF-8?q?=E8=81=8A=E5=A4=A9=E5=AE=A4=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E8=87=AA=E5=B7=B1=E7=9A=84=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.js b/src/main.js index 62edb78..af526d7 100644 --- a/src/main.js +++ b/src/main.js @@ -145,6 +145,7 @@ const chat = new Chat({ onsend: async (text, list) => { console.log('发送消息', text) clientList.send('chat', JSON.stringify({ type: 'message', text })) + chat.add({ name, text, time: new Date().toLocaleTimeString() }) console.log('发送结束') }, onexit: async () => {