Skip to content

Commit 33bdd29

Browse files
authored
修复issue#126 (#131)
* 修复issue#126 修复issue#126中的顶部菜单栏未选中的样式问题 * Update Header.vue * Update Header.vue
1 parent 9c03616 commit 33bdd29

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/layouts/components/Header.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,14 @@ const toggleSettingPanel = () => {
116116
};
117117
118118
const active = computed(() => {
119+
const { layout } = props;
119120
const route = useRoute();
120121
if (!route.path) {
121122
return '';
122123
}
123124
return route.path
124125
.split('/')
125-
.filter((item, index) => index <= props.maxLevel && index > 0)
126+
.filter((item, index) => index < props.maxLevel - (layout === 'mix' ? 1 : -1) && index > 0)
126127
.map((item) => `/${item}`)
127128
.join('');
128129
});

0 commit comments

Comments
 (0)