From 943ffba07ff0e201635d4f01d6126bdd5829d0ef Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=90=AC=E6=B5=B7?= <445436867@qq.com>
Date: Mon, 6 Mar 2023 16:06:27 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dplugin-layout=E4=B8=AD?=
 =?UTF-8?q?=E8=AE=A1=E7=AE=97=E9=BB=98=E8=AE=A4=E5=B1=95=E5=BC=80=E8=8F=9C?=
 =?UTF-8?q?=E5=8D=95=E6=9C=AA=E8=80=83=E8=99=91=E6=9C=AA=E9=85=8D=E7=BD=AE?=
 =?UTF-8?q?=E5=9C=A8=E8=8F=9C=E5=8D=95=E7=9A=84=E8=B7=AF=E7=94=B1=E5=9C=BA?=
 =?UTF-8?q?=E6=99=AF=20(#172)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 packages/fes-plugin-layout/src/runtime/views/Menu.vue | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/packages/fes-plugin-layout/src/runtime/views/Menu.vue b/packages/fes-plugin-layout/src/runtime/views/Menu.vue
index d00dc746..ef4e2d75 100644
--- a/packages/fes-plugin-layout/src/runtime/views/Menu.vue
+++ b/packages/fes-plugin-layout/src/runtime/views/Menu.vue
@@ -96,6 +96,9 @@ export default {
         });
         const defaultExpandMenu = computed(() => {
             let index = menuArray.value.findIndex((item) => item.value === activePath.value);
+            if (index === -1) {
+                return props.expandedKeys;
+            }
             const activeMenu = menuArray.value[index];
             const arr = [activeMenu];
             while (index > 0) {