@fox-js/foxui-pc 3.0.15 → 4.0.1-1
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/dist/index.cjs.js +5 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.esm.js +4496 -0
- package/dist/index.umd.js +5 -0
- package/dist/style.css +1 -0
- package/dist/style.esm.js +7 -0
- package/dist/types/index.d.ts +1167 -0
- package/package.json +31 -78
- package/README.md +0 -73
- package/dist/index.js +0 -1
- package/dist/index.js.LICENSE.txt +0 -2085
- package/dist/static/font/a55eefecba4edb90144a.eot +0 -0
- package/dist/static/font/a7e3261f45a10bb31b6a.ttf +0 -0
- package/dist/static/font/eb9f400a9c60eb2a67f7.woff +0 -0
- package/dist/static/images/bc617e5a3e06ca9f632d.svg +0 -35
|
@@ -0,0 +1,1167 @@
|
|
|
1
|
+
import type { AllowedComponentProps } from 'vue';
|
|
2
|
+
import { App } from 'vue';
|
|
3
|
+
import { clone } from '@fox-js/fox';
|
|
4
|
+
import { compareTo } from '@fox-js/big-decimal';
|
|
5
|
+
import type { ComponentCustomProps } from 'vue';
|
|
6
|
+
import { ComponentInternalInstance } from 'vue';
|
|
7
|
+
import type { ComponentOptionsMixin } from 'vue';
|
|
8
|
+
import { ComponentPublicInstance } from 'vue';
|
|
9
|
+
import type { ComputedOptions } from 'vue';
|
|
10
|
+
import type { DefineComponent } from 'vue';
|
|
11
|
+
import { divide } from '@fox-js/big-decimal';
|
|
12
|
+
import { ExecuteValidator } from '@fox-js/validator';
|
|
13
|
+
import { extend } from '@fox-js/fox';
|
|
14
|
+
import { isArray } from '@fox-js/fox';
|
|
15
|
+
import { isDate } from '@fox-js/fox';
|
|
16
|
+
import { isEqual } from '@fox-js/fox';
|
|
17
|
+
import { isESModule } from '@fox-js/fox';
|
|
18
|
+
import { isFunction } from '@fox-js/fox';
|
|
19
|
+
import { isMap } from '@fox-js/fox';
|
|
20
|
+
import { isObject } from '@fox-js/fox';
|
|
21
|
+
import { isPlainObject } from '@fox-js/fox';
|
|
22
|
+
import { isPromise } from '@fox-js/fox';
|
|
23
|
+
import { isSet } from '@fox-js/fox';
|
|
24
|
+
import { isString } from '@fox-js/fox';
|
|
25
|
+
import { isSymbol } from '@fox-js/fox';
|
|
26
|
+
import type { MethodOptions } from 'vue';
|
|
27
|
+
import { multiply } from '@fox-js/big-decimal';
|
|
28
|
+
import { negate } from '@fox-js/big-decimal';
|
|
29
|
+
import { numberFormat } from '@fox-js/big-decimal';
|
|
30
|
+
import { Ref } from 'vue';
|
|
31
|
+
import { Rule } from '@fox-js/validator';
|
|
32
|
+
import { toBoolean } from '@fox-js/fox';
|
|
33
|
+
import { toNumber } from '@fox-js/fox';
|
|
34
|
+
import { toTypeString } from '@fox-js/fox';
|
|
35
|
+
import { unNumberFormat } from '@fox-js/big-decimal';
|
|
36
|
+
import { UnwrapNestedRefs } from 'vue';
|
|
37
|
+
import { UnwrapRef } from 'vue';
|
|
38
|
+
import { ValidateMessages } from '@fox-js/validator';
|
|
39
|
+
import { ValidateResult } from '@fox-js/validator';
|
|
40
|
+
import type { VNodeProps } from 'vue';
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* 是否接受value过滤器
|
|
44
|
+
*/
|
|
45
|
+
export declare interface AcceptFilter {
|
|
46
|
+
(value: any): boolean;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* 广播类
|
|
51
|
+
*/
|
|
52
|
+
export declare class Broadcast {
|
|
53
|
+
/**
|
|
54
|
+
* parent
|
|
55
|
+
*/
|
|
56
|
+
private parent;
|
|
57
|
+
/**
|
|
58
|
+
* children
|
|
59
|
+
*/
|
|
60
|
+
private children;
|
|
61
|
+
/**
|
|
62
|
+
* 回调函数注册表
|
|
63
|
+
*/
|
|
64
|
+
private callbacks;
|
|
65
|
+
/**
|
|
66
|
+
* vue instance
|
|
67
|
+
*/
|
|
68
|
+
private instance;
|
|
69
|
+
/**
|
|
70
|
+
* 名称
|
|
71
|
+
*/
|
|
72
|
+
private name?;
|
|
73
|
+
/**
|
|
74
|
+
* 构造函数
|
|
75
|
+
* @param parent
|
|
76
|
+
* @param instance
|
|
77
|
+
* @param name
|
|
78
|
+
*/
|
|
79
|
+
constructor(parent: Broadcast | null, instance: ComponentInternalInstance, name?: string);
|
|
80
|
+
/**
|
|
81
|
+
* 加入孩子节点
|
|
82
|
+
* @param child
|
|
83
|
+
*/
|
|
84
|
+
private addChild;
|
|
85
|
+
/**
|
|
86
|
+
* 移除孩子节点
|
|
87
|
+
* @param child
|
|
88
|
+
*/
|
|
89
|
+
private removeChild;
|
|
90
|
+
/**
|
|
91
|
+
* 销毁
|
|
92
|
+
*/
|
|
93
|
+
destroy(): void;
|
|
94
|
+
/**
|
|
95
|
+
* 发生消息
|
|
96
|
+
* @param matched
|
|
97
|
+
* @param action
|
|
98
|
+
* @param args
|
|
99
|
+
*/
|
|
100
|
+
emit(matched: Matched, action: string, ...args: any[]): Results;
|
|
101
|
+
/**
|
|
102
|
+
* 发生消息(只发给孩子节点)
|
|
103
|
+
* @param matched
|
|
104
|
+
* @param action
|
|
105
|
+
* @param args
|
|
106
|
+
*/
|
|
107
|
+
emitToChildren(matched: Matched, action: string, ...args: any[]): Results;
|
|
108
|
+
/**
|
|
109
|
+
* 注册回调函数
|
|
110
|
+
* @param action
|
|
111
|
+
* @param callback
|
|
112
|
+
* @returns
|
|
113
|
+
*/
|
|
114
|
+
on(action: string, callback: BroadcastCallback): void;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* broadcast callback
|
|
119
|
+
*/
|
|
120
|
+
export declare interface BroadcastCallback {
|
|
121
|
+
(...args: any[]): Result;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export declare const BroadcastKey: unique symbol;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* 清理非数字
|
|
128
|
+
*/
|
|
129
|
+
export declare function clearNonNumber(value: string, allowDot?: boolean, allowMinus?: boolean): string;
|
|
130
|
+
|
|
131
|
+
export { clone }
|
|
132
|
+
|
|
133
|
+
export { compareTo }
|
|
134
|
+
|
|
135
|
+
export declare const Content: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* 创建broadcast
|
|
139
|
+
* @param parent
|
|
140
|
+
* @param name
|
|
141
|
+
* @param callbacks
|
|
142
|
+
* @returns
|
|
143
|
+
*/
|
|
144
|
+
export declare function createBroadcast(instance: ComponentInternalInstance, parent: Broadcast | null, name?: string, callbacks?: Record<string, BroadcastCallback>): Broadcast;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* 创建校验schema
|
|
148
|
+
* @param instance
|
|
149
|
+
* @param parent
|
|
150
|
+
* @param descriptor
|
|
151
|
+
* @returns
|
|
152
|
+
*/
|
|
153
|
+
export declare function createValidateSchema(instance: ComponentInternalInstance, parent: ValidateSchema | null, descriptor: Descriptor): ValidateSchema;
|
|
154
|
+
|
|
155
|
+
export declare const DateItem: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* 防抖函数
|
|
159
|
+
* @param func 函数
|
|
160
|
+
* @param time 防止抖动毫秒数
|
|
161
|
+
* @returns
|
|
162
|
+
*/
|
|
163
|
+
export declare function debounce(func: GenericFunction, time: number): GenericFunction;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* 获取小数长度
|
|
167
|
+
* @param value
|
|
168
|
+
*/
|
|
169
|
+
export declare function decimalLength(value: string | number): number;
|
|
170
|
+
|
|
171
|
+
declare const _default: FoxUIVue;
|
|
172
|
+
export default _default;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* anyNode
|
|
176
|
+
* @param name
|
|
177
|
+
* @param callbacks
|
|
178
|
+
* @returns
|
|
179
|
+
*/
|
|
180
|
+
export declare function defineBroadcast(name?: string, callbacks?: Record<string, BroadcastCallback>): Broadcast | null;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* 安装domain
|
|
184
|
+
* @param name 名称
|
|
185
|
+
* @param props 属性
|
|
186
|
+
* @param ignores 忽略的属性
|
|
187
|
+
* @param exposes 暴露的方法
|
|
188
|
+
* @returns
|
|
189
|
+
*/
|
|
190
|
+
export declare function defineDomain(name: string | null, props: Record<string, any>, ignores?: any[], exposes?: Record<string, BroadcastCallback>): Domain;
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* 定义domain item
|
|
194
|
+
* @returns
|
|
195
|
+
*/
|
|
196
|
+
export declare function defineItem(descriptor: Descriptor, name?: string, exposes?: Record<string, BroadcastCallback>): DomainItem;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* 创建page state
|
|
200
|
+
*
|
|
201
|
+
* @param domain
|
|
202
|
+
* @param overrideProps
|
|
203
|
+
*/
|
|
204
|
+
export declare function definePageState(domain: Domain, overrideProps?: Record<string, unknown>): UnwrapNestedRefs<PageState> | null;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* 删除公共校验器
|
|
208
|
+
* @param type
|
|
209
|
+
*/
|
|
210
|
+
export declare function deleteGlobalValidator(type: string): void;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* 组件描述
|
|
214
|
+
*/
|
|
215
|
+
export declare interface Descriptor {
|
|
216
|
+
componentName: string;
|
|
217
|
+
fieldName?: string;
|
|
218
|
+
valueName?: string;
|
|
219
|
+
valueType?: ValueType;
|
|
220
|
+
validate?: boolean;
|
|
221
|
+
validateHandler?: ValidateHandler;
|
|
222
|
+
validateCheckEvents?: string[];
|
|
223
|
+
validateResetEvents?: string[];
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export declare const DialogItem: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* 禁用属性
|
|
230
|
+
* @param source
|
|
231
|
+
*/
|
|
232
|
+
export declare function disabledProperty(source: Ref): Ref;
|
|
233
|
+
|
|
234
|
+
export { divide }
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Domain
|
|
238
|
+
*/
|
|
239
|
+
export declare class Domain {
|
|
240
|
+
/**
|
|
241
|
+
* 父亲domain
|
|
242
|
+
*/
|
|
243
|
+
private _parent;
|
|
244
|
+
get parent(): Domain | null;
|
|
245
|
+
set parent(val: Domain | null);
|
|
246
|
+
/**
|
|
247
|
+
* 名称
|
|
248
|
+
*/
|
|
249
|
+
private _name;
|
|
250
|
+
get name(): string | null;
|
|
251
|
+
/**
|
|
252
|
+
* 广播器
|
|
253
|
+
*/
|
|
254
|
+
private _broadcast;
|
|
255
|
+
get broadcast(): Broadcast | null;
|
|
256
|
+
set broadcast(val: Broadcast | null);
|
|
257
|
+
/**
|
|
258
|
+
* 校验器
|
|
259
|
+
*/
|
|
260
|
+
private _validateSchema;
|
|
261
|
+
get validateSchema(): ValidateSchema | null;
|
|
262
|
+
set validateSchema(val: ValidateSchema | null);
|
|
263
|
+
/**
|
|
264
|
+
* 属性集合
|
|
265
|
+
*/
|
|
266
|
+
private _props;
|
|
267
|
+
/**
|
|
268
|
+
* 构造函数
|
|
269
|
+
* @param name
|
|
270
|
+
*/
|
|
271
|
+
constructor(name?: string | null);
|
|
272
|
+
/**
|
|
273
|
+
* 销毁
|
|
274
|
+
*/
|
|
275
|
+
destroy(): void;
|
|
276
|
+
/**
|
|
277
|
+
* 合并属性
|
|
278
|
+
* @param props
|
|
279
|
+
*/
|
|
280
|
+
merge(props: Record<string | number, any>, ignores?: any[]): void;
|
|
281
|
+
/**
|
|
282
|
+
* 判断是否有属性
|
|
283
|
+
*/
|
|
284
|
+
has(key: string | number): boolean;
|
|
285
|
+
/**
|
|
286
|
+
* 删除属性
|
|
287
|
+
* @param key
|
|
288
|
+
*/
|
|
289
|
+
delete(key: string | number): void;
|
|
290
|
+
/**
|
|
291
|
+
* 设置属性
|
|
292
|
+
* @param key
|
|
293
|
+
* @param value
|
|
294
|
+
*/
|
|
295
|
+
set(key: string | number, value: any): void;
|
|
296
|
+
/**
|
|
297
|
+
* 获取属性
|
|
298
|
+
*
|
|
299
|
+
* @param key
|
|
300
|
+
* @param defaultValue
|
|
301
|
+
*/
|
|
302
|
+
get(key: string | number, defaultValue?: any): any;
|
|
303
|
+
/**
|
|
304
|
+
* 获取属性
|
|
305
|
+
*
|
|
306
|
+
* @param key
|
|
307
|
+
* @param defaultValue
|
|
308
|
+
*/
|
|
309
|
+
getForParent(key: string | number, defaultValue?: any): any;
|
|
310
|
+
/**
|
|
311
|
+
* 获取self属性
|
|
312
|
+
* @param key
|
|
313
|
+
* @returns
|
|
314
|
+
*/
|
|
315
|
+
getForSelf(key: string | number): any;
|
|
316
|
+
/**
|
|
317
|
+
* 从继承关系中获取属性集合
|
|
318
|
+
* @param key
|
|
319
|
+
*/
|
|
320
|
+
getAll(key: string | number): any[];
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* domain item
|
|
325
|
+
*/
|
|
326
|
+
export declare interface DomainItem {
|
|
327
|
+
broadcast: Broadcast;
|
|
328
|
+
validateSchema: ValidateSchema;
|
|
329
|
+
emitEvent: {
|
|
330
|
+
(type: string, ...args: any[]): void;
|
|
331
|
+
};
|
|
332
|
+
onEvent: {
|
|
333
|
+
(type: string, listener: EventListener_2): void;
|
|
334
|
+
};
|
|
335
|
+
offEvent: {
|
|
336
|
+
(type: string, listener: EventListener_2): void;
|
|
337
|
+
};
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* domain key
|
|
342
|
+
*/
|
|
343
|
+
export declare const DomainKey: unique symbol;
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* event listener
|
|
347
|
+
*/
|
|
348
|
+
declare interface EventListener_2 {
|
|
349
|
+
(...args: any[]): void;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* 根据排除模版,抽取属性
|
|
354
|
+
* @param src
|
|
355
|
+
* @param excludeTemplates
|
|
356
|
+
* @returns
|
|
357
|
+
*/
|
|
358
|
+
export declare function excludeProps(src: Record<string, any>, ...excludeTemplates: Record<string, any>[]): Record<string, any>;
|
|
359
|
+
|
|
360
|
+
export { extend }
|
|
361
|
+
|
|
362
|
+
export declare const floatData: (format: any, dataOp: any, mapOps: any) => any;
|
|
363
|
+
|
|
364
|
+
export declare const FooterBar: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* Fox UI
|
|
368
|
+
*/
|
|
369
|
+
declare interface FoxUI {
|
|
370
|
+
/**
|
|
371
|
+
* 版本号
|
|
372
|
+
*/
|
|
373
|
+
version: string;
|
|
374
|
+
/**
|
|
375
|
+
* 安装
|
|
376
|
+
* @param app
|
|
377
|
+
* @param options
|
|
378
|
+
*/
|
|
379
|
+
install(app: App, options: FoxUIOptions): void;
|
|
380
|
+
/**
|
|
381
|
+
* 初始化page Layout
|
|
382
|
+
*
|
|
383
|
+
* @param options
|
|
384
|
+
* @param rootDomain
|
|
385
|
+
*/
|
|
386
|
+
initPageLayout(options: FoxUIOptions, rootDomain?: Domain): void;
|
|
387
|
+
/**
|
|
388
|
+
* 设置scope getter
|
|
389
|
+
* @param getter
|
|
390
|
+
*/
|
|
391
|
+
setScopeGetter(getter: ScopeGetter): void;
|
|
392
|
+
/**
|
|
393
|
+
* 设置API
|
|
394
|
+
* @param name
|
|
395
|
+
* @param func
|
|
396
|
+
* @param scope
|
|
397
|
+
*/
|
|
398
|
+
setAPI(name: string, func: any, scope?: string): void;
|
|
399
|
+
/**
|
|
400
|
+
* 获取API
|
|
401
|
+
* @param proxy
|
|
402
|
+
* @param name
|
|
403
|
+
* @param scope
|
|
404
|
+
*/
|
|
405
|
+
getAPI(proxy: ComponentPublicInstance, name: string, scope?: string): any | null;
|
|
406
|
+
/**
|
|
407
|
+
* 批量增加api
|
|
408
|
+
* @param apis
|
|
409
|
+
* @param scope
|
|
410
|
+
*/
|
|
411
|
+
batchSetAPI(apis: Record<string, any>, scope?: string): void;
|
|
412
|
+
/**
|
|
413
|
+
* 清空scope apis
|
|
414
|
+
* @param scope
|
|
415
|
+
*/
|
|
416
|
+
clearScopeAPI(scope: string): void;
|
|
417
|
+
/**
|
|
418
|
+
* 获取root domain
|
|
419
|
+
*/
|
|
420
|
+
getRootDomain(): Domain;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* UI Options
|
|
425
|
+
*/
|
|
426
|
+
declare interface FoxUIOptions {
|
|
427
|
+
headerBarHeight?: number;
|
|
428
|
+
footerBarHeight?: number;
|
|
429
|
+
safeAreaInset?: SafeAreaInset;
|
|
430
|
+
pageLayout?: PageLayout;
|
|
431
|
+
headerPadding?: Rect;
|
|
432
|
+
contentPadding?: Rect;
|
|
433
|
+
groupLayout?: GroupLayout;
|
|
434
|
+
labelWidth?: number | string;
|
|
435
|
+
[propName: string]: any;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* Fox UI vue实例
|
|
440
|
+
*/
|
|
441
|
+
declare class FoxUIVue implements FoxUI {
|
|
442
|
+
/**
|
|
443
|
+
* packages
|
|
444
|
+
*/
|
|
445
|
+
private packages;
|
|
446
|
+
/**
|
|
447
|
+
* 安装器
|
|
448
|
+
*/
|
|
449
|
+
private installers;
|
|
450
|
+
/**
|
|
451
|
+
* version
|
|
452
|
+
*/
|
|
453
|
+
private _version;
|
|
454
|
+
get version(): string;
|
|
455
|
+
/**
|
|
456
|
+
* 构造函数
|
|
457
|
+
* @param packages
|
|
458
|
+
* @param version
|
|
459
|
+
*/
|
|
460
|
+
constructor(packages: any[], installers: Installer[], version: string);
|
|
461
|
+
/**
|
|
462
|
+
* 安装
|
|
463
|
+
* @param app
|
|
464
|
+
* @param options
|
|
465
|
+
*/
|
|
466
|
+
install(app: App, options?: FoxUIOptions): void;
|
|
467
|
+
/**
|
|
468
|
+
* 初始化page Layout
|
|
469
|
+
*
|
|
470
|
+
* @param options
|
|
471
|
+
* @param rootDomain
|
|
472
|
+
*/
|
|
473
|
+
initPageLayout(options: FoxUIOptions, rootDomain?: Domain): void;
|
|
474
|
+
/**
|
|
475
|
+
* 设置scope getter
|
|
476
|
+
* @param getter
|
|
477
|
+
*/
|
|
478
|
+
setScopeGetter(getter: ScopeGetter): void;
|
|
479
|
+
/**
|
|
480
|
+
* 设置API
|
|
481
|
+
* @param name
|
|
482
|
+
* @param api
|
|
483
|
+
* @param scope
|
|
484
|
+
*/
|
|
485
|
+
setAPI(name: string, api: any, scope?: string): void;
|
|
486
|
+
/**
|
|
487
|
+
* 获取API
|
|
488
|
+
* @param proxy
|
|
489
|
+
* @param name
|
|
490
|
+
* @param scope
|
|
491
|
+
*/
|
|
492
|
+
getAPI(proxy: ComponentPublicInstance, name: string, scope?: string): any | null;
|
|
493
|
+
/**
|
|
494
|
+
* 批量增加api
|
|
495
|
+
* @param apis
|
|
496
|
+
* @param scope
|
|
497
|
+
*/
|
|
498
|
+
batchSetAPI(apis: Record<string, any>, scope?: string): void;
|
|
499
|
+
/**
|
|
500
|
+
* 清空scope apis
|
|
501
|
+
* @param scope
|
|
502
|
+
*/
|
|
503
|
+
clearScopeAPI(scope: string): void;
|
|
504
|
+
/**
|
|
505
|
+
* 获取root domain
|
|
506
|
+
*/
|
|
507
|
+
getRootDomain(): Domain;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* 通用函数接口
|
|
512
|
+
*/
|
|
513
|
+
export declare interface GenericFunction {
|
|
514
|
+
(...args: any[]): any;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
* 获取公共校验检查事件
|
|
519
|
+
*/
|
|
520
|
+
export declare function getGlobalValidateCheckEvents(): string[];
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* 获取公共校验重置事件
|
|
524
|
+
*/
|
|
525
|
+
export declare function getGlobalValidateResetEvents(): string[];
|
|
526
|
+
|
|
527
|
+
/**
|
|
528
|
+
* 获取page content区域高度(pageHeight - headerHeight - footerHeight - padding )
|
|
529
|
+
* @param domain
|
|
530
|
+
* @param state
|
|
531
|
+
* @returns
|
|
532
|
+
*/
|
|
533
|
+
export declare function getPageContentAreaHeight(domain: Domain, state?: PageState): number;
|
|
534
|
+
|
|
535
|
+
/**
|
|
536
|
+
* 获取page content区域宽度(pageWidth - padding )
|
|
537
|
+
* @param domain
|
|
538
|
+
* @param state
|
|
539
|
+
* @returns
|
|
540
|
+
*/
|
|
541
|
+
export declare function getPageContentAreaWidth(domain: Domain, state?: PageState): number;
|
|
542
|
+
|
|
543
|
+
/**
|
|
544
|
+
* 获取page footer区域高度(footerHeight + SafeAreaBottom )
|
|
545
|
+
* @param domain
|
|
546
|
+
* @param state
|
|
547
|
+
* @returns
|
|
548
|
+
*/
|
|
549
|
+
export declare function getPageFooterAreaHeight(domain: Domain, state?: PageState): number;
|
|
550
|
+
|
|
551
|
+
/**
|
|
552
|
+
* 获取page header区域高度(headerHeight + SafeAreaTop )
|
|
553
|
+
* @param domain
|
|
554
|
+
* @param state
|
|
555
|
+
* @returns
|
|
556
|
+
*/
|
|
557
|
+
export declare function getPageHeaderAreaHeight(domain: Domain, state?: PageState): number;
|
|
558
|
+
|
|
559
|
+
/**
|
|
560
|
+
* 获取root domain
|
|
561
|
+
* @returns
|
|
562
|
+
*/
|
|
563
|
+
export declare function getRootDomain(): Domain;
|
|
564
|
+
|
|
565
|
+
export declare const Group: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
|
|
566
|
+
|
|
567
|
+
/**
|
|
568
|
+
* Layout信息接口
|
|
569
|
+
*/
|
|
570
|
+
declare interface GroupLayout {
|
|
571
|
+
type: string;
|
|
572
|
+
width: number;
|
|
573
|
+
column: number;
|
|
574
|
+
gutter: number;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
export declare const HeaderBar: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
|
|
578
|
+
|
|
579
|
+
export declare const HintText: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
|
|
580
|
+
|
|
581
|
+
/**
|
|
582
|
+
* 根据包含模版,抽取属性
|
|
583
|
+
* @param src
|
|
584
|
+
* @param includeTemplates
|
|
585
|
+
* @returns
|
|
586
|
+
*/
|
|
587
|
+
export declare function includeProps(src: Record<string, any>, ...includeTemplates: Record<string, any>[]): Record<string, any>;
|
|
588
|
+
|
|
589
|
+
/**
|
|
590
|
+
* 获取对应元素的在数组中第一个匹配的索引
|
|
591
|
+
* @param x
|
|
592
|
+
* @param arr
|
|
593
|
+
* @returns
|
|
594
|
+
*/
|
|
595
|
+
export declare function indexOf(x: unknown, arr: unknown[]): number;
|
|
596
|
+
|
|
597
|
+
export declare const InputItem: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
|
|
598
|
+
|
|
599
|
+
/**
|
|
600
|
+
* 安装函数
|
|
601
|
+
*/
|
|
602
|
+
declare interface Installer {
|
|
603
|
+
(app: App, options?: any): void;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
/**
|
|
607
|
+
* 获取整数长度
|
|
608
|
+
* @param value
|
|
609
|
+
*/
|
|
610
|
+
export declare function integerLength(value: string | number): number;
|
|
611
|
+
|
|
612
|
+
export { isArray }
|
|
613
|
+
|
|
614
|
+
/**
|
|
615
|
+
* 是否为浏览器环境
|
|
616
|
+
*/
|
|
617
|
+
export declare const isBrowser: boolean;
|
|
618
|
+
|
|
619
|
+
export { isDate }
|
|
620
|
+
|
|
621
|
+
/**
|
|
622
|
+
* 是否空字符串
|
|
623
|
+
* @param v
|
|
624
|
+
* @returns
|
|
625
|
+
*/
|
|
626
|
+
export declare const isEmptyString: (v: unknown) => boolean;
|
|
627
|
+
|
|
628
|
+
export { isEqual }
|
|
629
|
+
|
|
630
|
+
export { isESModule }
|
|
631
|
+
|
|
632
|
+
export { isFunction }
|
|
633
|
+
|
|
634
|
+
/**
|
|
635
|
+
* 是否为内嵌页面
|
|
636
|
+
* 内嵌页面为内嵌在容器内,如dialog,不需要设置content的高度
|
|
637
|
+
* @param domain
|
|
638
|
+
* @param proxy
|
|
639
|
+
* @returns
|
|
640
|
+
*/
|
|
641
|
+
export declare function isInnerPage(domain: Domain, proxy: any): boolean;
|
|
642
|
+
|
|
643
|
+
export { isMap }
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
* 是否为数字字符串
|
|
647
|
+
* @param value
|
|
648
|
+
* @returns
|
|
649
|
+
*/
|
|
650
|
+
export declare function isNumberString(value: string): boolean;
|
|
651
|
+
|
|
652
|
+
export { isObject }
|
|
653
|
+
|
|
654
|
+
export { isPlainObject }
|
|
655
|
+
|
|
656
|
+
export { isPromise }
|
|
657
|
+
|
|
658
|
+
/**
|
|
659
|
+
* 判断是否为正则表达式
|
|
660
|
+
* @param v
|
|
661
|
+
* @returns
|
|
662
|
+
*/
|
|
663
|
+
export declare function isRegExp(v: unknown): v is RegExp;
|
|
664
|
+
|
|
665
|
+
export { isSet }
|
|
666
|
+
|
|
667
|
+
export { isString }
|
|
668
|
+
|
|
669
|
+
/**
|
|
670
|
+
* 是否子页面
|
|
671
|
+
* @param domain
|
|
672
|
+
*/
|
|
673
|
+
export declare function isSubPage(domain: Domain): boolean;
|
|
674
|
+
|
|
675
|
+
export { isSymbol }
|
|
676
|
+
|
|
677
|
+
export declare const Item: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
|
|
678
|
+
|
|
679
|
+
/**
|
|
680
|
+
* 获取对应元素的在数组中最后一个匹配的索引
|
|
681
|
+
* @param x
|
|
682
|
+
* @param arr
|
|
683
|
+
* @returns
|
|
684
|
+
*/
|
|
685
|
+
export declare function lastIndexOf(x: unknown, arr: unknown[]): number;
|
|
686
|
+
|
|
687
|
+
export declare const Mapping: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
|
|
688
|
+
|
|
689
|
+
/**
|
|
690
|
+
* 匹配条件
|
|
691
|
+
*/
|
|
692
|
+
export declare interface Matched {
|
|
693
|
+
name?: string | RegExp | {
|
|
694
|
+
(name: string): boolean;
|
|
695
|
+
};
|
|
696
|
+
maxLevel?: number;
|
|
697
|
+
level?: number;
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
export { multiply }
|
|
701
|
+
|
|
702
|
+
export { negate }
|
|
703
|
+
|
|
704
|
+
export { numberFormat }
|
|
705
|
+
|
|
706
|
+
/**
|
|
707
|
+
* padding
|
|
708
|
+
*/
|
|
709
|
+
export declare interface Padding {
|
|
710
|
+
left: number | null;
|
|
711
|
+
top: number | null;
|
|
712
|
+
right: number | null;
|
|
713
|
+
bottom: number | null;
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
export declare const Page: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
|
|
717
|
+
|
|
718
|
+
/**
|
|
719
|
+
* page layout
|
|
720
|
+
*/
|
|
721
|
+
export declare interface PageLayout {
|
|
722
|
+
width: number | string;
|
|
723
|
+
height: number | string;
|
|
724
|
+
headerHeight: number | string;
|
|
725
|
+
footerHeight: number | string;
|
|
726
|
+
headerPadding?: Padding;
|
|
727
|
+
footerPadding?: Padding;
|
|
728
|
+
contentPadding?: Padding;
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
export declare interface PageState {
|
|
732
|
+
width: number;
|
|
733
|
+
height: number;
|
|
734
|
+
headerHeight: number;
|
|
735
|
+
headerPadding: Padding;
|
|
736
|
+
footerHeight: number;
|
|
737
|
+
footerPadding: Padding;
|
|
738
|
+
contentHeight: number | string | null;
|
|
739
|
+
contentPadding: Padding;
|
|
740
|
+
safeAreaTop: number;
|
|
741
|
+
safeAreaBottom: number;
|
|
742
|
+
safeAreaLeft: number;
|
|
743
|
+
safeAreaRight: number;
|
|
744
|
+
headerMounted?: boolean;
|
|
745
|
+
footerMounted?: boolean;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
/**
|
|
749
|
+
* 坐标
|
|
750
|
+
*/
|
|
751
|
+
export declare interface Point {
|
|
752
|
+
x: number;
|
|
753
|
+
y: number;
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
export declare const Price: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
|
|
757
|
+
|
|
758
|
+
/**
|
|
759
|
+
* 优先策略
|
|
760
|
+
*/
|
|
761
|
+
export declare enum PriorityPolicy {
|
|
762
|
+
Parent = 0,
|
|
763
|
+
Near = 1
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
/**
|
|
767
|
+
* 属性
|
|
768
|
+
* @param source
|
|
769
|
+
* @param name
|
|
770
|
+
* @param policy
|
|
771
|
+
* @param filter
|
|
772
|
+
*/
|
|
773
|
+
export declare function property(source: Ref, name: string, policy?: PriorityPolicy, filter?: AcceptFilter): Ref;
|
|
774
|
+
|
|
775
|
+
/**
|
|
776
|
+
* 动画
|
|
777
|
+
*/
|
|
778
|
+
export declare const raf: any;
|
|
779
|
+
|
|
780
|
+
/**
|
|
781
|
+
* 只读属性
|
|
782
|
+
* @param source
|
|
783
|
+
*/
|
|
784
|
+
export declare function readonlyProperty(source: Ref): Ref;
|
|
785
|
+
|
|
786
|
+
/**
|
|
787
|
+
* Rect类型
|
|
788
|
+
*/
|
|
789
|
+
declare interface Rect {
|
|
790
|
+
left: number;
|
|
791
|
+
top: number;
|
|
792
|
+
right: number;
|
|
793
|
+
bottom: number;
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
declare interface Rect_2 {
|
|
797
|
+
top: number;
|
|
798
|
+
left: number;
|
|
799
|
+
right: number;
|
|
800
|
+
bottom: number;
|
|
801
|
+
width: number;
|
|
802
|
+
height: number;
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
/**
|
|
806
|
+
* 结果类型
|
|
807
|
+
*/
|
|
808
|
+
export declare type Result = Promise<any> | any;
|
|
809
|
+
|
|
810
|
+
/**
|
|
811
|
+
* 结果集合
|
|
812
|
+
*/
|
|
813
|
+
export declare type Results = Result[];
|
|
814
|
+
|
|
815
|
+
export declare const RowItem: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
|
|
816
|
+
|
|
817
|
+
/**
|
|
818
|
+
* 安全区域
|
|
819
|
+
*/
|
|
820
|
+
export declare interface SafeAreaInset {
|
|
821
|
+
left: number | string;
|
|
822
|
+
top: number | string;
|
|
823
|
+
right: number | string;
|
|
824
|
+
bottom: number | string;
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
/**
|
|
828
|
+
* scope getter
|
|
829
|
+
*/
|
|
830
|
+
declare interface ScopeGetter {
|
|
831
|
+
(proxy: ComponentPublicInstance): string | null;
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
export declare const SelectItem: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
|
|
835
|
+
|
|
836
|
+
/**
|
|
837
|
+
* 设置公共校验检查事件
|
|
838
|
+
* @param events
|
|
839
|
+
*/
|
|
840
|
+
export declare function setGlobalValidateCheckEvents(events: string[]): void;
|
|
841
|
+
|
|
842
|
+
/**
|
|
843
|
+
* 设置公共的校验处理器
|
|
844
|
+
* @param validateHandler
|
|
845
|
+
*/
|
|
846
|
+
export declare function setGlobalValidateHandler(validateHandler: ValidateHandler): void;
|
|
847
|
+
|
|
848
|
+
/**
|
|
849
|
+
* 设置公共校验提示信息
|
|
850
|
+
*/
|
|
851
|
+
export declare function setGlobalValidateMessages(messages: ValidateMessages): void;
|
|
852
|
+
|
|
853
|
+
/**
|
|
854
|
+
* 设置公共校验重置事件
|
|
855
|
+
* @param events
|
|
856
|
+
*/
|
|
857
|
+
export declare function setGlobalValidateResetEvents(events: string[]): void;
|
|
858
|
+
|
|
859
|
+
/**
|
|
860
|
+
* 设置公共校验器
|
|
861
|
+
* @param type
|
|
862
|
+
* @param validator
|
|
863
|
+
*/
|
|
864
|
+
export declare function setGlobalValidator(type: string, validator: ExecuteValidator): void;
|
|
865
|
+
|
|
866
|
+
export declare const SlotItem: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
|
|
867
|
+
|
|
868
|
+
export declare const TableItem: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
|
|
869
|
+
|
|
870
|
+
export declare const TableMappingColumn: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
|
|
871
|
+
|
|
872
|
+
/**
|
|
873
|
+
* 节流函数
|
|
874
|
+
* @param func 函数
|
|
875
|
+
* @param time 延迟执行毫秒数
|
|
876
|
+
* @returns
|
|
877
|
+
*/
|
|
878
|
+
export declare function throttle(func: GenericFunction, time: number): GenericFunction;
|
|
879
|
+
|
|
880
|
+
export declare const TimeItem: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
|
|
881
|
+
|
|
882
|
+
export declare const TimeSelectItem: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
|
|
883
|
+
|
|
884
|
+
export { toBoolean }
|
|
885
|
+
|
|
886
|
+
export { toNumber }
|
|
887
|
+
|
|
888
|
+
/**
|
|
889
|
+
* 转换为number rect
|
|
890
|
+
*/
|
|
891
|
+
export declare function toPadding(rect: any): Padding;
|
|
892
|
+
|
|
893
|
+
/**
|
|
894
|
+
* 转换为px number数值
|
|
895
|
+
* @param value
|
|
896
|
+
* @param size
|
|
897
|
+
*/
|
|
898
|
+
export declare function toPx(value: number | string, size?: number): number;
|
|
899
|
+
|
|
900
|
+
/**
|
|
901
|
+
* to px desc
|
|
902
|
+
* @param value
|
|
903
|
+
* @parma size
|
|
904
|
+
* @returns
|
|
905
|
+
*/
|
|
906
|
+
export declare const toPxDesc: (value: string | number, size?: number) => string;
|
|
907
|
+
|
|
908
|
+
export { toTypeString }
|
|
909
|
+
|
|
910
|
+
/**
|
|
911
|
+
* to model value
|
|
912
|
+
* @param props
|
|
913
|
+
* @param format
|
|
914
|
+
* @returns
|
|
915
|
+
*/
|
|
916
|
+
export declare function toValue(props: UnwrapRef<Record<string, any>>, name?: string, format?: ValueFormat<any, any>): Ref;
|
|
917
|
+
|
|
918
|
+
export declare class UniqueID {
|
|
919
|
+
/**
|
|
920
|
+
* seed id
|
|
921
|
+
*/
|
|
922
|
+
private seed;
|
|
923
|
+
/**
|
|
924
|
+
* 种子
|
|
925
|
+
* @param seed
|
|
926
|
+
*/
|
|
927
|
+
constructor(seed?: number);
|
|
928
|
+
/**
|
|
929
|
+
* 获取唯一ID
|
|
930
|
+
* @returns
|
|
931
|
+
*/
|
|
932
|
+
get(): number;
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
export { unNumberFormat }
|
|
936
|
+
|
|
937
|
+
/**
|
|
938
|
+
* 更新 page state
|
|
939
|
+
* @param state
|
|
940
|
+
* @param pageLayout
|
|
941
|
+
* @param overrideProps
|
|
942
|
+
*/
|
|
943
|
+
export declare function updatePageState(state: PageState, pageLayout: any, overrideProps?: Record<string, unknown>, root?: boolean, rootWidth?: number, rootHeight?: number, headerBarHeight?: number, footerBarHeight?: number): void;
|
|
944
|
+
|
|
945
|
+
/**
|
|
946
|
+
* 使用broadcast
|
|
947
|
+
* @param proxy
|
|
948
|
+
* @returns
|
|
949
|
+
*/
|
|
950
|
+
export declare function useBroadcast(proxy?: ComponentPublicInstance | null): Broadcast | null;
|
|
951
|
+
|
|
952
|
+
/**
|
|
953
|
+
* 获取当前domain
|
|
954
|
+
* @returns
|
|
955
|
+
*/
|
|
956
|
+
export declare function useDomain(instance?: ComponentInternalInstance | null): Domain | null;
|
|
957
|
+
|
|
958
|
+
/**
|
|
959
|
+
* use expose
|
|
960
|
+
* @param apis
|
|
961
|
+
*/
|
|
962
|
+
export declare function useExpose(apis: Record<string, any>, instance?: ComponentInternalInstance | null): void;
|
|
963
|
+
|
|
964
|
+
/**
|
|
965
|
+
* 获取page state
|
|
966
|
+
* @param domain
|
|
967
|
+
* @returns
|
|
968
|
+
*/
|
|
969
|
+
export declare function usePageState(domain: Domain): PageState | null;
|
|
970
|
+
|
|
971
|
+
/**
|
|
972
|
+
* 获取element 位置
|
|
973
|
+
* @param elementRef
|
|
974
|
+
* @returns
|
|
975
|
+
*/
|
|
976
|
+
export declare const usePosition: (elementRef: (Element | Window) | Ref<Element | Window | undefined>) => Point;
|
|
977
|
+
|
|
978
|
+
export declare const useRect: (elementRef: (Element | Window) | Ref<Element | Window | undefined>) => Rect_2;
|
|
979
|
+
|
|
980
|
+
/**
|
|
981
|
+
* 校验条件
|
|
982
|
+
*/
|
|
983
|
+
export declare interface ValidateCondition {
|
|
984
|
+
exclude?: string[];
|
|
985
|
+
include?: string[];
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
/**
|
|
989
|
+
* 校验器handler
|
|
990
|
+
*/
|
|
991
|
+
export declare interface ValidateHandler {
|
|
992
|
+
/**
|
|
993
|
+
* 错误处理
|
|
994
|
+
* @param errorMsg
|
|
995
|
+
* @param proxy
|
|
996
|
+
* @param instance
|
|
997
|
+
*/
|
|
998
|
+
error?(errorMsg: string, proxy: ComponentPublicInstance, instance: ComponentInternalInstance): void;
|
|
999
|
+
/**
|
|
1000
|
+
* 重置处理
|
|
1001
|
+
* @param proxy
|
|
1002
|
+
* @param instance
|
|
1003
|
+
*/
|
|
1004
|
+
reset?(proxy: ComponentPublicInstance, instance: ComponentInternalInstance): void;
|
|
1005
|
+
/**
|
|
1006
|
+
* 成功处理
|
|
1007
|
+
* @param proxy
|
|
1008
|
+
* @param instance
|
|
1009
|
+
*/
|
|
1010
|
+
success?(proxy: ComponentPublicInstance, instance: ComponentInternalInstance): void;
|
|
1011
|
+
/**
|
|
1012
|
+
* 规则装饰处理
|
|
1013
|
+
* @param newRule
|
|
1014
|
+
* @param oldRule
|
|
1015
|
+
* @param proxy
|
|
1016
|
+
* @param instance
|
|
1017
|
+
*/
|
|
1018
|
+
decorate?(newRule: Rule, oldRle: Rule, proxy: ComponentPublicInstance, instance: ComponentInternalInstance): void;
|
|
1019
|
+
/**
|
|
1020
|
+
* 获取value
|
|
1021
|
+
* @param proxy
|
|
1022
|
+
* @param instance
|
|
1023
|
+
*/
|
|
1024
|
+
getValue?(proxy: ComponentPublicInstance, instance: ComponentInternalInstance): any;
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
/**
|
|
1028
|
+
* 校验器schema
|
|
1029
|
+
*/
|
|
1030
|
+
export declare class ValidateSchema {
|
|
1031
|
+
/**
|
|
1032
|
+
* parent
|
|
1033
|
+
*/
|
|
1034
|
+
private parent;
|
|
1035
|
+
/**
|
|
1036
|
+
* 校验器
|
|
1037
|
+
*/
|
|
1038
|
+
private validators;
|
|
1039
|
+
/**
|
|
1040
|
+
* 属性rule
|
|
1041
|
+
*/
|
|
1042
|
+
private attrRules;
|
|
1043
|
+
/**
|
|
1044
|
+
* rule
|
|
1045
|
+
*/
|
|
1046
|
+
private rules;
|
|
1047
|
+
/**
|
|
1048
|
+
* 描述
|
|
1049
|
+
*/
|
|
1050
|
+
private descriptor;
|
|
1051
|
+
/**
|
|
1052
|
+
* 实例
|
|
1053
|
+
*/
|
|
1054
|
+
private instance;
|
|
1055
|
+
/**
|
|
1056
|
+
* effect scope
|
|
1057
|
+
*/
|
|
1058
|
+
private scope;
|
|
1059
|
+
/**
|
|
1060
|
+
* 构造函数
|
|
1061
|
+
* @param parent
|
|
1062
|
+
* @param descriptor
|
|
1063
|
+
* @param instance
|
|
1064
|
+
*/
|
|
1065
|
+
constructor(parent: ValidateSchema | null, descriptor: Descriptor, instance: ComponentInternalInstance);
|
|
1066
|
+
/**
|
|
1067
|
+
* 初始化
|
|
1068
|
+
*/
|
|
1069
|
+
private init;
|
|
1070
|
+
/**
|
|
1071
|
+
* 销毁
|
|
1072
|
+
*/
|
|
1073
|
+
destroy(): void;
|
|
1074
|
+
/**
|
|
1075
|
+
* 执行validate handler函数
|
|
1076
|
+
* @param name
|
|
1077
|
+
* @param args
|
|
1078
|
+
*/
|
|
1079
|
+
private execHandler;
|
|
1080
|
+
/**
|
|
1081
|
+
* 调用装饰处理函数
|
|
1082
|
+
*/
|
|
1083
|
+
private decorate;
|
|
1084
|
+
/**
|
|
1085
|
+
* 调用成功处理函数
|
|
1086
|
+
*/
|
|
1087
|
+
private success;
|
|
1088
|
+
/**
|
|
1089
|
+
* 调用错误处理函数
|
|
1090
|
+
* @returns
|
|
1091
|
+
*/
|
|
1092
|
+
private error;
|
|
1093
|
+
/**
|
|
1094
|
+
* 调用错误处理函数
|
|
1095
|
+
* @returns
|
|
1096
|
+
*/
|
|
1097
|
+
private getValue;
|
|
1098
|
+
/**
|
|
1099
|
+
* 设置校验器
|
|
1100
|
+
* @param type
|
|
1101
|
+
* @param validator
|
|
1102
|
+
* @param global
|
|
1103
|
+
*
|
|
1104
|
+
* @returns
|
|
1105
|
+
*/
|
|
1106
|
+
setValidator(type: string, validator: ExecuteValidator, global?: boolean): void;
|
|
1107
|
+
/**
|
|
1108
|
+
* 获取validator(只获取私有的validator)
|
|
1109
|
+
* @param type
|
|
1110
|
+
*/
|
|
1111
|
+
getValidator(type: string): ExecuteValidator | null;
|
|
1112
|
+
/**
|
|
1113
|
+
* 删除校验器
|
|
1114
|
+
* @param type
|
|
1115
|
+
* @param global
|
|
1116
|
+
*/
|
|
1117
|
+
deleteValidator(type: string, global?: boolean): void;
|
|
1118
|
+
/**
|
|
1119
|
+
* 判断校验器是否存在
|
|
1120
|
+
* @param type
|
|
1121
|
+
* @param global
|
|
1122
|
+
* @returns
|
|
1123
|
+
*/
|
|
1124
|
+
hasValidator(type: string, global?: boolean): boolean;
|
|
1125
|
+
/**
|
|
1126
|
+
* 设置rule
|
|
1127
|
+
* @param rule
|
|
1128
|
+
*/
|
|
1129
|
+
setRule(rule: Rule | null): void;
|
|
1130
|
+
/**
|
|
1131
|
+
* 清空校验错误信息
|
|
1132
|
+
* @params deep
|
|
1133
|
+
* @returns
|
|
1134
|
+
*/
|
|
1135
|
+
clear(): void;
|
|
1136
|
+
/**
|
|
1137
|
+
* 执行校验
|
|
1138
|
+
* @returns
|
|
1139
|
+
*/
|
|
1140
|
+
validate(): Promise<ValidateResult>;
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
/**
|
|
1144
|
+
* validate schema key
|
|
1145
|
+
*/
|
|
1146
|
+
export declare const ValidateSchemaKey: unique symbol;
|
|
1147
|
+
|
|
1148
|
+
/**
|
|
1149
|
+
* value 格式话
|
|
1150
|
+
*/
|
|
1151
|
+
export declare interface ValueFormat<T, K> {
|
|
1152
|
+
(value: T): K;
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
/**
|
|
1156
|
+
* 获取value长度
|
|
1157
|
+
* @param val
|
|
1158
|
+
* @returns
|
|
1159
|
+
*/
|
|
1160
|
+
export declare function valueLength(val: unknown): number;
|
|
1161
|
+
|
|
1162
|
+
/**
|
|
1163
|
+
* value 类型
|
|
1164
|
+
*/
|
|
1165
|
+
export declare type ValueType = 'string' | 'number' | 'date';
|
|
1166
|
+
|
|
1167
|
+
export { }
|