From 606958fa51de78d58a8d247b8fb4a092a05ff67d Mon Sep 17 00:00:00 2001 From: zhangshuaibao <15731629597@163.com> Date: 星期四, 15 四月 2021 10:12:55 +0800 Subject: [PATCH] 修改图表 --- src/components/LayerController/LayerController.vue | 15 ++++++++++++++- 1 files changed, 14 insertions(+), 1 deletions(-) diff --git a/src/components/LayerController/LayerController.vue b/src/components/LayerController/LayerController.vue index fe80364..ef07406 100644 --- a/src/components/LayerController/LayerController.vue +++ b/src/components/LayerController/LayerController.vue @@ -21,7 +21,7 @@ import iconSetting from '@/assets/images/map-pages/icon/setting.png' import LcServiceLayer from './modules/LcServiceLayer' - +import bus from '@/eventBus' export default { name: 'LayerController', components: { LcServiceLayer }, @@ -55,9 +55,22 @@ } } }, + mounted () { + const that = this + bus.$on('changeState', function (state) { + if (state.num !== 3 && state.type) { + that.layerControllerVisible = false + } + }) + }, methods: { showPanel () { this.layerControllerVisible = !this.layerControllerVisible + const state = { + type: this.layerControllerVisible, + num: 3 + } + bus.$emit('changeState', state) }, switchPanel () { this.panelSwitch.main = !this.panelSwitch.main -- Gitblit v1.8.0