Skip to content

Commit

Permalink
fix(layouts-header): 为配置了一级路由、没有设置 redirect 的导航栏项目添加选中效果
Browse files Browse the repository at this point in the history
  • Loading branch information
Summer-Shen committed Jan 2, 2024
1 parent 7a3e75a commit 2bb5cc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/layouts/components/MenuContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:key="`href${item.path}`"
:href="getHref(item)?.[0]"
:name="item.path"
:value="item.meta?.single ? item.redirect : item.path"
:value="item.meta?.single ? item.redirect || item.path : item.path"
>
<template #icon>
<t-icon v-if="typeof item.icon === 'string' && item.icon" :name="item.icon" />
Expand All @@ -20,7 +20,7 @@
:key="`${item.path}`"
:to="item.path"
:name="item.path"
:value="item.meta?.single ? item.redirect : item.path"
:value="item.meta?.single ? item.redirect || item.path : item.path"
>
<template #icon>
<t-icon v-if="typeof item.icon === 'string' && item.icon" :name="item.icon" />
Expand Down

0 comments on commit 2bb5cc8

Please sign in to comment.