@gonsin/gview 2.0.97 → 2.0.99
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/index.mjs +1794 -1775
- package/dist/style.css +1 -1
- package/dist/types/http/index.d.ts +20 -7
- package/dist/types/stores/setting.d.ts +5 -9
- package/package.json +1 -1
|
@@ -1,20 +1,33 @@
|
|
|
1
1
|
import type { AxiosInstance, AxiosRequestConfig } from "axios";
|
|
2
2
|
import type { ResultData } from "./type";
|
|
3
|
-
import {
|
|
4
|
-
export declare const RequestConfig: {
|
|
5
|
-
timeout: number;
|
|
6
|
-
};
|
|
3
|
+
import type { Router } from "vue-router";
|
|
7
4
|
export declare class RequestHttp {
|
|
8
5
|
sessionId: () => string | null;
|
|
9
6
|
service: AxiosInstance;
|
|
10
|
-
unAuthService: AxiosInstance;
|
|
11
7
|
router: Router | null;
|
|
12
|
-
|
|
8
|
+
token: string;
|
|
9
|
+
getSessionIdUrl(url: string, sessionId: string | null): string;
|
|
10
|
+
checkToken(): Promise<string>;
|
|
11
|
+
initRouter(router: any): void;
|
|
12
|
+
constructor(settings?: {
|
|
13
|
+
config?: AxiosRequestConfig;
|
|
14
|
+
enableLog: boolean;
|
|
15
|
+
enableAuth: boolean;
|
|
16
|
+
enableToken: boolean;
|
|
17
|
+
checkToken: boolean;
|
|
18
|
+
});
|
|
13
19
|
get<T>(url: string, params?: object, _object?: {}): Promise<ResultData<T>>;
|
|
14
20
|
post<T>(url: string, params?: object, _object?: {}): Promise<ResultData<T>>;
|
|
15
21
|
put<T>(url: string, params?: object, _object?: {}): Promise<ResultData<T>>;
|
|
16
22
|
delete<T>(url: string, params?: any, _object?: {}): Promise<ResultData<T>>;
|
|
17
|
-
initRouter(router: any): void;
|
|
18
23
|
}
|
|
24
|
+
declare const configHttp: (settings: {
|
|
25
|
+
config?: AxiosRequestConfig;
|
|
26
|
+
enableLog?: boolean;
|
|
27
|
+
enableAuth?: boolean;
|
|
28
|
+
enableToken?: boolean;
|
|
29
|
+
checkToken?: boolean;
|
|
30
|
+
}) => RequestHttp;
|
|
31
|
+
export { configHttp };
|
|
19
32
|
declare const _default: RequestHttp;
|
|
20
33
|
export default _default;
|
|
@@ -81,14 +81,10 @@ export declare const useSettingStore: import("pinia").StoreDefinition<"setting",
|
|
|
81
81
|
*/
|
|
82
82
|
setUserToken(token: string, tokenExpiredTime: number): void;
|
|
83
83
|
/**
|
|
84
|
-
* @description: 初始化用户token
|
|
84
|
+
* @description: 初始化用户token ?? 重复
|
|
85
85
|
* @param {string} token
|
|
86
86
|
*/
|
|
87
|
-
initUserToken(token: string): void
|
|
88
|
-
/**
|
|
89
|
-
* @description: 检查token是否过期
|
|
90
|
-
*/
|
|
91
|
-
checkUserToken(): Promise<void>;
|
|
87
|
+
initUserToken(token: string): Promise<void>;
|
|
92
88
|
setSideMenuTree(userMenu: any): void;
|
|
93
89
|
setUserPermission(permissions: any): void;
|
|
94
90
|
/**
|
|
@@ -98,10 +94,10 @@ export declare const useSettingStore: import("pinia").StoreDefinition<"setting",
|
|
|
98
94
|
/**
|
|
99
95
|
* @description: 退出登录时初始化本地存储值
|
|
100
96
|
*/
|
|
101
|
-
resetInitValue(): void
|
|
97
|
+
resetInitValue(): Promise<void>;
|
|
102
98
|
/**
|
|
103
|
-
* @description
|
|
99
|
+
* @description 用户退出登录清除存储值
|
|
104
100
|
*/
|
|
105
|
-
userLogout(): void
|
|
101
|
+
userLogout(): Promise<void>;
|
|
106
102
|
}>;
|
|
107
103
|
export {};
|