| | |
| | | // 主题颜色 |
| | | const theme = computed(() => settingsStore.theme); |
| | | // 所有的路由信息 |
| | | const routers = computed(() => permissionStore.topbarRouters); |
| | | const routers = computed(() => permissionStore.getTopbarRoutes()); |
| | | |
| | | // 顶部显示菜单 |
| | | const topMenus = computed(() => { |
| | |
| | | |
| | | // 默认激活的菜单 |
| | | const activeMenu = computed(() => { |
| | | const path = route.path; |
| | | let path = route.path; |
| | | if (path === '/index') { |
| | | path = '/system/user'; |
| | | } |
| | | let activePath = path; |
| | | if (path !== undefined && path.lastIndexOf('/') > 0 && hideList.indexOf(path) === -1) { |
| | | const tmpPath = path.substring(1, path.length); |
| | | activePath = '/' + tmpPath.substring(0, tmpPath.indexOf('/')); |
| | | if (!route.meta.link) { |
| | | activePath = '/' + tmpPath.substring(0, tmpPath.indexOf('/')); |
| | | appStore.toggleSideBarHide(false); |
| | | } |
| | | } else if (!route.children) { |