From 8a4be799be0ce010bbb744a2e4fca7c7e5fa29b4 Mon Sep 17 00:00:00 2001 From: wuhaibin <110@qq.com> Date: Mon, 23 May 2022 15:42:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=95=E9=A1=B5=E5=BA=94=E7=94=A8=E4=B8=8B?= =?UTF-8?q?=E4=B8=8D=E5=90=8C=E9=A1=B5=E9=9D=A2=E5=8A=A0=E8=BD=BD=E4=B8=8D?= =?UTF-8?q?=E5=90=8Ckey=20=E4=B8=8D=E5=90=8CmapStyle=20=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E7=94=9F=E6=95=88=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/utils/APILoader.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/utils/APILoader.js b/components/utils/APILoader.js index 0ee00bc..8c46c68 100644 --- a/components/utils/APILoader.js +++ b/components/utils/APILoader.js @@ -13,6 +13,9 @@ export default class APILoader { constructor({ key, useAMapUI, version, protocol }) { this.config = { ...DEFAULT_CONFIG, useAMapUI, protocol } if (typeof window !== 'undefined') { + if (this.config.key !== key) { + mainPromise = null + } if (key) { this.config.key = key } else if ('amapkey' in window) {