Browse Source

状态管理

zpf 11 tháng trước cách đây
mục cha
commit
a9d6695515

+ 12 - 6
src/store/store.js

@@ -44,11 +44,11 @@ var store2 = {
         xzqh_flag: true,
         query_pick_pane: [],
         query_pick_last_pane: null,
-        query_vector_input:false,
-        cockpit_vector:{
-            title:"",
-            tableData:"",
-            columns:[],
+        query_vector_input: false,
+        cockpit_vector: {
+            title: "",
+            tableData: "",
+            columns: [],
         },
         cockpit_wpjg: {
             title: {},
@@ -196,6 +196,12 @@ var store2 = {
         this.state.toolBarActive = newValue;
         this.state.toolBar = [...this.state.toolBar];
     },
+    setActiveToolBar(newValue) {
+        this.state.toolBar[newValue] = true;
+
+        this.state.toolBarActive = newValue;
+        this.state.toolBar = [...this.state.toolBar];
+    },
     hideToolBar(newValue) {
         this.state.toolBar = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
     },
@@ -269,7 +275,7 @@ var store2 = {
 
     setXzqh_flag(newValue) {
         this.state.xzqh_flag = newValue;
-    },setCockpit_vector(newValue) {
+    }, setCockpit_vector(newValue) {
         this.state.cockpit_vector = newValue;
     },
 }

+ 1 - 1
src/views/cockpit/common/VectorSpace/BoxCommonVector.vue

@@ -239,7 +239,7 @@ export default {
 
 
             store.state.vectorData = arr
-
+            store.setActiveToolBar(9);
 
         },
         change_witch() {