From dee601a851573a5b1614a8f4c85d54ecf23969ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?zhaobing=E2=80=99?= Date: Mon, 27 Nov 2023 17:14:34 +0800 Subject: [PATCH] fix bugs --- .../sections/firmwareUpgrade/containers/deviceManagement.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/client/src/sections/firmwareUpgrade/containers/deviceManagement.jsx b/web/client/src/sections/firmwareUpgrade/containers/deviceManagement.jsx index c4bdd9e..a797af6 100644 --- a/web/client/src/sections/firmwareUpgrade/containers/deviceManagement.jsx +++ b/web/client/src/sections/firmwareUpgrade/containers/deviceManagement.jsx @@ -48,8 +48,10 @@ const DeviceManagement = (props) => { dispatch(firmwareUpgrade.getFirmware()).then(res=>{ if(res.success) setVData(res.payload.data) }) - },[]) + },[pepProjectId]) useEffect(()=>{ + setData([]) + setId(null) if(thingIds&&thingIds.length){ const data={thingIds:thingIds.split(',')[0]||'000'}//给一个初始化的值 setId(thingIds.split(',')[0])