mirror of
https://github.com/pure-admin/pure-admin-thin.git
synced 2025-11-26 12:33:38 +08:00
perf: 同步完整版代码
This commit is contained in:
@@ -7,13 +7,12 @@ import { remainingPaths } from "/@/router";
|
||||
import { transformI18n } from "/@/plugins/i18n";
|
||||
import { storageSession } from "/@/utils/storage";
|
||||
import { useAppStoreHook } from "/@/store/modules/app";
|
||||
import { useUserStoreHook } from "/@/store/modules/user";
|
||||
import { useEpThemeStoreHook } from "/@/store/modules/epTheme";
|
||||
|
||||
export function useNav() {
|
||||
const pureApp = useAppStoreHook();
|
||||
// 用户名
|
||||
const usename: string = storageSession.getItem("info")?.username;
|
||||
const username: string = storageSession.getItem("info")?.username;
|
||||
|
||||
// 设置国际化选中后的样式
|
||||
const getDropdownItemStyle = computed(() => {
|
||||
@@ -39,7 +38,8 @@ export function useNav() {
|
||||
|
||||
// 退出登录
|
||||
function logout() {
|
||||
useUserStoreHook().logOut();
|
||||
storageSession.removeItem("info");
|
||||
router.push("/login");
|
||||
}
|
||||
|
||||
function backHome() {
|
||||
@@ -112,7 +112,7 @@ export function useNav() {
|
||||
resolvePath,
|
||||
isCollapse,
|
||||
pureApp,
|
||||
usename,
|
||||
username,
|
||||
getDropdownItemStyle
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user