mirror of
https://github.com/Tencent/tdesign-vue-next-starter.git
synced 2024-12-23 07:26:29 +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 active = computed(() => {
|
||||||
|
const { layout } = props;
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
if (!route.path) {
|
if (!route.path) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
return route.path
|
return route.path
|
||||||
.split('/')
|
.split('/')
|
||||||
.filter((item, index) => index <= props.maxLevel && index > 0)
|
.filter((item, index) => index < props.maxLevel - (layout === 'mix' ? 1 : -1) && index > 0)
|
||||||
.map((item) => `/${item}`)
|
.map((item) => `/${item}`)
|
||||||
.join('');
|
.join('');
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user