Skip to content

Commit

Permalink
修复一级路由设置 meta.menu: false 无效
Browse files Browse the repository at this point in the history
  • Loading branch information
hooray committed Apr 5, 2024
1 parent dde17d4 commit afe7b2e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/layouts/components/Menu/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,10 @@ provide(rootMenuInjectionKey, reactive({
}"
>
<template v-for="item in menu" :key="item.path ?? JSON.stringify(item)">
<SubMenu v-if="item.children?.length" :menu="item" :unique-key="[item.path ?? JSON.stringify(item)]" />
<Item v-else :item="item" :unique-key="[item.path ?? JSON.stringify(item)]" @click="handleMenuItemClick(item.path ?? JSON.stringify(item))" />
<template v-if="item.meta?.menu !== false">
<SubMenu v-if="item.children?.length" :menu="item" :unique-key="[item.path ?? JSON.stringify(item)]" />
<Item v-else :item="item" :unique-key="[item.path ?? JSON.stringify(item)]" @click="handleMenuItemClick(item.path ?? JSON.stringify(item))" />
</template>
</template>
</div>
</template>

0 comments on commit afe7b2e

Please sign in to comment.