mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
refactor(projects): 代码优化
This commit is contained in:
@ -67,7 +67,8 @@ export const useAuthStore = defineStore('auth-store', {
|
||||
setUserInfo(data);
|
||||
|
||||
// 更新状态
|
||||
Object.assign(this, { userInfo: data, token });
|
||||
this.userInfo = data;
|
||||
this.token = token;
|
||||
|
||||
// 跳转登录后的地址
|
||||
toLoginRedirect();
|
||||
|
@ -69,7 +69,8 @@ export const useTabStore = defineStore('tab-store', {
|
||||
*/
|
||||
addTab(route: RouteLocationNormalizedLoaded) {
|
||||
if (!isInTabRoutes(this.tabs, route.path)) {
|
||||
this.tabs.push(getTabRouteByVueRoute(route));
|
||||
const tab = getTabRouteByVueRoute(route);
|
||||
this.tabs.push(tab);
|
||||
}
|
||||
},
|
||||
/**
|
||||
|
Reference in New Issue
Block a user