yxuse 2.0.29 → 2.0.31
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/lib/app.cjs.js +1 -0
- package/lib/app.es.js +4 -0
- package/lib/components.cjs.js +1 -1
- package/lib/components.es.js +11 -10
- package/lib/index.cjs.js +1 -1
- package/lib/index.cjs10.js +1 -0
- package/lib/index.cjs2.js +21 -19
- package/lib/index.cjs2.js.gz +0 -0
- package/lib/index.cjs3.js +1 -1
- package/lib/index.cjs5.js +1 -1
- package/lib/index.cjs7.js +3 -3
- package/lib/index.cjs7.js.gz +0 -0
- package/lib/index.es.js +10 -8
- package/lib/index.es10.js +11 -0
- package/lib/index.es2.js +3284 -3232
- package/lib/index.es2.js.gz +0 -0
- package/lib/index.es3.js +24 -21
- package/lib/index.es5.js +16 -16
- package/lib/index.es7.js +1024 -1006
- package/lib/index.es7.js.gz +0 -0
- package/lib/index.es8.js +7 -1
- package/lib/theme.cjs.js +1 -1
- package/lib/theme.es.js +12 -8
- package/lib/translate.cjs.js +1 -1
- package/lib/translate.es.js +7 -6
- package/lib/vue.runtime.esm-bundler.cjs.js +7 -5
- package/lib/vue.runtime.esm-bundler.cjs.js.gz +0 -0
- package/lib/vue.runtime.esm-bundler.es.js +107 -86
- package/lib/vue.runtime.esm-bundler.es.js.gz +0 -0
- package/package.json +6 -1
- package/types/api/auth/index.d.ts +1 -0
- package/types/app/index.d.ts +1 -0
- package/types/index.d.ts +3 -0
- package/types/theme/index.d.ts +9 -0
- package/types/translate/index.d.ts +1 -1
- package/types/utils/http/index.d.ts +13 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yxuse",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.31",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"yx"
|
|
6
6
|
],
|
|
@@ -71,6 +71,11 @@
|
|
|
71
71
|
"require": "./lib/hooks.cls.js",
|
|
72
72
|
"types": "./types/hooks/index.d.ts"
|
|
73
73
|
},
|
|
74
|
+
"./app": {
|
|
75
|
+
"import": "./lib/app.es.js",
|
|
76
|
+
"require": "./lib/app.cls.js",
|
|
77
|
+
"types": "./types/app/index.d.ts"
|
|
78
|
+
},
|
|
74
79
|
"./style": {
|
|
75
80
|
"import": "./lib/style.css",
|
|
76
81
|
"require": "./lib/style.css"
|
|
@@ -15,6 +15,7 @@ export declare const getUserRouteList: () => Promise<any>;
|
|
|
15
15
|
export declare const jumpToLogin: () => void;
|
|
16
16
|
/**@description 自动跳转home */
|
|
17
17
|
export declare const jumpToHome: () => void;
|
|
18
|
+
export declare const getLoginUrl: () => any;
|
|
18
19
|
/**获取当前部署的系统前缀 */
|
|
19
20
|
export declare const getHomeUrl: () => any;
|
|
20
21
|
/**设置系统配置信息 */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isWebApp: (key?: string) => boolean;
|
package/types/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * as translate from "./translate";
|
|
|
7
7
|
export * as yxi18n from "./yxi18n";
|
|
8
8
|
export * from "./directives";
|
|
9
9
|
export * from "./hooks";
|
|
10
|
+
export * from "./app";
|
|
10
11
|
export declare const BC: BroadcastChannel;
|
|
11
12
|
export * from "./components/type";
|
|
12
13
|
import * as utils from "./utils";
|
|
@@ -18,9 +19,11 @@ import * as translate from "./translate";
|
|
|
18
19
|
import * as yxi18n from "./yxi18n";
|
|
19
20
|
import * as yxHooks from "./hooks";
|
|
20
21
|
import * as yxIcon from "./yxIcon";
|
|
22
|
+
import * as app from "./app";
|
|
21
23
|
declare const _default: {
|
|
22
24
|
utils: typeof utils;
|
|
23
25
|
api: typeof api;
|
|
26
|
+
app: typeof app;
|
|
24
27
|
theme: typeof theme;
|
|
25
28
|
components: typeof components;
|
|
26
29
|
directives: typeof directives;
|
package/types/theme/index.d.ts
CHANGED
|
@@ -5,6 +5,10 @@ import type { ThemeDTO, YxuseOptions } from "./type.ts";
|
|
|
5
5
|
* @param isJumpLogin :是否在没有token或token过期时自动跳转至登录页
|
|
6
6
|
*/
|
|
7
7
|
export declare const install: (config: YxuseOptions) => Promise<void>;
|
|
8
|
+
export declare const saveCssVar: ({ themeCssVar, themeId }: {
|
|
9
|
+
themeCssVar: any;
|
|
10
|
+
themeId: any;
|
|
11
|
+
}) => void;
|
|
8
12
|
/**
|
|
9
13
|
* @description:修改主题
|
|
10
14
|
* @param theme 主题
|
|
@@ -14,6 +18,10 @@ export declare const changeTheme: (theme: ThemeDTO) => Promise<void>;
|
|
|
14
18
|
* @description:更新主题
|
|
15
19
|
*/
|
|
16
20
|
export declare const updateTheme: () => void;
|
|
21
|
+
/**
|
|
22
|
+
* 注册主题变量
|
|
23
|
+
*/
|
|
24
|
+
export declare const setCssVar: (themeUrl: string) => Promise<any>;
|
|
17
25
|
/**
|
|
18
26
|
* @description:获取默认主题URl
|
|
19
27
|
*/
|
|
@@ -41,3 +49,4 @@ export declare const findColorByTheme: (cssVarName: string, color: string) => st
|
|
|
41
49
|
* @description:注册当前系统私有css变量
|
|
42
50
|
* @param systemName 系统名称
|
|
43
51
|
*/
|
|
52
|
+
export declare const installCssVarInSystemTheme: (cssVar?: any, className?: string) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const initTranslate: ({ to, systemKey, translateApiUrl }: {
|
|
2
2
|
to: any;
|
|
3
3
|
systemKey: any;
|
|
4
|
-
translateApiUrl
|
|
4
|
+
translateApiUrl?: any;
|
|
5
5
|
}) => Promise<void>;
|
|
6
6
|
export declare const changeLang: (to: any) => Promise<void>;
|
|
7
7
|
export declare const getLang: () => Promise<any>;
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import type { AxiosInstance, AxiosRequestConfig } from "axios";
|
|
2
|
+
interface CustomAxiosRequestConfig extends AxiosRequestConfig {
|
|
3
|
+
/** 自定义响应处理 */
|
|
4
|
+
customResHandler?: (res: any) => void;
|
|
5
|
+
}
|
|
2
6
|
declare class YxHttp {
|
|
3
7
|
service: AxiosInstance;
|
|
4
|
-
|
|
8
|
+
/** 自定义响应处理map */
|
|
9
|
+
customResMap: {
|
|
10
|
+
[key: string]: Function;
|
|
11
|
+
};
|
|
12
|
+
constructor(config: CustomAxiosRequestConfig);
|
|
5
13
|
private setupInterceptors;
|
|
6
14
|
private handleOverdueResponse;
|
|
7
15
|
private handleErrorResponse;
|
|
@@ -12,7 +20,7 @@ declare class YxHttp {
|
|
|
12
20
|
* @param options : AxiosRequestConfig
|
|
13
21
|
* @description get 请求
|
|
14
22
|
*/
|
|
15
|
-
get<T = any>(url: string, params?: object, options?:
|
|
23
|
+
get<T = any>(url: string, params?: object, options?: CustomAxiosRequestConfig): Promise<T>;
|
|
16
24
|
/**
|
|
17
25
|
*
|
|
18
26
|
* @param url
|
|
@@ -20,21 +28,21 @@ declare class YxHttp {
|
|
|
20
28
|
* @param options : AxiosRequestConfig
|
|
21
29
|
* @description post 请求
|
|
22
30
|
*/
|
|
23
|
-
post<T = any>(url: string, params?: object, options?:
|
|
31
|
+
post<T = any>(url: string, params?: object, options?: CustomAxiosRequestConfig): Promise<T>;
|
|
24
32
|
/**
|
|
25
33
|
*
|
|
26
34
|
* @param url
|
|
27
35
|
* @param params
|
|
28
36
|
* @param options : AxiosRequestConfig
|
|
29
37
|
*/
|
|
30
|
-
put<T = any>(url: string, params?: object, options?:
|
|
38
|
+
put<T = any>(url: string, params?: object, options?: CustomAxiosRequestConfig): Promise<T>;
|
|
31
39
|
/**
|
|
32
40
|
*
|
|
33
41
|
* @param url
|
|
34
42
|
* @param params
|
|
35
43
|
* @param options : AxiosRequestConfig
|
|
36
44
|
*/
|
|
37
|
-
delete<T = any>(url: string, params?: any, options?:
|
|
45
|
+
delete<T = any>(url: string, params?: any, options?: CustomAxiosRequestConfig): Promise<T>;
|
|
38
46
|
}
|
|
39
47
|
declare const _default: YxHttp;
|
|
40
48
|
export default _default;
|