halo-fe 1.0.1 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/main.js +1518 -984
- package/dist/style.css +1 -0
- 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/Empty.vue.d.ts +26 -0
- package/esm/coms/Progress.vue.d.ts +8 -0
- package/esm/coms/Row.vue.d.ts +21 -0
- package/esm/coms/index.d.ts +8 -0
- package/esm/coms/types/CodeEmit.d.ts +23 -0
- package/esm/coms/types/CodeProps.d.ts +18 -0
- package/esm/coms/types/RowProps.d.ts +14 -0
- package/esm/coms/types/index.d.ts +4 -0
- package/esm/drivers/cdns/CdnFactory.d.ts +1 -1
- package/esm/drivers/cdns/index.d.ts +2 -0
- package/esm/drivers/encoders/EncoderFactory.d.ts +2 -2
- package/esm/drivers/encoders/index.d.ts +2 -0
- package/esm/drivers/excels/ExcelFactory.d.ts +1 -1
- package/esm/drivers/excels/index.d.ts +2 -1
- package/esm/drivers/explainers/index.d.ts +2 -0
- package/esm/drivers/factories/DriverFactory.d.ts +13 -12
- package/esm/drivers/factories/Factory.d.ts +1 -1
- package/esm/drivers/factories/IFactory.d.ts +1 -1
- package/esm/drivers/factories/index.d.ts +13 -1
- package/esm/drivers/features/FeatureFactory.d.ts +1 -1
- package/esm/drivers/features/index.d.ts +2 -1
- package/esm/drivers/hashers/HasherFactory.d.ts +2 -2
- package/esm/drivers/hashers/index.d.ts +2 -1
- package/esm/drivers/https/Http.d.ts +24 -0
- package/esm/drivers/https/HttpFactory.d.ts +20 -0
- package/esm/drivers/https/IHttp.d.ts +49 -0
- package/esm/drivers/https/entities/HttpMessage.d.ts +32 -0
- package/esm/drivers/https/entities/HttpRequest.d.ts +19 -0
- package/esm/drivers/{requesters → https}/entities/HttpResponse.d.ts +2 -5
- package/esm/drivers/{requesters/implements/DefaultRequester.d.ts → https/implements/DefaultHttp.d.ts} +4 -4
- package/esm/drivers/https/implements/HaloHttp.d.ts +37 -0
- package/esm/drivers/{requesters/implements/MkRequester.d.ts → https/implements/MkHttp.d.ts} +7 -7
- package/esm/drivers/https/index.d.ts +6 -0
- package/esm/drivers/index.d.ts +8 -10
- package/esm/drivers/providers/Provider.d.ts +17 -0
- package/esm/drivers/providers/ProviderFactory.d.ts +3 -3
- package/esm/drivers/providers/implements/IndexedDbProvider.d.ts +2 -2
- package/esm/drivers/providers/implements/StorageProvider.d.ts +4 -0
- package/esm/drivers/providers/index.d.ts +2 -1
- package/esm/drivers/signers/ISigner.d.ts +2 -2
- package/esm/drivers/signers/Signer.d.ts +13 -0
- package/esm/drivers/signers/SignerFactory.d.ts +1 -1
- package/esm/drivers/signers/implements/DefaultSigner.d.ts +4 -4
- package/esm/drivers/signers/index.d.ts +2 -1
- package/esm/drivers/ssos/ISso.d.ts +1 -1
- package/esm/drivers/ssos/SsoFactory.d.ts +1 -1
- package/esm/drivers/ssos/implements/AnonymousSso.d.ts +1 -1
- package/esm/drivers/ssos/implements/BearerSso.d.ts +1 -3
- package/esm/drivers/ssos/implements/NioSso.d.ts +1 -1
- package/esm/drivers/ssos/implements/SecretSso.d.ts +3 -3
- package/esm/drivers/ssos/implements/WeiXinSso.d.ts +1 -1
- package/esm/drivers/ssos/index.d.ts +2 -1
- package/esm/helpers/json-helper.d.ts +12 -4
- package/esm/helpers/object-helper.d.ts +4 -0
- package/esm/helpers/types/index.d.ts +0 -0
- package/esm/helpers/url-helper.d.ts +2 -2
- package/esm/main.d.ts +14 -3
- package/esm/services/index.d.ts +6 -12
- package/esm/services/types/IMessage.d.ts +14 -0
- package/esm/services/types/IMessager.d.ts +14 -0
- package/esm/services/types/index.d.ts +2 -0
- package/esm/stores/config.d.ts +10 -6
- package/esm/stores/driver.d.ts +2 -6
- package/esm/stores/index.d.ts +3 -2
- package/esm/stores/setting.d.ts +0 -4
- package/esm/stores/user.d.ts +3 -7
- package/esm/utilities/AffixUtility.d.ts +10 -0
- package/esm/utilities/EventUtility.d.ts +30 -0
- package/esm/utilities/KeyboardUtility.d.ts +73 -0
- package/esm/utilities/MouseUtility.d.ts +24 -0
- package/esm/utilities/index.d.ts +4 -0
- package/package.json +7 -7
- package/dist/vendor-axios-ud9O0vdJ.js +0 -1670
- package/esm/drivers/driver-helper.d.ts +0 -46
- package/esm/drivers/requesters/IRequester.d.ts +0 -25
- package/esm/drivers/requesters/Requester.d.ts +0 -13
- package/esm/drivers/requesters/RequesterFactory.d.ts +0 -21
- package/esm/drivers/requesters/entities/HttpRequest.d.ts +0 -34
- package/esm/drivers/requesters/implements/LocalRequester.d.ts +0 -43
- package/esm/drivers/requesters/index.d.ts +0 -5
- /package/esm/{thirds → plugins}/index.d.ts +0 -0
@@ -1,12 +1,12 @@
|
|
1
|
-
import
|
1
|
+
import Http from "../Http";
|
2
2
|
import HttpRequest from "../entities/HttpRequest";
|
3
3
|
import HttpResponse from "../entities/HttpResponse";
|
4
|
-
import
|
5
|
-
import IHasher from "../../hashers
|
4
|
+
import IHttp from "../IHttp";
|
5
|
+
import { IHasher } from "../../hashers";
|
6
6
|
/**
|
7
7
|
* MK请求器
|
8
8
|
*/
|
9
|
-
declare class
|
9
|
+
declare class MkHttp extends Http {
|
10
10
|
type: string;
|
11
11
|
/**
|
12
12
|
* 基准地址
|
@@ -23,7 +23,7 @@ declare class MkRequester extends Requester {
|
|
23
23
|
/**
|
24
24
|
* 默认请求器
|
25
25
|
*/
|
26
|
-
requester:
|
26
|
+
requester: IHttp;
|
27
27
|
/**
|
28
28
|
* Hash计算器
|
29
29
|
*/
|
@@ -31,10 +31,10 @@ declare class MkRequester extends Requester {
|
|
31
31
|
/**
|
32
32
|
* 危险操作,会暴露敏感信息
|
33
33
|
*/
|
34
|
-
open(conn: string): void
|
34
|
+
open(conn: string): Promise<void>;
|
35
35
|
/**
|
36
36
|
* 危险操作,会暴露敏感信息
|
37
37
|
*/
|
38
38
|
send(request: HttpRequest): Promise<HttpResponse>;
|
39
39
|
}
|
40
|
-
export default
|
40
|
+
export default MkHttp;
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import HttpFactory from "./HttpFactory";
|
2
|
+
import type IHttp from "./IHttp";
|
3
|
+
import HttpRequest from "./entities/HttpRequest";
|
4
|
+
import HttpResponse from "./entities/HttpResponse";
|
5
|
+
import HaloHttp from "./implements/HaloHttp";
|
6
|
+
export { HttpFactory, IHttp, HttpRequest, HttpResponse, HaloHttp };
|
package/esm/drivers/index.d.ts
CHANGED
@@ -1,10 +1,8 @@
|
|
1
|
-
|
2
|
-
export * from "./
|
3
|
-
export * from "./
|
4
|
-
export * from "./
|
5
|
-
export * from "./
|
6
|
-
export * from "./
|
7
|
-
export * from "./
|
8
|
-
export * from "./
|
9
|
-
export * from "./ssos/index";
|
10
|
-
export { DriverHelper, };
|
1
|
+
export * from "./excels";
|
2
|
+
export * from "./factories";
|
3
|
+
export * from "./features";
|
4
|
+
export * from "./hashers";
|
5
|
+
export * from "./providers";
|
6
|
+
export * from "./https";
|
7
|
+
export * from "./signers";
|
8
|
+
export * from "./ssos";
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import IProvider from "./IProvider";
|
2
|
+
/**
|
3
|
+
* 提供程序基类
|
4
|
+
*/
|
5
|
+
declare abstract class Provider implements IProvider {
|
6
|
+
type: string;
|
7
|
+
createAsync(store: string): Promise<any>;
|
8
|
+
deleteAsync(id: any): Promise<any>;
|
9
|
+
getAsync(id: any): Promise<any>;
|
10
|
+
insertAsync(id: any, entity: any): Promise<any>;
|
11
|
+
openAsync(conn: string): Promise<number>;
|
12
|
+
saveAsync(id: any, entity: any): Promise<any>;
|
13
|
+
updateAsync(id: any, entity: any): Promise<any>;
|
14
|
+
commit(): void;
|
15
|
+
dispose(): void;
|
16
|
+
}
|
17
|
+
export default Provider;
|
@@ -8,11 +8,11 @@ declare class ProviderFactory extends Factory<IProvider> {
|
|
8
8
|
/**
|
9
9
|
* 获取指定类型的提供程序
|
10
10
|
*/
|
11
|
-
create(type: string, conn?: string): IProvider
|
11
|
+
create(type: string, conn?: string): Promise<IProvider>;
|
12
12
|
private _default;
|
13
13
|
/**
|
14
|
-
*
|
14
|
+
* 获取并开启默认驱动程序
|
15
15
|
*/
|
16
|
-
getDefault(
|
16
|
+
getDefault(store: string): Promise<IProvider>;
|
17
17
|
}
|
18
18
|
export default ProviderFactory;
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import
|
1
|
+
import Provider from "../Provider";
|
2
2
|
/**
|
3
3
|
* IndexedDB提供程序实现
|
4
4
|
*/
|
5
|
-
declare class IndexedDbProvider
|
5
|
+
declare class IndexedDbProvider extends Provider {
|
6
6
|
type: string;
|
7
7
|
database: string;
|
8
8
|
store: string;
|
@@ -12,7 +12,7 @@ interface ISigner {
|
|
12
12
|
open(auth: {
|
13
13
|
url: string;
|
14
14
|
app_id: string;
|
15
|
-
}): void
|
15
|
+
}): Promise<void>;
|
16
16
|
/**
|
17
17
|
* 根据回调地址获取登录地址
|
18
18
|
*/
|
@@ -24,7 +24,7 @@ interface ISigner {
|
|
24
24
|
/**
|
25
25
|
* 获取签名
|
26
26
|
*/
|
27
|
-
getSign(userId: string, url: string, body:
|
27
|
+
getSign(userId: string, url: string, body: string, timestamp: number, secret: string): Promise<string>;
|
28
28
|
/**
|
29
29
|
* 释放资源
|
30
30
|
*/
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import ISigner from "./ISigner";
|
2
|
+
declare abstract class Signer implements ISigner {
|
3
|
+
type: string;
|
4
|
+
abstract open(auth: {
|
5
|
+
url: string;
|
6
|
+
app_id: string;
|
7
|
+
}): Promise<void>;
|
8
|
+
abstract callback(token: string): void;
|
9
|
+
abstract getSign(userId: string, url: string, body: string, timestamp: number, secret: string): Promise<string>;
|
10
|
+
abstract loginUrl(callback: string): string;
|
11
|
+
abstract dispose(): any;
|
12
|
+
}
|
13
|
+
export default Signer;
|
@@ -1,17 +1,17 @@
|
|
1
|
-
import ISigner from "../ISigner";
|
2
1
|
import IHasher from "../../hashers/IHasher";
|
2
|
+
import Signer from "../Signer";
|
3
3
|
/**
|
4
4
|
* 默认签名器
|
5
5
|
*/
|
6
|
-
declare class DefaultSigner
|
6
|
+
declare class DefaultSigner extends Signer {
|
7
7
|
type: string;
|
8
8
|
hasher: IHasher;
|
9
9
|
open(auth: {
|
10
10
|
url: string;
|
11
11
|
app_id: string;
|
12
|
-
}): void
|
12
|
+
}): Promise<void>;
|
13
13
|
callback(token: string): void;
|
14
|
-
getSign(userId: string, url: string, body:
|
14
|
+
getSign(userId: string, url: string, body: string, timestamp: number, secret: string): Promise<string>;
|
15
15
|
loginUrl(callback: string): string;
|
16
16
|
dispose(): void;
|
17
17
|
}
|
@@ -29,7 +29,7 @@ interface ISso extends IDriver {
|
|
29
29
|
/**
|
30
30
|
* 获取授权头,不能泄露域账号等用户标识
|
31
31
|
*/
|
32
|
-
|
32
|
+
getAuth(token: string, timestamp: number, sign: string, env: string): string;
|
33
33
|
/**
|
34
34
|
* 退出
|
35
35
|
*/
|
@@ -12,7 +12,7 @@ declare class AnonymousSso implements ISso {
|
|
12
12
|
token: string;
|
13
13
|
secret: string;
|
14
14
|
};
|
15
|
-
|
15
|
+
getAuth(token: string, timestamp: number, signature: string, env: string): string;
|
16
16
|
logout(): void;
|
17
17
|
}
|
18
18
|
export default AnonymousSso;
|
@@ -1,12 +1,10 @@
|
|
1
1
|
import ISso from "../ISso";
|
2
|
-
import { IRequester } from "../../requesters";
|
3
2
|
/**
|
4
3
|
* 默认登录授权
|
5
4
|
*/
|
6
5
|
declare class BearerSso implements ISso {
|
7
6
|
type: string;
|
8
7
|
static loginKey: string;
|
9
|
-
requester: IRequester;
|
10
8
|
open(auth: {
|
11
9
|
url: string;
|
12
10
|
app_id: string;
|
@@ -18,7 +16,7 @@ declare class BearerSso implements ISso {
|
|
18
16
|
token: string;
|
19
17
|
secret: string;
|
20
18
|
};
|
21
|
-
|
19
|
+
getAuth(token: string, timestamp: number, signature: string, env?: string): string;
|
22
20
|
logout(): void;
|
23
21
|
}
|
24
22
|
export default BearerSso;
|
@@ -17,7 +17,7 @@ declare class NioSso implements ISso {
|
|
17
17
|
token: string;
|
18
18
|
secret: string;
|
19
19
|
};
|
20
|
-
|
20
|
+
getAuth(token: string, timestamp: number, signature: string, env: string): string;
|
21
21
|
logout(): void;
|
22
22
|
}
|
23
23
|
export default NioSso;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import ISso from "../ISso";
|
2
|
-
import {
|
2
|
+
import { IHttp } from "../../https";
|
3
3
|
declare class SecretSso implements ISso {
|
4
4
|
type: string;
|
5
|
-
|
5
|
+
http: IHttp;
|
6
6
|
open(auth: {
|
7
7
|
url: string;
|
8
8
|
app_id: string;
|
@@ -14,7 +14,7 @@ declare class SecretSso implements ISso {
|
|
14
14
|
token: string;
|
15
15
|
secret: string;
|
16
16
|
};
|
17
|
-
|
17
|
+
getAuth(token: string, timestamp: number, signature: string, env: string): string;
|
18
18
|
logout(): void;
|
19
19
|
}
|
20
20
|
export default SecretSso;
|
@@ -14,7 +14,7 @@ declare class WeiXinSso implements ISso {
|
|
14
14
|
token: string;
|
15
15
|
secret: string;
|
16
16
|
};
|
17
|
-
|
17
|
+
getAuth(token: string, timestamp: number, signature: string, env: string): string;
|
18
18
|
logout(): void;
|
19
19
|
}
|
20
20
|
export default WeiXinSso;
|
@@ -8,17 +8,21 @@ declare type Prop = {
|
|
8
8
|
*/
|
9
9
|
declare class JsonHelper {
|
10
10
|
/**
|
11
|
-
*
|
11
|
+
* 把字符串格式化为Json字符串
|
12
12
|
*/
|
13
|
-
static
|
13
|
+
static stringify(value: any): string;
|
14
14
|
/**
|
15
|
-
*
|
15
|
+
* 对非字符串进行序列化
|
16
16
|
*/
|
17
|
-
static
|
17
|
+
static stringifyWithString(value: any): string;
|
18
18
|
/**
|
19
19
|
* 把字符串格式化为Json字符串
|
20
20
|
*/
|
21
21
|
static stringifyString(value: string): string;
|
22
|
+
/**
|
23
|
+
* 反序列化成json对象
|
24
|
+
*/
|
25
|
+
static parse(value: string): any;
|
22
26
|
/**
|
23
27
|
* 根据props中的.自动分割得到属性值
|
24
28
|
*/
|
@@ -27,5 +31,9 @@ declare class JsonHelper {
|
|
27
31
|
* 把json字符串合并到目标对象上
|
28
32
|
*/
|
29
33
|
static mergeTo(target: any, from: string): void;
|
34
|
+
/**
|
35
|
+
* 从树集合构建出Json对象
|
36
|
+
*/
|
37
|
+
static buildObject(tree: any[], childProp: string, fun: (node: any) => Prop): string;
|
30
38
|
}
|
31
39
|
export default JsonHelper;
|
File without changes
|
@@ -83,11 +83,11 @@ declare class UrlHelper {
|
|
83
83
|
/**
|
84
84
|
* 把指定对象转换成base64字符串
|
85
85
|
*/
|
86
|
-
static base64(obj: object): string
|
86
|
+
static base64(obj: object): Promise<string>;
|
87
87
|
/**
|
88
88
|
* 把指定base64字符串解析为原对象
|
89
89
|
*/
|
90
|
-
static base64Decode(val: string): any
|
90
|
+
static base64Decode(val: string): Promise<any>;
|
91
91
|
/**
|
92
92
|
* 是否是http或https开头的地址
|
93
93
|
*/
|
package/esm/main.d.ts
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
export * from "./
|
1
|
+
import { IMessager } from "./services";
|
2
|
+
import "./styles/index.scss";
|
3
|
+
export * from "./coms";
|
4
|
+
export * from "./drivers";
|
5
|
+
export * from "./helpers";
|
6
|
+
export * from "./plugins";
|
7
|
+
export * from "./services";
|
8
|
+
export * from "./stores";
|
9
|
+
export * from "./utilities";
|
10
|
+
/**
|
11
|
+
* 初始化框架
|
12
|
+
*/
|
13
|
+
declare let createHalo: (messager: IMessager) => Promise<void>;
|
14
|
+
export { createHalo };
|
package/esm/services/index.d.ts
CHANGED
@@ -1,15 +1,9 @@
|
|
1
1
|
import SettingService from "./SettingService";
|
2
|
+
import { IMessager } from "./types";
|
3
|
+
export * from "./types";
|
4
|
+
declare let messager: IMessager;
|
2
5
|
/**
|
3
|
-
*
|
6
|
+
* 重新设置消息对象
|
4
7
|
*/
|
5
|
-
|
6
|
-
|
7
|
-
* 成功消息提示
|
8
|
-
*/
|
9
|
-
success(message: string): void;
|
10
|
-
/**
|
11
|
-
* 错误消息提示
|
12
|
-
*/
|
13
|
-
error(message: string): void;
|
14
|
-
}
|
15
|
-
export { IMessageService, SettingService };
|
8
|
+
declare let setMessager: (msgr: IMessager) => void;
|
9
|
+
export { SettingService, messager, setMessager };
|
package/esm/stores/config.d.ts
CHANGED
@@ -26,15 +26,19 @@ declare let useConfigStore: import("pinia").StoreDefinition<"config", {
|
|
26
26
|
* 文件布局方式
|
27
27
|
*/
|
28
28
|
fileLayout: any;
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
29
|
+
editor: {
|
30
|
+
schemas: any[];
|
31
|
+
completions: {};
|
32
|
+
};
|
33
33
|
}, {}, {
|
34
34
|
/**
|
35
35
|
* 初始化配置值(不一定跟登录用户相关,这也是单独分离的好处)
|
36
36
|
*/
|
37
37
|
init(configs: any[]): void;
|
38
|
+
/**
|
39
|
+
* 尝试添加架构
|
40
|
+
*/
|
41
|
+
tryAddSchema(uri: string, fileMatch: string, schema: object): void;
|
38
42
|
/**
|
39
43
|
* 获取本地配置
|
40
44
|
*/
|
@@ -50,10 +54,10 @@ declare let useConfigStore: import("pinia").StoreDefinition<"config", {
|
|
50
54
|
/**
|
51
55
|
* 全量保存用户配置
|
52
56
|
*/
|
53
|
-
saveConfig(type: string, data: any, cached?: boolean): Promise<
|
57
|
+
saveConfig(type: string, data: any, cached?: boolean): Promise<boolean>;
|
54
58
|
/**
|
55
59
|
* 部分保存用户配置
|
56
60
|
*/
|
57
|
-
patchConfig(type: string, pairs: any): Promise<
|
61
|
+
patchConfig(type: string, pairs: any): Promise<boolean>;
|
58
62
|
}>;
|
59
63
|
export default useConfigStore;
|
package/esm/stores/driver.d.ts
CHANGED
@@ -24,18 +24,14 @@ declare let useDriverStore: import("pinia").StoreDefinition<"driver", {
|
|
24
24
|
* 环境集合,存储到Store中,防止每一个Driver实例重复加载
|
25
25
|
*/
|
26
26
|
envs: any[];
|
27
|
-
/**
|
28
|
-
* 请求器
|
29
|
-
*/
|
30
|
-
requester: import("../drivers").IRequester;
|
31
27
|
}, {}, {
|
32
28
|
/**
|
33
29
|
* 加载应用选项
|
34
30
|
*/
|
35
|
-
loadApps(reload?: boolean): Promise<
|
31
|
+
loadApps(reload?: boolean): Promise<void>;
|
36
32
|
/**
|
37
33
|
* 加载环境选项
|
38
34
|
*/
|
39
|
-
loadEnvs(reload?: boolean): Promise<
|
35
|
+
loadEnvs(reload?: boolean): Promise<void>;
|
40
36
|
}>;
|
41
37
|
export default useDriverStore;
|
package/esm/stores/index.d.ts
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
import useConfigStore from "./config";
|
2
|
+
import useDriverStore from "./driver";
|
3
|
+
import useEnvStore from "./env";
|
2
4
|
import useSettingStore from "./setting";
|
3
5
|
import useLogStore from "./log";
|
4
6
|
import useUserStore from "./user";
|
5
7
|
import useSocketStore from "./socket";
|
6
|
-
|
7
|
-
export { useConfigStore, useSettingStore, useLogStore, useUserStore, useSocketStore, useDriverStore };
|
8
|
+
export { useConfigStore, useSettingStore, useLogStore, useUserStore, useSocketStore, useDriverStore, useEnvStore };
|
package/esm/stores/setting.d.ts
CHANGED
package/esm/stores/user.d.ts
CHANGED
@@ -7,15 +7,11 @@ declare const useUserStore: import("pinia").StoreDefinition<"user", {
|
|
7
7
|
menusFlat: any;
|
8
8
|
debugger: any;
|
9
9
|
env: any;
|
10
|
-
/**
|
11
|
-
* 请求器
|
12
|
-
*/
|
13
|
-
requester: import("../drivers").IRequester;
|
14
10
|
}, {}, {
|
15
11
|
/**
|
16
12
|
* 获取本地缓存中的用户信息;好处:即使手动更改storage数据,也可以里面获取到
|
17
13
|
*/
|
18
|
-
getSso(): any
|
14
|
+
getSso(): Promise<any>;
|
19
15
|
/**
|
20
16
|
* 登录后,获取用户信息
|
21
17
|
*/
|
@@ -23,7 +19,7 @@ declare const useUserStore: import("pinia").StoreDefinition<"user", {
|
|
23
19
|
/**
|
24
20
|
* 通过完整url和请求体,获取授权头
|
25
21
|
*/
|
26
|
-
|
22
|
+
getAuth(url: string, body?: string): Promise<string>;
|
27
23
|
/**
|
28
24
|
* 未登录,获取匿名登录信息
|
29
25
|
*/
|
@@ -39,6 +35,6 @@ declare const useUserStore: import("pinia").StoreDefinition<"user", {
|
|
39
35
|
/**
|
40
36
|
* 退出登录
|
41
37
|
*/
|
42
|
-
logout(): Promise<
|
38
|
+
logout(): Promise<void>;
|
43
39
|
}>;
|
44
40
|
export default useUserStore;
|
@@ -0,0 +1,30 @@
|
|
1
|
+
/**
|
2
|
+
* 事件工具类
|
3
|
+
*/
|
4
|
+
declare class EventUtility {
|
5
|
+
resizeObserver: ResizeObserver;
|
6
|
+
resizeHandler: any;
|
7
|
+
/**
|
8
|
+
* 大小改变事件,已防抖
|
9
|
+
*/
|
10
|
+
resize: (element: Element, handler: Function, debounceMs?: number) => void;
|
11
|
+
/**
|
12
|
+
* 移除大小改变事件
|
13
|
+
*/
|
14
|
+
unresize: (element: Element) => void;
|
15
|
+
lastDebounceTime: number;
|
16
|
+
lastDebounceTimeout: any;
|
17
|
+
/**
|
18
|
+
* 事件防抖: time ms没重复触发才执行指定操作
|
19
|
+
*/
|
20
|
+
debounce: (func: Function, time: number, args?: any) => void;
|
21
|
+
/**
|
22
|
+
* 清空防抖
|
23
|
+
*/
|
24
|
+
clearDebounce: () => void;
|
25
|
+
/**
|
26
|
+
* 事件节流: 指定时间段内只第一次操作被触发
|
27
|
+
*/
|
28
|
+
throttle: () => void;
|
29
|
+
}
|
30
|
+
export default EventUtility;
|