From 33ef8a2dec0db1d0f31c6b670225a09746cd80d8 Mon Sep 17 00:00:00 2001 From: tangjie <122778500@qq.com> Date: Thu, 30 Jul 2026 11:49:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9A=E6=97=B6=E5=99=A8=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E8=BD=AE=E8=AF=A2=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/BaiduMapPicker/index.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/BaiduMapPicker/index.js b/src/components/BaiduMapPicker/index.js index 794e142..eefc655 100644 --- a/src/components/BaiduMapPicker/index.js +++ b/src/components/BaiduMapPicker/index.js @@ -32,9 +32,12 @@ const BaiduMapPicker = ({ visible, onCancel, onConfirm }) => { type: "script", attr: { type: "text/javascript" }, }); - setTimeout(() => { - setLoaded(true); - }, 1000); + const timer = setInterval(() => { + if (window.BMap?.Map) { + setLoaded(true); + clearInterval(timer); + } + }, 500); }; if (window?.base?.loadDynamicResource) { callback();