diff --git a/src/page/Meeting/index.tsx b/src/page/Meeting/index.tsx index 4bf4e06..f3038ab 100644 --- a/src/page/Meeting/index.tsx +++ b/src/page/Meeting/index.tsx @@ -148,10 +148,7 @@ const Meeting: React.FC = () => { useEffect(() => { onSignalr((item: any) => { - console.log(item); - const newChatList = [...chatList] - newChatList.push(item) - setChatList(newChatList) + setChatList((newChatList: any) => [...newChatList, item]) }) }, []) // 操作按钮 @@ -423,11 +420,20 @@ const Meeting: React.FC = () => { setTextMsg(e.target.value) }}>