From 2df04cb377c2aa2881974129758a998275a50552 Mon Sep 17 00:00:00 2001 From: sunnylqm Date: Fri, 8 Mar 2024 16:04:16 +0800 Subject: [PATCH] fix a wrong dep --- Example/testHotUpdate/src/TestConsole.js | 70 +++++++++++++----------- src/provider.tsx | 59 +++++++++++--------- 2 files changed, 71 insertions(+), 58 deletions(-) diff --git a/Example/testHotUpdate/src/TestConsole.js b/Example/testHotUpdate/src/TestConsole.js index 7a4fa9d..8207d3e 100644 --- a/Example/testHotUpdate/src/TestConsole.js +++ b/Example/testHotUpdate/src/TestConsole.js @@ -19,23 +19,25 @@ const UUID = '00000000-0000-0000-0000-000000000000'; const DownloadUrl = 'http://cos.pgyer.com/697913e94d7441f20c686e2b0996a1aa.apk?sign=7a8f11b1df82cba45c8ac30b1acec88c&t=1680404102&response-content-disposition=attachment%3Bfilename%3DtestHotupdate_1.0.apk'; +const CustomDialog = ({title, visible, onConfirm}) => { + if (!visible) { + return null; + } - const CustomDialog = ({title, visible, onConfirm}) => { - if (!visible) { - return null; - } - - return ( - - - {title} - - 确认 - - + return ( + + + {title} + + 确认 + - ); - }; + + ); +}; export default function TestConsole({visible}) { const [text, setText] = useState(''); const [running, setRunning] = useState(false); @@ -132,9 +134,8 @@ export default function TestConsole({visible}) { testID={NativeTestMethod[i].name} onLongPress={() => { NativeTestMethod[i].invoke(); - }} - > - {NativeTestMethod[i].name} + }}> + {NativeTestMethod[i].name} , ); } @@ -164,8 +165,14 @@ export default function TestConsole({visible}) { /> {running && } { setRunning(true); @@ -190,22 +197,23 @@ export default function TestConsole({visible}) { } setAlertVisible(true); setAlertMsg('done'); - } catch (e: any) { + } catch (e) { setAlertVisible(true); setAlertMsg(e.message); } setRunning(false); - }} - > - 执行 + }}> + 执行 -