Skip to content

Commit

Permalink
fix: 修复当子菜单只有一层并且其子菜单为空数组时渲染出错bug
Browse files Browse the repository at this point in the history
  • Loading branch information
yuntian001 committed Jun 20, 2023
1 parent 3b0c0ac commit 3d23151
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/layout/components/menu/components/menuItem.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<template>
<template v-if="!item.meta?.hideMenu">
<template
v-if="onlyOneChild && (!onlyOneChild.children || onlyOneChild.noShowingChildren) && !item.meta?.alwaysShow"
v-if="
onlyOneChild && (!onlyOneChild.children?.length || onlyOneChild.noShowingChildren) && !item.meta?.alwaysShow
"
>
<component
:is="onlyOneChild.meta?.isLink ? 'a' : 'routerLink'"
Expand Down

0 comments on commit 3d23151

Please sign in to comment.