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 ( <>
@@ -418,23 +436,8 @@ const Meeting: React.FC = () => {
{ setTextMsg(e.target.value) - }}> - + }} onPressEnter={sendMsg}> +
}