From 63914c1fb7a7834aaeb4818a697add59045d8879 Mon Sep 17 00:00:00 2001 From: yj <1336058017@qq.com> Date: Mon, 16 Dec 2024 14:27:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=9B=E5=85=A5=E4=BC=9A?= =?UTF-8?q?=E8=AE=AE=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/JoinSetting/index.tsx | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/components/JoinSetting/index.tsx b/src/components/JoinSetting/index.tsx index 18065db..e8be5b5 100644 --- a/src/components/JoinSetting/index.tsx +++ b/src/components/JoinSetting/index.tsx @@ -20,18 +20,17 @@ const JoinSetting = forwardRef((_props: any, ref: any) => { if (location.hash.indexOf('/meeting') === -1) { await agora.init() } - setJoinRoomSettingForm((res: any) => { - res.forEach(async (item: any, index: number) => { - if (index === 0 && role.ID.includes(userInfo.roleId)) { - await agora.getAudioMediaList().then(res => { - item.active = res.ecordingList.length ? true : false - }) - } else { - item.active = false - } - }); - return res - }) + const list = [...joinRoomSettingForm] + list.forEach(async (item: any, index: number) => { + if (index === 0 && role.ID.includes(userInfo.roleId)) { + await agora.getAudioMediaList().then(res => { + item.active = res.ecordingList.length ? true : false + }) + } else { + item.active = false + } + }); + setJoinRoomSettingForm(list) setRoomNumber(roomNum) getDeviceList() }