From 264880703c677d63b7e35b5eb085e6bc3214e3ed Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期三, 17 七月 2024 18:29:31 +0800
Subject: [PATCH] 2024.7.17

---
 src/utils/map/toolbox.js |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/src/utils/map/toolbox.js b/src/utils/map/toolbox.js
index ba75d5d..aa6fb9e 100644
--- a/src/utils/map/toolbox.js
+++ b/src/utils/map/toolbox.js
@@ -1,6 +1,9 @@
 /* eslint-disable no-undef */
-import { map, satellite, controlbar } from './index_old';
+import { map, satellite } from './index_old';
+import { useToolboxStore } from '@/stores/toolbox';
 // import '@/lib/jquery-3.5.1.min';
+
+const toolboxStore = useToolboxStore();
 
 /**
  * 鍧愭爣鎷惧彇榧犳爣鐐瑰嚮鍥炶皟浜嬩欢
@@ -42,6 +45,7 @@
    */
   toggleFeatures(value) {
     value ? map.setFeatures(['bg', 'road', 'point', 'building']) : map.setFeatures(['bg', 'road']);
+    toolboxStore.featuresStatus = value;
   },
 
   /**
@@ -50,6 +54,7 @@
    */
   toggleSatellite(value) {
     value ? satellite.show() : satellite.hide();
+    toolboxStore.satelliteStatus = value;
   },
 
   /**
@@ -59,6 +64,7 @@
   toggleControlbar(value) {
     // value ? controlbar.show() : controlbar.hide();
     value ? $('.amap-controlbar').show() : $('.amap-controlbar').hide();
+    toolboxStore.controlbarStatus = value;
   },
 
   /**
@@ -74,5 +80,6 @@
       _locationMarker = undefined;
       _locationText = undefined;
     }
+    toolboxStore.coorPickStatus = value;
   }
 };

--
Gitblit v1.9.3