Merge branch 'main' into next

This commit is contained in:
nocobase[bot] 2024-10-24 08:10:20 +00:00
commit 8541da4218

View File

@ -335,6 +335,24 @@ export const AMapComponent = React.forwardRef<AMapForwardedRefProps, AMapCompone
const _define = (window as any).define;
(window as any).define = undefined;
if (window.AMap) {
try {
requestIdleCallback(() => {
map.current = new AMap.Map(id.current, {
resizeEnable: true,
zoom,
} as AMap.MapOptions);
aMap.current = AMap;
setErrMessage('');
forceUpdate([]);
});
return;
} catch (err) {
setErrMessage(err);
}
}
AMapLoader.load({
key: accessKey,
version: '2.0',