From 58bdec1271827e2caed8731eb9f38afb2946bd6c Mon Sep 17 00:00:00 2001 From: weavefox-bot Date: Wed, 3 Jun 2026 23:13:01 +0800 Subject: [PATCH] =?UTF-8?q?feat(maps):=20=E6=94=AF=E6=8C=81=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E9=AB=98=E5=BE=B7=E5=9C=B0=E5=9B=BE=20JS=20?= =?UTF-8?q?=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复 issue #2862 允许用户通过 version 配置项自定义高德地图 JS 版本,默认为 2.0 --- packages/maps/src/amap-next/map.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/maps/src/amap-next/map.ts b/packages/maps/src/amap-next/map.ts index 9bc5ef7892..f4fc471d84 100644 --- a/packages/maps/src/amap-next/map.ts +++ b/packages/maps/src/amap-next/map.ts @@ -51,6 +51,7 @@ export default class AMapService extends BaseMap { token, mapInstance, plugin = [], + version = AMAP_VERSION, ...rest } = this.config; @@ -65,7 +66,7 @@ export default class AMapService extends BaseMap { plugin.push('Map3D'); await AMapLoader.load({ key: amapKey, // 申请好的Web端开发者Key,首次调用 load 时必填 - version: AMAP_VERSION, // 指定要加载的 JSAPI 的版本 + version: version, // 指定要加载的 JSAPI 的版本 plugins: plugin, // 需要使用的的插件列表,如比例尺'AMap.Scale'等 }); }