halo-fe 1.0.22 → 1.0.24

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. package/dist/assets/{liquidjs-C-LVcoaY.js → liquidjs-B8dqQyVv.js} +639 -632
  2. package/dist/main.js +4156 -3643
  3. package/esm/coms/Empty.vue.d.ts +15 -13
  4. package/esm/coms/Fill.vue.d.ts +14 -5
  5. package/esm/coms/Scroller.vue.d.ts +19 -16
  6. package/esm/coms/Timer.vue.d.ts +12 -5
  7. package/esm/coms/conditions/Condition.vue.d.ts +1 -10
  8. package/esm/coms/conditions/Index.vue.d.ts +1 -10
  9. package/esm/coms/controls/Code.vue.d.ts +19 -17
  10. package/esm/coms/controls/Compare.vue.d.ts +11 -19
  11. package/esm/coms/controls/Option.vue.d.ts +1 -1
  12. package/esm/coms/controls/RichText.vue.d.ts +6 -15
  13. package/esm/coms/controls/Select.vue.d.ts +1 -1
  14. package/esm/coms/layouts/Col.vue.d.ts +11 -4
  15. package/esm/coms/layouts/Container.vue.d.ts +15 -11
  16. package/esm/coms/layouts/Row.vue.d.ts +11 -14
  17. package/esm/coms/progresses/Progress.vue.d.ts +4 -16
  18. package/esm/coms/progresses/SocketProgress.vue.d.ts +15 -8
  19. package/esm/coms/tables/Table.vue.d.ts +1 -1
  20. package/esm/coms/tabs/Tab.vue.d.ts +1 -10
  21. package/esm/coms/tabs/TabPane.vue.d.ts +1 -1
  22. package/esm/drivers/cdns/CdnFactory.d.ts +1 -1
  23. package/esm/drivers/encoders/EncoderFactory.d.ts +1 -1
  24. package/esm/drivers/excels/ExcelFactory.d.ts +2 -2
  25. package/esm/drivers/features/FeatureFactory.d.ts +1 -1
  26. package/esm/drivers/hashers/HasherFactory.d.ts +4 -1
  27. package/esm/drivers/hashers/implement/Md5Hasher.d.ts +1 -1
  28. package/esm/drivers/hashers/implement/Sha256Hasher.d.ts +1 -1
  29. package/esm/drivers/helpers/@types/JsonConfig.d.ts +10 -0
  30. package/esm/drivers/helpers/@types/TreeNodeProp.d.ts +9 -0
  31. package/esm/drivers/helpers/@types/index.d.ts +3 -0
  32. package/esm/drivers/helpers/Helper.d.ts +8 -0
  33. package/esm/drivers/helpers/HelperFactory.d.ts +32 -0
  34. package/esm/drivers/helpers/IHelper.d.ts +4 -0
  35. package/esm/drivers/helpers/implements/ArrayHelper.d.ts +123 -0
  36. package/esm/drivers/helpers/implements/BrowserHelper.d.ts +12 -0
  37. package/esm/drivers/helpers/implements/ComponentHelper.d.ts +20 -0
  38. package/esm/drivers/helpers/implements/DictionaryHelper.d.ts +40 -0
  39. package/esm/drivers/helpers/implements/DomHelper.d.ts +118 -0
  40. package/esm/drivers/helpers/implements/EventHelper.d.ts +32 -0
  41. package/esm/drivers/helpers/implements/FileHelper.d.ts +24 -0
  42. package/esm/drivers/helpers/implements/HtmlHelper.d.ts +16 -0
  43. package/esm/drivers/helpers/implements/ImageHelper.d.ts +12 -0
  44. package/esm/drivers/helpers/implements/JsonHelper.d.ts +49 -0
  45. package/esm/drivers/helpers/implements/MathHelper.d.ts +52 -0
  46. package/esm/drivers/helpers/implements/MicroHelper.d.ts +12 -0
  47. package/esm/drivers/helpers/implements/MountHelper.d.ts +16 -0
  48. package/esm/drivers/helpers/implements/ObjectHelper.d.ts +44 -0
  49. package/esm/drivers/helpers/implements/ScrollHelper.d.ts +16 -0
  50. package/esm/drivers/helpers/implements/SignHelper.d.ts +16 -0
  51. package/esm/drivers/helpers/implements/StringHelper.d.ts +104 -0
  52. package/esm/drivers/helpers/implements/TaskHelper.d.ts +28 -0
  53. package/esm/drivers/helpers/implements/TimeHelper.d.ts +68 -0
  54. package/esm/drivers/helpers/implements/TreeHelper.d.ts +56 -0
  55. package/esm/drivers/helpers/implements/TypeHelper.d.ts +28 -0
  56. package/esm/drivers/helpers/implements/UrlHelper.d.ts +90 -0
  57. package/esm/drivers/helpers/index.d.ts +24 -0
  58. package/esm/drivers/https/HttpFactory.d.ts +1 -1
  59. package/esm/drivers/i18ns/II18n.d.ts +1 -1
  60. package/esm/drivers/index.d.ts +2 -0
  61. package/esm/drivers/providers/ProviderFactory.d.ts +1 -1
  62. package/esm/drivers/signers/SignerFactory.d.ts +1 -1
  63. package/esm/drivers/signers/implements/DefaultSigner.d.ts +1 -1
  64. package/esm/drivers/ssos/SsoFactory.d.ts +1 -1
  65. package/esm/drivers/utilities/@types/DragEvent.d.ts +11 -0
  66. package/esm/drivers/utilities/@types/DragOptions.d.ts +28 -0
  67. package/esm/drivers/utilities/@types/Position.d.ts +15 -0
  68. package/esm/drivers/utilities/@types/Rect.d.ts +10 -0
  69. package/esm/drivers/utilities/@types/index.d.ts +5 -0
  70. package/esm/drivers/utilities/IUtility.d.ts +4 -0
  71. package/esm/drivers/utilities/Utility.d.ts +5 -0
  72. package/esm/drivers/utilities/UtilityFactory.d.ts +43 -0
  73. package/esm/drivers/utilities/implement/AffixUtility.d.ts +11 -0
  74. package/esm/drivers/utilities/implement/DeltaUtility.d.ts +11 -0
  75. package/esm/drivers/utilities/implement/EventUtility.d.ts +73 -0
  76. package/esm/drivers/utilities/implement/KeyboardUtility.d.ts +74 -0
  77. package/esm/drivers/utilities/implement/MouseUtility.d.ts +25 -0
  78. package/esm/drivers/utilities/implement/RandomUtility.d.ts +41 -0
  79. package/esm/drivers/utilities/implement/SaveUtility.d.ts +16 -0
  80. package/esm/drivers/utilities/index.d.ts +9 -0
  81. package/esm/factorying/Factories.d.ts +15 -7
  82. package/esm/factorying/Factory.d.ts +10 -5
  83. package/esm/factorying/Helps.d.ts +29 -0
  84. package/esm/factorying/IFactory.d.ts +13 -5
  85. package/esm/factorying/Utils.d.ts +14 -0
  86. package/esm/factorying/index.d.ts +3 -1
  87. package/esm/helpers/DictionaryHelper.d.ts +6 -0
  88. package/esm/helpers/MathHelper.d.ts +0 -4
  89. package/esm/main.d.ts +1 -2
  90. package/esm/svcs/implement/DriverSvc.d.ts +8 -0
  91. package/esm/svcs/implement/SettingSvc.d.ts +1 -1
  92. package/esm/svcs/implement/UserSvc.d.ts +8 -4
  93. package/esm/svcs/index.d.ts +2 -0
  94. package/package.json +9 -9
@@ -0,0 +1,32 @@
1
+ import { Factory } from "../../factorying";
2
+ import IHelper from "./IHelper";
3
+ import { ArrayHelper, BrowserHelper, ComponentHelper, DictionaryHelper, DomHelper, EventHelper, FileHelper, HtmlHelper, ImageHelper, JsonHelper, MathHelper, MicroHelper, MountHelper, ObjectHelper, ScrollHelper, SignHelper, StringHelper, TaskHelper, TimeHelper, TreeHelper, TypeHelper, UrlHelper } from "./";
4
+ /**
5
+ * 帮助类工厂
6
+ */
7
+ declare class HelperFactory extends Factory<IHelper> {
8
+ open(): void;
9
+ get array(): ArrayHelper;
10
+ get browser(): BrowserHelper;
11
+ get component(): ComponentHelper;
12
+ get dom(): DomHelper;
13
+ get dictionary(): DictionaryHelper;
14
+ get event(): EventHelper;
15
+ get file(): FileHelper;
16
+ get html(): HtmlHelper;
17
+ get image(): ImageHelper;
18
+ get json(): JsonHelper;
19
+ get math(): MathHelper;
20
+ get mount(): MountHelper;
21
+ get object(): ObjectHelper;
22
+ get micro(): MicroHelper;
23
+ get scroll(): ScrollHelper;
24
+ get string(): StringHelper;
25
+ get task(): TaskHelper;
26
+ get type(): TypeHelper;
27
+ get time(): TimeHelper;
28
+ get tree(): TreeHelper;
29
+ get url(): UrlHelper;
30
+ get sign(): SignHelper;
31
+ }
32
+ export default HelperFactory;
@@ -0,0 +1,4 @@
1
+ import { IDriver } from "../@types";
2
+ interface IHelper extends IDriver {
3
+ }
4
+ export default IHelper;
@@ -0,0 +1,123 @@
1
+ import Helper from "../Helper";
2
+ /**
3
+ * 数组帮助类
4
+ */
5
+ declare class ArrayHelper extends Helper {
6
+ type: string;
7
+ /**
8
+ * 获取指定数组分成每片指定长度后的集合
9
+ */
10
+ getChunks: (entities: any[], size: number) => any[][];
11
+ /**
12
+ * 获取分成指定片数量后的集合
13
+ */
14
+ getChunksByCount(entities: any[], count: number): any[][];
15
+ /**
16
+ * 获取指定开始位置的指定数量的集合
17
+ */
18
+ getRange(entities: any[], index: number, count?: number): any[];
19
+ /**
20
+ * 获取最后length个元素
21
+ */
22
+ getLast(entities: string[], length: number): string[];
23
+ /**
24
+ * 取两个集合的交集
25
+ */
26
+ intersect: (arr1: any[], arr2: any[]) => any[];
27
+ /**
28
+ * 排除指定元素(差集)
29
+ */
30
+ except: (from: any[], target: any[] | any, equals?: (a: any, b: any) => boolean) => any[];
31
+ /**
32
+ * 求最大值,数据类型的比较函数要自己转换为数值类型
33
+ */
34
+ max: (entities: any[], func: Function) => any;
35
+ /**
36
+ * 求最小值,数据类型的比较函数要自己转换为数值类型
37
+ */
38
+ min: (entities: any[], func: Function) => any;
39
+ /**
40
+ * 求平均值
41
+ */
42
+ avg: (entities: any[], func: Function, digits?: number) => number;
43
+ /**
44
+ * 求和
45
+ */
46
+ sum: (entities: any[], func: Function, digits?: number) => number;
47
+ /**
48
+ * 是否包含
49
+ */
50
+ contains: (arr: any[], element: any) => boolean;
51
+ /**
52
+ * 判断指定集合中的指定属性的值,是否包含关键词
53
+ */
54
+ filterContains: (arr: any[], props: string[], keywords: string) => any[];
55
+ /**
56
+ * 判断2个数组是否每个元素都相同
57
+ */
58
+ same: (arr1: any[], arr2: any[]) => boolean;
59
+ /**
60
+ * 对数组元素根据指定函数进行去重,并返回去重后的值的新数组 n=>n.value
61
+ */
62
+ distinct: (entities: any[], selector: Function) => any[];
63
+ /**
64
+ * 创建集合
65
+ */
66
+ from(entities: any): any[];
67
+ /**
68
+ * 连接值构建成新数组,重复项也会自动构建,不存在的值,会自动创建为一个新项
69
+ */
70
+ fromValues: (arrValues: any[], arr: any[], propertyValue: string, propertyText: string) => any[];
71
+ /**
72
+ * 分割指定字符串为数组,字符串为空,返回空数组
73
+ * @param input
74
+ * @param split
75
+ * @param element 转换后添加的默认元素
76
+ */
77
+ split: (input: string, split: string, element?: any) => any[];
78
+ /**
79
+ * 合并多个数组中的每一项到新的二维数组中,没值的元素被有值的元素代替
80
+ */
81
+ combine: (...args: any[]) => any[];
82
+ /**
83
+ * 在指定元素前插入新元素,返回插入元素的索引
84
+ */
85
+ insert: (entities: object[], selectedRow: object, row: object) => number;
86
+ /**
87
+ * 在指定元素后插入新元素,返回插入元素的索引
88
+ */
89
+ append: (entities: object[], selectedRow: object, row: object) => number;
90
+ /**
91
+ * 不存在某元素时才添加某元素
92
+ */
93
+ pushIfNotExist: (entities: any[], element: any) => void;
94
+ /**
95
+ * 把集合创建成另一个集合
96
+ */
97
+ create<T>(entities: any[], handler: (entity: any, i: number) => T): T[];
98
+ /**
99
+ * 删除执行数组中的指定对象或者集合
100
+ */
101
+ remove: (entities: any[], elements: any[] | any) => void;
102
+ /**
103
+ * 删除指定元素,并返回删除后的字符串
104
+ */
105
+ removeIndex: (str: string, index: number, split: string) => string;
106
+ /**
107
+ * 按照指定函数对数组排序
108
+ */
109
+ orderBy: (entities: any[], orderByFns: Function | Function[], order?: "asc" | "desc" | null) => any[];
110
+ /**
111
+ * 分组,封装成字典而不是集合,大数据场景速度提升百倍
112
+ */
113
+ groupBy: (entities: any[], keyHandler: (entity: any) => any, valueHandler?: (item: any[]) => any) => object;
114
+ /**
115
+ * 分组
116
+ */
117
+ groupByArray: (entities: any[], keyFunc: (item: any) => any) => any[];
118
+ /**
119
+ * 替换指定元素为新元素
120
+ */
121
+ replace(entities: any[], selectFn: (value: any) => boolean, replacement: any): void;
122
+ }
123
+ export default ArrayHelper;
@@ -0,0 +1,12 @@
1
+ import Helper from "../Helper";
2
+ /**
3
+ * 多语言帮助类
4
+ */
5
+ declare class BrowserHelper extends Helper {
6
+ type: string;
7
+ /**
8
+ * 获取浏览器默认语言
9
+ */
10
+ getLanguage(): "zh-cn" | "en";
11
+ }
12
+ export default BrowserHelper;
@@ -0,0 +1,20 @@
1
+ import Helper from "../Helper";
2
+ /**
3
+ * 组件帮助类
4
+ */
5
+ declare class ComponentHelper extends Helper {
6
+ type: string;
7
+ /**
8
+ * 根据动态加载的组件对象,得到组件集合
9
+ */
10
+ getComponents(components: object, replace: string, prefix?: string): object;
11
+ /**
12
+ * 获取部分自定义组件名称
13
+ */
14
+ getName: (url: string, prefix: string) => string;
15
+ /**
16
+ * 检测异步控件是否加载完毕
17
+ */
18
+ detectLoaded(ref: any, cb: Function): void;
19
+ }
20
+ export default ComponentHelper;
@@ -0,0 +1,40 @@
1
+ import Helper from "../Helper";
2
+ /**
3
+ * 字典帮助类
4
+ */
5
+ declare class DictionaryHelper extends Helper {
6
+ type: string;
7
+ /**
8
+ * 从指定字典中提取忽略大小写的key的值
9
+ */
10
+ getValueIgnoreCase<T>(key: string, value: {
11
+ [key: string]: T;
12
+ }): T;
13
+ /**
14
+ * 对字典进行排序,并得到新字典
15
+ */
16
+ sort(obj: object): any;
17
+ /**
18
+ * 连接字典
19
+ */
20
+ join(obj: object, valueHandler?: (value: string) => string, delimiter?: string, join?: string): string;
21
+ /**
22
+ * 把字典转换成数组
23
+ */
24
+ toList(entity: {
25
+ [key: string]: any[];
26
+ }, valueHandler: (entity: {
27
+ key: string;
28
+ value: any;
29
+ }) => void): {
30
+ key: string;
31
+ value: any[];
32
+ }[];
33
+ /**
34
+ * 判断字典是否包含值
35
+ */
36
+ containsValue(dic: {
37
+ [key: string]: any;
38
+ }, value: any): boolean;
39
+ }
40
+ export default DictionaryHelper;
@@ -0,0 +1,118 @@
1
+ import { Position } from "../../utilities";
2
+ import Helper from "../Helper";
3
+ /**
4
+ * Dom帮助类
5
+ */
6
+ declare class DomHelper extends Helper {
7
+ type: string;
8
+ /**
9
+ * 根据字符串Ascii码得到固定颜色字典
10
+ */
11
+ getColors(values: string[]): object;
12
+ /**
13
+ * 获取样式名
14
+ */
15
+ getClass(...args: any[]): string;
16
+ /**
17
+ * 添加类
18
+ */
19
+ addClass: (dom: Element, cls: string, choice?: any) => void;
20
+ /**
21
+ * 删除类
22
+ */
23
+ removeClass: (selector: string | Element, className: string, except?: Element) => void;
24
+ /**
25
+ * 根据计算后的样式进行DOM过滤
26
+ */
27
+ filterStyle(doms: HTMLElement[], fn: (style: CSSStyleDeclaration) => boolean): HTMLElement[];
28
+ /**
29
+ * 添加样式
30
+ */
31
+ addStyle(dom: HTMLElement, prop: string, value: string): void;
32
+ /**
33
+ * 查找兄弟节点
34
+ */
35
+ siblings(dom: HTMLElement): HTMLElement[];
36
+ /**
37
+ * 查找指定父节点
38
+ */
39
+ parentUntil(dom: HTMLElement, cls: string): HTMLElement;
40
+ /**
41
+ * 查找第一个绝对定位的元素或backdrop元素,否则使用html元素
42
+ */
43
+ parentAbsolute(dom: HTMLElement): HTMLElement;
44
+ /**
45
+ * 查找孩子节点
46
+ */
47
+ find(dom: Element, cls: string): Element;
48
+ /**
49
+ * 获取dom宽度或高度
50
+ */
51
+ private getWidthOrHeight;
52
+ /**
53
+ * 统计所有控件宽度,含外边距
54
+ */
55
+ getWidth(value: Element | Element[]): number;
56
+ /**
57
+ * 获取元素可用宽度(移除内填充)
58
+ */
59
+ getAvailableWidth(value: Element | Element[]): number;
60
+ /**
61
+ * 统计所有非固定定位控件高度,含内填充和外边距
62
+ */
63
+ getHeight(value: Element | Element[]): number;
64
+ /**
65
+ * 获取元素可用高度(移除内填充)
66
+ */
67
+ getAvailableHeight(value: Element | Element[]): number;
68
+ /**
69
+ * 获取指定元素在视口内的位置
70
+ */
71
+ getViewportStyle(target: Element, title: string, subMenu: string, viewport: Element, position: string): any;
72
+ /**
73
+ * 获取指定选择器最大的索引
74
+ */
75
+ getMaxIndex(selector: string): number;
76
+ /**
77
+ * 判断当前鼠标位置是否在指定范围之内
78
+ */
79
+ inRange(event: Position, x: number, y: number, width: number, height: number): boolean;
80
+ /**
81
+ * 创建指定标签的dom,并设置内容
82
+ */
83
+ create(name: string, cls?: string, html?: string): HTMLElement;
84
+ /**
85
+ * 不存在时创建dom,并自动追加到文档
86
+ */
87
+ createIfAbsent(name: string, cls: string, html?: string): HTMLElement;
88
+ /**
89
+ * 根据路径获取标签(无src)
90
+ */
91
+ createEmptyByUrl: (url: string) => HTMLElement;
92
+ /**
93
+ * 根据路径获取待加载的元素,同时包含Url
94
+ */
95
+ createByUrl: (url: string) => HTMLElement;
96
+ /**
97
+ * 根据路径获取元素
98
+ * VIP:已废弃,不能用改方法判断资源是否加载完毕,因为可能只是脚本创建,资源还未加载完毕
99
+ */
100
+ getByUrl: (url: string) => HTMLElement;
101
+ /**
102
+ * 获取行内标签,如: style(非link)
103
+ */
104
+ getInlineTagByUrl(url: string): string;
105
+ /**
106
+ * 获取资源标签,如: link
107
+ */
108
+ getTagByUrl(url: string): string;
109
+ /**
110
+ * 获取文本宽度
111
+ */
112
+ getTextWidth(value: string): number;
113
+ /**
114
+ * 判断选择器内容是否溢出
115
+ */
116
+ isEllipsis: (selector: string) => boolean;
117
+ }
118
+ export default DomHelper;
@@ -0,0 +1,32 @@
1
+ import Helper from "../Helper";
2
+ /**
3
+ * 事件帮助类
4
+ */
5
+ declare class EventHelper extends Helper {
6
+ type: string;
7
+ /**
8
+ * 批量绑定事件,执行指定处理函数
9
+ */
10
+ bind: (events: any[], dom: any, func: Function) => void;
11
+ /**
12
+ * 批量绑定事件,执行指定处理函数
13
+ */
14
+ unbind: (events: any[], dom: any, func: Function) => void;
15
+ /**
16
+ * 绑定点击处理函数
17
+ */
18
+ click: (dom: any, func: Function) => void;
19
+ /**
20
+ * 解除点击监听
21
+ */
22
+ unclick: (dom: any, func: Function) => void;
23
+ /**
24
+ * 绑定滚动处理函数
25
+ */
26
+ scroll: (dom: any, func: Function) => void;
27
+ /**
28
+ * 移除滚动处理函数,防止内存泄漏
29
+ */
30
+ unscroll: (dom: any, func: Function) => void;
31
+ }
32
+ export default EventHelper;
@@ -0,0 +1,24 @@
1
+ import Helper from "../Helper";
2
+ /**
3
+ * 文件帮助类
4
+ */
5
+ declare class FileHelper extends Helper {
6
+ type: string;
7
+ /**
8
+ * 保存文件
9
+ */
10
+ save: (base64: string, fileName: string) => void;
11
+ /**
12
+ * 获取文件扩展名
13
+ */
14
+ getExtension: (name: string) => string;
15
+ /**
16
+ * 判断当前文件名是否是excel文件
17
+ */
18
+ isExcel: (name: string) => boolean;
19
+ /**
20
+ * 判断当前文件是否是图片文件
21
+ */
22
+ isImage: (url: string) => boolean;
23
+ }
24
+ export default FileHelper;
@@ -0,0 +1,16 @@
1
+ import Helper from "../Helper";
2
+ /**
3
+ * Html帮助类
4
+ */
5
+ declare class HtmlHelper extends Helper {
6
+ type: string;
7
+ /**
8
+ * 获取Html内容
9
+ */
10
+ getHtml: (value: string) => string;
11
+ /**
12
+ * 获取Html中的文字
13
+ */
14
+ getText: (value: string) => string;
15
+ }
16
+ export default HtmlHelper;
@@ -0,0 +1,12 @@
1
+ import Helper from "../Helper";
2
+ /**
3
+ * 图片帮助类
4
+ */
5
+ declare class ImageHelper extends Helper {
6
+ type: string;
7
+ /**
8
+ * 获取base64图片地址
9
+ */
10
+ base64: (base64: string) => string;
11
+ }
12
+ export default ImageHelper;
@@ -0,0 +1,49 @@
1
+ import { JsonConfig, TreeNodeProp } from "../@types";
2
+ import Helper from "../Helper";
3
+ /**
4
+ * JSON帮助类
5
+ */
6
+ declare class JsonHelper extends Helper {
7
+ type: string;
8
+ /**
9
+ * 对非字符串进行序列化
10
+ */
11
+ serializeWithoutString(value: any): string;
12
+ /**
13
+ * 把对象格式化为Json字符串
14
+ */
15
+ serialize(value: any, config?: boolean | JsonConfig): string;
16
+ /**
17
+ * 反序列化成json对象
18
+ */
19
+ deserialize(value: string): any;
20
+ /**
21
+ * 根据props中的.自动分割得到属性值
22
+ */
23
+ hasKey(value: any, props: string[]): boolean;
24
+ /**
25
+ * 根据props中的.自动分割得到属性值
26
+ */
27
+ getValue(value: any, props: string[]): any;
28
+ /**
29
+ * 把json字符串合并到目标对象上
30
+ */
31
+ mergeTo(target: any, from: string): void;
32
+ /**
33
+ * 从树集合构建出Json对象
34
+ */
35
+ buildObject(tree: any[], childProp: string, fn: (node: any) => TreeNodeProp): string;
36
+ /**
37
+ * 从开始层级开始构建Json字符串
38
+ */
39
+ private buildObjectLevel;
40
+ /**
41
+ * 填充指定长度的字符串
42
+ */
43
+ private fillSpace;
44
+ /**
45
+ * 填充指定长度的字符串
46
+ */
47
+ private fillKey;
48
+ }
49
+ export default JsonHelper;
@@ -0,0 +1,52 @@
1
+ import Helper from "../Helper";
2
+ /**
3
+ * 数学帮助类
4
+ */
5
+ declare class MathHelper extends Helper {
6
+ type: string;
7
+ /**
8
+ * 过滤某一页数据
9
+ */
10
+ filterPage: (rows: any[], page: number, size: number) => any[];
11
+ /**
12
+ * 总页数
13
+ */
14
+ pageCount: (count: number, size: number) => number;
15
+ /**
16
+ * 四舍五入
17
+ */
18
+ round: (value: number, digits: number) => string;
19
+ /**
20
+ * 天花板函数
21
+ */
22
+ ceil: (value: number) => number;
23
+ /**
24
+ * 获取最大值
25
+ */
26
+ max(...values: number[]): number;
27
+ /**
28
+ * 生成指定范围内的随机数
29
+ */
30
+ random(start: number, end: number): number;
31
+ /**
32
+ * 获取在指定范围内的值
33
+ */
34
+ between(value: number, min: number, max: number): number;
35
+ /**
36
+ * 尝试把任意类型转成数字,转换不成功返回原值
37
+ */
38
+ getNumber(value: any): any;
39
+ /**
40
+ * 获取百分比
41
+ */
42
+ getPercentage: (handled: number, total: number) => number;
43
+ /**
44
+ * 获取百分比,保留2位小数
45
+ */
46
+ getPercentageText: (handled: number, total: number) => string;
47
+ /**
48
+ * 获取大小
49
+ */
50
+ size: (bytes: number) => string;
51
+ }
52
+ export default MathHelper;
@@ -0,0 +1,12 @@
1
+ import Helper from "../Helper";
2
+ /**
3
+ * 微前端帮助类
4
+ */
5
+ declare class MicroHelper extends Helper {
6
+ type: string;
7
+ /**
8
+ * 加载乾坤子应用
9
+ */
10
+ load: (name: any, entry: any, dom: any, props: any) => void;
11
+ }
12
+ export default MicroHelper;
@@ -0,0 +1,16 @@
1
+ import Helper from "../Helper";
2
+ /**
3
+ * 事件挂载帮助类
4
+ */
5
+ declare class MountHelper extends Helper {
6
+ type: string;
7
+ /**
8
+ * 激发主框架事件
9
+ */
10
+ emit: (event: string, payload: any) => void;
11
+ /**
12
+ * 批量激发主框架事件
13
+ */
14
+ emits: (events: any) => void;
15
+ }
16
+ export default MountHelper;
@@ -0,0 +1,44 @@
1
+ import Helper from "../Helper";
2
+ /**
3
+ * 对象帮助类
4
+ */
5
+ declare class ObjectHelper extends Helper {
6
+ type: string;
7
+ /**
8
+ * 净化对象,返回不带默认属性的对象
9
+ */
10
+ pure(input: object): {};
11
+ /**
12
+ * 过滤key,并输出新对象
13
+ */
14
+ filter(input: object, filter: (n: any) => boolean, valueFn: (n: any) => {}): any[];
15
+ /**
16
+ * 提取部分属性,并得到新对象
17
+ */
18
+ extract(value: object, keys: string[]): any;
19
+ /**
20
+ * 把数组转换成对象
21
+ */
22
+ toObject(array: any[], keyFn: (n: any) => string, valueFn: (n: any) => string): any;
23
+ /**
24
+ * 手动复制,并对字段执行指定自定义处理
25
+ */
26
+ copy: (obj: any, handler?: {}) => any[] | any;
27
+ /**
28
+ * 对对象进行深度克隆,同时可以移除Proxy对象
29
+ */
30
+ clone<T>(obj: T, handler?: (n: any) => void): T;
31
+ /**
32
+ * 合并来源对象到目标对象上
33
+ */
34
+ mergeTo(target: any, from: any): any;
35
+ /**
36
+ * 给对象添加多层属性,并赋值
37
+ */
38
+ addProperties: (obj: object, keys: string[], value: string) => void;
39
+ /**
40
+ * 获取对象不区分大小写的key
41
+ */
42
+ getKey(value: object, key: string): string;
43
+ }
44
+ export default ObjectHelper;
@@ -0,0 +1,16 @@
1
+ import Helper from "../Helper";
2
+ /**
3
+ * 滚动帮助类
4
+ */
5
+ declare class ScrollHelper extends Helper {
6
+ type: string;
7
+ /**
8
+ * 判断指定元素滚动条位置,是否到了页面底部
9
+ */
10
+ isBottom: (selector: any) => boolean;
11
+ /**
12
+ * 滚动指定元素的滚动条到页面底部
13
+ */
14
+ scrollToBottom: (selector: any) => void;
15
+ }
16
+ export default ScrollHelper;
@@ -0,0 +1,16 @@
1
+ import Helper from "../Helper";
2
+ /**
3
+ * 签名帮助类
4
+ */
5
+ declare class SignHelper extends Helper {
6
+ type: string;
7
+ /**
8
+ * 清空对象中的空值
9
+ */
10
+ clean(obj: object): void;
11
+ /**
12
+ * 签名字典
13
+ */
14
+ signDictionary(dictionary: object, encoding?: boolean): string;
15
+ }
16
+ export default SignHelper;