mirror of
https://github.com/Tencent/tdesign-vue-next-starter.git
synced 2024-12-23 07:01:23 +08:00
修复issue#126 (#131)
* 修复issue#126 修复issue#126中的顶部菜单栏未选中的样式问题 * Update Header.vue * Update Header.vue
This commit is contained in:
parent
9c03616909
commit
33bdd29561
|
@ -116,13 +116,14 @@ const toggleSettingPanel = () => {
|
|||
};
|
||||
|
||||
const active = computed(() => {
|
||||
const { layout } = props;
|
||||
const route = useRoute();
|
||||
if (!route.path) {
|
||||
return '';
|
||||
}
|
||||
return route.path
|
||||
.split('/')
|
||||
.filter((item, index) => index <= props.maxLevel && index > 0)
|
||||
.filter((item, index) => index < props.maxLevel - (layout === 'mix' ? 1 : -1) && index > 0)
|
||||
.map((item) => `/${item}`)
|
||||
.join('');
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user