halo-fe 1.0.18 → 1.0.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. package/dist/main.js +975 -976
  2. package/esm/drivers/builders/types/ProviderTable.d.ts +6 -0
  3. package/esm/drivers/builders/types/index.d.ts +2 -0
  4. package/esm/drivers/i18ns/I18n.d.ts +41 -0
  5. package/esm/drivers/i18ns/I18nFactory.d.ts +13 -0
  6. package/esm/drivers/i18ns/II18n.d.ts +66 -0
  7. package/esm/drivers/i18ns/implements/DefaultI18n.d.ts +13 -0
  8. package/esm/drivers/i18ns/index.d.ts +3 -0
  9. package/esm/drivers/index.d.ts +1 -0
  10. package/esm/factorying/Factories.d.ts +15 -11
  11. package/esm/factorying/index.d.ts +16 -4
  12. package/esm/helpers/JsonHelper.d.ts +5 -1
  13. package/esm/repos/IRepo.d.ts +4 -0
  14. package/esm/repos/RepoFactory.d.ts +5 -0
  15. package/esm/repos/implements/SettingRepo.d.ts +15 -0
  16. package/esm/repos/index.d.ts +1 -1
  17. package/esm/svcs/implement/I18nSvc.d.ts +1 -1
  18. package/esm/svcs/implement/index.d.ts +1 -2
  19. package/esm/svcs/index.d.ts +1 -7
  20. package/esm/types/CreateFeOptions.d.ts +6 -5
  21. package/esm/utilities/SaveUtility.d.ts +15 -0
  22. package/esm/utilities/index.d.ts +2 -1
  23. package/package.json +2 -3
  24. package/dist/assets/@intlify-BISCQg1h.js +0 -2189
  25. package/dist/assets/@vue-aVYGocXp.js +0 -93
  26. package/dist/assets/vue-i18n-CLr3brPz.js +0 -1670
  27. package/esm/coms/Code.vue.d.ts +0 -41
  28. package/esm/coms/Col.vue.d.ts +0 -11
  29. package/esm/coms/Compare.vue.d.ts +0 -40
  30. package/esm/coms/Container.vue.d.ts +0 -23
  31. package/esm/coms/RichText.vue.d.ts +0 -24
  32. package/esm/coms/Row.vue.d.ts +0 -21
  33. package/esm/coms/types/CodeEmit.d.ts +0 -23
  34. package/esm/coms/types/CodeProps.d.ts +0 -18
  35. package/esm/coms/types/RichTextOptions.d.ts +0 -14
  36. package/esm/coms/types/RichTextProps.d.ts +0 -12
  37. package/esm/coms/types/RowProps.d.ts +0 -14
  38. package/esm/drivers/IDriver.d.ts +0 -10
  39. package/esm/drivers/cdns/implements/BootCdn.d.ts +0 -12
  40. package/esm/drivers/cdns/implements/JsdelivrCdn.d.ts +0 -15
  41. package/esm/drivers/cdns/implements/StaticFileCdn.d.ts +0 -21
  42. package/esm/drivers/cdns/implements/UnpkgCdn.d.ts +0 -12
  43. package/esm/drivers/factories/DriverFactory.d.ts +0 -64
  44. package/esm/drivers/factories/Factory.d.ts +0 -18
  45. package/esm/drivers/factories/IFactory.d.ts +0 -18
  46. package/esm/drivers/factories/index.d.ts +0 -42
  47. package/esm/drivers/providers/implements/StorageHelper.d.ts +0 -34
  48. package/esm/helpers/ScriptHelper.d.ts +0 -19
  49. package/esm/helpers/array-helper.d.ts +0 -97
  50. package/esm/helpers/component-helper.d.ts +0 -18
  51. package/esm/helpers/cookie-helper.d.ts +0 -6
  52. package/esm/helpers/dictionary-helper.d.ts +0 -18
  53. package/esm/helpers/dom-helper.d.ts +0 -86
  54. package/esm/helpers/event-helper.d.ts +0 -30
  55. package/esm/helpers/file-helper.d.ts +0 -22
  56. package/esm/helpers/html-helper.d.ts +0 -10
  57. package/esm/helpers/i18n-helper.d.ts +0 -14
  58. package/esm/helpers/image-helper.d.ts +0 -10
  59. package/esm/helpers/json-helper.d.ts +0 -39
  60. package/esm/helpers/math-helper.d.ts +0 -46
  61. package/esm/helpers/micro-helper.d.ts +0 -10
  62. package/esm/helpers/mount-helper.d.ts +0 -14
  63. package/esm/helpers/object-helper.d.ts +0 -38
  64. package/esm/helpers/script-helper.d.ts +0 -31
  65. package/esm/helpers/scroll-helper.d.ts +0 -14
  66. package/esm/helpers/sign-helper.d.ts +0 -14
  67. package/esm/helpers/storage-helper.d.ts +0 -34
  68. package/esm/helpers/string-helper.d.ts +0 -94
  69. package/esm/helpers/task-helper.d.ts +0 -26
  70. package/esm/helpers/time-helper.d.ts +0 -66
  71. package/esm/helpers/tree-helper.d.ts +0 -54
  72. package/esm/helpers/type-helper.d.ts +0 -26
  73. package/esm/helpers/url-helper.d.ts +0 -96
  74. package/esm/plugins/HtmlTransform.d.ts +0 -6
  75. package/esm/plugins/types/IMessager.d.ts +0 -34
  76. package/esm/plugins/types/index.d.ts +0 -7
  77. package/esm/services/ConfigService.d.ts +0 -66
  78. package/esm/services/DriverService.d.ts +0 -36
  79. package/esm/services/EnvService.d.ts +0 -14
  80. package/esm/services/LogService.d.ts +0 -19
  81. package/esm/services/SettingService.d.ts +0 -42
  82. package/esm/services/SocketService.d.ts +0 -23
  83. package/esm/services/UserService.d.ts +0 -47
  84. package/esm/services/index.d.ts +0 -15
  85. package/esm/services/types/IMessage.d.ts +0 -14
  86. package/esm/services/types/IMessager.d.ts +0 -34
  87. package/esm/services/types/index.d.ts +0 -2
  88. package/esm/servs/ConfigServ.d.ts +0 -66
  89. package/esm/servs/DriverServ.d.ts +0 -36
  90. package/esm/servs/EnvServ.d.ts +0 -14
  91. package/esm/servs/IServ.d.ts +0 -6
  92. package/esm/servs/LogServ.d.ts +0 -19
  93. package/esm/servs/Serv.d.ts +0 -4
  94. package/esm/servs/ServFactory.d.ts +0 -11
  95. package/esm/servs/SettingServ.d.ts +0 -42
  96. package/esm/servs/SocketServ.d.ts +0 -38
  97. package/esm/servs/UserServ.d.ts +0 -47
  98. package/esm/servs/implement/ConfigServ.d.ts +0 -66
  99. package/esm/servs/implement/DriverServ.d.ts +0 -36
  100. package/esm/servs/implement/EnvServ.d.ts +0 -14
  101. package/esm/servs/implement/LogServ.d.ts +0 -19
  102. package/esm/servs/implement/SettingServ.d.ts +0 -42
  103. package/esm/servs/implement/SocketServ.d.ts +0 -38
  104. package/esm/servs/implement/UserServ.d.ts +0 -47
  105. package/esm/servs/index.d.ts +0 -15
  106. package/esm/stores/config.d.ts +0 -63
  107. package/esm/stores/driver.d.ts +0 -37
  108. package/esm/stores/env.d.ts +0 -12
  109. package/esm/stores/index.d.ts +0 -8
  110. package/esm/stores/log.d.ts +0 -20
  111. package/esm/stores/setting.d.ts +0 -43
  112. package/esm/stores/socket.d.ts +0 -27
  113. package/esm/stores/user.d.ts +0 -40
  114. package/esm/types/CreateOptions.d.ts +0 -18
@@ -1,86 +0,0 @@
1
- /**
2
- * Dom帮助类
3
- */
4
- declare class DomHelper {
5
- /**
6
- * 根据字符串Ascii码得到固定颜色字典
7
- */
8
- static getColors(values: string[]): object;
9
- /**
10
- * 获取样式名
11
- */
12
- static getClass(...args: any[]): string;
13
- /**
14
- * 添加类
15
- */
16
- static addClass: (dom: Element, cls: string, choice?: any) => void;
17
- /**
18
- * 删除类
19
- */
20
- static removeClass: (selector: string | Element, className: string, except?: Element) => void;
21
- /**
22
- * 根据计算后的样式进行DOM过滤
23
- */
24
- static filterStyle(doms: any[], fun: (style: CSSStyleDeclaration) => boolean): any[];
25
- /**
26
- * 添加样式
27
- */
28
- static addStyle(dom: HTMLElement, prop: string, value: string): void;
29
- /**
30
- * 查找指定父节点
31
- */
32
- static parentUntil(dom: any, cls: string): any;
33
- /**
34
- * 查找第一个绝对定位的元素或backdrop元素,否则使用html元素
35
- */
36
- static parentAbsolute(dom: any): any;
37
- /**
38
- * 查找孩子节点
39
- */
40
- static find(dom: Element, cls: string): Element;
41
- /**
42
- * 获取dom宽度或高度
43
- */
44
- private static getWidthOrHeight;
45
- /**
46
- * 统计所有控件宽度,含外边距
47
- */
48
- static getWidth(value: Element | Element[]): number;
49
- /**
50
- * 获取元素可用宽度(移除内填充)
51
- */
52
- static getAvailableWidth(value: Element | Element[]): number;
53
- /**
54
- * 统计所有非固定定位控件高度,含内填充和外边距
55
- */
56
- static getHeight(value: Element | Element[]): number;
57
- /**
58
- * 获取元素可用高度(移除内填充)
59
- */
60
- static getAvailableHeight(value: Element | Element[]): number;
61
- /**
62
- * 获取指定元素在视口内的位置
63
- */
64
- static getViewportStyle(target: Element, title: string, subMenu: string, viewport: Element, position: string): any;
65
- /**
66
- * 获取指定选择器最大的索引
67
- */
68
- static getMaxIndex(selector: string): number;
69
- /**
70
- * 判断当前鼠标位置是否在指定范围之内
71
- */
72
- static inRange(event: MouseEvent, x: number, y: number, width: number, height: number): boolean;
73
- /**
74
- * 创建指定标签的dom,并设置内容
75
- */
76
- static create(name: string, cls?: string, html?: string): HTMLElement;
77
- /**
78
- * 不存在时创建dom,并自动追加到文档
79
- */
80
- static createIfAbsent(name: string, cls: string, html?: string): HTMLElement;
81
- /**
82
- * 获取文本宽度
83
- */
84
- static getTextWidth(value: string): number;
85
- }
86
- export default DomHelper;
@@ -1,30 +0,0 @@
1
- /**
2
- * 事件帮助类
3
- */
4
- declare class EventHelper {
5
- /**
6
- * 批量绑定事件,执行指定处理函数
7
- */
8
- static bind: (events: any[], dom: any, func: Function) => void;
9
- /**
10
- * 批量绑定事件,执行指定处理函数
11
- */
12
- static unbind: (events: any[], dom: any, func: Function) => void;
13
- /**
14
- * 绑定点击处理函数
15
- */
16
- static click: (dom: any, func: Function) => void;
17
- /**
18
- * 解除点击监听
19
- */
20
- static unclick: (dom: any, func: Function) => void;
21
- /**
22
- * 绑定滚动处理函数
23
- */
24
- static scroll: (dom: any, func: Function) => void;
25
- /**
26
- * 移除滚动处理函数,防止内存泄漏
27
- */
28
- static unscroll: (dom: any, func: Function) => void;
29
- }
30
- export default EventHelper;
@@ -1,22 +0,0 @@
1
- /**
2
- * 文件帮助类
3
- */
4
- declare class FileHelper {
5
- /**
6
- * 保存文件
7
- */
8
- static save: (base64: string, fileName: string) => void;
9
- /**
10
- * 获取文件扩展名
11
- */
12
- static getExtension: (name: string) => string;
13
- /**
14
- * 判断当前文件名是否是excel文件
15
- */
16
- static isExcel: (name: string) => boolean;
17
- /**
18
- * 判断当前文件是否是图片文件
19
- */
20
- static isImage: (url: string) => boolean;
21
- }
22
- export default FileHelper;
@@ -1,10 +0,0 @@
1
- /**
2
- * Html帮助类
3
- */
4
- declare class HtmlHelper {
5
- /**
6
- * 获取Html内容
7
- */
8
- static getHtml: (value: string) => string;
9
- }
10
- export default HtmlHelper;
@@ -1,14 +0,0 @@
1
- /**
2
- * 多语言帮助类
3
- */
4
- declare class I18nHelper {
5
- /**
6
- * 获取浏览器默认语言
7
- */
8
- static getBrowserLanguage(): "zh-cn" | "en";
9
- /**
10
- * 获取当前语言
11
- */
12
- static getCurrentLanguage(): any;
13
- }
14
- export default I18nHelper;
@@ -1,10 +0,0 @@
1
- /**
2
- * 图片帮助类
3
- */
4
- declare class ImageHelper {
5
- /**
6
- * 获取base64图片地址
7
- */
8
- static base64: (base64: string) => string;
9
- }
10
- export default ImageHelper;
@@ -1,39 +0,0 @@
1
- declare type Prop = {
2
- key: string;
3
- type: string;
4
- remark: string;
5
- };
6
- /**
7
- * JSON帮助类
8
- */
9
- declare class JsonHelper {
10
- /**
11
- * 把字符串格式化为Json字符串
12
- */
13
- static stringify(value: any): string;
14
- /**
15
- * 对非字符串进行序列化
16
- */
17
- static stringifyWithString(value: any): string;
18
- /**
19
- * 把字符串格式化为Json字符串
20
- */
21
- static stringifyString(value: string): string;
22
- /**
23
- * 反序列化成json对象
24
- */
25
- static parse(value: string): any;
26
- /**
27
- * 根据props中的.自动分割得到属性值
28
- */
29
- static getValue(value: string, props: string): string;
30
- /**
31
- * 把json字符串合并到目标对象上
32
- */
33
- static mergeTo(target: any, from: string): void;
34
- /**
35
- * 从树集合构建出Json对象
36
- */
37
- static buildObject(tree: any[], childProp: string, fun: (node: any) => Prop): string;
38
- }
39
- export default JsonHelper;
@@ -1,46 +0,0 @@
1
- /**
2
- * 数学帮助类
3
- */
4
- declare class MathHelper {
5
- /**
6
- * 过滤某一页数据
7
- */
8
- static filterPage: (rows: any[], page: number, size: number) => any[];
9
- /**
10
- * 总页数
11
- */
12
- static pageCount: (count: number, size: number) => number;
13
- /**
14
- * 四舍五入
15
- */
16
- static round: (value: number, digits: number) => string;
17
- /**
18
- * 天花板函数
19
- */
20
- static ceil: (value: number) => number;
21
- /**
22
- * 获取百分比
23
- */
24
- static getPercentage: (current: number, total: number) => number;
25
- /**
26
- * 获取百分比,保留2位小数
27
- */
28
- static getPercentageText: (current: number, total: number) => string;
29
- /**
30
- * 获取进度文本
31
- */
32
- static getProgressText: (current: number, total: number) => string;
33
- /**
34
- * 获取大小
35
- */
36
- static size: (bytes: number) => string;
37
- /**
38
- * 生成指定范围内的随机数
39
- */
40
- static random(start: number, end: number): number;
41
- /**
42
- * 获取最大值
43
- */
44
- static max(...values: number[]): number;
45
- }
46
- export default MathHelper;
@@ -1,10 +0,0 @@
1
- /**
2
- * 微前端帮助类
3
- */
4
- declare class MicroHelper {
5
- /**
6
- * 加载乾坤子应用
7
- */
8
- static load: (name: any, entry: any, dom: any, props: any) => void;
9
- }
10
- export default MicroHelper;
@@ -1,14 +0,0 @@
1
- /**
2
- * 事件挂载帮助类
3
- */
4
- declare class MountHelper {
5
- /**
6
- * 激发主框架事件
7
- */
8
- static emit: (event: string, payload: any) => void;
9
- /**
10
- * 批量激发主框架事件
11
- */
12
- static emits: (events: any) => void;
13
- }
14
- export default MountHelper;
@@ -1,38 +0,0 @@
1
- /**
2
- * 对象帮助类
3
- */
4
- declare class ObjectHelper {
5
- /**
6
- * 净化对象,返回不带默认属性的对象
7
- */
8
- static pure(input: object): {};
9
- /**
10
- * 过滤key,并输出新对象
11
- */
12
- static filter(input: object, filter: (n: any) => boolean, valueHandler: (n: any) => {}): any[];
13
- /**
14
- * 把数组转换成对象
15
- */
16
- static toObject(array: any[], keySelector: (n: any) => string, valueSelector: (n: any) => string): {};
17
- /**
18
- * 手动复制,并对字段执行指定自定义处理
19
- */
20
- static copy: (obj: any, handler?: {}) => any[] | any;
21
- /**
22
- * 对对象进行深度克隆,同时可以移除Proxy对象
23
- */
24
- static clone: (obj: any, handler?: (n: any) => void) => any;
25
- /**
26
- * 合并来源对象到目标对象上
27
- */
28
- static mergeTo: (target: any, from: any) => any;
29
- /**
30
- * 给对象添加属性集合,并赋值
31
- */
32
- static addProperties: (obj: object, keys: string[], value: string) => void;
33
- /**
34
- * 获取对象不区分大小写的key
35
- */
36
- static getKey(value: object, key: string): string;
37
- }
38
- export default ObjectHelper;
@@ -1,31 +0,0 @@
1
- /**
2
- * 脚本帮助类
3
- */
4
- declare class ScriptHelper {
5
- /**
6
- * 异步加载脚本/样式内容,把内容处理为行内html
7
- * 这种方式,依赖的内部资源,会从当前站点加载
8
- */
9
- static loadContentAsync: (src: string | string[]) => Promise<void[]>;
10
- /**
11
- * 异步加载单个路径下的多个文件
12
- */
13
- static loadPathAsync: (path: string, files: string[]) => Promise<void>;
14
- /**
15
- * 通过注入DOM标签异步加载脚本或样式表
16
- */
17
- static loadAsync: (src: string | string[]) => Promise<void>;
18
- /**
19
- * 注意:箭头函数没有参数
20
- */
21
- static loadAll: (...args: any[]) => Promise<any[]>;
22
- /**
23
- * 根据路径获取标签(无src)
24
- */
25
- static getInnerTagByUrl: (url: string) => HTMLStyleElement | HTMLScriptElement;
26
- /**
27
- * 根据路径获取待加载的元素,同时包含Url
28
- */
29
- static getOuterTagByUrl: (url: string) => HTMLLinkElement | HTMLScriptElement;
30
- }
31
- export default ScriptHelper;
@@ -1,14 +0,0 @@
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;
@@ -1,14 +0,0 @@
1
- /**
2
- * 签名帮助类
3
- */
4
- declare class SignHelper {
5
- /**
6
- * 清空对象中的空值
7
- */
8
- static clean(obj: object): void;
9
- /**
10
- * 签名字典
11
- */
12
- static signDictionary(dictionary: object, encoding?: boolean): string;
13
- }
14
- export default SignHelper;
@@ -1,34 +0,0 @@
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;
@@ -1,94 +0,0 @@
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;
@@ -1,26 +0,0 @@
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;
@@ -1,66 +0,0 @@
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;
@@ -1,54 +0,0 @@
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;