mirror of
https://github.com/jekip/naive-ui-admin.git
synced 2026-02-23 06:32:27 +08:00
fix(命名规范):修复store中重构之后遗留的命名错误
This commit is contained in:
@@ -20,7 +20,7 @@ const DEFAULT_CONFIG: TreeHelperConfig = {
|
|||||||
|
|
||||||
const getConfig = (config: Partial<TreeHelperConfig>) => Object.assign({}, DEFAULT_CONFIG, config);
|
const getConfig = (config: Partial<TreeHelperConfig>) => Object.assign({}, DEFAULT_CONFIG, config);
|
||||||
|
|
||||||
interface AsyncRouteState {
|
export interface IAsyncRouteState {
|
||||||
menus: RouteRecordRaw[];
|
menus: RouteRecordRaw[];
|
||||||
routers: any[];
|
routers: any[];
|
||||||
addRouters: any[];
|
addRouters: any[];
|
||||||
@@ -50,7 +50,7 @@ function filter<T = any>(
|
|||||||
|
|
||||||
export const useAsyncRouteStore = defineStore({
|
export const useAsyncRouteStore = defineStore({
|
||||||
id: 'app-async-route',
|
id: 'app-async-route',
|
||||||
state: (): AsyncRouteState => ({
|
state: (): IAsyncRouteState => ({
|
||||||
menus: [],
|
menus: [],
|
||||||
routers: constantRouter,
|
routers: constantRouter,
|
||||||
addRouters: [],
|
addRouters: [],
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ const Storage = createStorage({ storage: localStorage });
|
|||||||
import { getUserInfo, login } from '@/api/system/user';
|
import { getUserInfo, login } from '@/api/system/user';
|
||||||
import { storage } from '@/utils/Storage';
|
import { storage } from '@/utils/Storage';
|
||||||
|
|
||||||
interface UserState {
|
export interface IUserState {
|
||||||
token: string;
|
token: string;
|
||||||
username: string;
|
username: string;
|
||||||
welcome: string;
|
welcome: string;
|
||||||
@@ -19,7 +19,7 @@ interface UserState {
|
|||||||
|
|
||||||
export const useUserStore = defineStore({
|
export const useUserStore = defineStore({
|
||||||
id: 'app-user',
|
id: 'app-user',
|
||||||
state: (): UserState => ({
|
state: (): IUserState => ({
|
||||||
token: Storage.get(ACCESS_TOKEN, ''),
|
token: Storage.get(ACCESS_TOKEN, ''),
|
||||||
username: '',
|
username: '',
|
||||||
welcome: '',
|
welcome: '',
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { IAsyncRouteState } from '@/store/modules/async-route';
|
import { IAsyncRouteState } from '@/store/modules/asyncRoute';
|
||||||
import { IUserState } from '@/store/modules/user/state';
|
import { IUserState } from '@/store/modules/user';
|
||||||
import { ILockscreenState } from '@/store/modules/lockscreen';
|
import { ILockscreenState } from '@/store/modules/lockscreen';
|
||||||
import { ITabsViewState } from '@/store/modules/tabs-view';
|
import { ITabsViewState } from '@/store/modules/tabsView';
|
||||||
|
|
||||||
export interface IStore {
|
export interface IStore {
|
||||||
asyncRoute: IAsyncRouteState;
|
asyncRoute: IAsyncRouteState;
|
||||||
|
|||||||
Reference in New Issue
Block a user