diff --git a/src/store/modules/asyncRoute.ts b/src/store/modules/asyncRoute.ts index 39d58d4..edf350c 100644 --- a/src/store/modules/asyncRoute.ts +++ b/src/store/modules/asyncRoute.ts @@ -20,7 +20,7 @@ const DEFAULT_CONFIG: TreeHelperConfig = { const getConfig = (config: Partial) => Object.assign({}, DEFAULT_CONFIG, config); -interface AsyncRouteState { +export interface IAsyncRouteState { menus: RouteRecordRaw[]; routers: any[]; addRouters: any[]; @@ -50,7 +50,7 @@ function filter( export const useAsyncRouteStore = defineStore({ id: 'app-async-route', - state: (): AsyncRouteState => ({ + state: (): IAsyncRouteState => ({ menus: [], routers: constantRouter, addRouters: [], diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 360c434..2c818d3 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -8,7 +8,7 @@ const Storage = createStorage({ storage: localStorage }); import { getUserInfo, login } from '@/api/system/user'; import { storage } from '@/utils/Storage'; -interface UserState { +export interface IUserState { token: string; username: string; welcome: string; @@ -19,7 +19,7 @@ interface UserState { export const useUserStore = defineStore({ id: 'app-user', - state: (): UserState => ({ + state: (): IUserState => ({ token: Storage.get(ACCESS_TOKEN, ''), username: '', welcome: '', diff --git a/src/store/types.ts b/src/store/types.ts index 85b6d63..11855a7 100644 --- a/src/store/types.ts +++ b/src/store/types.ts @@ -1,7 +1,7 @@ -import { IAsyncRouteState } from '@/store/modules/async-route'; -import { IUserState } from '@/store/modules/user/state'; +import { IAsyncRouteState } from '@/store/modules/asyncRoute'; +import { IUserState } from '@/store/modules/user'; import { ILockscreenState } from '@/store/modules/lockscreen'; -import { ITabsViewState } from '@/store/modules/tabs-view'; +import { ITabsViewState } from '@/store/modules/tabsView'; export interface IStore { asyncRoute: IAsyncRouteState;