From afd4342bccb0e111fe4134fa7693f50b0b91fdbd Mon Sep 17 00:00:00 2001 From: 徐旺旺 <11530253@qq.com> Date: 星期三, 31 三月 2021 19:00:51 +0800 Subject: [PATCH] 工具条调整 --- src/components/panel/ToolBoxPanel.vue | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/panel/ToolBoxPanel.vue b/src/components/panel/ToolBoxPanel.vue index 62a5442..f65eb9c 100644 --- a/src/components/panel/ToolBoxPanel.vue +++ b/src/components/panel/ToolBoxPanel.vue @@ -290,7 +290,6 @@ if (this.drawLayer == null) { this.drawLayer = this.L.layerGroup().addTo(this.map) } - this.active = index // this.isShow[index] = !this.isShow[index] // this.isShow[index - 1] = !this.isShow[index - 1] // if (this.checkbutton === index) { @@ -307,9 +306,12 @@ // console.log(this.isShow[index - 1]) console.log(this.basemapList) for (let i = 0; i < this.isShow.length; i++) { - this.isShow[i] = false + if (i !== index) { + this.isShow[i] = false + } } - this.isShow[index] = true + this.isShow[index] = !this.isShow[index] + this.isShow[index] ? (this.active = index) : (this.active = '') }, choiceItem (itemT, indexT) { this.Selecd = indexT -- Gitblit v1.8.0