Commit 0e7a5982 authored by 徐一鸣's avatar 徐一鸣

优化服务管理侧边导航

parent b4c70c60
...@@ -9,14 +9,16 @@ ...@@ -9,14 +9,16 @@
<span v-text="title"></span> <span v-text="title"></span>
</h3> </h3>
<ul class="side_nav_bar_list"> <ul class="side_nav_bar_list">
<li <router-link
tag="li"
active-class="current"
v-for="(nav, index) in navList" v-for="(nav, index) in navList"
:class="{ current: $route.path.indexOf(nav.path) > -1 }" :class="{ current: $route.path.indexOf(nav.path) > -1 }"
:key="'nav' + index" :key="'nav' + index"
@click="navAction(nav)" :to="nav.path"
> >
<span v-text="nav.name"></span> <span v-text="nav.name"></span>
</li> </router-link>
</ul> </ul>
</div> </div>
</template> </template>
...@@ -39,9 +41,6 @@ export default { ...@@ -39,9 +41,6 @@ export default {
}, },
}, },
methods: { methods: {
navAction(nav) {
this.$router.push(nav.path);
},
titleAction() { titleAction() {
if (this.titlePath) { if (this.titlePath) {
this.$router.push(this.titlePath); this.$router.push(this.titlePath);
......
...@@ -75,7 +75,7 @@ export default { ...@@ -75,7 +75,7 @@ export default {
name: "云资源管理", name: "云资源管理",
path: "/fwgl/list/9/云资源管理", path: "/fwgl/list/9/云资源管理",
}, },
]; ].filter((nav) => nav.level === this.userLevel);
this.$router.push(this.navList[0].path); this.$router.push(this.navList[0].path);
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment