@ditari/store 5.1.5 → 5.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.d.ts +11 -0
- package/dist/cjs/modules/useAppStore.d.ts +36 -0
- package/dist/cjs/modules/useBreadStore.d.ts +11 -0
- package/dist/cjs/modules/useDeviceStore.d.ts +17 -0
- package/dist/cjs/modules/useDicStore.d.ts +46 -0
- package/dist/cjs/modules/useKeepAliveStore.d.ts +26 -0
- package/dist/cjs/modules/useMenuStore.d.ts +15 -0
- package/dist/cjs/modules/useNavTabStore.d.ts +52 -0
- package/dist/cjs/modules/useUserStore.d.ts +23 -0
- package/dist/cjs/types.d.ts +10 -0
- package/dist/esm/index.d.ts +11 -0
- package/dist/esm/modules/useAppStore.d.ts +36 -0
- package/dist/esm/modules/useBreadStore.d.ts +11 -0
- package/dist/esm/modules/useDeviceStore.d.ts +17 -0
- package/dist/esm/modules/useDicStore.d.ts +46 -0
- package/dist/esm/modules/useKeepAliveStore.d.ts +26 -0
- package/dist/esm/modules/useMenuStore.d.ts +15 -0
- package/dist/esm/modules/useNavTabStore.d.ts +52 -0
- package/dist/esm/modules/useUserStore.d.ts +23 -0
- package/dist/esm/types.d.ts +10 -0
- package/package.json +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type { App } from "./modules/useAppStore";
|
|
2
|
+
export { default as useAppStore } from "./modules/useAppStore";
|
|
3
|
+
export * from "./modules/useBreadStore";
|
|
4
|
+
export * from "./modules/useDeviceStore";
|
|
5
|
+
export { default as useDicStore } from "./modules/useDicStore";
|
|
6
|
+
export { default as useKeepAliveStore } from "./modules/useKeepAliveStore";
|
|
7
|
+
export { default as useMenuStore } from "./modules/useMenuStore";
|
|
8
|
+
export type { NavTabsState } from "./modules/useNavTabStore";
|
|
9
|
+
export { default as useNavTabStore } from "./modules/useNavTabStore";
|
|
10
|
+
export { default as useUserStore } from "./modules/useUserStore";
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ThemeConfig } from "ant-design-vue/es/config-provider/context";
|
|
2
|
+
export interface HeaderStyle {
|
|
3
|
+
colorBgHeader: string;
|
|
4
|
+
}
|
|
5
|
+
export interface TabsStyle {
|
|
6
|
+
colorBgActive: string;
|
|
7
|
+
colorTextActive: string;
|
|
8
|
+
colorSplit: string;
|
|
9
|
+
colorShadowActive: string;
|
|
10
|
+
colorTabsText: string;
|
|
11
|
+
}
|
|
12
|
+
export interface App {
|
|
13
|
+
theme: ThemeConfig;
|
|
14
|
+
modeConfig: Mode;
|
|
15
|
+
layout: {
|
|
16
|
+
sideWidth: number;
|
|
17
|
+
headerHeight: number;
|
|
18
|
+
collapsedWidth: number;
|
|
19
|
+
collapsed: boolean;
|
|
20
|
+
};
|
|
21
|
+
isCompact: boolean;
|
|
22
|
+
headerTokenStyle: HeaderStyle;
|
|
23
|
+
tabsTokenStyle?: TabsStyle;
|
|
24
|
+
sideTokenStyle: Record<string, string>;
|
|
25
|
+
refresh: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface Mode {
|
|
28
|
+
mode: string;
|
|
29
|
+
list: {
|
|
30
|
+
value: string;
|
|
31
|
+
label: string;
|
|
32
|
+
}[];
|
|
33
|
+
}
|
|
34
|
+
declare const useAppStore: import("pinia").StoreDefinition<"_STORE_APP_ID", App, {}, {}>;
|
|
35
|
+
export default useAppStore;
|
|
36
|
+
//# sourceMappingURL=useAppStore.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface BreadcrumbState {
|
|
2
|
+
breadcrumbs: [];
|
|
3
|
+
}
|
|
4
|
+
export declare const useBreadStore: import("pinia").StoreDefinition<"_STORE_BREADCRUMB_ID", BreadcrumbState, {
|
|
5
|
+
getBreadcrumb: (state: {
|
|
6
|
+
breadcrumbs: [];
|
|
7
|
+
} & import("pinia").PiniaCustomStateProperties<BreadcrumbState>) => [];
|
|
8
|
+
}, {
|
|
9
|
+
saveBreadcrumb(data: never): void;
|
|
10
|
+
}>;
|
|
11
|
+
//# sourceMappingURL=useBreadStore.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const useDeviceStore: import("pinia").StoreDefinition<"_STORE_DEVICE_ID", Pick<{
|
|
2
|
+
isAdaptive: import("vue").Ref<boolean, boolean>;
|
|
3
|
+
isMobile: import("vue").ComputedRef<boolean>;
|
|
4
|
+
isTablet: import("vue").ComputedRef<boolean>;
|
|
5
|
+
isDesktop: import("vue").ComputedRef<boolean>;
|
|
6
|
+
}, "isAdaptive">, Pick<{
|
|
7
|
+
isAdaptive: import("vue").Ref<boolean, boolean>;
|
|
8
|
+
isMobile: import("vue").ComputedRef<boolean>;
|
|
9
|
+
isTablet: import("vue").ComputedRef<boolean>;
|
|
10
|
+
isDesktop: import("vue").ComputedRef<boolean>;
|
|
11
|
+
}, "isMobile" | "isTablet" | "isDesktop">, Pick<{
|
|
12
|
+
isAdaptive: import("vue").Ref<boolean, boolean>;
|
|
13
|
+
isMobile: import("vue").ComputedRef<boolean>;
|
|
14
|
+
isTablet: import("vue").ComputedRef<boolean>;
|
|
15
|
+
isDesktop: import("vue").ComputedRef<boolean>;
|
|
16
|
+
}, never>>;
|
|
17
|
+
//# sourceMappingURL=useDeviceStore.d.ts.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export interface DictionaryItem {
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
}
|
|
5
|
+
export interface Dictionary {
|
|
6
|
+
[key: string]: {
|
|
7
|
+
value: DictionaryItem[];
|
|
8
|
+
timestamp: number;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* {key:[]}
|
|
13
|
+
*/
|
|
14
|
+
export interface DictionaryList {
|
|
15
|
+
[key: string]: DictionaryItem[];
|
|
16
|
+
}
|
|
17
|
+
export interface DataDictionaryState {
|
|
18
|
+
dataDic: Dictionary;
|
|
19
|
+
cacheDuration: number;
|
|
20
|
+
}
|
|
21
|
+
declare const useDicStore: import("pinia").StoreDefinition<"_STORE_DATA_DICTIONARY_ID", DataDictionaryState, {}, {
|
|
22
|
+
isCacheExpired(name: string): boolean;
|
|
23
|
+
saveDicByKey(key: string, data: DictionaryItem[]): void;
|
|
24
|
+
saveAll(data: DictionaryList): void;
|
|
25
|
+
/**
|
|
26
|
+
* 1. 根据 key 获取字典列表 (原 getDicByKey)
|
|
27
|
+
* @param key 字典的 key
|
|
28
|
+
*/
|
|
29
|
+
getDicByKey(key: string): DictionaryItem[];
|
|
30
|
+
/**
|
|
31
|
+
* 2. 返回 value 匹配到的整个对象 (原 getDicObjByValue)
|
|
32
|
+
* @param key 字典的 key
|
|
33
|
+
* @param value 字典项的值
|
|
34
|
+
*/
|
|
35
|
+
getDicObjByValue(key: string, value: string | number): DictionaryItem | null;
|
|
36
|
+
/**
|
|
37
|
+
* 3. 根据字典名称和字典的 value 获取对应的中文 (原 getDicTextByValue)
|
|
38
|
+
*/
|
|
39
|
+
getDicTextByValue(key: string, value: string | number): string;
|
|
40
|
+
/**
|
|
41
|
+
* 4. 根据文字匹配对应的 value (原 getDicValueByText)
|
|
42
|
+
*/
|
|
43
|
+
getDicValueByText(key: string, text: string): string;
|
|
44
|
+
}>;
|
|
45
|
+
export default useDicStore;
|
|
46
|
+
//# sourceMappingURL=useDicStore.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 缓存组件name数据
|
|
3
|
+
*/
|
|
4
|
+
import { type RouteLocationNormalized } from "vue-router";
|
|
5
|
+
declare const useKeepAliveStore: import("pinia").StoreDefinition<"_STORE_KEEP_ALIVE_ID", {
|
|
6
|
+
list: string[];
|
|
7
|
+
}, {
|
|
8
|
+
get: (state: {
|
|
9
|
+
list: string[];
|
|
10
|
+
} & import("pinia").PiniaCustomStateProperties<{
|
|
11
|
+
list: string[];
|
|
12
|
+
}>) => string[];
|
|
13
|
+
}, {
|
|
14
|
+
/**
|
|
15
|
+
* 删除已经缓存的组件
|
|
16
|
+
* @param name 组件名称(必须唯一)
|
|
17
|
+
*/
|
|
18
|
+
deleteKeepAlive(name: string): void;
|
|
19
|
+
/**
|
|
20
|
+
* 保存要缓存的组件名称
|
|
21
|
+
* @param route
|
|
22
|
+
*/
|
|
23
|
+
save(route: RouteLocationNormalized): void;
|
|
24
|
+
}>;
|
|
25
|
+
export default useKeepAliveStore;
|
|
26
|
+
//# sourceMappingURL=useKeepAliveStore.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ItemType } from "ant-design-vue";
|
|
2
|
+
export type ExtendedItemType = ItemType & {
|
|
3
|
+
id?: string;
|
|
4
|
+
parentId?: string;
|
|
5
|
+
};
|
|
6
|
+
export interface Menu {
|
|
7
|
+
openKeys: string[];
|
|
8
|
+
selectedKeys: string[];
|
|
9
|
+
data: ExtendedItemType[];
|
|
10
|
+
}
|
|
11
|
+
declare const useMenuStore: import("pinia").StoreDefinition<"_STORE_MENU_ID", Menu, {}, {
|
|
12
|
+
save(data: ExtendedItemType[]): void;
|
|
13
|
+
}>;
|
|
14
|
+
export default useMenuStore;
|
|
15
|
+
//# sourceMappingURL=useMenuStore.d.ts.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { LocationQuery, RouteLocationNormalized, RouteMeta, RouteParams } from "vue-router";
|
|
2
|
+
export interface NavTabsState {
|
|
3
|
+
path?: string;
|
|
4
|
+
fullPath?: string;
|
|
5
|
+
query?: LocationQuery;
|
|
6
|
+
params?: RouteParams;
|
|
7
|
+
meta?: RouteMeta;
|
|
8
|
+
name?: string;
|
|
9
|
+
openTime?: number | undefined;
|
|
10
|
+
}
|
|
11
|
+
export declare const useNavTabStore: import("pinia").StoreDefinition<"_STORE_NAV_TABS_ID", {
|
|
12
|
+
list: NavTabsState[];
|
|
13
|
+
activeKey: string;
|
|
14
|
+
}, {
|
|
15
|
+
getList: (state: {
|
|
16
|
+
list: {
|
|
17
|
+
path?: string | undefined;
|
|
18
|
+
fullPath?: string | undefined;
|
|
19
|
+
query?: LocationQuery | undefined;
|
|
20
|
+
params?: RouteParams | undefined;
|
|
21
|
+
meta?: RouteMeta | undefined;
|
|
22
|
+
name?: string | undefined;
|
|
23
|
+
openTime?: number | undefined | undefined;
|
|
24
|
+
}[];
|
|
25
|
+
activeKey: string;
|
|
26
|
+
} & import("pinia").PiniaCustomStateProperties<{
|
|
27
|
+
list: NavTabsState[];
|
|
28
|
+
activeKey: string;
|
|
29
|
+
}>) => NavTabsState[];
|
|
30
|
+
}, {
|
|
31
|
+
/**
|
|
32
|
+
* 保存标签信息
|
|
33
|
+
* @param route
|
|
34
|
+
*/
|
|
35
|
+
save(route: RouteLocationNormalized): void;
|
|
36
|
+
/**
|
|
37
|
+
* 删除标签
|
|
38
|
+
* @param key url路径
|
|
39
|
+
*/
|
|
40
|
+
deleteTabs(key: string): void;
|
|
41
|
+
/**
|
|
42
|
+
* 设置标题
|
|
43
|
+
* @param title 标题
|
|
44
|
+
* @param path url
|
|
45
|
+
*/
|
|
46
|
+
setNavTitle(title: string, path: string): void;
|
|
47
|
+
closeOtherTabs(fullPath: string): void;
|
|
48
|
+
closeLeftTabs(fullPath: string): void;
|
|
49
|
+
closeRightTabs(fullPath: string): void;
|
|
50
|
+
}>;
|
|
51
|
+
export default useNavTabStore;
|
|
52
|
+
//# sourceMappingURL=useNavTabStore.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface UserState {
|
|
2
|
+
token: string | undefined;
|
|
3
|
+
userInfo: unknown;
|
|
4
|
+
}
|
|
5
|
+
declare const useUserStore: import("pinia").StoreDefinition<"_STORE_USER_ID", UserState, {
|
|
6
|
+
getToken: (state: {
|
|
7
|
+
token: string | undefined;
|
|
8
|
+
userInfo: unknown;
|
|
9
|
+
} & import("pinia").PiniaCustomStateProperties<UserState>) => string | undefined;
|
|
10
|
+
getUserInfo: (state: {
|
|
11
|
+
token: string | undefined;
|
|
12
|
+
userInfo: unknown;
|
|
13
|
+
} & import("pinia").PiniaCustomStateProperties<UserState>) => unknown;
|
|
14
|
+
}, {
|
|
15
|
+
/**
|
|
16
|
+
* 保存token
|
|
17
|
+
* @param token
|
|
18
|
+
*/
|
|
19
|
+
saveToken(token: string): void;
|
|
20
|
+
saveUserInfo(data: unknown): void;
|
|
21
|
+
}>;
|
|
22
|
+
export default useUserStore;
|
|
23
|
+
//# sourceMappingURL=useUserStore.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const BREADCRUMB_ID = "_STORE_BREADCRUMB_ID";
|
|
2
|
+
export declare const DATA_DICTIONARY_ID = "_STORE_DATA_DICTIONARY_ID";
|
|
3
|
+
export declare const KEEP_ALIVE_ID = "_STORE_KEEP_ALIVE_ID";
|
|
4
|
+
export declare const MENU_ID = "_STORE_MENU_ID";
|
|
5
|
+
export declare const NAV_TAB_ID = "_STORE_NAV_TABS_ID";
|
|
6
|
+
export declare const SETTINGS_ID = "_STORE_SETTINGS_ID";
|
|
7
|
+
export declare const USER_ID = "_STORE_USER_ID";
|
|
8
|
+
export declare const APP_ID = "_STORE_APP_ID";
|
|
9
|
+
export declare const DEVICE_ID = "_STORE_DEVICE_ID";
|
|
10
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type { App } from "./modules/useAppStore";
|
|
2
|
+
export { default as useAppStore } from "./modules/useAppStore";
|
|
3
|
+
export * from "./modules/useBreadStore";
|
|
4
|
+
export * from "./modules/useDeviceStore";
|
|
5
|
+
export { default as useDicStore } from "./modules/useDicStore";
|
|
6
|
+
export { default as useKeepAliveStore } from "./modules/useKeepAliveStore";
|
|
7
|
+
export { default as useMenuStore } from "./modules/useMenuStore";
|
|
8
|
+
export type { NavTabsState } from "./modules/useNavTabStore";
|
|
9
|
+
export { default as useNavTabStore } from "./modules/useNavTabStore";
|
|
10
|
+
export { default as useUserStore } from "./modules/useUserStore";
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ThemeConfig } from "ant-design-vue/es/config-provider/context";
|
|
2
|
+
export interface HeaderStyle {
|
|
3
|
+
colorBgHeader: string;
|
|
4
|
+
}
|
|
5
|
+
export interface TabsStyle {
|
|
6
|
+
colorBgActive: string;
|
|
7
|
+
colorTextActive: string;
|
|
8
|
+
colorSplit: string;
|
|
9
|
+
colorShadowActive: string;
|
|
10
|
+
colorTabsText: string;
|
|
11
|
+
}
|
|
12
|
+
export interface App {
|
|
13
|
+
theme: ThemeConfig;
|
|
14
|
+
modeConfig: Mode;
|
|
15
|
+
layout: {
|
|
16
|
+
sideWidth: number;
|
|
17
|
+
headerHeight: number;
|
|
18
|
+
collapsedWidth: number;
|
|
19
|
+
collapsed: boolean;
|
|
20
|
+
};
|
|
21
|
+
isCompact: boolean;
|
|
22
|
+
headerTokenStyle: HeaderStyle;
|
|
23
|
+
tabsTokenStyle?: TabsStyle;
|
|
24
|
+
sideTokenStyle: Record<string, string>;
|
|
25
|
+
refresh: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface Mode {
|
|
28
|
+
mode: string;
|
|
29
|
+
list: {
|
|
30
|
+
value: string;
|
|
31
|
+
label: string;
|
|
32
|
+
}[];
|
|
33
|
+
}
|
|
34
|
+
declare const useAppStore: import("pinia").StoreDefinition<"_STORE_APP_ID", App, {}, {}>;
|
|
35
|
+
export default useAppStore;
|
|
36
|
+
//# sourceMappingURL=useAppStore.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface BreadcrumbState {
|
|
2
|
+
breadcrumbs: [];
|
|
3
|
+
}
|
|
4
|
+
export declare const useBreadStore: import("pinia").StoreDefinition<"_STORE_BREADCRUMB_ID", BreadcrumbState, {
|
|
5
|
+
getBreadcrumb: (state: {
|
|
6
|
+
breadcrumbs: [];
|
|
7
|
+
} & import("pinia").PiniaCustomStateProperties<BreadcrumbState>) => [];
|
|
8
|
+
}, {
|
|
9
|
+
saveBreadcrumb(data: never): void;
|
|
10
|
+
}>;
|
|
11
|
+
//# sourceMappingURL=useBreadStore.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const useDeviceStore: import("pinia").StoreDefinition<"_STORE_DEVICE_ID", Pick<{
|
|
2
|
+
isAdaptive: import("vue").Ref<boolean, boolean>;
|
|
3
|
+
isMobile: import("vue").ComputedRef<boolean>;
|
|
4
|
+
isTablet: import("vue").ComputedRef<boolean>;
|
|
5
|
+
isDesktop: import("vue").ComputedRef<boolean>;
|
|
6
|
+
}, "isAdaptive">, Pick<{
|
|
7
|
+
isAdaptive: import("vue").Ref<boolean, boolean>;
|
|
8
|
+
isMobile: import("vue").ComputedRef<boolean>;
|
|
9
|
+
isTablet: import("vue").ComputedRef<boolean>;
|
|
10
|
+
isDesktop: import("vue").ComputedRef<boolean>;
|
|
11
|
+
}, "isMobile" | "isTablet" | "isDesktop">, Pick<{
|
|
12
|
+
isAdaptive: import("vue").Ref<boolean, boolean>;
|
|
13
|
+
isMobile: import("vue").ComputedRef<boolean>;
|
|
14
|
+
isTablet: import("vue").ComputedRef<boolean>;
|
|
15
|
+
isDesktop: import("vue").ComputedRef<boolean>;
|
|
16
|
+
}, never>>;
|
|
17
|
+
//# sourceMappingURL=useDeviceStore.d.ts.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export interface DictionaryItem {
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
}
|
|
5
|
+
export interface Dictionary {
|
|
6
|
+
[key: string]: {
|
|
7
|
+
value: DictionaryItem[];
|
|
8
|
+
timestamp: number;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* {key:[]}
|
|
13
|
+
*/
|
|
14
|
+
export interface DictionaryList {
|
|
15
|
+
[key: string]: DictionaryItem[];
|
|
16
|
+
}
|
|
17
|
+
export interface DataDictionaryState {
|
|
18
|
+
dataDic: Dictionary;
|
|
19
|
+
cacheDuration: number;
|
|
20
|
+
}
|
|
21
|
+
declare const useDicStore: import("pinia").StoreDefinition<"_STORE_DATA_DICTIONARY_ID", DataDictionaryState, {}, {
|
|
22
|
+
isCacheExpired(name: string): boolean;
|
|
23
|
+
saveDicByKey(key: string, data: DictionaryItem[]): void;
|
|
24
|
+
saveAll(data: DictionaryList): void;
|
|
25
|
+
/**
|
|
26
|
+
* 1. 根据 key 获取字典列表 (原 getDicByKey)
|
|
27
|
+
* @param key 字典的 key
|
|
28
|
+
*/
|
|
29
|
+
getDicByKey(key: string): DictionaryItem[];
|
|
30
|
+
/**
|
|
31
|
+
* 2. 返回 value 匹配到的整个对象 (原 getDicObjByValue)
|
|
32
|
+
* @param key 字典的 key
|
|
33
|
+
* @param value 字典项的值
|
|
34
|
+
*/
|
|
35
|
+
getDicObjByValue(key: string, value: string | number): DictionaryItem | null;
|
|
36
|
+
/**
|
|
37
|
+
* 3. 根据字典名称和字典的 value 获取对应的中文 (原 getDicTextByValue)
|
|
38
|
+
*/
|
|
39
|
+
getDicTextByValue(key: string, value: string | number): string;
|
|
40
|
+
/**
|
|
41
|
+
* 4. 根据文字匹配对应的 value (原 getDicValueByText)
|
|
42
|
+
*/
|
|
43
|
+
getDicValueByText(key: string, text: string): string;
|
|
44
|
+
}>;
|
|
45
|
+
export default useDicStore;
|
|
46
|
+
//# sourceMappingURL=useDicStore.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 缓存组件name数据
|
|
3
|
+
*/
|
|
4
|
+
import { type RouteLocationNormalized } from "vue-router";
|
|
5
|
+
declare const useKeepAliveStore: import("pinia").StoreDefinition<"_STORE_KEEP_ALIVE_ID", {
|
|
6
|
+
list: string[];
|
|
7
|
+
}, {
|
|
8
|
+
get: (state: {
|
|
9
|
+
list: string[];
|
|
10
|
+
} & import("pinia").PiniaCustomStateProperties<{
|
|
11
|
+
list: string[];
|
|
12
|
+
}>) => string[];
|
|
13
|
+
}, {
|
|
14
|
+
/**
|
|
15
|
+
* 删除已经缓存的组件
|
|
16
|
+
* @param name 组件名称(必须唯一)
|
|
17
|
+
*/
|
|
18
|
+
deleteKeepAlive(name: string): void;
|
|
19
|
+
/**
|
|
20
|
+
* 保存要缓存的组件名称
|
|
21
|
+
* @param route
|
|
22
|
+
*/
|
|
23
|
+
save(route: RouteLocationNormalized): void;
|
|
24
|
+
}>;
|
|
25
|
+
export default useKeepAliveStore;
|
|
26
|
+
//# sourceMappingURL=useKeepAliveStore.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ItemType } from "ant-design-vue";
|
|
2
|
+
export type ExtendedItemType = ItemType & {
|
|
3
|
+
id?: string;
|
|
4
|
+
parentId?: string;
|
|
5
|
+
};
|
|
6
|
+
export interface Menu {
|
|
7
|
+
openKeys: string[];
|
|
8
|
+
selectedKeys: string[];
|
|
9
|
+
data: ExtendedItemType[];
|
|
10
|
+
}
|
|
11
|
+
declare const useMenuStore: import("pinia").StoreDefinition<"_STORE_MENU_ID", Menu, {}, {
|
|
12
|
+
save(data: ExtendedItemType[]): void;
|
|
13
|
+
}>;
|
|
14
|
+
export default useMenuStore;
|
|
15
|
+
//# sourceMappingURL=useMenuStore.d.ts.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { LocationQuery, RouteLocationNormalized, RouteMeta, RouteParams } from "vue-router";
|
|
2
|
+
export interface NavTabsState {
|
|
3
|
+
path?: string;
|
|
4
|
+
fullPath?: string;
|
|
5
|
+
query?: LocationQuery;
|
|
6
|
+
params?: RouteParams;
|
|
7
|
+
meta?: RouteMeta;
|
|
8
|
+
name?: string;
|
|
9
|
+
openTime?: number | undefined;
|
|
10
|
+
}
|
|
11
|
+
export declare const useNavTabStore: import("pinia").StoreDefinition<"_STORE_NAV_TABS_ID", {
|
|
12
|
+
list: NavTabsState[];
|
|
13
|
+
activeKey: string;
|
|
14
|
+
}, {
|
|
15
|
+
getList: (state: {
|
|
16
|
+
list: {
|
|
17
|
+
path?: string | undefined;
|
|
18
|
+
fullPath?: string | undefined;
|
|
19
|
+
query?: LocationQuery | undefined;
|
|
20
|
+
params?: RouteParams | undefined;
|
|
21
|
+
meta?: RouteMeta | undefined;
|
|
22
|
+
name?: string | undefined;
|
|
23
|
+
openTime?: number | undefined | undefined;
|
|
24
|
+
}[];
|
|
25
|
+
activeKey: string;
|
|
26
|
+
} & import("pinia").PiniaCustomStateProperties<{
|
|
27
|
+
list: NavTabsState[];
|
|
28
|
+
activeKey: string;
|
|
29
|
+
}>) => NavTabsState[];
|
|
30
|
+
}, {
|
|
31
|
+
/**
|
|
32
|
+
* 保存标签信息
|
|
33
|
+
* @param route
|
|
34
|
+
*/
|
|
35
|
+
save(route: RouteLocationNormalized): void;
|
|
36
|
+
/**
|
|
37
|
+
* 删除标签
|
|
38
|
+
* @param key url路径
|
|
39
|
+
*/
|
|
40
|
+
deleteTabs(key: string): void;
|
|
41
|
+
/**
|
|
42
|
+
* 设置标题
|
|
43
|
+
* @param title 标题
|
|
44
|
+
* @param path url
|
|
45
|
+
*/
|
|
46
|
+
setNavTitle(title: string, path: string): void;
|
|
47
|
+
closeOtherTabs(fullPath: string): void;
|
|
48
|
+
closeLeftTabs(fullPath: string): void;
|
|
49
|
+
closeRightTabs(fullPath: string): void;
|
|
50
|
+
}>;
|
|
51
|
+
export default useNavTabStore;
|
|
52
|
+
//# sourceMappingURL=useNavTabStore.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface UserState {
|
|
2
|
+
token: string | undefined;
|
|
3
|
+
userInfo: unknown;
|
|
4
|
+
}
|
|
5
|
+
declare const useUserStore: import("pinia").StoreDefinition<"_STORE_USER_ID", UserState, {
|
|
6
|
+
getToken: (state: {
|
|
7
|
+
token: string | undefined;
|
|
8
|
+
userInfo: unknown;
|
|
9
|
+
} & import("pinia").PiniaCustomStateProperties<UserState>) => string | undefined;
|
|
10
|
+
getUserInfo: (state: {
|
|
11
|
+
token: string | undefined;
|
|
12
|
+
userInfo: unknown;
|
|
13
|
+
} & import("pinia").PiniaCustomStateProperties<UserState>) => unknown;
|
|
14
|
+
}, {
|
|
15
|
+
/**
|
|
16
|
+
* 保存token
|
|
17
|
+
* @param token
|
|
18
|
+
*/
|
|
19
|
+
saveToken(token: string): void;
|
|
20
|
+
saveUserInfo(data: unknown): void;
|
|
21
|
+
}>;
|
|
22
|
+
export default useUserStore;
|
|
23
|
+
//# sourceMappingURL=useUserStore.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const BREADCRUMB_ID = "_STORE_BREADCRUMB_ID";
|
|
2
|
+
export declare const DATA_DICTIONARY_ID = "_STORE_DATA_DICTIONARY_ID";
|
|
3
|
+
export declare const KEEP_ALIVE_ID = "_STORE_KEEP_ALIVE_ID";
|
|
4
|
+
export declare const MENU_ID = "_STORE_MENU_ID";
|
|
5
|
+
export declare const NAV_TAB_ID = "_STORE_NAV_TABS_ID";
|
|
6
|
+
export declare const SETTINGS_ID = "_STORE_SETTINGS_ID";
|
|
7
|
+
export declare const USER_ID = "_STORE_USER_ID";
|
|
8
|
+
export declare const APP_ID = "_STORE_APP_ID";
|
|
9
|
+
export declare const DEVICE_ID = "_STORE_DEVICE_ID";
|
|
10
|
+
//# sourceMappingURL=types.d.ts.map
|