xframelib 0.4.1 → 0.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/api/Token.d.ts +20 -0
- package/dist/api/User.d.ts +45 -0
- package/dist/api/index.d.ts +2 -0
- package/dist/controls/collapsepanel/VCollapsiblePanel.vue.d.ts +26 -0
- package/dist/controls/collapsepanel/VCollapsiblePanelGroup.vue.d.ts +30 -0
- package/dist/controls/collapsepanel/color.util.d.ts +1 -0
- package/dist/controls/collapsepanel/composables/store.d.ts +7 -0
- package/dist/controls/collapsepanel/constant.d.ts +1 -0
- package/dist/controls/collapsepanel/index.d.ts +3 -0
- package/dist/controls/layoutcontainer/LayoutManager.d.ts +107 -0
- package/dist/controls/layoutcontainer/index.d.ts +3 -0
- package/dist/controls/layoutcontainer/layout.vue.d.ts +37 -0
- package/dist/controls/splitpanes/index.d.ts +3 -0
- package/dist/controls/vuewindow/SinglePointerEvent.d.ts +23 -0
- package/dist/controls/vuewindow/dom.d.ts +16 -0
- package/dist/controls/vuewindow/draggable_helper.d.ts +20 -0
- package/dist/controls/vuewindow/index.d.ts +6 -0
- package/dist/controls/vuewindow/resizable_helper.d.ts +16 -0
- package/dist/controls/vuewindow/style.d.ts +110 -0
- package/dist/controls/vuewindow/window/Button.vue.d.ts +26 -0
- package/dist/controls/vuewindow/window/index.vue.d.ts +160 -0
- package/dist/controls/vuewindow/window/utils.d.ts +17 -0
- package/dist/controls/vuewindow/z_element.d.ts +11 -0
- package/dist/core/Global.d.ts +26 -0
- package/dist/core/IModel.d.ts +34 -0
- package/dist/core/MsgHelper.d.ts +12 -0
- package/dist/core/SysEvents.d.ts +23 -0
- package/dist/core/index.d.ts +3 -0
- package/dist/hprose/HproseClient.d.ts +20 -0
- package/dist/hprose/ProxyClient.d.ts +22 -0
- package/dist/hprose/index.d.ts +11 -0
- package/dist/index.cjs +3 -8
- package/dist/index.css +69 -0
- package/dist/index.d.ts +10 -1116
- package/dist/index.js +3 -8
- package/dist/mitt/index.d.ts +25 -0
- package/dist/model/Config.d.ts +94 -0
- package/dist/model/Constants.d.ts +15 -0
- package/dist/model/Layout.d.ts +75 -0
- package/dist/model/Token.d.ts +66 -0
- package/dist/model/index.d.ts +4 -0
- package/dist/public/mitm.html +166 -0
- package/dist/public/sw.js +128 -0
- package/dist/utils/AxiosHelper.d.ts +58 -0
- package/dist/utils/BigFileDownload.d.ts +117 -0
- package/dist/utils/Color.d.ts +74 -0
- package/dist/utils/FileDownload.d.ts +36 -0
- package/dist/utils/FileUpload.d.ts +90 -0
- package/dist/utils/H5Tool.d.ts +98 -0
- package/dist/utils/IsTool.d.ts +101 -0
- package/dist/utils/JQuery.d.ts +35 -0
- package/dist/utils/LockHelper.d.ts +17 -0
- package/dist/utils/Storage.d.ts +57 -0
- package/dist/utils/StringUtils.d.ts +15 -0
- package/dist/utils/Time.d.ts +1 -0
- package/dist/utils/TokenHelper.d.ts +18 -0
- package/dist/utils/URLTool.d.ts +18 -0
- package/dist/utils/index.d.ts +16 -0
- package/dist/utils/uuid.d.ts +3 -0
- package/package.json +15 -15
package/dist/index.d.ts
CHANGED
|
@@ -1,1116 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
hproseInvoke(methodName: string, args?: any[] | undefined): Promise<any>;
|
|
12
|
-
hproseInvokeContext(methodName: string, context: ClientContext | undefined, ...args: any): Promise<any>;
|
|
13
|
-
/**
|
|
14
|
-
* 编码参数方式请求
|
|
15
|
-
* @param request
|
|
16
|
-
*/
|
|
17
|
-
hproseInvokeEncode(requestParamsEncode: string): Promise<any>;
|
|
18
|
-
/**
|
|
19
|
-
* 对请求参数编码
|
|
20
|
-
* @param name 方法名
|
|
21
|
-
* @param args 请求参数
|
|
22
|
-
*/
|
|
23
|
-
encodeRequest(name: string, ...args: any): string;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
declare type EventType = string | symbol;
|
|
27
|
-
declare type Handler<T = any> = (event?: T) => void;
|
|
28
|
-
declare type WildcardHandler = (type: EventType, event?: any) => void;
|
|
29
|
-
declare type EventHandlerList = Array<Handler>;
|
|
30
|
-
declare type WildCardEventHandlerList = Array<WildcardHandler>;
|
|
31
|
-
declare type EventHandlerMap = Map<EventType, EventHandlerList | WildCardEventHandlerList>;
|
|
32
|
-
interface Emitter {
|
|
33
|
-
all: EventHandlerMap;
|
|
34
|
-
on<T = any>(type: EventType, handler: Handler<T>): void;
|
|
35
|
-
on(type: '*', handler: WildcardHandler): void;
|
|
36
|
-
off<T = any>(type: EventType, handler: Handler<T>): void;
|
|
37
|
-
off(type: '*', handler: WildcardHandler): void;
|
|
38
|
-
emit<T = any>(type: EventType, event?: T): void;
|
|
39
|
-
emit(type: '*', event?: any): void;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* 默认全局总线对象
|
|
43
|
-
*/
|
|
44
|
-
declare const GlobalMitt: Emitter;
|
|
45
|
-
|
|
46
|
-
declare class MsgHelper {
|
|
47
|
-
private message;
|
|
48
|
-
private eventBus;
|
|
49
|
-
constructor(messageui: any, eventbus?: Emitter | undefined);
|
|
50
|
-
/**共用消息 */
|
|
51
|
-
msg(msgInfo: string, seconds?: number, typename?: string): void;
|
|
52
|
-
info(msgInfo: string, seconds?: number): void;
|
|
53
|
-
warn(msgInfo: string, seconds?: number): void;
|
|
54
|
-
err(msgInfo: string, seconds?: number): void;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* UI界面相关
|
|
59
|
-
*/
|
|
60
|
-
interface IUIObject {
|
|
61
|
-
/**
|
|
62
|
-
* 网站标题
|
|
63
|
-
*/
|
|
64
|
-
SiteTitle: string;
|
|
65
|
-
/**
|
|
66
|
-
* 版权
|
|
67
|
-
*/
|
|
68
|
-
CopyRight: string; //'Copyright ©XXX 2021-2025',
|
|
69
|
-
/**
|
|
70
|
-
* 官方链接
|
|
71
|
-
*/
|
|
72
|
-
WebSite?: string; //网站链接
|
|
73
|
-
/**
|
|
74
|
-
* 超时锁屏时间(单位:秒s)
|
|
75
|
-
*/
|
|
76
|
-
LockTime?: number; //
|
|
77
|
-
/**
|
|
78
|
-
* 其他扩展的属性
|
|
79
|
-
*/
|
|
80
|
-
[props: string]: any;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* 服务URL
|
|
84
|
-
*/
|
|
85
|
-
interface IServiceURL {
|
|
86
|
-
/**
|
|
87
|
-
* 用户登录(统一用户登录)
|
|
88
|
-
*/
|
|
89
|
-
LoginAuthURL: string; //用户验证
|
|
90
|
-
/**
|
|
91
|
-
* Axios普通WebAPI的BaseURL
|
|
92
|
-
* 全局默认的http请求地址(一般与主hprose相同或不同);文件上传地址
|
|
93
|
-
*/
|
|
94
|
-
DefaultWebAPI?: string;
|
|
95
|
-
/**
|
|
96
|
-
* 默认HproseAPI的服务地址
|
|
97
|
-
*/
|
|
98
|
-
DefaultHproseAPI?: string;
|
|
99
|
-
/**
|
|
100
|
-
* 其他扩展的URL属性
|
|
101
|
-
*/
|
|
102
|
-
[props: string]: any;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* 地图相关Keys
|
|
107
|
-
*/
|
|
108
|
-
interface IMapKeys {
|
|
109
|
-
/**
|
|
110
|
-
* 天地图Key
|
|
111
|
-
*/
|
|
112
|
-
TDTKey?: string;
|
|
113
|
-
/**
|
|
114
|
-
* MapboxKey
|
|
115
|
-
*/
|
|
116
|
-
MapboxKey?: string;
|
|
117
|
-
/**
|
|
118
|
-
* Cesium Key
|
|
119
|
-
*/
|
|
120
|
-
CesiumKey?: string;
|
|
121
|
-
/**
|
|
122
|
-
* Google地图Key
|
|
123
|
-
*/
|
|
124
|
-
GoogleKey?: string;
|
|
125
|
-
/**
|
|
126
|
-
* 其他扩展的Key属性
|
|
127
|
-
*/
|
|
128
|
-
[props: string]: any;
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* 系统配置信息
|
|
132
|
-
*/
|
|
133
|
-
interface ISystemConfig {
|
|
134
|
-
/**
|
|
135
|
-
* 用户界面配置
|
|
136
|
-
*/
|
|
137
|
-
UI?: IUIObject;
|
|
138
|
-
/**
|
|
139
|
-
* 服务URL
|
|
140
|
-
*/
|
|
141
|
-
ServiceURL: IServiceURL;
|
|
142
|
-
/**
|
|
143
|
-
* 地图相关Keys
|
|
144
|
-
*/
|
|
145
|
-
MapKeys?: IMapKeys;
|
|
146
|
-
/**
|
|
147
|
-
* API服务路径
|
|
148
|
-
*/
|
|
149
|
-
APIPath?: object; //
|
|
150
|
-
//其他配置信息
|
|
151
|
-
[props: string]: any;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* 当前存储的token对象
|
|
156
|
-
*/
|
|
157
|
-
interface ITokenInfo {
|
|
158
|
-
id: string;
|
|
159
|
-
name: string;
|
|
160
|
-
token: string;
|
|
161
|
-
expire: string;
|
|
162
|
-
refresh: string;
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* 单个token对象内容
|
|
166
|
-
* 与后台相匹配
|
|
167
|
-
*/
|
|
168
|
-
interface IToken {
|
|
169
|
-
/**
|
|
170
|
-
* token内容
|
|
171
|
-
*/
|
|
172
|
-
tokenContent: string;
|
|
173
|
-
/**
|
|
174
|
-
* 超时时间
|
|
175
|
-
*/
|
|
176
|
-
expires: string;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* 双Token接口定义
|
|
181
|
-
*/
|
|
182
|
-
interface IDoubleToken {
|
|
183
|
-
/**
|
|
184
|
-
* 当前有效token
|
|
185
|
-
*/
|
|
186
|
-
accessToken: IToken;
|
|
187
|
-
/**
|
|
188
|
-
* 用于刷新的token
|
|
189
|
-
*/
|
|
190
|
-
refreshToken: IToken;
|
|
191
|
-
}
|
|
192
|
-
/**
|
|
193
|
-
* 系统用户
|
|
194
|
-
*/
|
|
195
|
-
interface ISystemUser {
|
|
196
|
-
/**
|
|
197
|
-
* 用户ID
|
|
198
|
-
*/
|
|
199
|
-
id: string;
|
|
200
|
-
/**
|
|
201
|
-
* 用户名
|
|
202
|
-
*/
|
|
203
|
-
name: string;
|
|
204
|
-
/**
|
|
205
|
-
* 用户组ID
|
|
206
|
-
*/
|
|
207
|
-
groupid?: string;
|
|
208
|
-
photo?: string;
|
|
209
|
-
mobile?: string;
|
|
210
|
-
qq?: string;
|
|
211
|
-
email?: string;
|
|
212
|
-
img?: string;
|
|
213
|
-
issystem?: boolean;
|
|
214
|
-
createtime?: string;
|
|
215
|
-
updatetime?: string;
|
|
216
|
-
issecurity?: boolean;
|
|
217
|
-
appkey?: string;
|
|
218
|
-
role?: string;
|
|
219
|
-
doubleToken?: IDoubleToken;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
interface InnerObject {
|
|
223
|
-
/**
|
|
224
|
-
* 当前登录用户对象
|
|
225
|
-
*/
|
|
226
|
-
User?: ISystemUser;
|
|
227
|
-
/**
|
|
228
|
-
* axios对象
|
|
229
|
-
*/
|
|
230
|
-
Axios: any;
|
|
231
|
-
Config: ISystemConfig;
|
|
232
|
-
EventBus: Emitter;
|
|
233
|
-
DefaultProxyClient: ProxyClient | null | undefined;
|
|
234
|
-
Message?: MsgHelper;
|
|
235
|
-
[props: string]: any;
|
|
236
|
-
}
|
|
237
|
-
/**
|
|
238
|
-
* 初始化配置信息
|
|
239
|
-
*/
|
|
240
|
-
interface XOptions {
|
|
241
|
-
config?: any;
|
|
242
|
-
message?: any;
|
|
243
|
-
axios?: any;
|
|
244
|
-
defaultHproseURL?: string;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
declare const Global: InnerObject;
|
|
248
|
-
/**
|
|
249
|
-
* 通过配置文件初始化系统
|
|
250
|
-
* @param options 配置参数对象
|
|
251
|
-
*/
|
|
252
|
-
declare function initXFrame(options: XOptions): void;
|
|
253
|
-
/**
|
|
254
|
-
* 框架初始化
|
|
255
|
-
* @param messageUI 消息UI
|
|
256
|
-
* @param defaultHproseURL 默认HproseURL
|
|
257
|
-
*/
|
|
258
|
-
declare const init: (messageUI: any, axiosObj: any, defaultHproseURL?: string | undefined) => void;
|
|
259
|
-
/**
|
|
260
|
-
* 获取HproseProxy对象
|
|
261
|
-
* @param hproseURL Hprose服务链接地址
|
|
262
|
-
* @returns Hprose代理对象
|
|
263
|
-
*/
|
|
264
|
-
declare function getProxyClient(hproseURL?: string): ProxyClient | undefined;
|
|
265
|
-
/**
|
|
266
|
-
* 初始化Global.DefaultProxyClient对象
|
|
267
|
-
* @param defaulthproseURL 默认的Hprose服务对象URL
|
|
268
|
-
* @returns ProxyClient对象
|
|
269
|
-
*/
|
|
270
|
-
declare function initDefaultProxyClient(defaulthproseURL?: string): ProxyClient | undefined;
|
|
271
|
-
|
|
272
|
-
declare const SysEvents: {
|
|
273
|
-
HproseServiceErrorEvent: string;
|
|
274
|
-
WebAPIErrorEvent: string;
|
|
275
|
-
AlertInfoEvent: string;
|
|
276
|
-
/**
|
|
277
|
-
* 一般通用警告或错误
|
|
278
|
-
*/
|
|
279
|
-
CommonWarnEvent: string;
|
|
280
|
-
};
|
|
281
|
-
|
|
282
|
-
/**
|
|
283
|
-
* 常用H5相关操作
|
|
284
|
-
*/
|
|
285
|
-
declare class H5Tool {
|
|
286
|
-
/**
|
|
287
|
-
* HTML元素事件监听
|
|
288
|
-
* @param element Window或HTMLElement
|
|
289
|
-
* @param type 事件名称
|
|
290
|
-
* @param handler 处理函数
|
|
291
|
-
*/
|
|
292
|
-
static addHandler(element: Window | HTMLElement | any, type: string, handler: Function): void;
|
|
293
|
-
/**
|
|
294
|
-
* 窗体变化事件
|
|
295
|
-
* @param handlerFunc 窗体变化处理函数
|
|
296
|
-
*/
|
|
297
|
-
static windowResizeHandler(handlerFunc: Function): void;
|
|
298
|
-
/**
|
|
299
|
-
* 是否支持全屏操作
|
|
300
|
-
* @returns true/false
|
|
301
|
-
*/
|
|
302
|
-
static fullscreenEnabled(): boolean;
|
|
303
|
-
/**
|
|
304
|
-
* 全屏
|
|
305
|
-
* @param el HTML元素
|
|
306
|
-
* @param isfull 是否全屏
|
|
307
|
-
*/
|
|
308
|
-
static fullScreen(el: any | Element, isfull: boolean): void;
|
|
309
|
-
/**
|
|
310
|
-
* 进入全屏
|
|
311
|
-
* @param element 全屏要素容器
|
|
312
|
-
*/
|
|
313
|
-
static requestFullScreen(element: any | Element): void;
|
|
314
|
-
/**
|
|
315
|
-
* 退出全屏
|
|
316
|
-
*/
|
|
317
|
-
static exitFullScreen(): void;
|
|
318
|
-
/**
|
|
319
|
-
* 获取全屏的容器元素
|
|
320
|
-
* @returns 全屏的容器元素
|
|
321
|
-
*/
|
|
322
|
-
static fullScreenElement(): Element | HTMLElement | Document | null;
|
|
323
|
-
/**
|
|
324
|
-
* 是否是全屏
|
|
325
|
-
* @returns 全屏状态
|
|
326
|
-
*/
|
|
327
|
-
static isFullScreen(): boolean;
|
|
328
|
-
/**
|
|
329
|
-
* 监听全屏变化状态
|
|
330
|
-
* @param handlerFunc 全屏状态变化的处理函数
|
|
331
|
-
*/
|
|
332
|
-
static onFullScreenChanged(handlerFunc: (isfullscreen: boolean) => any): void;
|
|
333
|
-
/**
|
|
334
|
-
* 解决对象Json化循环引用问题
|
|
335
|
-
* @param key
|
|
336
|
-
* @param value
|
|
337
|
-
* @returns
|
|
338
|
-
*/
|
|
339
|
-
static stringifyCircularHandler(key: string, value: any): any;
|
|
340
|
-
/**
|
|
341
|
-
* 对象Json化——解决循环引用问题
|
|
342
|
-
* @param obj 传入对象参数
|
|
343
|
-
* @returns 无循环引用的新对象
|
|
344
|
-
*/
|
|
345
|
-
static jsonStringify(obj: any): string;
|
|
346
|
-
/**
|
|
347
|
-
* 去掉JSON循环引用关系
|
|
348
|
-
* @param obj 传入对象参数
|
|
349
|
-
* @returns 无循环引用的新对象
|
|
350
|
-
*/
|
|
351
|
-
static jsonParse(obj: any): any;
|
|
352
|
-
/**
|
|
353
|
-
* 获取input File的对象的数据路径
|
|
354
|
-
* @param file File对象
|
|
355
|
-
* @returns
|
|
356
|
-
*/
|
|
357
|
-
static getObjectURL(file: any): string | undefined;
|
|
358
|
-
/**
|
|
359
|
-
* 获取文件的短MD5摘要
|
|
360
|
-
* @param fileObj file对象
|
|
361
|
-
* @param handleMd5Result 处理文件MD5结果
|
|
362
|
-
*/
|
|
363
|
-
static getFileShortMD5(fileObj: any, handleMd5Result: (data: {
|
|
364
|
-
isOK: boolean;
|
|
365
|
-
data: string;
|
|
366
|
-
}) => void): any;
|
|
367
|
-
/**
|
|
368
|
-
* 提供MD5值计算
|
|
369
|
-
* @param content 字符串
|
|
370
|
-
* @param needRawHash 是否需要是二进制格式的结果,默认为false
|
|
371
|
-
* @returns MD5值
|
|
372
|
-
*/
|
|
373
|
-
static MD5(content: string, needRawHash?: boolean): string;
|
|
374
|
-
/**
|
|
375
|
-
* 复制文本
|
|
376
|
-
* @param text
|
|
377
|
-
*/
|
|
378
|
-
static copyText: (text: string) => Promise<unknown>;
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
declare class StringUtils {
|
|
382
|
-
/**
|
|
383
|
-
* 判断字符串是否为空或undefined,不判断为0,不判断为false
|
|
384
|
-
* @param str
|
|
385
|
-
* @returns {boolean}
|
|
386
|
-
*/
|
|
387
|
-
static isNullOrEmpty: (str: any) => boolean;
|
|
388
|
-
static isNotEmpty: (str: any) => boolean;
|
|
389
|
-
/**
|
|
390
|
-
* / _ - 转换成驼峰并将view替换成空字符串
|
|
391
|
-
* @param {*} name name
|
|
392
|
-
*/
|
|
393
|
-
static toHump(name: any): any;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
/**
|
|
397
|
-
* 创建本地缓存对象
|
|
398
|
-
*/
|
|
399
|
-
declare class StorageHelper {
|
|
400
|
-
private prefixKey;
|
|
401
|
-
private storage;
|
|
402
|
-
constructor(prefixKey?: string, storage?: Storage);
|
|
403
|
-
private getKey;
|
|
404
|
-
/**
|
|
405
|
-
* @description 设置缓存
|
|
406
|
-
* @param {string} key 缓存键
|
|
407
|
-
* @param {*} value 缓存值
|
|
408
|
-
* @param expire
|
|
409
|
-
*/
|
|
410
|
-
set(key: string, value: any, expire?: number | null): void;
|
|
411
|
-
/**
|
|
412
|
-
* 读取缓存
|
|
413
|
-
* @param {string} key 缓存键
|
|
414
|
-
* @param {*=} def 默认值
|
|
415
|
-
*/
|
|
416
|
-
get(key: string, def?: any): any;
|
|
417
|
-
/**
|
|
418
|
-
* 从缓存删除某项
|
|
419
|
-
* @param {string} key
|
|
420
|
-
*/
|
|
421
|
-
remove(key: string): void;
|
|
422
|
-
/**
|
|
423
|
-
* 清空所有缓存
|
|
424
|
-
* @memberOf Cache
|
|
425
|
-
*/
|
|
426
|
-
clear(): void;
|
|
427
|
-
/**
|
|
428
|
-
* 设置cookie
|
|
429
|
-
* @param {string} name cookie 名称
|
|
430
|
-
* @param {*} value cookie 值
|
|
431
|
-
* @param {number=} expire 过期时间
|
|
432
|
-
* 如果过期时间为设置,默认关闭浏览器自动删除
|
|
433
|
-
* @example
|
|
434
|
-
*/
|
|
435
|
-
setCookie(name: string, value: any, expire?: number | null): void;
|
|
436
|
-
/**
|
|
437
|
-
* 根据名字获取cookie值
|
|
438
|
-
* @param name
|
|
439
|
-
*/
|
|
440
|
-
getCookie(name: string): string;
|
|
441
|
-
/**
|
|
442
|
-
* 根据名字删除指定的cookie
|
|
443
|
-
* @param {string} key
|
|
444
|
-
*/
|
|
445
|
-
removeCookie(key: string): void;
|
|
446
|
-
/**
|
|
447
|
-
* 清空cookie,使所有cookie失效
|
|
448
|
-
*/
|
|
449
|
-
clearCookie(): void;
|
|
450
|
-
}
|
|
451
|
-
declare const storage: StorageHelper;
|
|
452
|
-
|
|
453
|
-
declare function uuid(): string;
|
|
454
|
-
declare function newGuid(): string;
|
|
455
|
-
|
|
456
|
-
/**
|
|
457
|
-
* rgb转十六进制
|
|
458
|
-
* @param colorRGB rgb颜色值
|
|
459
|
-
* @returns
|
|
460
|
-
*/
|
|
461
|
-
declare function getHexColor(colorRGB: string): string;
|
|
462
|
-
/**
|
|
463
|
-
* 十六进制转RGB
|
|
464
|
-
* @param color16 十六进制颜色值
|
|
465
|
-
* @returns
|
|
466
|
-
*/
|
|
467
|
-
declare function getRGBColor(color16: string): string;
|
|
468
|
-
/**
|
|
469
|
-
* 解决十六进制短颜色问题
|
|
470
|
-
* @param colorHex 十六进制颜色
|
|
471
|
-
* @returns
|
|
472
|
-
*/
|
|
473
|
-
declare function getLongHexColor(colorHex: string): string;
|
|
474
|
-
declare enum EnumColor {
|
|
475
|
-
RGBA = 0,
|
|
476
|
-
Hex = 1,
|
|
477
|
-
Hsla = 2
|
|
478
|
-
}
|
|
479
|
-
/**
|
|
480
|
-
* 判断是否是16进制颜色
|
|
481
|
-
* @param colorStr 颜色字符串
|
|
482
|
-
* @returns
|
|
483
|
-
*/
|
|
484
|
-
declare function isEnumColor(colorStr: string): EnumColor | undefined;
|
|
485
|
-
declare function getRGBColorFromHSLA(colorHSLA: string): string | undefined;
|
|
486
|
-
/**
|
|
487
|
-
* 判断是否 十六进制颜色值.
|
|
488
|
-
* 输入形式可为 #fff000 #f00
|
|
489
|
-
*
|
|
490
|
-
* @param String color 十六进制颜色值
|
|
491
|
-
* @return Boolean
|
|
492
|
-
*/
|
|
493
|
-
declare function isHexColor(color: string): boolean;
|
|
494
|
-
/**
|
|
495
|
-
* RGB 颜色值转换为 十六进制颜色值.
|
|
496
|
-
* r, g, 和 b 需要在 [0, 255] 范围内
|
|
497
|
-
*
|
|
498
|
-
* @return String 类似#ff00ff
|
|
499
|
-
* @param r
|
|
500
|
-
* @param g
|
|
501
|
-
* @param b
|
|
502
|
-
*/
|
|
503
|
-
declare function rgbToHex(r: number, g: number, b: number): string;
|
|
504
|
-
/**
|
|
505
|
-
* Transform a HEX color to its RGB representation
|
|
506
|
-
* @param {string} hex The color to transform
|
|
507
|
-
* @returns The RGB representation of the passed color
|
|
508
|
-
*/
|
|
509
|
-
declare function hexToRGB(hex: string): string;
|
|
510
|
-
declare function colorIsDark(color: string): boolean | undefined;
|
|
511
|
-
/**
|
|
512
|
-
* Darkens a HEX color given the passed percentage
|
|
513
|
-
* @param {string} color The color to process
|
|
514
|
-
* @param {number} amount The amount to change the color by
|
|
515
|
-
* @returns {string} The HEX representation of the processed color
|
|
516
|
-
*/
|
|
517
|
-
declare function darken(color: string, amount: number): string;
|
|
518
|
-
/**
|
|
519
|
-
* Lightens a 6 char HEX color according to the passed percentage
|
|
520
|
-
* @param {string} color The color to change
|
|
521
|
-
* @param {number} amount The amount to change the color by
|
|
522
|
-
* @returns {string} The processed color represented as HEX
|
|
523
|
-
*/
|
|
524
|
-
declare function lighten(color: string, amount: number): string;
|
|
525
|
-
/**
|
|
526
|
-
* Determines what the best text color is (black or white) based con the contrast with the background
|
|
527
|
-
* @param hexColor - Last selected color by the user
|
|
528
|
-
*/
|
|
529
|
-
declare function calculateBestTextColor(hexColor: string): "#000000" | "#FFFFFF";
|
|
530
|
-
|
|
531
|
-
/**
|
|
532
|
-
* 下载文件
|
|
533
|
-
* @param content 文本或二进制文件
|
|
534
|
-
* @param filename 文件名
|
|
535
|
-
*/
|
|
536
|
-
declare const Download: (content: string | any, filename: string) => void;
|
|
537
|
-
/**
|
|
538
|
-
* URL方式保存文件到本地
|
|
539
|
-
* @param data 文件的blob数据
|
|
540
|
-
* @param name 文件名
|
|
541
|
-
*/
|
|
542
|
-
declare function SaveAs(data: string | any, name: string): void;
|
|
543
|
-
/**
|
|
544
|
-
* JSON对象下载为.json文件
|
|
545
|
-
* @param jsonObject Json对象
|
|
546
|
-
* @param jsonID 名称(不需要后缀名)
|
|
547
|
-
*/
|
|
548
|
-
declare const JsonDownload: (jsonObject: object, jsonID: string) => void;
|
|
549
|
-
/**
|
|
550
|
-
* 从Web上下载文件
|
|
551
|
-
* (通过axios下载)
|
|
552
|
-
* @param requestUrl URL下载地址
|
|
553
|
-
* @param fileName 文件名
|
|
554
|
-
*/
|
|
555
|
-
declare const HttpDownload: (axios: any, requestUrl: string, fileName: string) => void;
|
|
556
|
-
/**
|
|
557
|
-
* 根据文件地址下载文件
|
|
558
|
-
* (网站内部文件或外部图片地址)
|
|
559
|
-
* @param {*} sUrl
|
|
560
|
-
*/
|
|
561
|
-
declare function DownloadByUrl({ url, target, fileName }: {
|
|
562
|
-
url: string;
|
|
563
|
-
target?: '_self' | '_blank';
|
|
564
|
-
fileName?: string;
|
|
565
|
-
}): Promise<boolean>;
|
|
566
|
-
|
|
567
|
-
declare function sleep(delay: any): void;
|
|
568
|
-
|
|
569
|
-
declare type ResponseType = 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream';
|
|
570
|
-
/**
|
|
571
|
-
* Get服务请求
|
|
572
|
-
* @param apiUrl API接口路径
|
|
573
|
-
* @param baseUrl 基础服务路径
|
|
574
|
-
* @param _params 参数
|
|
575
|
-
* @param headers headers参数
|
|
576
|
-
* @param responseType 响应类型,默认为json
|
|
577
|
-
* @param cancelToken 取消标识
|
|
578
|
-
* @returns 返回Promise对象
|
|
579
|
-
*/
|
|
580
|
-
declare function requestGet(apiUrl: string, baseUrl?: string, _params?: any, headers?: any, responseType?: ResponseType, cancelToken?: any): Promise<any>;
|
|
581
|
-
/**
|
|
582
|
-
* Post服务请求-FormData
|
|
583
|
-
* @param apiUrl API接口路径
|
|
584
|
-
* @param baseUrl 基础服务路径
|
|
585
|
-
* @param _params 参数
|
|
586
|
-
* @param headers headers参数
|
|
587
|
-
* @returns 返回Promise对象
|
|
588
|
-
*/
|
|
589
|
-
declare function requestPost(apiUrl: string, baseUrl?: string, _bodyParams?: any, _queryParams?: any, headers?: any, responseType?: ResponseType): Promise<any>;
|
|
590
|
-
/**
|
|
591
|
-
* Post服务请求-Body方式
|
|
592
|
-
* @param apiUrl API接口路径
|
|
593
|
-
* @param baseUrl 基础服务路径
|
|
594
|
-
* @param _params 参数
|
|
595
|
-
* @returns 返回Promise对象
|
|
596
|
-
*/
|
|
597
|
-
declare function requestPostBody(apiUrl: string, baseUrl?: string, _bodyParams?: any, _queryParams?: any, headers?: any, responseType?: ResponseType): Promise<any>;
|
|
598
|
-
/**
|
|
599
|
-
* 业务服务Get请求
|
|
600
|
-
* @param apiUrl API接口路径
|
|
601
|
-
* @param _params 参数
|
|
602
|
-
* @returns 返回Promise对象
|
|
603
|
-
*/
|
|
604
|
-
declare function get(apiUrl: string, _params?: any): Promise<any>;
|
|
605
|
-
/**
|
|
606
|
-
* 业务服务Post请求
|
|
607
|
-
* @param apiUrl API接口路径
|
|
608
|
-
* @param _params 参数
|
|
609
|
-
* @returns 返回Promise对象
|
|
610
|
-
*/
|
|
611
|
-
declare function post(apiUrl: string, _params?: any): Promise<any>;
|
|
612
|
-
/**
|
|
613
|
-
* 独立的外部Get请求(无token验证信息)
|
|
614
|
-
* @param fullRequestURL 完整请求路径
|
|
615
|
-
* @param _params 请求参数
|
|
616
|
-
* @returns 返回Promise对象
|
|
617
|
-
*/
|
|
618
|
-
declare function getData(fullRequestURL: string, _params?: any): Promise<any>;
|
|
619
|
-
|
|
620
|
-
declare const storageHelper: StorageHelper;
|
|
621
|
-
/**
|
|
622
|
-
* 获取token中的授权Key
|
|
623
|
-
* @returns
|
|
624
|
-
*/
|
|
625
|
-
declare function getLocalToken(): ITokenInfo;
|
|
626
|
-
/**
|
|
627
|
-
* 清除本地Token
|
|
628
|
-
*/
|
|
629
|
-
declare function clearLocalToken(): void;
|
|
630
|
-
/**
|
|
631
|
-
* 获得RefreshToken
|
|
632
|
-
* @returns
|
|
633
|
-
*/
|
|
634
|
-
declare function getRefreshToken(): string;
|
|
635
|
-
|
|
636
|
-
declare type FileEventName = 'attempt' | 'attemptFailure' | 'chunkSuccess' | 'error' | 'offline' | 'online' | 'progress' | 'success';
|
|
637
|
-
declare type AllowedMethods = 'PUT' | 'POST' | 'PATCH';
|
|
638
|
-
/**
|
|
639
|
-
* 文件上传配置
|
|
640
|
-
*/
|
|
641
|
-
interface FileUploadOptions {
|
|
642
|
-
endpoint: string | ((file?: File) => Promise<string>);
|
|
643
|
-
file: File;
|
|
644
|
-
method?: AllowedMethods;
|
|
645
|
-
headers?: XhrHeaders;
|
|
646
|
-
maxFileSize?: number;
|
|
647
|
-
chunkSize?: number;
|
|
648
|
-
attempts?: number;
|
|
649
|
-
/**
|
|
650
|
-
* 单位:秒
|
|
651
|
-
*/
|
|
652
|
-
delayBeforeAttempt?: number;
|
|
653
|
-
md5?: string;
|
|
654
|
-
}
|
|
655
|
-
/**
|
|
656
|
-
* 文件上传类
|
|
657
|
-
*/
|
|
658
|
-
declare class FileUpload {
|
|
659
|
-
endpoint: string | ((file?: File) => Promise<string>);
|
|
660
|
-
file: File;
|
|
661
|
-
headers: XhrHeaders;
|
|
662
|
-
method: AllowedMethods;
|
|
663
|
-
chunkSize: number;
|
|
664
|
-
attempts: number;
|
|
665
|
-
delayBeforeAttempt: number;
|
|
666
|
-
md5: string;
|
|
667
|
-
private chunk?;
|
|
668
|
-
private chunkCount;
|
|
669
|
-
private chunkByteSize;
|
|
670
|
-
private maxFileBytes;
|
|
671
|
-
private endpointValue?;
|
|
672
|
-
private totalChunks;
|
|
673
|
-
private attemptCount;
|
|
674
|
-
private offline;
|
|
675
|
-
private paused;
|
|
676
|
-
private success;
|
|
677
|
-
private currentXhr?;
|
|
678
|
-
private reader;
|
|
679
|
-
private eventTarget;
|
|
680
|
-
private fileName;
|
|
681
|
-
constructor(options: FileUploadOptions);
|
|
682
|
-
/**
|
|
683
|
-
* 订阅事件
|
|
684
|
-
*/
|
|
685
|
-
on(FileEventName: FileEventName, fn: (event: any) => void): void;
|
|
686
|
-
abort(): void;
|
|
687
|
-
pause(): void;
|
|
688
|
-
resume(): void;
|
|
689
|
-
/**
|
|
690
|
-
* 发送消息
|
|
691
|
-
*/
|
|
692
|
-
private dispatch;
|
|
693
|
-
/**
|
|
694
|
-
*验证参数的正确性
|
|
695
|
-
*/
|
|
696
|
-
private validateOptions;
|
|
697
|
-
/**
|
|
698
|
-
* Endpoint can either be a URL or a function that returns a promise that resolves to a string.
|
|
699
|
-
*/
|
|
700
|
-
private getEndpoint;
|
|
701
|
-
/**
|
|
702
|
-
* Get portion of the file of x bytes corresponding to chunkSize
|
|
703
|
-
*/
|
|
704
|
-
private getChunk;
|
|
705
|
-
private xhrPromise;
|
|
706
|
-
/**
|
|
707
|
-
* Send chunk of the file with appropriate headers and add post parameters if it's last chunk
|
|
708
|
-
*/
|
|
709
|
-
private sendChunk;
|
|
710
|
-
/**
|
|
711
|
-
* 失败处理和尝试
|
|
712
|
-
*/
|
|
713
|
-
private manageRetries;
|
|
714
|
-
/**
|
|
715
|
-
* 进行分片上传,并处理错误和重试
|
|
716
|
-
*/
|
|
717
|
-
private sendChunks;
|
|
718
|
-
}
|
|
719
|
-
/**
|
|
720
|
-
* 创建文件上传对象方法
|
|
721
|
-
* @param options
|
|
722
|
-
* @returns
|
|
723
|
-
*/
|
|
724
|
-
declare const createFileUpload: (options: FileUploadOptions) => FileUpload;
|
|
725
|
-
|
|
726
|
-
/**
|
|
727
|
-
* 模仿JQuery相关方法
|
|
728
|
-
*/
|
|
729
|
-
declare class JQuery {
|
|
730
|
-
/**
|
|
731
|
-
* 是否有Style类名
|
|
732
|
-
* @param ele HTML元素
|
|
733
|
-
* @param className 类名
|
|
734
|
-
* @returns
|
|
735
|
-
*/
|
|
736
|
-
hasClass(ele: HTMLElement, className: string): RegExpMatchArray | null;
|
|
737
|
-
/**
|
|
738
|
-
* 为元素添加Style类名
|
|
739
|
-
* @param ele HTML元素
|
|
740
|
-
* @param className 类名
|
|
741
|
-
*/
|
|
742
|
-
addClass(ele: HTMLElement, className: string): void;
|
|
743
|
-
/**
|
|
744
|
-
* 移除元素的Style类名
|
|
745
|
-
* @param ele HTML元素
|
|
746
|
-
* @param className 类名
|
|
747
|
-
*/
|
|
748
|
-
removeClass(ele: HTMLElement, className: string): void;
|
|
749
|
-
/**
|
|
750
|
-
* 切换Style类名
|
|
751
|
-
* @param ele HTML元素
|
|
752
|
-
* @param className 类名
|
|
753
|
-
*/
|
|
754
|
-
toggleClass(ele: HTMLElement, className: string): void;
|
|
755
|
-
}
|
|
756
|
-
/**
|
|
757
|
-
* jquery对象
|
|
758
|
-
*/
|
|
759
|
-
declare const jquery: JQuery;
|
|
760
|
-
|
|
761
|
-
interface ILockState {
|
|
762
|
-
isLock: boolean;
|
|
763
|
-
lockTime: number;
|
|
764
|
-
}
|
|
765
|
-
/**
|
|
766
|
-
* 获取当前Lock状态
|
|
767
|
-
* @returns 是否Locked
|
|
768
|
-
*/
|
|
769
|
-
declare function getLockState(): any;
|
|
770
|
-
/**
|
|
771
|
-
* 全局监听Lock
|
|
772
|
-
*/
|
|
773
|
-
declare function onLockListener(): void;
|
|
774
|
-
/**
|
|
775
|
-
* 取消全局监听Lock
|
|
776
|
-
*/
|
|
777
|
-
declare function unLockListener(): void;
|
|
778
|
-
|
|
779
|
-
/**
|
|
780
|
-
* 下载文件信息模型
|
|
781
|
-
*/
|
|
782
|
-
interface IFileMeta {
|
|
783
|
-
id?: string;
|
|
784
|
-
name: string;
|
|
785
|
-
length: number;
|
|
786
|
-
downloadID: string;
|
|
787
|
-
chunkSize?: number;
|
|
788
|
-
}
|
|
789
|
-
/**
|
|
790
|
-
* 文件下载事件
|
|
791
|
-
*/
|
|
792
|
-
declare type FileDownloadEvent = 'init' | 'info' | 'error' | 'downloadProgress' | 'saveProgress' | 'success';
|
|
793
|
-
/**
|
|
794
|
-
* 大文件分片/断点续传下载
|
|
795
|
-
*/
|
|
796
|
-
declare class BigFileDownload {
|
|
797
|
-
private fileID;
|
|
798
|
-
private downloadURL;
|
|
799
|
-
ChunkUnitM: number;
|
|
800
|
-
private chunkByteSize;
|
|
801
|
-
private totalChunks;
|
|
802
|
-
private currentDB?;
|
|
803
|
-
private keys?;
|
|
804
|
-
private fileMetaData;
|
|
805
|
-
private finishNum;
|
|
806
|
-
private eventTarget;
|
|
807
|
-
private cancelSource;
|
|
808
|
-
private isStarting;
|
|
809
|
-
private fileName?;
|
|
810
|
-
constructor(fileID: string, downloadURL: string, chunkSizeM?: number);
|
|
811
|
-
/**
|
|
812
|
-
* 订阅事件
|
|
813
|
-
*/
|
|
814
|
-
on(eventName: FileDownloadEvent, fn: (event: any) => void): void;
|
|
815
|
-
/**
|
|
816
|
-
* 发送消息
|
|
817
|
-
*/
|
|
818
|
-
private dispatch;
|
|
819
|
-
/**
|
|
820
|
-
* 抛出异常信息
|
|
821
|
-
* @param data 异常描述
|
|
822
|
-
*/
|
|
823
|
-
private dispatchError;
|
|
824
|
-
/**
|
|
825
|
-
* 推送文字进度
|
|
826
|
-
* @param data 文字消息
|
|
827
|
-
*/
|
|
828
|
-
private dispatchInfo;
|
|
829
|
-
/**
|
|
830
|
-
* Get请求获取文件元数据信息
|
|
831
|
-
* @param baseURL 根URL路径
|
|
832
|
-
* @param apiPath 方法路径
|
|
833
|
-
* @param queryParams 请求参数
|
|
834
|
-
* @returns IFileMeta
|
|
835
|
-
*/
|
|
836
|
-
queryDownloadFileMeta(baseURL: string, apiPath?: string, queryParams?: any): Promise<IFileMeta | null>;
|
|
837
|
-
/**
|
|
838
|
-
*获取本地的File元数据信息
|
|
839
|
-
*/
|
|
840
|
-
getIFileMeta(): Promise<IFileMeta | null>;
|
|
841
|
-
/**
|
|
842
|
-
* 初始化信息
|
|
843
|
-
*/
|
|
844
|
-
private initIndexDB;
|
|
845
|
-
/**
|
|
846
|
-
* 初始化要下载的文件元数据
|
|
847
|
-
* @param url 下载路径
|
|
848
|
-
* @returns
|
|
849
|
-
*/
|
|
850
|
-
init(fileMeta: IFileMeta): Promise<void>;
|
|
851
|
-
/**
|
|
852
|
-
* 获取分片大小
|
|
853
|
-
* @returns
|
|
854
|
-
*/
|
|
855
|
-
getTotalChunks(): number;
|
|
856
|
-
/**
|
|
857
|
-
* 暂停下载
|
|
858
|
-
*/
|
|
859
|
-
pause(): void;
|
|
860
|
-
/**
|
|
861
|
-
* 重新开始
|
|
862
|
-
*/
|
|
863
|
-
restart(): void;
|
|
864
|
-
/**
|
|
865
|
-
* 删除下载任务
|
|
866
|
-
*/
|
|
867
|
-
delete(): void;
|
|
868
|
-
/**
|
|
869
|
-
* 开始分段下载
|
|
870
|
-
*/
|
|
871
|
-
download(downURL?: string): void;
|
|
872
|
-
/**
|
|
873
|
-
* 下载完成进度
|
|
874
|
-
*/
|
|
875
|
-
private downloadProgress;
|
|
876
|
-
/**
|
|
877
|
-
* 输出保存文件进度-分片统计
|
|
878
|
-
*/
|
|
879
|
-
private outputProgress;
|
|
880
|
-
/**
|
|
881
|
-
* 保存文件
|
|
882
|
-
*/
|
|
883
|
-
private savefile;
|
|
884
|
-
}
|
|
885
|
-
|
|
886
|
-
/**
|
|
887
|
-
* @description: 判断值是否未某个类型
|
|
888
|
-
*/
|
|
889
|
-
declare function is(val: unknown, type: string): boolean;
|
|
890
|
-
/**
|
|
891
|
-
* @description: 是否为函数
|
|
892
|
-
*/
|
|
893
|
-
declare function isFunction<T = Function>(val: unknown): val is T;
|
|
894
|
-
/**
|
|
895
|
-
* @description: 是否已定义
|
|
896
|
-
*/
|
|
897
|
-
declare const isDef: <T = unknown>(val?: T | undefined) => val is T;
|
|
898
|
-
declare const isUnDef: <T = unknown>(val?: T | undefined) => val is T;
|
|
899
|
-
declare function isNull(val: unknown): val is null;
|
|
900
|
-
declare function isNullAndUnDef(val: unknown): val is null | undefined;
|
|
901
|
-
declare function isNullOrUnDef(val: unknown): val is null | undefined;
|
|
902
|
-
/**
|
|
903
|
-
* @description: 是否为对象
|
|
904
|
-
*/
|
|
905
|
-
declare const isObject: (val: any) => val is Record<any, any>;
|
|
906
|
-
/**
|
|
907
|
-
* @description: 是否为时间
|
|
908
|
-
*/
|
|
909
|
-
declare function isDate(val: unknown): val is Date;
|
|
910
|
-
/**
|
|
911
|
-
* @description: 是否为数值
|
|
912
|
-
*/
|
|
913
|
-
declare function isNumber(val: unknown): val is number;
|
|
914
|
-
/**
|
|
915
|
-
* @description: 是否为AsyncFunction
|
|
916
|
-
*/
|
|
917
|
-
declare function isAsyncFunction<T = any>(val: unknown): val is Promise<T>;
|
|
918
|
-
/**
|
|
919
|
-
* @description: 是否为promise
|
|
920
|
-
*/
|
|
921
|
-
declare function isPromise<T = any>(val: unknown): val is Promise<T>;
|
|
922
|
-
/**
|
|
923
|
-
* @description: 是否为字符串
|
|
924
|
-
*/
|
|
925
|
-
declare function isString(val: unknown): val is string;
|
|
926
|
-
/**
|
|
927
|
-
* @description: 是否为boolean类型
|
|
928
|
-
*/
|
|
929
|
-
declare function isBoolean(val: unknown): val is boolean;
|
|
930
|
-
/**
|
|
931
|
-
* @description: 是否为数组
|
|
932
|
-
*/
|
|
933
|
-
declare function isArray(val: any): val is Array<any>;
|
|
934
|
-
/**
|
|
935
|
-
* @description: 是否客户端
|
|
936
|
-
*/
|
|
937
|
-
declare const isClient: () => boolean;
|
|
938
|
-
/**
|
|
939
|
-
* @description: 是否为浏览器
|
|
940
|
-
*/
|
|
941
|
-
declare const isWindow: (val: any) => val is Window;
|
|
942
|
-
declare const isElement: (val: unknown) => val is Element;
|
|
943
|
-
declare const isServer: boolean;
|
|
944
|
-
declare function isImageDom(o: Element): boolean;
|
|
945
|
-
/**
|
|
946
|
-
* 是否为空
|
|
947
|
-
* @param source
|
|
948
|
-
* @returns
|
|
949
|
-
*/
|
|
950
|
-
declare function isEmpty(source: unknown): boolean;
|
|
951
|
-
/**
|
|
952
|
-
* 是否是异常
|
|
953
|
-
* @param val
|
|
954
|
-
* @returns
|
|
955
|
-
*/
|
|
956
|
-
declare function isError(val: unknown): boolean;
|
|
957
|
-
/**
|
|
958
|
-
* 判断元素是否为WeakSet
|
|
959
|
-
* @param source
|
|
960
|
-
* @returns
|
|
961
|
-
*/
|
|
962
|
-
declare function isWeakSet(source: unknown): boolean;
|
|
963
|
-
/**
|
|
964
|
-
* @description 判断元素是否为WeakMap
|
|
965
|
-
* @param {*} source 元素
|
|
966
|
-
* @return {Boolen}
|
|
967
|
-
*/
|
|
968
|
-
declare function isWeakMap(source: unknown): boolean;
|
|
969
|
-
/**
|
|
970
|
-
* @description 判断元素是否为Symbol
|
|
971
|
-
* @param {*} source 元素
|
|
972
|
-
* @return {Boolen}
|
|
973
|
-
*/
|
|
974
|
-
declare function isSymbol(source: unknown): boolean;
|
|
975
|
-
/**
|
|
976
|
-
* @description 判断元素是否为Map
|
|
977
|
-
* @param {*} source 元素
|
|
978
|
-
* @return {Boolen}
|
|
979
|
-
*/
|
|
980
|
-
declare function isMap(source: unknown): boolean;
|
|
981
|
-
/**
|
|
982
|
-
* 是否有效的URL地址
|
|
983
|
-
* @param url
|
|
984
|
-
* @returns
|
|
985
|
-
*/
|
|
986
|
-
declare const isValidURL: (url: string) => boolean;
|
|
987
|
-
|
|
988
|
-
/**
|
|
989
|
-
* 将对象添加当作参数拼接到URL上面
|
|
990
|
-
* @param baseUrl 需要拼接的url
|
|
991
|
-
* @param obj 参数对象
|
|
992
|
-
* @returns {string} 拼接后的对象
|
|
993
|
-
* 例子:
|
|
994
|
-
* let obj = {a: '3', b: '4'}
|
|
995
|
-
* setObjToUrlParams('www.baidu.com', obj)
|
|
996
|
-
* ==>www.baidu.com?a=3&b=4
|
|
997
|
-
*/
|
|
998
|
-
declare function ObjToUrlParams(baseUrl: string, obj: object): string;
|
|
999
|
-
/**
|
|
1000
|
-
* 深入拷贝对象
|
|
1001
|
-
* @param src
|
|
1002
|
-
* @param target
|
|
1003
|
-
* @returns
|
|
1004
|
-
*/
|
|
1005
|
-
declare function deepMerge<T = any>(src?: any, target?: any): T;
|
|
1006
|
-
|
|
1007
|
-
declare class HproseClient {
|
|
1008
|
-
private hproseURL?;
|
|
1009
|
-
client?: Client;
|
|
1010
|
-
private hproseProxy;
|
|
1011
|
-
private static httpTransport?;
|
|
1012
|
-
constructor(url?: string);
|
|
1013
|
-
private init;
|
|
1014
|
-
/**
|
|
1015
|
-
* 获取HproseProxy
|
|
1016
|
-
*/
|
|
1017
|
-
getProxy(): Promise<any>;
|
|
1018
|
-
invoke(methodName: string, args?: any[], context?: ClientContext): Promise<any>;
|
|
1019
|
-
/**
|
|
1020
|
-
* 解码和编码
|
|
1021
|
-
*/
|
|
1022
|
-
encode(name: string, args: any[], context: ClientContext): Uint8Array | undefined;
|
|
1023
|
-
decode(response: Uint8Array, context: ClientContext): any;
|
|
1024
|
-
}
|
|
1025
|
-
|
|
1026
|
-
interface GIHprose {
|
|
1027
|
-
getDefaultClient(): ProxyClient;
|
|
1028
|
-
registerHprose(hpClientName: string, hproseUrl: string): HproseClient | undefined;
|
|
1029
|
-
getHprose(hpClientName: string): HproseClient | undefined;
|
|
1030
|
-
getProxyHprose(hpClientName: string): ProxyClient | undefined;
|
|
1031
|
-
unregisterHprose(hpClientName: string): void;
|
|
1032
|
-
}
|
|
1033
|
-
declare const GlobalHprose: GIHprose;
|
|
1034
|
-
|
|
1035
|
-
/**
|
|
1036
|
-
* 刷新Token
|
|
1037
|
-
*/
|
|
1038
|
-
declare function doRefreshToken(): void;
|
|
1039
|
-
/**
|
|
1040
|
-
* 检查和刷新Token
|
|
1041
|
-
* @param userToken
|
|
1042
|
-
*/
|
|
1043
|
-
declare function checkDoRefreshToken(userToken: ITokenInfo): void;
|
|
1044
|
-
/**
|
|
1045
|
-
* 存储Token对象
|
|
1046
|
-
* @param userToken
|
|
1047
|
-
*/
|
|
1048
|
-
declare function setLocalToken(userToken: IDoubleToken): void;
|
|
1049
|
-
/**
|
|
1050
|
-
* 设置当前用户
|
|
1051
|
-
* @param userInfo
|
|
1052
|
-
*/
|
|
1053
|
-
declare function setUser(userInfo: ISystemUser): void;
|
|
1054
|
-
|
|
1055
|
-
interface IUserInfo {
|
|
1056
|
-
/**
|
|
1057
|
-
* 用户名
|
|
1058
|
-
*/
|
|
1059
|
-
username: string;
|
|
1060
|
-
oldpwd: string;
|
|
1061
|
-
newpwd: string;
|
|
1062
|
-
}
|
|
1063
|
-
interface IUser {
|
|
1064
|
-
username: string;
|
|
1065
|
-
pwd: string;
|
|
1066
|
-
/**
|
|
1067
|
-
* 所属系统
|
|
1068
|
-
*/
|
|
1069
|
-
system?: string;
|
|
1070
|
-
}
|
|
1071
|
-
/**
|
|
1072
|
-
* 用户登录
|
|
1073
|
-
* @param data 用户信息
|
|
1074
|
-
* @returns
|
|
1075
|
-
*/
|
|
1076
|
-
declare function login(data: IUser): Promise<any>;
|
|
1077
|
-
/**
|
|
1078
|
-
* 检查某一系统的用户
|
|
1079
|
-
* @param data 用户对象
|
|
1080
|
-
* @returns
|
|
1081
|
-
*/
|
|
1082
|
-
declare function checkLogin(data: IUser): Promise<any>;
|
|
1083
|
-
/**
|
|
1084
|
-
* 修改密码
|
|
1085
|
-
* @param data 用户数据
|
|
1086
|
-
* @returns
|
|
1087
|
-
*/
|
|
1088
|
-
declare function changePWD(data: IUserInfo): Promise<any>;
|
|
1089
|
-
/**
|
|
1090
|
-
* 退出登录
|
|
1091
|
-
*/
|
|
1092
|
-
declare function logout(): void;
|
|
1093
|
-
/**
|
|
1094
|
-
* 验证 已有的token
|
|
1095
|
-
* @param token 需要验证的token
|
|
1096
|
-
* @returns
|
|
1097
|
-
*/
|
|
1098
|
-
declare function checkToken(token: string): Promise<any>;
|
|
1099
|
-
|
|
1100
|
-
/**
|
|
1101
|
-
* 刷新提前量(毫秒,ms)
|
|
1102
|
-
*/
|
|
1103
|
-
declare const TOKEN_REFRESH_TIME: number;
|
|
1104
|
-
/**
|
|
1105
|
-
* 用户和Token相关服务API
|
|
1106
|
-
*/
|
|
1107
|
-
declare const USER_TOKEN_API: {
|
|
1108
|
-
Login: string;
|
|
1109
|
-
CheckLogin: string;
|
|
1110
|
-
Logout: string;
|
|
1111
|
-
ChangePWD: string;
|
|
1112
|
-
RefreshToken: string;
|
|
1113
|
-
CheckToken: string;
|
|
1114
|
-
};
|
|
1115
|
-
|
|
1116
|
-
export { AllowedMethods, BigFileDownload, Download, DownloadByUrl, Emitter, EnumColor, EventHandlerList, EventHandlerMap, EventType, FileDownloadEvent, FileEventName, FileUploadOptions, GIHprose, Global, GlobalHprose, GlobalMitt, H5Tool, Handler, HproseClient, HttpDownload, IDoubleToken, IFileMeta, ILockState, IMapKeys, IServiceURL, ISystemConfig, ISystemUser, IToken, ITokenInfo, IUIObject, IUser, JsonDownload, ObjToUrlParams, ProxyClient, ResponseType, SaveAs, StorageHelper as Storage, StringUtils, SysEvents, TOKEN_REFRESH_TIME, USER_TOKEN_API, WildCardEventHandlerList, WildcardHandler, calculateBestTextColor, changePWD, checkDoRefreshToken, checkLogin, checkToken, clearLocalToken, colorIsDark, createFileUpload, darken, deepMerge, doRefreshToken, get, getData, getHexColor, getLocalToken, getLockState, getLongHexColor, getProxyClient, getRGBColor, getRGBColorFromHSLA, getRefreshToken, hexToRGB, init, initDefaultProxyClient, initXFrame, is, isArray, isAsyncFunction, isBoolean, isClient, isDate, isDef, isElement, isEmpty, isEnumColor, isError, isFunction, isHexColor, isImageDom, isMap, isNull, isNullAndUnDef, isNullOrUnDef, isNumber, isObject, isPromise, isServer, isString, isSymbol, isUnDef, isValidURL, isWeakMap, isWeakSet, isWindow, jquery, lighten, login, logout, newGuid, onLockListener, post, requestGet, requestPost, requestPostBody, rgbToHex, setLocalToken, setUser, sleep, storage, storageHelper, unLockListener, uuid };
|
|
1
|
+
export * from './controls/splitpanes';
|
|
2
|
+
export * from './controls/collapsepanel';
|
|
3
|
+
export * from './controls/vuewindow';
|
|
4
|
+
export * from './controls/layoutcontainer';
|
|
5
|
+
export * from './core';
|
|
6
|
+
export * from './mitt';
|
|
7
|
+
export * from './utils';
|
|
8
|
+
export * from './hprose';
|
|
9
|
+
export * from './api';
|
|
10
|
+
export * from './model';
|