diff --git a/src/layout/components/NavHeader/ViewSwitcher.vue b/src/layout/components/NavHeader/ViewSwitcher.vue index 4045c4214..f2f956391 100644 --- a/src/layout/components/NavHeader/ViewSwitcher.vue +++ b/src/layout/components/NavHeader/ViewSwitcher.vue @@ -77,8 +77,8 @@ export default { .menu-main.el-menu { background-color: transparent; ::v-deep .el-submenu .el-submenu__title { - height: 50px; - line-height: 50px; + height: 55px; + line-height: 55px; border-bottom: none; } &.el-menu--horizontal { @@ -93,16 +93,19 @@ export default { } .el-menu--horizontal .el-menu .el-menu-item { display: inline-block!important; + padding: 10px 15px; text-align: center; - padding: 8px 15px 20px 15px; + height: 70px; + width: 85px; &:hover { color: #303133; + //background-color: #e6e6e6; } &:first-child { - margin-left: 15px; + margin-left: 20px; } &:last-child { - margin-right: 15px; + margin-right: 20px; } } .el-submenu.is-opened { @@ -121,10 +124,12 @@ export default { } .icons-title { display: inline-block; - padding-bottom: 10px; font-size: 14px; } .el-menu--popup-bottom-start { margin-top: 0!important; } +.el-menu-item.is-active { + font-weight: bold; +} diff --git a/src/utils/startup.js b/src/utils/startup.js index 704148e2d..aea4d92da 100644 --- a/src/utils/startup.js +++ b/src/utils/startup.js @@ -15,10 +15,6 @@ function reject(msg) { return new Promise((resolve, reject) => reject(msg)) } -// function setHeadTitle({ to, from, next }) { -// document.title = getPageTitle(to.meta.title) -// } - async function checkLogin({ to, from, next }) { if (whiteList.indexOf(to.path) !== -1) { next() @@ -69,12 +65,11 @@ async function changeCurrentOrgIfNeed({ to, from, next }) { await refreshCurrentOrg() const currentOrg = store.getters.currentOrg if (!currentOrg || typeof currentOrg !== 'object') { - // console.log('Not has current org') orgUtil.change2PropOrg() return reject('Change prop org') } if (!orgUtil.hasCurrentOrgPermission()) { - console.debug('Not has current org permission') + console.error('Not has current org permission') orgUtil.change2PropOrg() return reject('Change prop org') } @@ -109,11 +104,6 @@ export async function generatePageRoutes({ to, from, next }) { try { // try get user profile - // note: roles must be a object array! such as: ['admin'] or ,['developer','editor'] - // 不能改名 current_org_roles, 里面返回的就是这个 - // const currentRole = store.getters.currentRole - // console.log('Current org role: ', currentRole, rolec.getRolesDisplay(currentRole)) - // generate accessible routes map based on roles const accessRoutes = await store.dispatch('permission/generateRoutes', { to, from })