From e0c014397056bcddf82acd063288d3d045bd2dc5 Mon Sep 17 00:00:00 2001 From: roymondchen Date: Thu, 2 Mar 2023 20:44:45 +0800 Subject: [PATCH] =?UTF-8?q?fix(editor):=20=E6=9B=B4=E6=96=B0=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=90=8E=EF=BC=8C=E7=BB=84=E4=BB=B6=E6=A0=91=E9=80=89?= =?UTF-8?q?=E4=B8=AD=E7=8A=B6=E6=80=81=E8=A2=AB=E9=87=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/editor/src/layouts/sidebar/LayerPanel.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/editor/src/layouts/sidebar/LayerPanel.vue b/packages/editor/src/layouts/sidebar/LayerPanel.vue index ce60a113..46359010 100644 --- a/packages/editor/src/layouts/sidebar/LayerPanel.vue +++ b/packages/editor/src/layouts/sidebar/LayerPanel.vue @@ -221,10 +221,15 @@ watch(nodes, (nodes) => { ) { tree.value?.setCheckedKeys([], false); - [currentNodeKey.value] = ids; checkedKeys.value = ids.filter((id) => id !== page.value?.id); expandedKeys.value = union(expandedKeys.value, ids); } + + [currentNodeKey.value] = ids; + + setTimeout(() => { + tree.value?.setCurrentKey(currentNodeKey.value); + }); }); watch(isMultiSelect, (isMultiSelect) => {