yxuse 2.0.1 → 2.0.3
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/README.md +119 -76
- package/lib/index.cjs2.js +5 -3
- package/lib/index.cjs2.js.gz +0 -0
- package/lib/index.cjs3.js +1 -1
- package/lib/index.cjs6.js +3 -3
- package/lib/index.cjs6.js.gz +0 -0
- package/lib/index.es.js +5 -5
- package/lib/index.es2.js +910 -847
- package/lib/index.es2.js.gz +0 -0
- package/lib/index.es3.js +66 -45
- package/lib/index.es6.js +954 -941
- package/lib/index.es6.js.gz +0 -0
- package/lib/style.css +1 -1
- package/lib/style.css.gz +0 -0
- package/lib/theme.cjs.js +1 -1
- package/lib/theme.es.js +7 -6
- package/lib/utils.cjs.js +1 -1
- package/lib/utils.es.js +8 -7
- package/package.json +150 -150
- package/types/api/auth/index.d.ts +13 -5
- package/types/components/Toolbar/index.d.ts +4 -0
- package/types/components/YxDialog/index.vue.d.ts +1 -1
- package/types/components/YxDialog/type.d.ts +4 -0
- package/types/components/YxSearchForm/type.d.ts +20 -0
- package/types/components/YxTable/type.d.ts +4 -0
- package/types/theme/config.d.ts +9 -0
- package/types/theme/index.d.ts +9 -9
- package/types/theme/type.d.ts +28 -0
- package/types/utils/common/index.d.ts +5 -0
package/types/theme/index.d.ts
CHANGED
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
id: number;
|
|
3
|
-
defaultTheme: number;
|
|
4
|
-
theme: string;
|
|
5
|
-
themeUrl: string;
|
|
6
|
-
}
|
|
1
|
+
import type { ThemeDTO, YxuseOptions } from "./type.ts";
|
|
7
2
|
/**
|
|
8
3
|
* @description:注册主题下的css变量
|
|
9
|
-
* @
|
|
4
|
+
* @options isRenderToolbar :是否需要渲染Toolbar
|
|
10
5
|
* @param isJumpLogin :是否在没有token或token过期时自动跳转至登录页
|
|
11
6
|
*/
|
|
12
|
-
export declare const install: (
|
|
7
|
+
export declare const install: (config: YxuseOptions) => Promise<void>;
|
|
13
8
|
/**
|
|
14
9
|
* @description:修改主题
|
|
15
10
|
* @param theme 主题
|
|
@@ -36,7 +31,12 @@ export declare const getCurThemeCssVar: () => any;
|
|
|
36
31
|
* @param groupName 名称
|
|
37
32
|
*/
|
|
38
33
|
export declare const getGroupColor: (groupName: string) => object;
|
|
39
|
-
|
|
34
|
+
/**
|
|
35
|
+
* @description:判断当前色值是否在当前主题中
|
|
36
|
+
* @param key 色值变量
|
|
37
|
+
* @param color 名称
|
|
38
|
+
*/
|
|
39
|
+
export declare const findColorByTheme: (key: string, color: string) => boolean;
|
|
40
40
|
/**
|
|
41
41
|
* @description:注册当前系统私有css变量
|
|
42
42
|
* @param systemName 系统名称
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface ThemeDTO {
|
|
2
|
+
id: number;
|
|
3
|
+
defaultTheme: number;
|
|
4
|
+
theme: string;
|
|
5
|
+
themeUrl: string;
|
|
6
|
+
}
|
|
7
|
+
export interface YxuseOptions {
|
|
8
|
+
/** 是否渲染悬浮球*/
|
|
9
|
+
isRenderToolbar?: boolean;
|
|
10
|
+
/** 是否加载工单*/
|
|
11
|
+
isRenderIssue?: boolean;
|
|
12
|
+
/** 是否加载语言切换*/
|
|
13
|
+
isRenderLang?: boolean;
|
|
14
|
+
/** 登录页地址*/
|
|
15
|
+
loginUrl?: string;
|
|
16
|
+
/** 自定义登录api,非运管系统项目使用*/
|
|
17
|
+
loginApiUrl?: string;
|
|
18
|
+
/** 翻译Api地址,非运管系统项目使用*/
|
|
19
|
+
translateApiUrl?: string;
|
|
20
|
+
/** 主题列表接口,非运管系统项目使用*/
|
|
21
|
+
themeApiUrl: string;
|
|
22
|
+
/** 首页地址*/
|
|
23
|
+
homeUrl?: string;
|
|
24
|
+
/** 系统语言*/
|
|
25
|
+
lang?: string;
|
|
26
|
+
/** 当前环境*/
|
|
27
|
+
environment: "development" | "production";
|
|
28
|
+
}
|
|
@@ -30,4 +30,9 @@ export declare const enumToArray: <T extends Record<string, string | number>>(en
|
|
|
30
30
|
label: string;
|
|
31
31
|
value: string | number;
|
|
32
32
|
}[];
|
|
33
|
+
/**
|
|
34
|
+
* @description 判断该色值是否是深色
|
|
35
|
+
* @param color 色值
|
|
36
|
+
*/
|
|
37
|
+
export declare const isDarkColor: (color: string) => boolean | null;
|
|
33
38
|
export {};
|