halo-fe 1.0.31 → 1.0.32

Sign up to get free protection for your applications and to get access to all the features.
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- html{-webkit-user-select:initial;user-select:initial;font-size:14px;font-family:Consolas}a{text-decoration:none}p{margin:0;line-height:20px}input{outline:none;margin:0;font-family:inherit}ul,ol{margin:0;padding:0;outline:none}li{list-style-type:none}img{display:block}pre{margin:0;font-family:inherit}html.blue .ha-rich-text .ql-toolbar.ql-snow{border:1px solid #434e61;box-shadow:0 1px 4px #29374d;background-image:linear-gradient(to bottom,#354052,#354052)}html.blue .ha-rich-text .ql-container.ql-snow{border-color:#434e61;background:#354052}html.blue .ha-rich-text .ql-stroke{stroke:#ffffffb8}html.blue .ha-rich-text .ql-fill{fill:#ffffffb8}html.blue .ha-rich-text .ql-picker .ql-picker-label,html.blue .ha-rich-text .ql-date{color:#ffffffb8}html.light .ha-rich-text .ql-toolbar.ql-snow{border:1px solid #dcdfe6;box-shadow:0 1px 4px #ccc9;background-image:linear-gradient(to bottom,#fff,#f2f2f2)}html.light .ha-rich-text .ql-container.ql-snow{border-color:#dcdfe6}.ha-rich-text ol,.ha-rich-text ul{padding-left:1.5em}.ha-rich-text ol{counter-reset:my-counter}.ha-rich-text ol li{list-style-type:none;counter-increment:my-counter}.ha-rich-text ol li:before{content:counter(my-counter) "."}.ha-fill{width:100%;height:100%}.ha-scroller{position:relative;height:100%}.ha-scroller:hover .scroller-thumb{display:block}.ha-scroller.hover .scroller-thumb{display:block;opacity:.5}.ha-scroller .scroller-container{height:100%;overflow:auto;width:100%;scrollbar-width:none}.ha-scroller .scroller-track{position:absolute;top:0;right:0;width:8px;height:100%}.ha-scroller .scroller-thumb{display:none;position:absolute;cursor:pointer;height:30px;width:100%;-webkit-user-select:none;user-select:none;background:#a3a6ad;opacity:.3;border-radius:5px}.ha-scroller .scroller-thumb:hover{opacity:.5}.ha-card{padding:5px;border:1px solid #414243;background:#1d1e1f;box-shadow:0 0 12px #000000b8;border-radius:4px}.ha-code{width:100%;height:100%}.ha-code.border{width:calc(100% - 2px);height:calc(100% - 2px);border-radius:4px}.ha-code.border .monaco-editor,.ha-code.border .overflow-guard{border-radius:4px}.ha-code.border:has(.monaco-editor.focused){border:1px solid #007fd4}.ha-compare{width:100%;height:100%}.ha-rich-text{width:100%}.ha-rich-text .ql-date{font-family:"Font Awesome 6 Free"}.ha-rich-text .ql-date:before{content:""}.ha-rich-text .ql-toolbar{line-height:20px}.ha-rich-text .ql-toolbar.ql-snow{padding:3px;position:sticky;top:0;z-index:10;border-top-left-radius:4px;border-top-right-radius:4px}.ha-rich-text .ql-body{border-bottom-left-radius:4px;border-bottom-right-radius:4px}.ha-rich-text .ql-container{height:auto}.ha-rich-text .ql-container.ql-snow{font-family:inherit;border:0}.ha-rich-text .ql-editor{padding:8px 8px 620px;word-break:break-word;overflow:initial}.ha-rich-text .ql-formats .ql-picker+.ql-picker{display:block!important}.ha-rich-text .ql-formats .ql-picker:has(+.ql-picker){display:none}.ha-rich-text:has(.ql-editor:focus) .ql-snow.ql-toolbar{border-color:#007fd4;border-bottom-color:#4c4d4f}.ha-rich-text:has(.ql-editor:focus) .ql-snow+.ql-body{border-color:#007fd4}.ha-condition{display:flex}.ha-col{display:flex;flex-direction:column;gap:5px}.ha-container{padding:10px;width:calc(100% - 20px);height:calc(100% - 20px)}.ha-container .ha-operation:nth-child(1){margin-top:0;margin-bottom:10px;padding:8px 10px;line-height:32px}.ha-row{display:flex;gap:5px}.ha-row.between{justify-content:space-between}.ha-progress{position:absolute;width:0;z-index:1}.progress-tip{font-size:12px;padding:0 8px;border-radius:4px;display:flex;align-items:center}.progress-tip.info{color:#409eff;background:#18222c;border:1px solid #1d3043}.progress-tip.success{color:#67c23a;background:#1c2518;border:1px solid #25371c}.progress-tip.warning{color:#e6a23c;background:#292218;border:1px solid #3e301c}.progress-tip.error{color:#f56c6c;background:#2b1d1d;border:1px solid #412626}.ha-socket-progress{width:100%;display:flex;gap:5px}.ha-socket-progress .progress-tips{display:flex;gap:5px}.ha-socket-progress .progress-chart{display:flex;flex:1;align-items:center;gap:5px}.ha-socket-progress .progress-bar{height:6px;background:#363637;width:100%;border-radius:4px}.ha-socket-progress .progress-percentage{height:100%;background:#67c23a;transition:width .5s;border-radius:4px}.ha-socket-progress .progress-info{font-size:12px;display:flex;justify-content:space-between;color:#aaa}.ha-socket-progress .progress-text{color:#cfd3dc}.ha-socket-progress.warning .progress-percentage{background:#e6a23c}.ha-socket-progress.warning .progress-text{color:#e6a23c}.ha-socket-progress.error .progress-percentage{background:#f56c6c}.ha-socket-progress.error .progress-text{color:#f56c6c}@keyframes antRotate{to{transform:rotate(405deg)}}@keyframes antSpinMove{to{opacity:1}}.ha-spinner .spinner-dots{position:relative;font-size:20px;width:20px;height:20px;transform:rotate(45deg);animation:antRotate 1.2s linear infinite;margin:0 auto}.ha-spinner .spinner-dots i{position:absolute;display:block;width:9px;height:9px;border-radius:100%;transform:scale(.75);transform-origin:50% 50%;opacity:.3;animation:antSpinMove 1s linear infinite alternate}.ha-spinner .spinner-dots i:first-child{top:0;left:0}.ha-spinner .spinner-dots i:nth-child(2){top:0;right:0;animation-delay:.4s}.ha-spinner .spinner-dots i:nth-child(3){right:0;bottom:0;animation-delay:.8s}.ha-spinner .spinner-dots i:nth-child(4){bottom:0;left:0;animation-delay:1.2s}.ha-spinner .spinner-title{color:#f40}.ha-spinner .stack{color:#a3a6ad;white-space:pre-wrap}.ha-spinner .spinner-text{text-align:center;font-size:14px;margin-top:10px}.ha-spinner.is-loading{height:100%;display:flex;align-items:center;justify-content:center}.ha-spinner.is-error{padding:10px;font-size:14px;transition:none}.ha-spinner.is-error .retry{color:#38c;cursor:pointer;margin-left:5px}.ha-spinner.is-error .retry:active{color:#f40}.ha-dance{display:flex;align-items:center}.ha-dance .char{animation:animationText 1s ease-in-out infinite alternate}@keyframes animationText{0%{transform:matrix(1,0,0,1,0,-2)}to{transform:matrix(1,0,0,1,0,2)}}
1
+ html{-webkit-user-select:initial;user-select:initial;font-size:14px;font-family:Consolas}a{text-decoration:none}p{margin:0;line-height:20px}input{outline:none;margin:0;font-family:inherit}ul,ol{margin:0;padding:0;outline:none}li{list-style-type:none}img{display:block}pre{margin:0;font-family:inherit}html.blue .ha-rich-text .ql-toolbar.ql-snow{border:1px solid #434e61;box-shadow:0 1px 4px #29374d;background-image:linear-gradient(to bottom,#354052,#354052)}html.blue .ha-rich-text .ql-container.ql-snow{border-color:#434e61;background:#354052}html.blue .ha-rich-text .ql-stroke{stroke:#ffffffb8}html.blue .ha-rich-text .ql-fill{fill:#ffffffb8}html.blue .ha-rich-text .ql-picker .ql-picker-label,html.blue .ha-rich-text .ql-date{color:#ffffffb8}html.light .ha-rich-text .ql-toolbar.ql-snow{border:1px solid #dcdfe6;box-shadow:0 1px 4px #ccc9;background-image:linear-gradient(to bottom,#fff,#f2f2f2)}html.light .ha-rich-text .ql-container.ql-snow{border-color:#dcdfe6}.ha-rich-text ol,.ha-rich-text ul{padding-left:1.5em}.ha-rich-text ol{counter-reset:my-counter}.ha-rich-text ol li{list-style-type:none;counter-increment:my-counter}.ha-rich-text ol li:before{content:counter(my-counter) "."}.ha-fill{width:100%;height:100%}.ha-scroller{position:relative;height:100%}.ha-scroller:hover .scroller-thumb{display:block}.ha-scroller.hover .scroller-thumb{display:block;opacity:.5}.ha-scroller .scroller-container{height:100%;overflow:auto;width:100%;scrollbar-width:none}.ha-scroller .scroller-track{position:absolute;top:0;right:0;width:8px;height:100%}.ha-scroller .scroller-thumb{display:none;position:absolute;cursor:pointer;height:30px;width:100%;-webkit-user-select:none;user-select:none;background:#a3a6ad;opacity:.3;border-radius:5px}.ha-scroller .scroller-thumb:hover{opacity:.5}.ha-card{padding:5px;border:1px solid #414243;background:#1d1e1f;box-shadow:0 0 12px #000000b8;border-radius:4px}.ha-code{width:100%;height:100%}.ha-code.border{width:calc(100% - 2px);height:calc(100% - 2px);border-radius:4px}.ha-code.border .monaco-editor,.ha-code.border .overflow-guard{border-radius:4px}.ha-code.border:has(.monaco-editor.focused){border:1px solid #007fd4}.ha-compare{width:100%;height:100%}.ha-rich-text{width:100%}.ha-rich-text .ql-date{font-family:"Font Awesome 6 Free"}.ha-rich-text .ql-date:before{content:""}.ha-rich-text .ql-toolbar{line-height:20px}.ha-rich-text .ql-toolbar.ql-snow{padding:3px;position:sticky;top:0;z-index:10;border-top-left-radius:4px;border-top-right-radius:4px}.ha-rich-text .ql-body{border-bottom-left-radius:4px;border-bottom-right-radius:4px}.ha-rich-text .ql-container{height:auto}.ha-rich-text .ql-container.ql-snow{font-family:inherit;border:0}.ha-rich-text .ql-editor{padding:8px 8px 620px;word-break:break-word;overflow:initial}.ha-rich-text .ql-formats .ql-picker+.ql-picker{display:block!important}.ha-rich-text .ql-formats .ql-picker:has(+.ql-picker){display:none}.ha-rich-text:has(.ql-editor:focus) .ql-snow.ql-toolbar{border-color:#007fd4;border-bottom-color:#4c4d4f}.ha-rich-text:has(.ql-editor:focus) .ql-snow+.ql-body{border-color:#007fd4}.ha-condition{display:flex}.ha-col{display:flex;flex-direction:column;gap:5px}.ha-container{padding:10px;width:calc(100% - 20px);height:calc(100% - 20px)}.ha-container .ha-operation:nth-child(1){margin-top:0;margin-bottom:10px;padding:8px 10px;line-height:32px}.ha-row{display:flex;gap:5px}.ha-row.between{justify-content:space-between}.ha-progress{position:absolute;width:0;z-index:1}.progress-tip{font-size:12px;padding:0 8px;border-radius:4px;display:flex;align-items:center}.progress-tip.info{color:#409eff;background:#18222c;border:1px solid #1d3043}.progress-tip.success{color:#67c23a;background:#1c2518;border:1px solid #25371c}.progress-tip.warning{color:#e6a23c;background:#292218;border:1px solid #3e301c}.progress-tip.error{color:#f56c6c;background:#2b1d1d;border:1px solid #412626}.ha-socket-progress{width:100%;display:flex;gap:5px}.ha-socket-progress .progress-tips{display:flex;gap:5px}.ha-socket-progress .progress-chart{display:flex;flex:1;align-items:center;gap:5px}.ha-socket-progress .progress-bar{height:6px;background:#363637;width:100%;border-radius:4px}.ha-socket-progress .progress-percentage{height:100%;background:#67c23a;transition:width .5s;border-radius:4px}.ha-socket-progress .progress-info{font-size:12px;display:flex;justify-content:space-between;color:#aaa;gap:10px}.ha-socket-progress .progress-text{color:#cfd3dc}.ha-socket-progress.warning .progress-percentage{background:#e6a23c}.ha-socket-progress.warning .progress-text{color:#e6a23c}.ha-socket-progress.error .progress-percentage{background:#f56c6c}.ha-socket-progress.error .progress-text{color:#f56c6c}@keyframes antRotate{to{transform:rotate(405deg)}}@keyframes antSpinMove{to{opacity:1}}.ha-spinner .spinner-dots{position:relative;font-size:20px;width:20px;height:20px;transform:rotate(45deg);animation:antRotate 1.2s linear infinite;margin:0 auto}.ha-spinner .spinner-dots i{position:absolute;display:block;width:9px;height:9px;border-radius:100%;transform:scale(.75);transform-origin:50% 50%;opacity:.3;animation:antSpinMove 1s linear infinite alternate}.ha-spinner .spinner-dots i:first-child{top:0;left:0}.ha-spinner .spinner-dots i:nth-child(2){top:0;right:0;animation-delay:.4s}.ha-spinner .spinner-dots i:nth-child(3){right:0;bottom:0;animation-delay:.8s}.ha-spinner .spinner-dots i:nth-child(4){bottom:0;left:0;animation-delay:1.2s}.ha-spinner .spinner-title{color:#f40}.ha-spinner .stack{color:#a3a6ad;white-space:pre-wrap}.ha-spinner .spinner-text{text-align:center;font-size:14px;margin-top:10px}.ha-spinner.is-loading{height:100%;display:flex;align-items:center;justify-content:center}.ha-spinner.is-error{padding:10px;font-size:14px;transition:none}.ha-spinner.is-error .retry{color:#38c;cursor:pointer;margin-left:5px}.ha-spinner.is-error .retry:active{color:#f40}.ha-dance{display:flex;align-items:center}.ha-dance .char{animation:animationText 1s ease-in-out infinite alternate}@keyframes animationText{0%{transform:matrix(1,0,0,1,0,-2)}to{transform:matrix(1,0,0,1,0,2)}}
@@ -2,7 +2,9 @@ declare function __VLS_template(): {
2
2
  slots: {
3
3
  default?(_: {}): any;
4
4
  };
5
- refs: {};
5
+ refs: {
6
+ containerRef: HTMLDivElement;
7
+ };
6
8
  attrs: Partial<{}>;
7
9
  };
8
10
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
@@ -11,7 +13,9 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
11
13
  type: BooleanConstructor;
12
14
  default: boolean;
13
15
  };
14
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
16
+ }>, {
17
+ ref: import("vue").Ref<any, any>;
18
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
15
19
  container: {
16
20
  type: BooleanConstructor;
17
21
  default: boolean;
@@ -0,0 +1,11 @@
1
+ import ICryptor from "./ICryptor";
2
+ /**
3
+ * 加解密基类
4
+ */
5
+ declare abstract class Cryptor implements ICryptor {
6
+ type: string;
7
+ openAsync(conn?: string): Promise<void>;
8
+ encrypt<T>(content: T, key: string): string;
9
+ abstract encryptString(content: string, key: string): string;
10
+ }
11
+ export default Cryptor;
@@ -0,0 +1,13 @@
1
+ import { Factory } from "../../factory";
2
+ import ICryptor from "./ICryptor";
3
+ /**
4
+ * 加解密工厂
5
+ */
6
+ declare class CryptorFactory extends Factory<ICryptor> {
7
+ open(): void;
8
+ /**
9
+ * 获取AES加解密器
10
+ */
11
+ getAesAsync(): Promise<ICryptor>;
12
+ }
13
+ export default CryptorFactory;
@@ -0,0 +1,15 @@
1
+ import { IDriver, IOpen } from "../@types";
2
+ /**
3
+ * 加解密接口
4
+ */
5
+ interface ICryptor extends IDriver, IOpen {
6
+ /**
7
+ * 加密任意数据
8
+ */
9
+ encrypt<T>(content: T, key: string): string;
10
+ /**
11
+ * 加密字符串
12
+ */
13
+ encryptString(content: string, key: string): string;
14
+ }
15
+ export default ICryptor;
@@ -0,0 +1,10 @@
1
+ import Cryptor from "../Cryptor";
2
+ /**
3
+ * AES加解密
4
+ */
5
+ declare class AesCryptor extends Cryptor {
6
+ crypto: any;
7
+ openAsync(conn?: string): Promise<void>;
8
+ encryptString(content: string, key: string): string;
9
+ }
10
+ export default AesCryptor;
@@ -0,0 +1,3 @@
1
+ import ICryptor from "./ICryptor";
2
+ import CryptorFactory from "./CryptorFactory";
3
+ export { type ICryptor, CryptorFactory };
@@ -1,7 +1,7 @@
1
1
  import Http from "../Http";
2
2
  import HttpRequest from "../entities/HttpRequest";
3
3
  import { IHasher } from "../../hashers";
4
- import { IEncryptor } from "../../encryptors";
4
+ import { ICryptor } from "../../cryptors";
5
5
  /**
6
6
  * EI请求器
7
7
  */
@@ -17,7 +17,7 @@ declare class EiHttp extends Http {
17
17
  /**
18
18
  * 加解密器
19
19
  */
20
- encryptor: IEncryptor;
20
+ encryptor: ICryptor;
21
21
  /**
22
22
  * Hash计算器
23
23
  */
@@ -53,7 +53,7 @@ export * from "./bridges";
53
53
  export * from "./builders";
54
54
  export * from "./cdns";
55
55
  export * from "./encoders";
56
- export * from "./encryptors";
56
+ export * from "./cryptors";
57
57
  export * from "./excels";
58
58
  export * from "./explainers";
59
59
  export * from "./features";
@@ -14,7 +14,7 @@ interface IProvider extends IDriver, IOpen {
14
14
  /**
15
15
  * 查询强类型数据
16
16
  */
17
- getEntity<T>(table: string, key: any): Promise<T>;
17
+ getEntityAsync<T>(table: string, key: any): Promise<T>;
18
18
  /**
19
19
  * 查询数据
20
20
  */
@@ -5,17 +5,17 @@ import IProvider from "./IProvider";
5
5
  declare abstract class Provider implements IProvider {
6
6
  type: string;
7
7
  openAsync(conn: string): Promise<void>;
8
- abstract createAsync(kind: string): Promise<any>;
9
- abstract deleteAsync(kind: string, key: any): Promise<any>;
10
- abstract getEntity<T>(kind: string, key: any): Promise<T>;
11
- abstract getAsync(kind: string, key: any): Promise<any>;
8
+ createAsync(table: string): Promise<any>;
9
+ abstract deleteAsync(table: string, key: any): Promise<any>;
10
+ abstract getEntityAsync<T>(table: string, key: any): Promise<T>;
11
+ abstract getAsync(table: string, key: any): Promise<any>;
12
12
  abstract getKeysAsync(table: string): Promise<any[]>;
13
- abstract insertAsync(kind: string, key: any, entity: any): Promise<any>;
14
- abstract updateAsync(kind: string, key: any, entity: any): Promise<any>;
15
- abstract saveEntity<T>(kind: string, key: any, entity: T): Promise<any>;
16
- abstract saveAsync(kind: string, key: any, entity: any): Promise<any>;
13
+ abstract insertAsync(table: string, key: any, entity: any): Promise<any>;
14
+ abstract updateAsync(table: string, key: any, entity: any): Promise<any>;
15
+ abstract saveEntity<T>(table: string, key: any, entity: T): Promise<any>;
16
+ abstract saveAsync(table: string, key: any, entity: any): Promise<any>;
17
17
  replaceEntityAsync(table: string, key: any, newKey: any): Promise<void>;
18
- abstract commit(): void;
19
- abstract dispose(): void;
18
+ commit(): void;
19
+ dispose(): void;
20
20
  }
21
21
  export default Provider;
@@ -8,12 +8,12 @@ declare class ProviderFactory extends Factory<IProvider> {
8
8
  open(): void;
9
9
  private _default;
10
10
  /**
11
- * 获取默认驱动程序,并自动决定创建指定名称的仓储
11
+ * 获取IndeedDb驱动程序,并自动决定创建指定名称的仓储
12
12
  */
13
- getDefaultAsync(table: string): Promise<IProvider>;
13
+ getDbAsync(table: string): Promise<IProvider>;
14
14
  /**
15
15
  * 获取默认Storage提供程序
16
16
  */
17
- get storage(): IProvider;
17
+ getStorageAsync(): Promise<IProvider>;
18
18
  }
19
19
  export default ProviderFactory;
@@ -4,17 +4,13 @@ import Provider from "../Provider";
4
4
  */
5
5
  declare class CookieProvider extends Provider {
6
6
  type: string;
7
- openAsync(conn: string): Promise<void>;
8
7
  getKeysAsync(table: string): Promise<any[]>;
9
- createAsync(kind: string): Promise<any>;
10
- deleteAsync(kind: string, key: any): Promise<any>;
11
- getAsync(kind: string, key: any): Promise<any>;
12
- getEntity<T>(kind: string, key: any): Promise<T>;
13
- insertAsync(kind: string, key: any, entity: any): Promise<any>;
14
- saveEntity<T>(kind: string, key: any, entity: T): Promise<any>;
15
- saveAsync(kind: string, key: any, entity: any): Promise<any>;
16
- updateAsync(kind: string, key: any, entity: any): Promise<any>;
17
- commit(): void;
18
- dispose(): void;
8
+ deleteAsync(table: string, key: any): Promise<any>;
9
+ getAsync(table: string, key: any): Promise<any>;
10
+ getEntityAsync<T>(table: string, key: any): Promise<T>;
11
+ insertAsync(table: string, key: any, entity: any): Promise<any>;
12
+ saveEntity<T>(table: string, key: any, entity: T): Promise<any>;
13
+ saveAsync(table: string, key: any, entity: any): Promise<any>;
14
+ updateAsync(table: string, key: any, entity: any): Promise<any>;
19
15
  }
20
16
  export default CookieProvider;
@@ -24,15 +24,7 @@ declare class IndexedDbProvider extends Provider {
24
24
  * 保证创建存储Store
25
25
  */
26
26
  createAsync(table: string): Promise<any>;
27
- /**
28
- * 打开数据库(不升级,用于执行命令)
29
- */
30
- openDbAsync(): Promise<IDBDatabase>;
31
- /**
32
- * 开启事务
33
- */
34
- openTransAsync(table: string, mode: IDBTransactionMode, db: IDBDatabase): Promise<IDBTransaction>;
35
- getEntity<T>(table: string, id: any): Promise<T>;
27
+ getEntityAsync<T>(table: string, id: any): Promise<T>;
36
28
  /**
37
29
  * 查询数据
38
30
  */
@@ -56,12 +48,17 @@ declare class IndexedDbProvider extends Provider {
56
48
  */
57
49
  deleteAsync: (table: string, key: any) => Promise<any>;
58
50
  /**
59
- * 提交事务
51
+ * 升级数据库版本
52
+ * VIP:无需手动关闭数据空连接,系统在onsuccess中会自动关闭连接
53
+ */
54
+ upgradeDbAsync(version: number): Promise<IDBDatabase>;
55
+ /**
56
+ * 打开数据库(不升级,用于执行命令)
60
57
  */
61
- commit(): void;
58
+ openDbAsync(): Promise<IDBDatabase>;
62
59
  /**
63
- * 关闭连接
60
+ * 开启事务
64
61
  */
65
- dispose(): void;
62
+ openTransAsync(db: IDBDatabase, table: string, mode: IDBTransactionMode): Promise<IDBTransaction>;
66
63
  }
67
64
  export default IndexedDbProvider;
@@ -4,18 +4,14 @@ import Provider from "../Provider";
4
4
  */
5
5
  declare class StorageProvider extends Provider {
6
6
  type: string;
7
- openAsync(conn: string): Promise<void>;
8
- createAsync(kind: string): Promise<any>;
7
+ getEntityAsync<T>(table: string, key: string): Promise<T>;
8
+ getAsync(table: string, key: any): Promise<any>;
9
9
  getKeysAsync(table: string): Promise<any[]>;
10
- getAsync(kind: string, key: any): Promise<any>;
11
- getEntity<T>(kind: string, key: string): Promise<T>;
12
- insertAsync(kind: string, key: any, entity: any): Promise<any>;
13
- saveEntity<T>(kind: string, key: any, entity: T): Promise<any>;
14
- saveAsync(kind: string, key: any, entity: any): Promise<any>;
15
- updateAsync(kind: string, key: any, entity: any): Promise<any>;
16
- deleteAsync(kind: string, key: any): Promise<any>;
17
- commit(): void;
18
- dispose(): void;
10
+ insertAsync(table: string, key: any, entity: any): Promise<any>;
11
+ saveEntity<T>(table: string, key: any, entity: T): Promise<any>;
12
+ saveAsync(table: string, key: any, entity: any): Promise<any>;
13
+ updateAsync(table: string, key: any, entity: any): Promise<any>;
14
+ deleteAsync(table: string, key: any): Promise<any>;
19
15
  /**
20
16
  * 以5M为基准,获取剩余可用容量(KB)
21
17
  */
@@ -24,5 +20,9 @@ declare class StorageProvider extends Provider {
24
20
  * 判断指定值是否能够存储到storage中
25
21
  */
26
22
  canStorage: (value: object) => boolean;
23
+ /**
24
+ * 获取唯一键
25
+ */
26
+ getKey(table: string, type: string): string;
27
27
  }
28
28
  export default StorageProvider;
@@ -12,54 +12,54 @@ declare class TimeUtil extends Util {
12
12
  * 根据字符串获取可对比的时间
13
13
  */
14
14
  getTime: (value?: any) => Date;
15
- /**
16
- * 格式化时间
17
- */
18
- format: (value: any, format: string) => string;
19
15
  /**
20
16
  * 对时间值进行时间格式化
21
17
  */
22
- formatSecondTime: (value: any) => string;
18
+ formatMillisecondTime: (value?: string) => string;
23
19
  /**
24
20
  * 对时间值进行时间格式化
25
21
  */
26
- formatMillisecondTime: (value: string) => string;
22
+ formatSecondTime: (value?: any) => string;
27
23
  /**
28
24
  * 格式化成24小时时间格式
29
25
  */
30
- formatTime: (value: any) => string;
26
+ formatTime: (value?: any) => string;
31
27
  /**
32
28
  * 对时间值进行日期格式化
33
29
  */
34
- formatDate: (value: any) => string;
30
+ formatDate: (value?: any) => string;
35
31
  /**
36
32
  * 格式化时间 YYYY-MM-DD HH:mm:ss
37
33
  */
38
- formatDateTime: (value: any) => string;
34
+ formatDateTime: (value?: any) => string;
39
35
  /**
40
- * 获取当前日期时间的字符串
36
+ * 格式化时间
41
37
  */
42
- getDateTimeString: () => string;
38
+ format: (value: any, format: string) => string;
43
39
  /**
44
- * 获取当前时间的字符串
40
+ * 添加小时
45
41
  */
46
- getDateString: () => string;
42
+ addHours: (value: any, hours: number) => Date;
47
43
  /**
48
- * 获取当前时间的字符串
44
+ * 添加天数
49
45
  */
50
- getTimeString: () => string;
46
+ addDays: (value: any, days: number) => Date;
51
47
  /**
52
48
  * 添加天数
53
49
  */
54
- addDays: (value: any, days: number) => Date;
50
+ addWeeks: (value: any, weeks: number) => Date;
55
51
  /**
56
52
  * 添加月份
57
53
  */
58
54
  addMonths: (value: any, months: number) => Date;
59
55
  /**
60
- * 添加小时
56
+ * 添加年份
61
57
  */
62
- addHours: (value: any, hours: number) => Date;
58
+ addYears: (value: any, years: number) => Date;
59
+ /**
60
+ * 添加时间
61
+ */
62
+ add: (value: any, amount: number, type: any) => Date;
63
63
  /**
64
64
  * 判断指定时间是否是周末
65
65
  */
@@ -1,4 +1,4 @@
1
- import { BuilderFactory, CdnFactory, EncoderFactory, EncryptorFactory, ExcelFactory, ExplainerFactory, FeatureFactory, HasherFactory, UtilFactory, I18nFactory, HttpFactory, MessengerFactory, ProviderFactory, SignerFactory, SocketFactory, SsoFactory, TaskFactory, TemplateFactory, UtilityFactory } from "../drivers";
1
+ import { BuilderFactory, CdnFactory, EncoderFactory, CryptorFactory, ExcelFactory, ExplainerFactory, FeatureFactory, HasherFactory, UtilFactory, I18nFactory, HttpFactory, MessengerFactory, ProviderFactory, SignerFactory, SocketFactory, SsoFactory, TaskFactory, TemplateFactory, UtilityFactory } from "../drivers";
2
2
  import { RepoFactory } from "../repos";
3
3
  import { SvcFactory } from "../svcs";
4
4
  /**
@@ -26,7 +26,7 @@ declare class Factories {
26
26
  /**
27
27
  * 加解密工厂
28
28
  */
29
- static get encryptor(): EncryptorFactory;
29
+ static get encryptor(): CryptorFactory;
30
30
  /**
31
31
  * Excel工厂
32
32
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "halo-fe",
3
- "version": "1.0.31",
3
+ "version": "1.0.32",
4
4
  "description": "Halo front end sdk",
5
5
  "scripts": {
6
6
  "halo-fe:tsc": "vue-tsc",