Merge pull request #2221 from jumpserver/revert-2220-pr@v3@feaat_router_submenu_open

Revert "feat: 仪表盘、工作台默认展开子菜单"
This commit is contained in:
老广 2022-11-30 14:29:17 +08:00 committed by GitHub
commit cc9b4ea2bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 18 deletions

View File

@ -30,7 +30,6 @@
<el-menu
class="left-menu"
:default-active="activeMenu"
:default-openeds="opensMenu"
:collapse="isCollapse"
:background-color="variables['menuBg']"
:text-color="variables['menuText']"
@ -98,13 +97,6 @@ export default {
this.$log.debug('Active menu path3: ', locPath)
return locPath
},
opensMenu() {
const { meta } = this.$route
if (meta?.opensMenu) {
return meta.opensMenu
}
return []
},
showLogo() {
return this.$store.state.settings.sidebarLogo
},
@ -154,19 +146,15 @@ export default {
.switch-view {
position: absolute;
top: 50%;
right: 16px;
right: 0;
transform: translateY(-50%);
z-index: 1;
padding: 3px;
line-height: 10px;
border-radius: 3px;
&:hover {
background: var(--menu-hover)!important;
color: var(--color-primary);
}
.icon {
margin-right: 0!important;
&:hover {
color: var(--color-primary)!important;
color: var(--color-primary);
}
}
}

View File

@ -28,7 +28,6 @@ export default {
meta: {
icon: 'dashboard',
title: i18n.t('route.Dashboard'),
opensMenu: ['/audit/sessions', '/audit/logs'],
permissions: []
}
},

View File

@ -21,7 +21,6 @@ Vue.use(Router)
icon: 'svg-name' the icon show in the sidebar
breadcrumb: false if set false, the item will hidden in breadcrumb(default is true)
activeMenu: '/example/list' if set path, the sidebar will highlight the path you set
opensMenu: ['/app/list'] expand submenu by default
}
*/
import commonRoutes from './common'

View File

@ -29,7 +29,6 @@ export default {
meta: {
icon: 'overview',
title: i18n.t('route.Overview'),
opensMenu: ['/workbench/ops'],
permissions: []
}
},