diff --git a/Web/src/common/login/index.js b/Web/src/common/login/index.js index b5f5894..ca4f285 100644 --- a/Web/src/common/login/index.js +++ b/Web/src/common/login/index.js @@ -1,6 +1,6 @@ import { api } from '@/common/api' import { token } from '@/common/token' -import { GLOBAL_INFO_KEY } from '@/common/storage' +import { GLOBAL_INFO_KEY, APP_MENU_KEY } from '@/common/storage' import { encryptByDES, decryptByDES } from '@/util/des' import app from '@/main' @@ -50,6 +50,7 @@ const doLogout = () => { if (success) { removeGlobal() token.value = '' + window.localStorage.removeItem(APP_MENU_KEY) if (app.$route.path === '/') { app.$router.replace('/login') } else { diff --git a/Web/src/views/main/_layout/sider/menu.js b/Web/src/views/main/_layout/sider/menu.js index f5bbbd8..573f23c 100644 --- a/Web/src/views/main/_layout/sider/menu.js +++ b/Web/src/views/main/_layout/sider/menu.js @@ -32,7 +32,7 @@ export default { return ( - {menu.meta.icon ? : null} + {menu.meta.icon && } {menu.meta.title} {this.renderMenu(menu.children)} @@ -43,7 +43,7 @@ export default { renderMenuItem(menu) { return ( this.onOpenContentWindow(menu)}> - {menu.meta.icon ? : null} + {menu.meta.icon && } {menu.meta.title} )