From 39d5ea5aa528bd6cb8caf64d95dfc6ad358f4942 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Wed, 14 Jul 2021 10:53:47 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=88=9B=E5=BB=BA=E5=88=86=E7=BB=84?= =?UTF-8?q?=E6=88=96=E8=80=85=E4=BB=AA=E8=A1=A8=E6=9D=BF=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E5=8F=96=E6=B6=88=E6=8C=89=E9=92=AE=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E5=8F=91=E5=87=BA=E7=9B=AE=E5=BD=95=E6=A0=91=E7=9A=84?= =?UTF-8?q?=E8=AF=B7=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/panel/list/PanelList.vue | 30 +++++++++++---------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/frontend/src/views/panel/list/PanelList.vue b/frontend/src/views/panel/list/PanelList.vue index 30d5b9ddee..07917ed19c 100644 --- a/frontend/src/views/panel/list/PanelList.vue +++ b/frontend/src/views/panel/list/PanelList.vue @@ -293,21 +293,23 @@ export default { methods: { closeEditPanelDialog(panelInfo) { this.editPanel.visible = false - this.defaultTree() - // 默认展开 同时点击 新增的节点 - if (panelInfo && panelInfo.panelType === 'self' && this.lastActiveNodeData.id) { - if (this.editPanel.optType === 'rename') { - this.lastActiveNodeData.name = panelInfo.name - return + if (panelInfo) { + this.defaultTree() + // 默认展开 同时点击 新增的节点 + if (panelInfo && panelInfo.panelType === 'self' && this.lastActiveNodeData.id) { + if (this.editPanel.optType === 'rename') { + this.lastActiveNodeData.name = panelInfo.name + return + } + if (!this.lastActiveNodeData.children) { + this.$set(this.lastActiveNodeData, 'children', []) + } + this.lastActiveNodeData.children.push(panelInfo) + this.lastActiveNode.expanded = true + this.activeNodeAndClick(panelInfo) + } else { + this.tree(this.groupForm) } - if (!this.lastActiveNodeData.children) { - this.$set(this.lastActiveNodeData, 'children', []) - } - this.lastActiveNodeData.children.push(panelInfo) - this.lastActiveNode.expanded = true - this.activeNodeAndClick(panelInfo) - } else { - this.tree(this.groupForm) } }, showEditPanel(param) {