Skip to content

Commit

Permalink
fix: 修复plugin-layout中计算默认展开菜单未考虑未配置在菜单的路由场景 (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
wanchun authored Mar 6, 2023
1 parent fbf1441 commit a4abb51
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/fes-plugin-layout/src/runtime/views/Menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit a4abb51

Please sign in to comment.