halo-fe 1.0.21 → 1.0.23
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/main.js +4165 -3630
- package/dist/style.css +1 -1
- package/esm/coms/Code.vue.d.ts +41 -0
- package/esm/coms/Col.vue.d.ts +11 -0
- package/esm/coms/Compare.vue.d.ts +40 -0
- package/esm/coms/Container.vue.d.ts +23 -0
- package/esm/coms/RichText.vue.d.ts +24 -0
- package/esm/coms/Row.vue.d.ts +21 -0
- package/esm/coms/index.d.ts +1 -1
- package/esm/coms/progresses/SocketProgress.vue.d.ts +10 -1
- package/esm/coms/types/CodeEmit.d.ts +23 -0
- package/esm/coms/types/CodeProps.d.ts +18 -0
- package/esm/coms/types/RichTextOptions.d.ts +14 -0
- package/esm/coms/types/RichTextProps.d.ts +12 -0
- package/esm/coms/types/RowProps.d.ts +14 -0
- package/esm/drivers/@types/IOpen.d.ts +1 -1
- package/esm/drivers/IDriver.d.ts +10 -0
- package/esm/drivers/cdns/Cdn.d.ts +1 -1
- package/esm/drivers/cdns/CdnFactory.d.ts +1 -1
- package/esm/drivers/cdns/implements/BootCdn.d.ts +12 -0
- package/esm/drivers/cdns/implements/JsdelivrCdn.d.ts +15 -0
- package/esm/drivers/cdns/implements/StaticFileCdn.d.ts +21 -0
- package/esm/drivers/cdns/implements/UnpkgCdn.d.ts +12 -0
- package/esm/drivers/encoders/EncoderFactory.d.ts +1 -1
- package/esm/drivers/excels/ExcelFactory.d.ts +1 -1
- package/esm/drivers/factories/DriverFactory.d.ts +64 -0
- package/esm/drivers/factories/Factory.d.ts +18 -0
- package/esm/drivers/factories/IFactory.d.ts +18 -0
- package/esm/drivers/factories/index.d.ts +42 -0
- package/esm/drivers/features/FeatureFactory.d.ts +1 -1
- package/esm/drivers/hashers/HasherFactory.d.ts +4 -1
- package/esm/drivers/hashers/implement/Md5Hasher.d.ts +1 -1
- package/esm/drivers/hashers/implement/Sha256Hasher.d.ts +1 -1
- package/esm/drivers/helpers/@types/JsonConfig.d.ts +10 -0
- package/esm/drivers/helpers/@types/TreeNodeProp.d.ts +9 -0
- package/esm/drivers/helpers/@types/index.d.ts +3 -0
- package/esm/drivers/helpers/Helper.d.ts +8 -0
- package/esm/drivers/helpers/HelperFactory.d.ts +32 -0
- package/esm/drivers/helpers/IHelper.d.ts +4 -0
- package/esm/drivers/helpers/implements/ArrayHelper.d.ts +124 -0
- package/esm/drivers/helpers/implements/BrowserHelper.d.ts +12 -0
- package/esm/drivers/helpers/implements/ComponentHelper.d.ts +20 -0
- package/esm/drivers/helpers/implements/DictionaryHelper.d.ts +40 -0
- package/esm/drivers/helpers/implements/DomHelper.d.ts +118 -0
- package/esm/drivers/helpers/implements/EventHelper.d.ts +32 -0
- package/esm/drivers/helpers/implements/FileHelper.d.ts +24 -0
- package/esm/drivers/helpers/implements/HtmlHelper.d.ts +16 -0
- package/esm/drivers/helpers/implements/ImageHelper.d.ts +12 -0
- package/esm/drivers/helpers/implements/JsonHelper.d.ts +49 -0
- package/esm/drivers/helpers/implements/MathHelper.d.ts +52 -0
- package/esm/drivers/helpers/implements/MicroHelper.d.ts +12 -0
- package/esm/drivers/helpers/implements/MountHelper.d.ts +16 -0
- package/esm/drivers/helpers/implements/ObjectHelper.d.ts +44 -0
- package/esm/drivers/helpers/implements/ScrollHelper.d.ts +16 -0
- package/esm/drivers/helpers/implements/SignHelper.d.ts +16 -0
- package/esm/drivers/helpers/implements/StringHelper.d.ts +104 -0
- package/esm/drivers/helpers/implements/TaskHelper.d.ts +28 -0
- package/esm/drivers/helpers/implements/TimeHelper.d.ts +68 -0
- package/esm/drivers/helpers/implements/TreeHelper.d.ts +56 -0
- package/esm/drivers/helpers/implements/TypeHelper.d.ts +28 -0
- package/esm/drivers/helpers/implements/UrlHelper.d.ts +90 -0
- package/esm/drivers/helpers/index.d.ts +24 -0
- package/esm/drivers/https/HttpFactory.d.ts +1 -1
- package/esm/drivers/https/implements/HaloHttp.d.ts +1 -4
- package/esm/drivers/https/implements/MkHttp.d.ts +1 -1
- package/esm/drivers/i18ns/I18n.d.ts +9 -5
- package/esm/drivers/i18ns/II18n.d.ts +6 -2
- package/esm/drivers/i18ns/implements/DefaultI18n.d.ts +1 -1
- package/esm/drivers/index.d.ts +1 -0
- package/esm/drivers/providers/ProviderFactory.d.ts +1 -1
- package/esm/drivers/providers/implements/StorageHelper.d.ts +34 -0
- package/esm/drivers/signers/SignerFactory.d.ts +1 -1
- package/esm/drivers/signers/implements/DefaultSigner.d.ts +1 -1
- package/esm/drivers/ssos/SsoFactory.d.ts +1 -1
- package/esm/factorying/Factories.d.ts +11 -7
- package/esm/factorying/Factory.d.ts +10 -5
- package/esm/factorying/Helpers.d.ts +29 -0
- package/esm/factorying/IFactory.d.ts +13 -5
- package/esm/factorying/index.d.ts +3 -1
- package/esm/helpers/MathHelper.d.ts +0 -4
- package/esm/helpers/ScriptHelper.d.ts +19 -0
- package/esm/helpers/StringHelper.d.ts +26 -18
- package/esm/helpers/array-helper.d.ts +97 -0
- package/esm/helpers/component-helper.d.ts +18 -0
- package/esm/helpers/cookie-helper.d.ts +6 -0
- package/esm/helpers/dictionary-helper.d.ts +18 -0
- package/esm/helpers/dom-helper.d.ts +86 -0
- package/esm/helpers/event-helper.d.ts +30 -0
- package/esm/helpers/file-helper.d.ts +22 -0
- package/esm/helpers/html-helper.d.ts +10 -0
- package/esm/helpers/i18n-helper.d.ts +14 -0
- package/esm/helpers/image-helper.d.ts +10 -0
- package/esm/helpers/json-helper.d.ts +39 -0
- package/esm/helpers/math-helper.d.ts +46 -0
- package/esm/helpers/micro-helper.d.ts +10 -0
- package/esm/helpers/mount-helper.d.ts +14 -0
- package/esm/helpers/object-helper.d.ts +38 -0
- package/esm/helpers/script-helper.d.ts +31 -0
- package/esm/helpers/scroll-helper.d.ts +14 -0
- package/esm/helpers/sign-helper.d.ts +14 -0
- package/esm/helpers/storage-helper.d.ts +34 -0
- package/esm/helpers/string-helper.d.ts +94 -0
- package/esm/helpers/task-helper.d.ts +26 -0
- package/esm/helpers/time-helper.d.ts +66 -0
- package/esm/helpers/tree-helper.d.ts +54 -0
- package/esm/helpers/type-helper.d.ts +26 -0
- package/esm/helpers/url-helper.d.ts +96 -0
- package/esm/main.d.ts +1 -2
- package/esm/plugins/HtmlTransform.d.ts +6 -0
- package/esm/plugins/types/IMessager.d.ts +34 -0
- package/esm/plugins/types/index.d.ts +7 -0
- package/esm/services/ConfigService.d.ts +66 -0
- package/esm/services/DriverService.d.ts +36 -0
- package/esm/services/EnvService.d.ts +14 -0
- package/esm/services/LogService.d.ts +19 -0
- package/esm/services/SettingService.d.ts +42 -0
- package/esm/services/SocketService.d.ts +23 -0
- package/esm/services/UserService.d.ts +47 -0
- package/esm/services/index.d.ts +15 -0
- package/esm/services/types/IMessage.d.ts +14 -0
- package/esm/services/types/IMessager.d.ts +34 -0
- package/esm/services/types/index.d.ts +2 -0
- package/esm/servs/ConfigServ.d.ts +66 -0
- package/esm/servs/DriverServ.d.ts +36 -0
- package/esm/servs/EnvServ.d.ts +14 -0
- package/esm/servs/IServ.d.ts +6 -0
- package/esm/servs/LogServ.d.ts +19 -0
- package/esm/servs/Serv.d.ts +4 -0
- package/esm/servs/ServFactory.d.ts +11 -0
- package/esm/servs/SettingServ.d.ts +42 -0
- package/esm/servs/SocketServ.d.ts +38 -0
- package/esm/servs/UserServ.d.ts +47 -0
- package/esm/servs/implement/ConfigServ.d.ts +66 -0
- package/esm/servs/implement/DriverServ.d.ts +36 -0
- package/esm/servs/implement/EnvServ.d.ts +14 -0
- package/esm/servs/implement/LogServ.d.ts +19 -0
- package/esm/servs/implement/SettingServ.d.ts +42 -0
- package/esm/servs/implement/SocketServ.d.ts +38 -0
- package/esm/servs/implement/UserServ.d.ts +47 -0
- package/esm/servs/index.d.ts +15 -0
- package/esm/stores/config.d.ts +63 -0
- package/esm/stores/driver.d.ts +37 -0
- package/esm/stores/env.d.ts +12 -0
- package/esm/stores/index.d.ts +8 -0
- package/esm/stores/log.d.ts +20 -0
- package/esm/stores/setting.d.ts +43 -0
- package/esm/stores/socket.d.ts +27 -0
- package/esm/stores/user.d.ts +40 -0
- package/esm/svcs/implement/ConfigSvc.d.ts +6 -2
- package/esm/svcs/implement/DriverSvc.d.ts +4 -0
- package/esm/svcs/implement/I18nSvc.d.ts +1 -1
- package/esm/svcs/implement/SettingSvc.d.ts +1 -1
- package/esm/svcs/implement/UserSvc.d.ts +8 -4
- package/esm/svcs/index.d.ts +26 -30
- package/esm/types/CreateOptions.d.ts +18 -0
- package/esm/utilities/RandomUtility.d.ts +40 -0
- package/esm/utilities/index.d.ts +2 -1
- package/package.json +1 -1
- package/esm/drivers/builders/types/ProviderTable.d.ts +0 -6
- package/esm/drivers/builders/types/index.d.ts +0 -2
- package/esm/svcs/@types/Dictionary.d.ts +0 -4
@@ -0,0 +1,14 @@
|
|
1
|
+
/**
|
2
|
+
* 滚动帮助类
|
3
|
+
*/
|
4
|
+
declare class ScrollHelper {
|
5
|
+
/**
|
6
|
+
* 判断指定元素滚动条位置,是否到了页面底部
|
7
|
+
*/
|
8
|
+
static isBottom: (selector: any) => boolean;
|
9
|
+
/**
|
10
|
+
* 滚动指定元素的滚动条到页面底部
|
11
|
+
*/
|
12
|
+
static scrollToBottom: (selector: any) => void;
|
13
|
+
}
|
14
|
+
export default ScrollHelper;
|
@@ -0,0 +1,34 @@
|
|
1
|
+
/**
|
2
|
+
* 存储帮助类
|
3
|
+
*/
|
4
|
+
declare class StorageHelper {
|
5
|
+
/**
|
6
|
+
* 获取本地存储
|
7
|
+
*/
|
8
|
+
static get: (key: string, value?: any) => any;
|
9
|
+
/**
|
10
|
+
* 设置本地存储
|
11
|
+
*/
|
12
|
+
static set: (key: string, value: string) => void;
|
13
|
+
/**
|
14
|
+
* 获取本地存储
|
15
|
+
*/
|
16
|
+
static getObject: (key: string) => any;
|
17
|
+
/**
|
18
|
+
* 设置本地存储
|
19
|
+
*/
|
20
|
+
static setObject: (key: string, value: any) => void;
|
21
|
+
/**
|
22
|
+
* 移除存储数据
|
23
|
+
*/
|
24
|
+
static remove: (key: string) => void;
|
25
|
+
/**
|
26
|
+
* 以5M为基准,获取剩余可用容量(KB)
|
27
|
+
*/
|
28
|
+
static getLeftStorage: () => number;
|
29
|
+
/**
|
30
|
+
* 判断指定值是否能够存储到storage中
|
31
|
+
*/
|
32
|
+
static canStorage: (value: object) => boolean;
|
33
|
+
}
|
34
|
+
export default StorageHelper;
|
@@ -0,0 +1,94 @@
|
|
1
|
+
/**
|
2
|
+
* 字符串帮助类
|
3
|
+
*/
|
4
|
+
declare class StringHelper {
|
5
|
+
/**
|
6
|
+
* 生成唯一字符串
|
7
|
+
*/
|
8
|
+
static getUniqueId: () => string;
|
9
|
+
/**
|
10
|
+
* 填充字符串到指定长度,使用pad填充
|
11
|
+
*/
|
12
|
+
static padLeft: (value: string, length: number, pad: string) => any;
|
13
|
+
/**
|
14
|
+
* 去掉头部字符串
|
15
|
+
*/
|
16
|
+
static trimStart: (value: string, trim: string) => string;
|
17
|
+
/**
|
18
|
+
* 去掉尾部字符串
|
19
|
+
*/
|
20
|
+
static trimEnd: (value: string, trim: string) => string;
|
21
|
+
/**
|
22
|
+
* 去掉头尾字符串
|
23
|
+
*/
|
24
|
+
static trim: (value: string, start: string, end: string) => string;
|
25
|
+
/**
|
26
|
+
* 获取中划线命名法
|
27
|
+
*/
|
28
|
+
static getDashName: (value: string) => string;
|
29
|
+
/**
|
30
|
+
* 忽略大小写包含判断,支持从数组中搜索关键词
|
31
|
+
*/
|
32
|
+
static containsIgnoreCase: (keywords: string, value: string | string[]) => boolean;
|
33
|
+
/**
|
34
|
+
* 从html中提取纯文本
|
35
|
+
*/
|
36
|
+
static getTextFromHtml: (html: string) => string;
|
37
|
+
/**
|
38
|
+
* 判断是否是数字类型,这样支持0
|
39
|
+
*/
|
40
|
+
static isNumber: (value: any) => boolean;
|
41
|
+
/**
|
42
|
+
* 验证是否是邮箱格式
|
43
|
+
*/
|
44
|
+
static isEmail: (email: string) => boolean;
|
45
|
+
/**
|
46
|
+
* 判断是否是json
|
47
|
+
*/
|
48
|
+
static isJson: (value: string) => boolean;
|
49
|
+
/**
|
50
|
+
* 判断是否是isJsonp
|
51
|
+
*/
|
52
|
+
static isJsonp: (value: string) => boolean;
|
53
|
+
/**
|
54
|
+
* 判断是否是html
|
55
|
+
*/
|
56
|
+
static isHtml: (value: string) => boolean;
|
57
|
+
/**
|
58
|
+
* 获取内容类型
|
59
|
+
*/
|
60
|
+
static getContentType: (value: string) => "json" | "html" | "text";
|
61
|
+
/**
|
62
|
+
* 判断字符串是否为空或空串
|
63
|
+
*/
|
64
|
+
static isNullOrEmpty: (value: string) => boolean;
|
65
|
+
/**
|
66
|
+
* 判断字符串是否为空或空串
|
67
|
+
*/
|
68
|
+
static isEmpty: (value: string) => value is "";
|
69
|
+
/**
|
70
|
+
* 判断是否符合密码要求
|
71
|
+
*/
|
72
|
+
static isPassword: (value: string) => boolean;
|
73
|
+
/**
|
74
|
+
* 获取数据值或者空
|
75
|
+
*/
|
76
|
+
static getNumberOrNull: (value: any) => number;
|
77
|
+
/**
|
78
|
+
* 格式化成留指定位数的小数
|
79
|
+
*/
|
80
|
+
static format: (value: string, digits: number) => any;
|
81
|
+
/**
|
82
|
+
* 获取两个字符串之间的字符串
|
83
|
+
*/
|
84
|
+
static getBetween: (value: string, start: string, end: string) => string;
|
85
|
+
/**
|
86
|
+
* 根据字符串或数组,自动返回数组
|
87
|
+
*/
|
88
|
+
static getArray(name: string | string[]): string[];
|
89
|
+
/**
|
90
|
+
* 忽略大小写比较
|
91
|
+
*/
|
92
|
+
static equalsIgnoreCase(value: any, valueCompare: string): boolean;
|
93
|
+
}
|
94
|
+
export default StringHelper;
|
@@ -0,0 +1,26 @@
|
|
1
|
+
/**
|
2
|
+
* 任务执行帮助类
|
3
|
+
*/
|
4
|
+
declare class TaskHelper {
|
5
|
+
/**
|
6
|
+
* 延时指定ms后执行指定任务
|
7
|
+
*/
|
8
|
+
static delay: (fun: Function, ms: number) => number;
|
9
|
+
/**
|
10
|
+
* 在执行指定延时后,每隔指定ms执行指定任务
|
11
|
+
*/
|
12
|
+
static execute: (fun: Function, ms: number, delay: number) => Promise<unknown>;
|
13
|
+
/**
|
14
|
+
* 清空定时器
|
15
|
+
*/
|
16
|
+
static clearInterval: (id: number) => void;
|
17
|
+
/**
|
18
|
+
* 防抖(指定时间内只触发一次)
|
19
|
+
*/
|
20
|
+
static debounce: (fun: Function, delay: number) => (e: any) => void;
|
21
|
+
/**
|
22
|
+
* 节流:https://segmentfault.com/a/1190000018428170
|
23
|
+
*/
|
24
|
+
static throttle: (fun: Function, delay: number) => (e: any) => boolean;
|
25
|
+
}
|
26
|
+
export default TaskHelper;
|
@@ -0,0 +1,66 @@
|
|
1
|
+
/**
|
2
|
+
* 时间帮助类
|
3
|
+
*/
|
4
|
+
declare class TimeHelper {
|
5
|
+
/**
|
6
|
+
* 获取相对于1970年1月1日的时间戳(ms),不同时区结果相同
|
7
|
+
*/
|
8
|
+
static getTimestamp: (value?: any) => number;
|
9
|
+
/**
|
10
|
+
* 根据字符串获取可对比的时间
|
11
|
+
*/
|
12
|
+
static getTime: (value?: any) => Date;
|
13
|
+
/**
|
14
|
+
* 格式化时间
|
15
|
+
*/
|
16
|
+
static format: (value: string, format: string) => string;
|
17
|
+
/**
|
18
|
+
* 获取当前日期时间的字符串
|
19
|
+
*/
|
20
|
+
static getDateTimeString: () => string;
|
21
|
+
/**
|
22
|
+
* 获取当前时间的字符串
|
23
|
+
*/
|
24
|
+
static getDateString: () => string;
|
25
|
+
/**
|
26
|
+
* 获取当前时间的字符串
|
27
|
+
*/
|
28
|
+
static getTimeString: () => string;
|
29
|
+
/**
|
30
|
+
* 对时间值进行时间格式化
|
31
|
+
*/
|
32
|
+
static formatSecondTime: (value: any) => string;
|
33
|
+
/**
|
34
|
+
* 对时间值进行时间格式化
|
35
|
+
*/
|
36
|
+
static formatMillisecondTime: (value: string) => string;
|
37
|
+
/**
|
38
|
+
* 格式化成24小时时间格式
|
39
|
+
*/
|
40
|
+
static formatTime: (value: any) => string;
|
41
|
+
/**
|
42
|
+
* 对时间值进行日期格式化
|
43
|
+
*/
|
44
|
+
static formatDate: (value: any) => string;
|
45
|
+
/**
|
46
|
+
* 添加天数
|
47
|
+
*/
|
48
|
+
static addDays: (value: any, days: number) => Date;
|
49
|
+
/**
|
50
|
+
* 添加月份
|
51
|
+
*/
|
52
|
+
static addMonths: (value: any, months: number) => Date;
|
53
|
+
/**
|
54
|
+
* 添加小时
|
55
|
+
*/
|
56
|
+
static addHours: (value: any, hours: number) => Date;
|
57
|
+
/**
|
58
|
+
* 判断指定时间是否是周末
|
59
|
+
*/
|
60
|
+
static isWeekend: (value: any) => boolean;
|
61
|
+
/**
|
62
|
+
* 把中国时间,转换为当地时间
|
63
|
+
*/
|
64
|
+
static localeTime: (time: any) => Date;
|
65
|
+
}
|
66
|
+
export default TimeHelper;
|
@@ -0,0 +1,54 @@
|
|
1
|
+
/**
|
2
|
+
* 树帮助类
|
3
|
+
*/
|
4
|
+
declare class TreeHelper {
|
5
|
+
/**
|
6
|
+
* 从树结构数据中,递归获取指定主键的对象
|
7
|
+
*/
|
8
|
+
static getById: (id: any, idProp: string, tree: any[], childProp: string) => any;
|
9
|
+
/**
|
10
|
+
* 树节点
|
11
|
+
*/
|
12
|
+
static getByIds: (ids: any[], idProp: string, tree: any[], childProp: string) => any[];
|
13
|
+
/**
|
14
|
+
* 找出指定层级集合中,指定对象的下一个对象
|
15
|
+
*/
|
16
|
+
static getNextById: (id: any, idProp: string, tree: any[], childProp: string) => any;
|
17
|
+
/**
|
18
|
+
* 获取兄弟节点
|
19
|
+
*/
|
20
|
+
static getSiblingsById: (id: any, idProp: string, tree: any[], childProp: string) => any;
|
21
|
+
/**
|
22
|
+
* 获取父节点
|
23
|
+
*/
|
24
|
+
static getParentById: (id: any, idProp: string, tree: any[], childProp: string) => any;
|
25
|
+
/**
|
26
|
+
* 从树结构数据中,递归获取指定主键的父元素集合
|
27
|
+
*/
|
28
|
+
static getParentsById: (id: any, idProp: string, tree: any[], childProp: string, hasSelf?: boolean) => any[];
|
29
|
+
/**
|
30
|
+
* 获取当前节点的所有孩子节点的集合
|
31
|
+
*/
|
32
|
+
static getChildrenById: (id: any, idProp: string, tree: any[], childProp: string, hasSelf?: boolean) => any[];
|
33
|
+
/**
|
34
|
+
* 获取当前节点的所有孩子节点的集合
|
35
|
+
*/
|
36
|
+
static getChildren: (element: any, childProp: string, hasSelf?: boolean) => any[];
|
37
|
+
/**
|
38
|
+
* 搜索指定文本的树结构
|
39
|
+
*/
|
40
|
+
static searchTree: (keywords: string, tree: any[], childProp: string, searchProps: any) => any[];
|
41
|
+
/**
|
42
|
+
* 删除指定子元素
|
43
|
+
*/
|
44
|
+
static removeById: (id: any, idProp: string, tree: any[], childProp: string) => void;
|
45
|
+
/**
|
46
|
+
* 获取树结构扁平化后的节点信息
|
47
|
+
*/
|
48
|
+
static getFlat: (tree: any[], childProp: string) => any[];
|
49
|
+
/**
|
50
|
+
* 对树结点的数据进行重新映射,映射得到新的Tree数组
|
51
|
+
*/
|
52
|
+
static map: (tree: any[], prevChildProp: string, childProp: string, fun: Function) => any[];
|
53
|
+
}
|
54
|
+
export default TreeHelper;
|
@@ -0,0 +1,26 @@
|
|
1
|
+
/**
|
2
|
+
* 类型帮助类
|
3
|
+
*/
|
4
|
+
declare class TypeHelper {
|
5
|
+
/**
|
6
|
+
* 判断输入类型是否是字符串类型 null -> false
|
7
|
+
*/
|
8
|
+
static isString: (input: any) => boolean;
|
9
|
+
/**
|
10
|
+
* 判断输入类型是否是Object类型
|
11
|
+
*/
|
12
|
+
static isObject: (input: any) => boolean;
|
13
|
+
/**
|
14
|
+
* 判断输入类型是否是Array类型
|
15
|
+
*/
|
16
|
+
static isArray: (input: any) => boolean;
|
17
|
+
/**
|
18
|
+
* 判断输入类型是否是Number类型,null -> false
|
19
|
+
*/
|
20
|
+
static isNumber: (input: any) => boolean;
|
21
|
+
/**
|
22
|
+
* 判断输入类型是否是isBoolean类型
|
23
|
+
*/
|
24
|
+
static isBoolean: (input: any) => boolean;
|
25
|
+
}
|
26
|
+
export default TypeHelper;
|
@@ -0,0 +1,96 @@
|
|
1
|
+
/**
|
2
|
+
* Url帮助类
|
3
|
+
*/
|
4
|
+
declare class UrlHelper {
|
5
|
+
/**
|
6
|
+
* 获取指定地址路由对象
|
7
|
+
*/
|
8
|
+
static getToRoute(url: string, withReturnUrl?: boolean): any;
|
9
|
+
/**
|
10
|
+
* 获取要跳转的Url地址信息,自动涵盖后退地址
|
11
|
+
*/
|
12
|
+
static getToUrl(url: string, withReturnUrl?: boolean): string;
|
13
|
+
/**
|
14
|
+
* 获取菜单参数
|
15
|
+
*/
|
16
|
+
static getM(url: string): any;
|
17
|
+
/**
|
18
|
+
* 获取后退地址路由
|
19
|
+
*/
|
20
|
+
static getBackRoute(): any;
|
21
|
+
/**
|
22
|
+
* 获取要后退的地址URL
|
23
|
+
*/
|
24
|
+
static getBackUrl(): string;
|
25
|
+
/**
|
26
|
+
* 获取指定地址的路由对象,自动合并qs,并解码
|
27
|
+
*/
|
28
|
+
static getRoute(url: string, queryObj?: object): any;
|
29
|
+
/**
|
30
|
+
* 处理实体,得到url query参数形式
|
31
|
+
* 如:app=Tool&compare[language]=json&compare[sql]=App%3D%27Tool%27+and+[Table]+like+%27Ctl_%25%27+order+by+[Table],+Name
|
32
|
+
*/
|
33
|
+
static getQuery(value: any): string;
|
34
|
+
/**
|
35
|
+
* 处理键值对的值
|
36
|
+
*/
|
37
|
+
private static handleQueryValue;
|
38
|
+
/**
|
39
|
+
* 自动根据后面路径,决定是否要合并Url
|
40
|
+
*/
|
41
|
+
static concatUrl: (url: string, path: string) => string;
|
42
|
+
/**
|
43
|
+
* 合并路径和查询对象(自动编码,并支持覆盖现有参数),得到完整URL地址,并会省略默认值
|
44
|
+
* ? 对url参数不编码,只对 queryObj 参数编码,防止用户的参数被改成编码形式
|
45
|
+
* ? 目前,对Url参数对象和目标对象都编码,因为源对象属性是经过解码的
|
46
|
+
*/
|
47
|
+
static getUrl: (url: string, params?: any) => string;
|
48
|
+
/**
|
49
|
+
* 获取超链接配置对象
|
50
|
+
*/
|
51
|
+
static getAnchor: (url: string, params?: any) => {
|
52
|
+
href: any;
|
53
|
+
target: any;
|
54
|
+
};
|
55
|
+
/**
|
56
|
+
* 从Url中提取路径
|
57
|
+
*/
|
58
|
+
static getPath(url: string): string;
|
59
|
+
/**
|
60
|
+
* 获取path中最后一个片段信息
|
61
|
+
*/
|
62
|
+
static getLastSegment(url: string): string;
|
63
|
+
/**
|
64
|
+
* 获取地址中的查询参数
|
65
|
+
*/
|
66
|
+
static getQueryParam(url: string, key: string): string;
|
67
|
+
/**
|
68
|
+
* 从Url中提取查询对象
|
69
|
+
*/
|
70
|
+
static deserialize(url: string): object;
|
71
|
+
/**
|
72
|
+
* 把查询字符串转换成对象(自动解码成源数据)
|
73
|
+
*/
|
74
|
+
static deserializeQs(qs: string, decode?: boolean): any;
|
75
|
+
/**
|
76
|
+
* 把对象转换成查询字符串,自动编码
|
77
|
+
*/
|
78
|
+
static serialize(obj: object, encoding?: boolean): string;
|
79
|
+
/**
|
80
|
+
* URL编码
|
81
|
+
*/
|
82
|
+
static encode(val: string): string;
|
83
|
+
/**
|
84
|
+
* 把指定对象转换成base64字符串
|
85
|
+
*/
|
86
|
+
static base64(obj: object): Promise<string>;
|
87
|
+
/**
|
88
|
+
* 把指定base64字符串解析为原对象
|
89
|
+
*/
|
90
|
+
static base64Decode(val: string): Promise<any>;
|
91
|
+
/**
|
92
|
+
* 是否是http或https开头的地址
|
93
|
+
*/
|
94
|
+
static httpOrHttps(url: string): boolean;
|
95
|
+
}
|
96
|
+
export default UrlHelper;
|
package/esm/main.d.ts
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
import { CreateFeOptions } from "./@types";
|
2
2
|
import "./styles/index.scss";
|
3
|
+
export * from "./@types";
|
3
4
|
export * from "./coms";
|
4
5
|
export * from "./drivers";
|
5
6
|
export * from "./factorying";
|
6
|
-
export * from "./helpers";
|
7
7
|
export * from "./plugins";
|
8
8
|
export * from "./repos";
|
9
9
|
export * from "./svcs";
|
10
|
-
export * from "./@types";
|
11
10
|
export * from "./utilities";
|
12
11
|
/**
|
13
12
|
* 初始化前端基础框架
|
@@ -0,0 +1,34 @@
|
|
1
|
+
/**
|
2
|
+
* 消息提示接口,下游自己定义
|
3
|
+
*/
|
4
|
+
interface IMessager {
|
5
|
+
/**
|
6
|
+
* 显示全局成功消息
|
7
|
+
*/
|
8
|
+
success(message: string): void;
|
9
|
+
/**
|
10
|
+
* 显示全局警告消息
|
11
|
+
*/
|
12
|
+
warning(message: string | number): void;
|
13
|
+
/**
|
14
|
+
* 显示全局信息消息
|
15
|
+
*/
|
16
|
+
info(message: string): void;
|
17
|
+
/**
|
18
|
+
* 显示全局错误消息
|
19
|
+
*/
|
20
|
+
error(message: string): void;
|
21
|
+
/**
|
22
|
+
* 显示全局错误消息
|
23
|
+
*/
|
24
|
+
confirm(title: string, message: string, options?: any): Promise<any>;
|
25
|
+
/**
|
26
|
+
* 显示警告框
|
27
|
+
*/
|
28
|
+
alert(title: string, message: string, options?: any): void;
|
29
|
+
/**
|
30
|
+
* 通知
|
31
|
+
*/
|
32
|
+
notify(title: string, message: string, type: string): void;
|
33
|
+
}
|
34
|
+
export default IMessager;
|
@@ -0,0 +1,66 @@
|
|
1
|
+
/**
|
2
|
+
* 不一定跟用户相关,此时如果使用配置仓储,使用的是配置文件的配置,非接口配置
|
3
|
+
*/
|
4
|
+
declare class ConfigService {
|
5
|
+
/**
|
6
|
+
* 默认背景
|
7
|
+
*/
|
8
|
+
background: string;
|
9
|
+
/**
|
10
|
+
* 当前主题
|
11
|
+
*/
|
12
|
+
theme: string;
|
13
|
+
/**
|
14
|
+
* 当前布局方式
|
15
|
+
*/
|
16
|
+
layout: string;
|
17
|
+
/**
|
18
|
+
* 当前语言
|
19
|
+
*/
|
20
|
+
language: string;
|
21
|
+
/**
|
22
|
+
* 字体
|
23
|
+
*/
|
24
|
+
font: string;
|
25
|
+
/**
|
26
|
+
* 文件布局方式
|
27
|
+
*/
|
28
|
+
fileLayout: string;
|
29
|
+
editor: {
|
30
|
+
schemas: any[];
|
31
|
+
completions: {};
|
32
|
+
};
|
33
|
+
/**
|
34
|
+
* 初始化配置值(不一定跟登录用户相关,这也是单独分离的好处)
|
35
|
+
*/
|
36
|
+
init(configs: any[]): void;
|
37
|
+
/**
|
38
|
+
* 尝试添加架构
|
39
|
+
*/
|
40
|
+
tryAddSchema(uri: string, fileMatch: string, schema: object): void;
|
41
|
+
/**
|
42
|
+
* 获取本地配置
|
43
|
+
*/
|
44
|
+
getLocalConfig(type: string): Promise<any>;
|
45
|
+
/**
|
46
|
+
* 设置背景
|
47
|
+
*/
|
48
|
+
setBackground(background: string): void;
|
49
|
+
/**
|
50
|
+
* 加载用户配置
|
51
|
+
*/
|
52
|
+
loadConfig(type: string, cached?: boolean): Promise<any>;
|
53
|
+
/**
|
54
|
+
* 全量保存用户配置
|
55
|
+
*/
|
56
|
+
saveConfig(type: string, data: any, cached?: boolean): Promise<boolean>;
|
57
|
+
/**
|
58
|
+
* 部分保存用户配置
|
59
|
+
*/
|
60
|
+
patchConfig(type: string, pairs: any): Promise<boolean>;
|
61
|
+
/**
|
62
|
+
* 获取当前语言
|
63
|
+
*/
|
64
|
+
getLanguage(): string;
|
65
|
+
}
|
66
|
+
export default ConfigService;
|
@@ -0,0 +1,36 @@
|
|
1
|
+
/**
|
2
|
+
* 使用驱动仓储
|
3
|
+
*/
|
4
|
+
declare class DriverService {
|
5
|
+
/**
|
6
|
+
* 加载完毕状态记录
|
7
|
+
*/
|
8
|
+
loaded: {
|
9
|
+
apps: boolean;
|
10
|
+
envs: boolean;
|
11
|
+
};
|
12
|
+
/**
|
13
|
+
* 是否加载中状态,用于并发场景 防止重复拉取接口
|
14
|
+
*/
|
15
|
+
loading: {
|
16
|
+
apps: boolean;
|
17
|
+
envs: boolean;
|
18
|
+
};
|
19
|
+
/**
|
20
|
+
* 应用集合,存储到Store中,防止每一个Driver实例重复加载
|
21
|
+
*/
|
22
|
+
apps: any[];
|
23
|
+
/**
|
24
|
+
* 环境集合,存储到Store中,防止每一个Driver实例重复加载
|
25
|
+
*/
|
26
|
+
envs: any[];
|
27
|
+
/**
|
28
|
+
* 加载应用选项
|
29
|
+
*/
|
30
|
+
loadApps(reload?: boolean): Promise<void>;
|
31
|
+
/**
|
32
|
+
* 加载环境选项
|
33
|
+
*/
|
34
|
+
loadEnvs(reload?: boolean): Promise<void>;
|
35
|
+
}
|
36
|
+
export default DriverService;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
/**
|
2
|
+
* 日志服务
|
3
|
+
*/
|
4
|
+
declare class LogService {
|
5
|
+
logs: any[];
|
6
|
+
/**
|
7
|
+
* 手动添加日志
|
8
|
+
*/
|
9
|
+
add(code: string, message: string, stack: string, elapsed?: number): void;
|
10
|
+
/**
|
11
|
+
* 删除日志
|
12
|
+
*/
|
13
|
+
remove(index: number): void;
|
14
|
+
/**
|
15
|
+
* 清空日志
|
16
|
+
*/
|
17
|
+
clear(): void;
|
18
|
+
}
|
19
|
+
export default LogService;
|
@@ -0,0 +1,42 @@
|
|
1
|
+
/**
|
2
|
+
* 获取前端配置
|
3
|
+
*/
|
4
|
+
declare class SettingService {
|
5
|
+
loaded: boolean;
|
6
|
+
particles: boolean;
|
7
|
+
home: string;
|
8
|
+
background: any;
|
9
|
+
font: string;
|
10
|
+
language: string;
|
11
|
+
layout: string;
|
12
|
+
theme: string;
|
13
|
+
themes: any[];
|
14
|
+
layouts: any[];
|
15
|
+
backgrounds: any[];
|
16
|
+
locales: any[];
|
17
|
+
fonts: any;
|
18
|
+
ssos: any[];
|
19
|
+
size: string;
|
20
|
+
watermark: any;
|
21
|
+
app: string;
|
22
|
+
env: string;
|
23
|
+
/**
|
24
|
+
* 中心库
|
25
|
+
*/
|
26
|
+
central: any;
|
27
|
+
/**
|
28
|
+
* 业务库
|
29
|
+
*/
|
30
|
+
business: any;
|
31
|
+
upload: any;
|
32
|
+
version: any;
|
33
|
+
/**
|
34
|
+
* 系统初始化
|
35
|
+
*/
|
36
|
+
init(): Promise<void>;
|
37
|
+
/**
|
38
|
+
* 加载设置
|
39
|
+
*/
|
40
|
+
load(): Promise<any>;
|
41
|
+
}
|
42
|
+
export default SettingService;
|