mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
@ -310,6 +310,14 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => {
|
||||
return getSelectedMenuKeyPathByKey(selectedKey, menus.value);
|
||||
}
|
||||
|
||||
async function onRouteSwitchWhenLoggedIn() {
|
||||
authStore.initUserInfo();
|
||||
}
|
||||
|
||||
async function onRouteSwitchWhenNotLoggedIn() {
|
||||
// some global init logic if it does not need to be logged in
|
||||
}
|
||||
|
||||
return {
|
||||
resetStore,
|
||||
routeHome,
|
||||
@ -326,6 +334,8 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => {
|
||||
isInitAuthRoute,
|
||||
setIsInitAuthRoute,
|
||||
getIsAuthRouteExist,
|
||||
getSelectedMenuKeyPath
|
||||
getSelectedMenuKeyPath,
|
||||
onRouteSwitchWhenLoggedIn,
|
||||
onRouteSwitchWhenNotLoggedIn
|
||||
};
|
||||
});
|
||||
|
Reference in New Issue
Block a user