From 2b0e9f50f1d8b8a601e87bb4af0f97e571f9cd3f Mon Sep 17 00:00:00 2001 From: yj <1336058017@qq.com> Date: Mon, 15 Jul 2024 10:55:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E6=81=AF=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/page/Meeting/index.tsx | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/src/page/Meeting/index.tsx b/src/page/Meeting/index.tsx index f3038ab..84a2a73 100644 --- a/src/page/Meeting/index.tsx +++ b/src/page/Meeting/index.tsx @@ -285,6 +285,7 @@ const Meeting: React.FC = () => { } }) } + const handleCustomStorageChange = (e: any): void => { if (e.key === 'isJoin') { if (e.value) { @@ -303,6 +304,23 @@ const Meeting: React.FC = () => { }, 1000) } }; + // 聊天发送 + const sendMsg = (): void => { + if (textMsg) { + onInvoke('sendChannelMsg', { + roomNum: state.channelId, + msg: textMsg, + }) + setChatList((newChatList: any) => [...newChatList, { + uid: state.uid, + userName: state.userName, + message: textMsg, + }]) + setTextMsg('') + } else { + message.success('请输入内容!') + } + } return ( <>