Ver código fonte

驾驶舱二级页面定位飞入关闭后实体销毁

lkk 1 ano atrás
pai
commit
12d36b8c39
1 arquivos alterados com 8 adições e 0 exclusões
  1. 8 0
      src/components/Query/clickQuery/CockpitVector.vue

+ 8 - 0
src/components/Query/clickQuery/CockpitVector.vue

@@ -66,6 +66,9 @@ export default {
     vectordataid() {
       return store.state.vectordataid;
     },
+    viewer_flag() {
+      return store.state.viewer_flag;
+    },
   },
   //监控data中的数据变化
   watch: {
@@ -78,6 +81,11 @@ export default {
         })
       },
     },
+    viewer_flag(newVal) {
+      if (newVal) {
+        viewer.dataSources.removeAll();
+      }
+    },
   },
   //方法集合
   methods: {