mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-10-12 12:53:42 +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