This commit is contained in:
2023-12-20 14:11:05 +08:00
parent 1d61f056b8
commit 39d2c4a959
6 changed files with 122 additions and 19 deletions

View File

@@ -28,10 +28,10 @@
mode="vertical">
<!-- 根据 sidebarRouters 路由生成菜单 -->
<sidebar-item
v-for="(route, index) in routeList"
v-for="(route, index) in routeList.children"
:key="route.path + index"
:item="route"
:base-path="route.path" />
:base-path="routeList.path+ '/'+ route.path" />
</el-menu>
</el-scrollbar>
</div>
@@ -49,9 +49,7 @@ export default {
...mapState(['settings']),
...mapGetters(['sidebarRouters', 'sidebar', 'choicepart']),
routeList() {
// return [this.partList[this.choicepart]]
// return [this.sidebarRouters[29]]
return [this.sidebarRouters[this.choicepart]]
return this.sidebarRouters[this.choicepart]
},
activeMenu() {
const route = this.$route;