qinyan há 1 ano atrás
pai
commit
096a016b26

+ 4 - 3
src/modules/editor/components/CompUI/basicUI/Map/component.tsx

@@ -32,9 +32,10 @@ export const Component = defineComponent({
           position: value.addressInfo.lnglat,
         });
         map.value.add(marker.value);
-
-        const toolbar = new AMap.ToolBar({ position: "LT" }); // 缩放工具条实例化
-        map.value.addControl(toolbar);
+        if (!store.isEditMode) {
+          const toolbar = new AMap.ToolBar({ position: "LT" }); // 缩放工具条实例化
+          map.value.addControl(toolbar);
+        }
       });
     }
 

+ 1 - 1
src/modules/editor/components/CompUI/formItems/MapAttr.tsx

@@ -105,7 +105,7 @@ export default defineComponent({
           geocoder.value = new AMap.Geocoder();
           autoComplete.value = new AMap.AutoComplete({ city: "全国" });
 
-          const toolbar = new AMap.ToolBar(); // 缩放工具条实例化
+          const toolbar = new AMap.ToolBar({ position: "LT" }); // 缩放工具条实例化
           map.value.addControl(toolbar);
         }
       );