This commit is contained in:
2023-11-14 10:35:10 +08:00
parent 045843bc1c
commit 26862423c1
28 changed files with 608 additions and 22 deletions

View File

@@ -28,7 +28,7 @@
mode="vertical">
<!-- 根据 sidebarRouters 路由生成菜单 -->
<sidebar-item
v-for="(route, index) in sidebarRouters"
v-for="(route, index) in routeList"
:key="route.path + index"
:item="route"
:base-path="route.path" />
@@ -47,7 +47,12 @@ export default {
components: { SidebarItem, Logo },
computed: {
...mapState(['settings']),
...mapGetters(['sidebarRouters', 'sidebar']),
...mapGetters(['sidebarRouters', 'sidebar', 'choicepart']),
routeList() {
// return [this.partList[this.choicepart]]
// return [this.sidebarRouters[29]]
return [this.sidebarRouters[this.choicepart]]
},
activeMenu() {
const route = this.$route;
const { meta, path } = route;