From 22772fecbcdf74c74ca4b9bd4a8c9ab11abd39ff Mon Sep 17 00:00:00 2001 From: lb Date: Wed, 1 Feb 2023 11:09:52 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E5=85=B3=E9=97=AD3d=E5=9B=BE=E7=9A=84?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E5=B0=8F=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/3DOverview/index.vue | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/views/3DOverview/index.vue b/src/views/3DOverview/index.vue index 09d0716..5345599 100644 --- a/src/views/3DOverview/index.vue +++ b/src/views/3DOverview/index.vue @@ -142,6 +142,7 @@ export default { data() { return { eqId: null, + oldEqId: null, currentEquipment: null, showPage: false, toggleResize: 'toggle-1' // <=== no need to worry this @@ -170,8 +171,17 @@ export default { }, handle3DClick() { this.eqId = document.getElementById('V3DData').rel - // alert(this.eqId) + + if (this.oldEqId && this.oldEqId === this.eqId) { + // 关闭框 + console.log('here.........关闭框', this.oldEqId, this.eqId) + this.currentEquipment = null + this.oldEqId = null + return + } + if (this.eqId) { + this.oldEqId = this.eqId this.currentEquipment = eqList.find(item => item.id === this.eqId) } }