Skip to content

Commit e5e29f6

Browse files
committed
[fix narvar] navbar highlight
navbar active index is at wrong place after manual refresh. now it has benn fixed.
1 parent 6da5e73 commit e5e29f6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/components/page/navbar.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div id="nav-content">
44
<el-menu
55
id="menu"
6-
:default-active="activeIndex"
6+
:default-active="$route.path"
77
:router="true"
88
class="el-menu-demo"
99
mode="horizontal"
@@ -64,13 +64,12 @@ export default {
6464
name: 'NavBar',
6565
data() {
6666
return {
67-
activeIndex: '/'
6867
};
6968
},
7069
components: {
7170
UserLogout,
7271
UserAvatar
73-
}
72+
},
7473
};
7574
</script>
7675

0 commit comments

Comments
 (0)