diff --git a/src/components/AMap/src/AMapDesigner/index.vue b/src/components/AMap/src/AMapDesigner/index.vue index b3ce78c..c1c6627 100644 --- a/src/components/AMap/src/AMapDesigner/index.vue +++ b/src/components/AMap/src/AMapDesigner/index.vue @@ -495,12 +495,10 @@ /** 地图创建完成(动画关闭) */ function complete () { if (map) { - map.on('complete', () => { - setMapDataJson(mapProps.options); - handleSetCourierUserList(); - mapState.loading = false; - mapState.first = true; - }); + setMapDataJson(mapProps.options); + handleSetCourierUserList(); + mapState.loading = false; + mapState.first = true; } } @@ -512,7 +510,7 @@ if (!mapProps.toolbarControl) mapState.toggleOperatePanelClass.toolbarHeight = 0; }); watch(toRefs(mapProps).options, (newValue) => { - if (mapState.first) { + if (mapState.first && newValue) { setMapDataJson(newValue); handleSetCourierUserList(); } diff --git a/src/views/common/mapLogistic/index.vue b/src/views/common/mapLogistic/index.vue index 7c11ada..0071071 100644 --- a/src/views/common/mapLogistic/index.vue +++ b/src/views/common/mapLogistic/index.vue @@ -2,9 +2,9 @@