@vue-start/pro 0.4.13 → 0.5.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.d.ts +909 -413
- package/dist/index.es.js +2027 -1253
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
+
/// <reference types="lodash" />
|
|
1
2
|
import * as vue from 'vue';
|
|
2
3
|
import { ExtractPropTypes, PropType, VNode, App, Ref as Ref$1 } from 'vue';
|
|
4
|
+
import * as _vue_reactivity from '@vue/reactivity';
|
|
3
5
|
import { UnwrapNestedRefs, Ref, ComputedRef } from '@vue/reactivity';
|
|
4
|
-
import
|
|
6
|
+
import * as _vue_start_store from '@vue-start/store';
|
|
7
|
+
import { TUpdater } from '@vue-start/store';
|
|
5
8
|
import { IRequestActor } from '@vue-start/request';
|
|
9
|
+
import { Subject } from 'rxjs';
|
|
10
|
+
import * as lodash from 'lodash';
|
|
6
11
|
|
|
7
12
|
declare const proGridProps: () => {
|
|
8
13
|
row: {
|
|
@@ -20,8 +25,38 @@ declare const proGridProps: () => {
|
|
|
20
25
|
}[]>;
|
|
21
26
|
};
|
|
22
27
|
};
|
|
23
|
-
declare type
|
|
24
|
-
declare const
|
|
28
|
+
declare type ProGridProps = Partial<ExtractPropTypes<ReturnType<typeof proGridProps>>>;
|
|
29
|
+
declare const ProGrid: vue.DefineComponent<Partial<ExtractPropTypes<{
|
|
30
|
+
row: {
|
|
31
|
+
type: PropType<Record<string, any>>;
|
|
32
|
+
default: undefined;
|
|
33
|
+
};
|
|
34
|
+
col: {
|
|
35
|
+
type: PropType<Record<string, any>>;
|
|
36
|
+
};
|
|
37
|
+
items: {
|
|
38
|
+
type: PropType<{
|
|
39
|
+
vNode: VNode;
|
|
40
|
+
rowKey?: string | number | undefined;
|
|
41
|
+
col?: Record<string, any> | undefined;
|
|
42
|
+
}[]>;
|
|
43
|
+
};
|
|
44
|
+
}>>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<Partial<ExtractPropTypes<{
|
|
45
|
+
row: {
|
|
46
|
+
type: PropType<Record<string, any>>;
|
|
47
|
+
default: undefined;
|
|
48
|
+
};
|
|
49
|
+
col: {
|
|
50
|
+
type: PropType<Record<string, any>>;
|
|
51
|
+
};
|
|
52
|
+
items: {
|
|
53
|
+
type: PropType<{
|
|
54
|
+
vNode: VNode;
|
|
55
|
+
rowKey?: string | number | undefined;
|
|
56
|
+
col?: Record<string, any> | undefined;
|
|
57
|
+
}[]>;
|
|
58
|
+
};
|
|
59
|
+
}>>>, {}>;
|
|
25
60
|
|
|
26
61
|
declare type TDefaultValueType = "text" | "textarea" | "password" | "digit" | "date" | "dateRange" | "time" | "timeRange" | "select" | "treeSelect" | "checkbox" | "radio" | "slider" | "switch" | "rate" | "cascader";
|
|
27
62
|
declare type TValueType = TDefaultValueType | string;
|
|
@@ -194,6 +229,7 @@ interface IProModuleProvide {
|
|
|
194
229
|
}
|
|
195
230
|
declare const useProModule: () => IProModuleProvide;
|
|
196
231
|
declare const provideProModule: (ctx: IProModuleProvide) => void;
|
|
232
|
+
declare const useModuleEvent: (cb: (action: TActionEvent) => void) => void;
|
|
197
233
|
interface IRequestOpts {
|
|
198
234
|
actor: IRequestActor;
|
|
199
235
|
/**
|
|
@@ -291,7 +327,22 @@ declare const ProModule: vue.DefineComponent<Partial<ExtractPropTypes<{
|
|
|
291
327
|
};
|
|
292
328
|
}>>>, {}>;
|
|
293
329
|
|
|
294
|
-
declare
|
|
330
|
+
declare type TInitialState<T> = T | (() => T);
|
|
331
|
+
declare type TRegisterStore = {
|
|
332
|
+
key: string;
|
|
333
|
+
initialState?: TInitialState<any>;
|
|
334
|
+
persist?: boolean;
|
|
335
|
+
};
|
|
336
|
+
declare type TRegisterStoreMap = Record<string, TRegisterStore>;
|
|
337
|
+
/**
|
|
338
|
+
* 更新全局状态
|
|
339
|
+
*/
|
|
340
|
+
declare const useDispatchStore: <T>() => (key: string, stateOrUpdater: T | TUpdater<T>) => void;
|
|
341
|
+
/**
|
|
342
|
+
* 读取全局状态
|
|
343
|
+
* 返回ref对象
|
|
344
|
+
*/
|
|
345
|
+
declare const useReadStore: (key: string) => _vue_reactivity.Ref<any>;
|
|
295
346
|
|
|
296
347
|
declare const useDoneRequestActor: (actors: (IRequestActor | string)[], callback: (actor: IRequestActor) => void) => void;
|
|
297
348
|
declare const useFailedRequestActor: (actors: (IRequestActor | string)[], callback: (actor: IRequestActor) => void) => void;
|
|
@@ -300,6 +351,26 @@ declare const useComposeRequestActor: (actors: (IRequestActor | string)[], optio
|
|
|
300
351
|
onFailed?: ((actor: IRequestActor) => void) | undefined;
|
|
301
352
|
onFinish?: ((actor: IRequestActor) => void) | undefined;
|
|
302
353
|
}, cancelWhileUnmount?: boolean) => void;
|
|
354
|
+
/******************************* meta *********************************/
|
|
355
|
+
/**
|
|
356
|
+
* 转换请求数据
|
|
357
|
+
* @param actor
|
|
358
|
+
* @param convertData
|
|
359
|
+
* @param convertPath
|
|
360
|
+
*/
|
|
361
|
+
declare const convertResData: (actor: IRequestActor, convertData?: ((res: IRequestActor["res"], actor: IRequestActor) => any) | undefined, convertPath?: (string | number)[]) => any;
|
|
362
|
+
declare type TMeta = {
|
|
363
|
+
actorName: string;
|
|
364
|
+
storeName?: string;
|
|
365
|
+
initParams?: Record<string, any>;
|
|
366
|
+
convertPath?: (string | number)[];
|
|
367
|
+
convertData?: (data: any, actor: IRequestActor) => any;
|
|
368
|
+
};
|
|
369
|
+
/**
|
|
370
|
+
* 发送meta请求
|
|
371
|
+
*/
|
|
372
|
+
declare const useDispatchMeta: () => (actorName: string) => void;
|
|
373
|
+
declare const useMetaRegister: (registerMetaMap: IProConfigProvide["registerMetaMap"], registerActorMap: IProConfigProvide["registerActorMap"]) => void;
|
|
303
374
|
|
|
304
375
|
declare const proBasePropsFn: () => {
|
|
305
376
|
/**
|
|
@@ -331,6 +402,7 @@ declare const proBasePropsFn: () => {
|
|
|
331
402
|
};
|
|
332
403
|
declare type ProBaseProps = Partial<ExtractPropTypes<ReturnType<typeof proBasePropsFn>>>;
|
|
333
404
|
declare const proBaseProps: ProBaseProps;
|
|
405
|
+
declare type ProDispatchRequestType = (actorName: string, params?: IRequestActor["req"], extra?: IRequestActor["extra"]) => IRequestActor | undefined;
|
|
334
406
|
interface IProConfigProvide {
|
|
335
407
|
/**
|
|
336
408
|
* 组件集
|
|
@@ -340,11 +412,45 @@ interface IProConfigProvide {
|
|
|
340
412
|
* form组件集(使用FormItem包裹的组件集合)
|
|
341
413
|
*/
|
|
342
414
|
formElementMap?: TElementMap;
|
|
415
|
+
/**
|
|
416
|
+
* 注册的全局状态
|
|
417
|
+
*/
|
|
418
|
+
registerStoreMap: TRegisterStoreMap;
|
|
419
|
+
/**
|
|
420
|
+
* 注册的全局接口
|
|
421
|
+
*/
|
|
422
|
+
registerActorMap: Record<string, {
|
|
423
|
+
actor: IRequestActor;
|
|
424
|
+
}>;
|
|
425
|
+
/**
|
|
426
|
+
* 注册的全局Meta
|
|
427
|
+
*/
|
|
428
|
+
registerMetaMap: Record<string, TMeta>;
|
|
429
|
+
/**
|
|
430
|
+
* 发送请求
|
|
431
|
+
* @param actorName
|
|
432
|
+
* @param params
|
|
433
|
+
* @param extra
|
|
434
|
+
*/
|
|
435
|
+
dispatchRequest: ProDispatchRequestType;
|
|
343
436
|
}
|
|
344
437
|
declare const proConfigProps: () => {
|
|
345
|
-
|
|
346
|
-
type: PropType<
|
|
347
|
-
|
|
438
|
+
elementMap: {
|
|
439
|
+
type: PropType<TElementMap>;
|
|
440
|
+
};
|
|
441
|
+
formElementMap: {
|
|
442
|
+
type: PropType<TElementMap>;
|
|
443
|
+
};
|
|
444
|
+
registerStores: {
|
|
445
|
+
type: PropType<TRegisterStore[]>;
|
|
446
|
+
};
|
|
447
|
+
registerActors: {
|
|
448
|
+
type: PropType<{
|
|
449
|
+
actor: IRequestActor;
|
|
450
|
+
}[]>;
|
|
451
|
+
};
|
|
452
|
+
registerMetas: {
|
|
453
|
+
type: PropType<TMeta[]>;
|
|
348
454
|
};
|
|
349
455
|
};
|
|
350
456
|
declare const useProConfig: () => IProConfigProvide;
|
|
@@ -353,438 +459,179 @@ declare type ProConfigProps = Partial<ExtractPropTypes<ReturnType<typeof proConf
|
|
|
353
459
|
* 组件方式注册
|
|
354
460
|
*/
|
|
355
461
|
declare const ProConfig: vue.DefineComponent<Partial<ExtractPropTypes<{
|
|
356
|
-
|
|
357
|
-
type: PropType<
|
|
358
|
-
|
|
462
|
+
elementMap: {
|
|
463
|
+
type: PropType<TElementMap>;
|
|
464
|
+
};
|
|
465
|
+
formElementMap: {
|
|
466
|
+
type: PropType<TElementMap>;
|
|
467
|
+
};
|
|
468
|
+
registerStores: {
|
|
469
|
+
type: PropType<TRegisterStore[]>;
|
|
470
|
+
};
|
|
471
|
+
registerActors: {
|
|
472
|
+
type: PropType<{
|
|
473
|
+
actor: IRequestActor;
|
|
474
|
+
}[]>;
|
|
475
|
+
};
|
|
476
|
+
registerMetas: {
|
|
477
|
+
type: PropType<TMeta[]>;
|
|
359
478
|
};
|
|
360
479
|
}>>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<Partial<ExtractPropTypes<{
|
|
361
|
-
|
|
362
|
-
type: PropType<
|
|
363
|
-
|
|
480
|
+
elementMap: {
|
|
481
|
+
type: PropType<TElementMap>;
|
|
482
|
+
};
|
|
483
|
+
formElementMap: {
|
|
484
|
+
type: PropType<TElementMap>;
|
|
485
|
+
};
|
|
486
|
+
registerStores: {
|
|
487
|
+
type: PropType<TRegisterStore[]>;
|
|
488
|
+
};
|
|
489
|
+
registerActors: {
|
|
490
|
+
type: PropType<{
|
|
491
|
+
actor: IRequestActor;
|
|
492
|
+
}[]>;
|
|
493
|
+
};
|
|
494
|
+
registerMetas: {
|
|
495
|
+
type: PropType<TMeta[]>;
|
|
364
496
|
};
|
|
365
497
|
}>>>, {}>;
|
|
366
498
|
/**
|
|
367
499
|
* app.use 方式注册
|
|
368
500
|
* @param config
|
|
369
501
|
*/
|
|
370
|
-
declare const createProConfig: (config?:
|
|
502
|
+
declare const createProConfig: (config?: ProConfigProps) => (app: App) => void;
|
|
371
503
|
|
|
372
|
-
interface
|
|
504
|
+
interface IAccess extends Record<string, any> {
|
|
505
|
+
token?: string;
|
|
373
506
|
}
|
|
374
|
-
|
|
375
|
-
|
|
507
|
+
declare type TAccess = UnwrapNestedRefs<IAccess>;
|
|
508
|
+
declare const useAccess: () => TAccess;
|
|
509
|
+
declare const useAccessMgr: () => readonly [any, (stateOrUpdater: _vue_start_store.TUpdater<undefined> | undefined) => void, () => void];
|
|
510
|
+
declare const MustLogon: vue.DefineComponent<unknown, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
511
|
+
[key: string]: any;
|
|
512
|
+
}>[] | null | undefined, {}, vue.ComputedOptions, vue.MethodOptions, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<unknown>, {}>;
|
|
513
|
+
declare const LogonUserKey: unique symbol;
|
|
514
|
+
interface IUser extends Record<string, any> {
|
|
515
|
+
id?: string | number;
|
|
376
516
|
}
|
|
377
|
-
declare
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
/**
|
|
391
|
-
* 单个操作描述
|
|
392
|
-
*/
|
|
393
|
-
interface IOperateItem {
|
|
394
|
-
value: string | number;
|
|
395
|
-
label?: string | VNode;
|
|
396
|
-
element?: (record: Record<string, any>, item: IOperateItem) => VNode;
|
|
397
|
-
show?: boolean | ((record: Record<string, any>) => boolean);
|
|
398
|
-
disabled?: boolean | ((record: Record<string, any>) => boolean);
|
|
399
|
-
onClick?: (record: Record<string, any>) => void;
|
|
400
|
-
sort?: number;
|
|
517
|
+
declare type TLogonUserProvide = {
|
|
518
|
+
user: UnwrapNestedRefs<IUser>;
|
|
519
|
+
setUser: (u: IUser) => void;
|
|
520
|
+
per: UnwrapNestedRefs<Record<string, any>>;
|
|
521
|
+
setPer: (u: IUser) => void;
|
|
522
|
+
opts: Record<string, any>;
|
|
523
|
+
};
|
|
524
|
+
declare const useLogonUser: () => TLogonUserProvide;
|
|
525
|
+
declare const LogonUser: vue.DefineComponent<unknown, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
526
|
+
[key: string]: any;
|
|
527
|
+
}>[] | undefined, {}, vue.ComputedOptions, vue.MethodOptions, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<unknown>, {}>;
|
|
528
|
+
|
|
529
|
+
interface IProFormProvideExtra extends Record<string, any> {
|
|
401
530
|
}
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
531
|
+
interface IProFormProvide extends IProFormProvideExtra {
|
|
532
|
+
formState: UnwrapNestedRefs<Record<string, any>>;
|
|
533
|
+
showState: UnwrapNestedRefs<Record<string, any>>;
|
|
534
|
+
readonlyState: UnwrapNestedRefs<Record<string, any>>;
|
|
535
|
+
disableState: UnwrapNestedRefs<Record<string, any>>;
|
|
536
|
+
readonly: Ref<boolean | undefined>;
|
|
537
|
+
elementMap?: TElementMap;
|
|
538
|
+
formElementMap?: TElementMap;
|
|
539
|
+
columns: Ref<TColumns>;
|
|
411
540
|
}
|
|
412
|
-
declare const
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
541
|
+
declare const useProForm: () => IProFormProvide;
|
|
542
|
+
declare enum FormAction {
|
|
543
|
+
RESET = "RESET",
|
|
544
|
+
SUBMIT = "SUBMIT",
|
|
545
|
+
CONTINUE = "CONTINUE"
|
|
546
|
+
}
|
|
547
|
+
declare type TProFormOperate = ProOperateProps & {
|
|
548
|
+
onReset?: () => void;
|
|
549
|
+
onSubmit?: () => void;
|
|
550
|
+
onContinue?: () => void;
|
|
551
|
+
};
|
|
552
|
+
declare const proFormProps: () => {
|
|
553
|
+
/**
|
|
554
|
+
* class名称
|
|
555
|
+
*/
|
|
556
|
+
clsName: {
|
|
417
557
|
type: StringConstructor;
|
|
558
|
+
default: string;
|
|
418
559
|
};
|
|
419
560
|
/**
|
|
420
|
-
*
|
|
561
|
+
* 同 antd 或 element form中的model
|
|
421
562
|
*/
|
|
422
|
-
|
|
423
|
-
type: PropType<
|
|
563
|
+
model: {
|
|
564
|
+
type: PropType<Record<string, any>>;
|
|
424
565
|
};
|
|
425
566
|
/**
|
|
426
|
-
*
|
|
567
|
+
* 子组件是否只读样式
|
|
427
568
|
*/
|
|
428
|
-
|
|
569
|
+
readonly: {
|
|
429
570
|
type: BooleanConstructor;
|
|
571
|
+
default: undefined;
|
|
430
572
|
};
|
|
431
573
|
/**
|
|
432
|
-
*
|
|
574
|
+
* FormComponent 根据此项来确定组件是否显示
|
|
575
|
+
* rules 根据rules中方法生成showState对象
|
|
433
576
|
*/
|
|
434
|
-
|
|
435
|
-
type: PropType<
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
577
|
+
showState: {
|
|
578
|
+
type: PropType<BooleanObjType>;
|
|
579
|
+
};
|
|
580
|
+
showStateRules: {
|
|
581
|
+
type: PropType<BooleanRulesObjType>;
|
|
439
582
|
};
|
|
440
583
|
/**
|
|
441
|
-
*
|
|
584
|
+
* 是否只读
|
|
442
585
|
*/
|
|
443
|
-
|
|
444
|
-
type: PropType<
|
|
586
|
+
readonlyState: {
|
|
587
|
+
type: PropType<BooleanObjType>;
|
|
588
|
+
};
|
|
589
|
+
readonlyStateRules: {
|
|
590
|
+
type: PropType<BooleanRulesObjType>;
|
|
445
591
|
};
|
|
446
|
-
};
|
|
447
|
-
declare type ProTableProps = Partial<ExtractPropTypes<ReturnType<typeof proTableProps>>> & ProBaseProps;
|
|
448
|
-
declare const createTable: (Table: any, Props?: any, tableMethods?: string[]) => any;
|
|
449
|
-
|
|
450
|
-
declare type TPageState = {
|
|
451
|
-
page: number;
|
|
452
|
-
pageSize: number;
|
|
453
|
-
};
|
|
454
|
-
declare const defaultPage: TPageState;
|
|
455
|
-
interface IListData extends Record<string, any> {
|
|
456
|
-
total: number;
|
|
457
|
-
dataSource: Record<string, any>[];
|
|
458
|
-
}
|
|
459
|
-
interface ICurdState extends Record<string, any> {
|
|
460
|
-
listLoading?: boolean;
|
|
461
|
-
listData?: IListData;
|
|
462
|
-
mode?: ICurdCurrentMode;
|
|
463
|
-
detailLoading?: boolean;
|
|
464
|
-
detailData?: Record<string, any>;
|
|
465
|
-
operateLoading?: boolean;
|
|
466
|
-
addAction?: ICurdAddAction;
|
|
467
|
-
}
|
|
468
|
-
/**
|
|
469
|
-
* action:list,detail,add,edit,delete
|
|
470
|
-
*/
|
|
471
|
-
interface ICurdOperateOpts extends Omit<IRequestOpts, "actor" | "action">, Omit<IOperateItem, "value"> {
|
|
472
|
-
action: ICurdAction;
|
|
473
|
-
actor?: IRequestActor;
|
|
474
|
-
tableOperate?: boolean;
|
|
475
|
-
}
|
|
476
|
-
declare type TCurdActionEvent = {
|
|
477
|
-
action: ICurdAction;
|
|
478
|
-
type: ICurdSubAction;
|
|
479
|
-
record?: Record<string, any>;
|
|
480
|
-
values?: Record<string, any>;
|
|
481
|
-
source?: TActionEvent["source"];
|
|
482
|
-
};
|
|
483
|
-
declare const proCurdProps: () => {
|
|
484
592
|
/**
|
|
485
|
-
*
|
|
593
|
+
* 是否disabled
|
|
486
594
|
*/
|
|
487
|
-
|
|
488
|
-
type:
|
|
489
|
-
|
|
595
|
+
disableState: {
|
|
596
|
+
type: PropType<BooleanObjType>;
|
|
597
|
+
};
|
|
598
|
+
disableStateRules: {
|
|
599
|
+
type: PropType<BooleanRulesObjType>;
|
|
490
600
|
};
|
|
491
601
|
/**
|
|
492
|
-
*
|
|
602
|
+
* 是否启用rules验证
|
|
493
603
|
*/
|
|
494
|
-
|
|
495
|
-
type:
|
|
604
|
+
needRules: {
|
|
605
|
+
type: BooleanConstructor;
|
|
606
|
+
default: boolean;
|
|
496
607
|
};
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
608
|
+
/**
|
|
609
|
+
* provide传递
|
|
610
|
+
*/
|
|
611
|
+
provideExtra: {
|
|
612
|
+
type: PropType<IProFormProvideExtra>;
|
|
500
613
|
};
|
|
501
|
-
|
|
502
|
-
|
|
614
|
+
/**
|
|
615
|
+
* 操作按钮
|
|
616
|
+
*/
|
|
617
|
+
operate: {
|
|
618
|
+
type: PropType<TProFormOperate>;
|
|
503
619
|
};
|
|
504
|
-
|
|
505
|
-
type:
|
|
620
|
+
submitLoading: {
|
|
621
|
+
type: BooleanConstructor;
|
|
506
622
|
};
|
|
507
|
-
|
|
508
|
-
|
|
623
|
+
/**
|
|
624
|
+
* ref 默认中转方法
|
|
625
|
+
*/
|
|
626
|
+
formMethods: {
|
|
627
|
+
type: PropType<string[]>;
|
|
509
628
|
};
|
|
510
629
|
};
|
|
511
|
-
declare type
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
curdState?: UnwrapNestedRefs<ICurdState>;
|
|
630
|
+
declare type ProFormProps = Partial<ExtractPropTypes<ReturnType<typeof proFormProps>>> & ProBaseProps & Omit<ProGridProps, "items"> & {
|
|
631
|
+
onFinish?: (showValues?: Record<string, any>, values?: Record<string, any>) => void;
|
|
632
|
+
onFinishFailed?: (errs: any) => void;
|
|
515
633
|
};
|
|
516
|
-
declare const
|
|
517
|
-
|
|
518
|
-
interface IProCurdProvide {
|
|
519
|
-
columns: Ref<TColumns>;
|
|
520
|
-
getSignColumns: (signName: string) => TColumns;
|
|
521
|
-
getFormItemVNode: (column: TColumn, needRules: boolean | undefined) => VNode | null;
|
|
522
|
-
getItemVNode: (column: TColumn, value: any) => VNode | null;
|
|
523
|
-
elementMap: TElementMap;
|
|
524
|
-
formElementMap: TElementMap;
|
|
525
|
-
rowKey: string;
|
|
526
|
-
curdState: UnwrapNestedRefs<ICurdState>;
|
|
527
|
-
formColumns: Ref<TColumns>;
|
|
528
|
-
descColumns: Ref<TColumns>;
|
|
529
|
-
tableColumns: Ref<TColumns>;
|
|
530
|
-
searchColumns: Ref<TColumns>;
|
|
531
|
-
sendCurdEvent: (event: TCurdActionEvent) => void;
|
|
532
|
-
operates: ICurdOperateOpts[];
|
|
533
|
-
getOperate: (action: ICurdAction) => ICurdOperateOpts | undefined;
|
|
534
|
-
refreshList: (extra?: Record<string, any>) => void;
|
|
535
|
-
/******************子组件参数*******************/
|
|
536
|
-
listProps?: ComputedRef<Record<string, any> | undefined>;
|
|
537
|
-
formProps?: ComputedRef<Record<string, any> | undefined>;
|
|
538
|
-
descProps?: ComputedRef<Record<string, any> | undefined>;
|
|
539
|
-
modalProps?: ComputedRef<Record<string, any> | undefined>;
|
|
540
|
-
}
|
|
541
|
-
declare const useProCurd: <T extends IProCurdProvide>() => T;
|
|
542
|
-
declare const provideProCurd: (ctx: IProCurdProvide) => void;
|
|
543
|
-
/************************************ 常量 *************************************/
|
|
544
|
-
/**
|
|
545
|
-
* curd 5种基础Action
|
|
546
|
-
*/
|
|
547
|
-
declare enum CurdAction {
|
|
548
|
-
LIST = "LIST",
|
|
549
|
-
DETAIL = "DETAIL",
|
|
550
|
-
ADD = "ADD",
|
|
551
|
-
EDIT = "EDIT",
|
|
552
|
-
DELETE = "DELETE"
|
|
553
|
-
}
|
|
554
|
-
declare type ICurdAction = keyof typeof CurdAction | string;
|
|
555
|
-
/**
|
|
556
|
-
* CurdAction 的子事件
|
|
557
|
-
*/
|
|
558
|
-
declare enum CurdSubAction {
|
|
559
|
-
EMIT = "EMIT",
|
|
560
|
-
EXECUTE = "EXECUTE",
|
|
561
|
-
PAGE = "PAGE",
|
|
562
|
-
SUCCESS = "SUCCESS",
|
|
563
|
-
FAIL = "FAIL"
|
|
564
|
-
}
|
|
565
|
-
declare type ICurdSubAction = keyof typeof CurdSubAction;
|
|
566
|
-
/**
|
|
567
|
-
* curd 操作模式
|
|
568
|
-
*/
|
|
569
|
-
declare enum CurdCurrentMode {
|
|
570
|
-
ADD = "ADD",
|
|
571
|
-
EDIT = "EDIT",
|
|
572
|
-
DETAIL = "DETAIL"
|
|
573
|
-
}
|
|
574
|
-
declare type ICurdCurrentMode = keyof typeof CurdCurrentMode | string;
|
|
575
|
-
/**
|
|
576
|
-
* curd add 模式下 标记 "确定" "确定并继续" 触发
|
|
577
|
-
*/
|
|
578
|
-
declare enum CurdAddAction {
|
|
579
|
-
NORMAL = "NORMAL",
|
|
580
|
-
CONTINUE = "CONTINUE"
|
|
581
|
-
}
|
|
582
|
-
declare type ICurdAddAction = keyof typeof CurdAddAction;
|
|
583
|
-
|
|
584
|
-
declare const modalCurdProps: () => {
|
|
585
|
-
defaultAddRecord: {
|
|
586
|
-
type: PropType<Record<string, any>>;
|
|
587
|
-
};
|
|
588
|
-
};
|
|
589
|
-
declare type ModalCurdProps = Partial<ExtractPropTypes<ReturnType<typeof modalCurdProps>>>;
|
|
590
|
-
declare type ProModalCurdProps = ModalCurdProps & ProCurdProps;
|
|
591
|
-
declare const ProModalCurd: vue.DefineComponent<ProModalCurdProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProModalCurdProps>, {}>;
|
|
592
|
-
|
|
593
|
-
declare const pageCurdProps: () => {
|
|
594
|
-
defaultAddRecord: {
|
|
595
|
-
type: PropType<Record<string, any>>;
|
|
596
|
-
};
|
|
597
|
-
routeBack: {
|
|
598
|
-
type: PropType<(action: ICurdAction) => void>;
|
|
599
|
-
};
|
|
600
|
-
};
|
|
601
|
-
declare type PageCurdProps = Partial<ExtractPropTypes<ReturnType<typeof pageCurdProps>>>;
|
|
602
|
-
declare type ProPageCurdProps = PageCurdProps & ProCurdProps;
|
|
603
|
-
declare const ProPageCurd: vue.DefineComponent<ProPageCurdProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProPageCurdProps>, {}>;
|
|
604
|
-
|
|
605
|
-
declare const createCurdDesc: (Descriptions: any, DescriptionsItem: any) => any;
|
|
606
|
-
|
|
607
|
-
declare const proCurdAddOrEditProps: () => {
|
|
608
|
-
signName: {
|
|
609
|
-
type: StringConstructor;
|
|
610
|
-
};
|
|
611
|
-
modelName: {
|
|
612
|
-
type: StringConstructor;
|
|
613
|
-
default: string;
|
|
614
|
-
};
|
|
615
|
-
operateBar: {
|
|
616
|
-
type: BooleanConstructor;
|
|
617
|
-
default: boolean;
|
|
618
|
-
};
|
|
619
|
-
showContinueAdd: {
|
|
620
|
-
type: BooleanConstructor;
|
|
621
|
-
default: boolean;
|
|
622
|
-
};
|
|
623
|
-
okText: {
|
|
624
|
-
type: StringConstructor;
|
|
625
|
-
default: string;
|
|
626
|
-
};
|
|
627
|
-
okButtonProps: {
|
|
628
|
-
type: PropType<Record<string, any>>;
|
|
629
|
-
};
|
|
630
|
-
continueText: {
|
|
631
|
-
type: StringConstructor;
|
|
632
|
-
default: string;
|
|
633
|
-
};
|
|
634
|
-
continueButtonProps: {
|
|
635
|
-
type: PropType<Record<string, any>>;
|
|
636
|
-
};
|
|
637
|
-
};
|
|
638
|
-
declare type ProCurdAddOrEditProps = Partial<ExtractPropTypes<ReturnType<typeof proCurdAddOrEditProps>>>;
|
|
639
|
-
declare const createCurdForm: (Form: any, Button: any, convertFormProps?: ((curdState: ICurdState) => Record<string, any>) | undefined, formMethods?: string[]) => any;
|
|
640
|
-
|
|
641
|
-
declare const proCurdListProps: () => {
|
|
642
|
-
/**
|
|
643
|
-
* extra 是否放到SearchForm中
|
|
644
|
-
*/
|
|
645
|
-
extraInSearch: {
|
|
646
|
-
type: BooleanConstructor;
|
|
647
|
-
default: undefined;
|
|
648
|
-
};
|
|
649
|
-
searchProps: {
|
|
650
|
-
type: PropType<Record<string, any>>;
|
|
651
|
-
};
|
|
652
|
-
tableProps: {
|
|
653
|
-
type: PropType<Record<string, any>>;
|
|
654
|
-
};
|
|
655
|
-
paginationProps: {
|
|
656
|
-
type: PropType<Record<string, any>>;
|
|
657
|
-
};
|
|
658
|
-
showPagination: {
|
|
659
|
-
type: BooleanConstructor;
|
|
660
|
-
default: boolean;
|
|
661
|
-
};
|
|
662
|
-
pageState: {
|
|
663
|
-
type: PropType<TPageState>;
|
|
664
|
-
};
|
|
665
|
-
};
|
|
666
|
-
declare type ProCurdListProps = Partial<ExtractPropTypes<ReturnType<typeof proCurdListProps>>>;
|
|
667
|
-
declare const createCurdList: (SearchForm: any, Table: any) => vue.DefineComponent<Partial<ExtractPropTypes<{
|
|
668
|
-
/**
|
|
669
|
-
* extra 是否放到SearchForm中
|
|
670
|
-
*/
|
|
671
|
-
extraInSearch: {
|
|
672
|
-
type: BooleanConstructor;
|
|
673
|
-
default: undefined;
|
|
674
|
-
};
|
|
675
|
-
searchProps: {
|
|
676
|
-
type: PropType<Record<string, any>>;
|
|
677
|
-
};
|
|
678
|
-
tableProps: {
|
|
679
|
-
type: PropType<Record<string, any>>;
|
|
680
|
-
};
|
|
681
|
-
paginationProps: {
|
|
682
|
-
type: PropType<Record<string, any>>;
|
|
683
|
-
};
|
|
684
|
-
showPagination: {
|
|
685
|
-
type: BooleanConstructor;
|
|
686
|
-
default: boolean;
|
|
687
|
-
};
|
|
688
|
-
pageState: {
|
|
689
|
-
type: PropType<TPageState>;
|
|
690
|
-
};
|
|
691
|
-
}>>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<Partial<ExtractPropTypes<{
|
|
692
|
-
/**
|
|
693
|
-
* extra 是否放到SearchForm中
|
|
694
|
-
*/
|
|
695
|
-
extraInSearch: {
|
|
696
|
-
type: BooleanConstructor;
|
|
697
|
-
default: undefined;
|
|
698
|
-
};
|
|
699
|
-
searchProps: {
|
|
700
|
-
type: PropType<Record<string, any>>;
|
|
701
|
-
};
|
|
702
|
-
tableProps: {
|
|
703
|
-
type: PropType<Record<string, any>>;
|
|
704
|
-
};
|
|
705
|
-
paginationProps: {
|
|
706
|
-
type: PropType<Record<string, any>>;
|
|
707
|
-
};
|
|
708
|
-
showPagination: {
|
|
709
|
-
type: BooleanConstructor;
|
|
710
|
-
default: boolean;
|
|
711
|
-
};
|
|
712
|
-
pageState: {
|
|
713
|
-
type: PropType<TPageState>;
|
|
714
|
-
};
|
|
715
|
-
}>>>, {}>;
|
|
716
|
-
|
|
717
|
-
interface IProFormProvideExtra extends Record<string, any> {
|
|
718
|
-
}
|
|
719
|
-
interface IProFormProvide extends IProFormProvideExtra {
|
|
720
|
-
formState: UnwrapNestedRefs<Record<string, any>>;
|
|
721
|
-
showState: UnwrapNestedRefs<Record<string, any>>;
|
|
722
|
-
readonlyState: UnwrapNestedRefs<Record<string, any>>;
|
|
723
|
-
disableState: UnwrapNestedRefs<Record<string, any>>;
|
|
724
|
-
readonly: Ref<boolean | undefined>;
|
|
725
|
-
elementMap?: TElementMap;
|
|
726
|
-
formElementMap?: TElementMap;
|
|
727
|
-
columns: Ref<TColumns>;
|
|
728
|
-
}
|
|
729
|
-
declare const useProForm: () => IProFormProvide;
|
|
730
|
-
declare const proFormProps: () => {
|
|
731
|
-
/**
|
|
732
|
-
* 同 antd 或 element form中的model
|
|
733
|
-
*/
|
|
734
|
-
model: {
|
|
735
|
-
type: PropType<Record<string, any>>;
|
|
736
|
-
};
|
|
737
|
-
/**
|
|
738
|
-
* 子组件是否只读样式
|
|
739
|
-
*/
|
|
740
|
-
readonly: {
|
|
741
|
-
type: BooleanConstructor;
|
|
742
|
-
default: undefined;
|
|
743
|
-
};
|
|
744
|
-
/**
|
|
745
|
-
* FormComponent 根据此项来确定组件是否显示
|
|
746
|
-
* rules 根据rules中方法生成showState对象
|
|
747
|
-
*/
|
|
748
|
-
showState: {
|
|
749
|
-
type: PropType<BooleanObjType>;
|
|
750
|
-
};
|
|
751
|
-
showStateRules: {
|
|
752
|
-
type: PropType<BooleanRulesObjType>;
|
|
753
|
-
};
|
|
754
|
-
/**
|
|
755
|
-
* 是否只读
|
|
756
|
-
*/
|
|
757
|
-
readonlyState: {
|
|
758
|
-
type: PropType<BooleanObjType>;
|
|
759
|
-
};
|
|
760
|
-
readonlyStateRules: {
|
|
761
|
-
type: PropType<BooleanRulesObjType>;
|
|
762
|
-
};
|
|
763
|
-
/**
|
|
764
|
-
* 是否disabled
|
|
765
|
-
*/
|
|
766
|
-
disableState: {
|
|
767
|
-
type: PropType<BooleanObjType>;
|
|
768
|
-
};
|
|
769
|
-
disableStateRules: {
|
|
770
|
-
type: PropType<BooleanRulesObjType>;
|
|
771
|
-
};
|
|
772
|
-
/**
|
|
773
|
-
* 是否启用rules验证
|
|
774
|
-
*/
|
|
775
|
-
needRules: {
|
|
776
|
-
type: BooleanConstructor;
|
|
777
|
-
default: boolean;
|
|
778
|
-
};
|
|
779
|
-
/**
|
|
780
|
-
* provide传递
|
|
781
|
-
*/
|
|
782
|
-
provideExtra: {
|
|
783
|
-
type: PropType<IProFormProvideExtra>;
|
|
784
|
-
};
|
|
785
|
-
};
|
|
786
|
-
declare type ProFormProps = Partial<ExtractPropTypes<ReturnType<typeof proFormProps>>> & ProBaseProps;
|
|
787
|
-
declare const createForm: (Form: any, Grid: any, formMethods: string[]) => any;
|
|
634
|
+
declare const ProForm: vue.DefineComponent<ProFormProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProFormProps>, {}>;
|
|
788
635
|
|
|
789
636
|
declare enum SearchMode {
|
|
790
637
|
AUTO = "AUTO",
|
|
@@ -822,11 +669,7 @@ declare const proSearchFormProps: () => {
|
|
|
822
669
|
};
|
|
823
670
|
};
|
|
824
671
|
declare type ProSearchFormProps = Partial<ExtractPropTypes<ReturnType<typeof proSearchFormProps>>> & ProFormProps;
|
|
825
|
-
|
|
826
|
-
* 该组件只是个模式,最终返回null,不做任何渲染,应配合着ProForm的包装类一起使用
|
|
827
|
-
* 针对传入的model(监听对象)做相应的finish(回调)处理
|
|
828
|
-
*/
|
|
829
|
-
declare const createSearchForm: (Form: any, Props: any, formMethods: string[]) => any;
|
|
672
|
+
declare const ProSearchForm: vue.DefineComponent<ProSearchFormProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProSearchFormProps>, {}>;
|
|
830
673
|
|
|
831
674
|
interface FormItemProps {
|
|
832
675
|
name?: string | number | (string | number)[];
|
|
@@ -927,14 +770,651 @@ declare const proFormListProps: () => {
|
|
|
927
770
|
};
|
|
928
771
|
};
|
|
929
772
|
declare type ProFormListProps = Partial<ExtractPropTypes<ReturnType<typeof proFormListProps>>>;
|
|
930
|
-
declare const
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
773
|
+
declare const ProFormList: vue.DefineComponent<Partial<ExtractPropTypes<{
|
|
774
|
+
rowKey: {
|
|
775
|
+
type: StringConstructor;
|
|
776
|
+
default: string;
|
|
777
|
+
};
|
|
778
|
+
name: {
|
|
779
|
+
type: PropType<string | number | (string | number)[]>;
|
|
780
|
+
required: boolean;
|
|
781
|
+
};
|
|
782
|
+
}>>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<Partial<ExtractPropTypes<{
|
|
783
|
+
rowKey: {
|
|
784
|
+
type: StringConstructor;
|
|
785
|
+
default: string;
|
|
786
|
+
};
|
|
787
|
+
name: {
|
|
788
|
+
type: PropType<string | number | (string | number)[]>;
|
|
789
|
+
required: boolean;
|
|
790
|
+
};
|
|
791
|
+
}>>>, {}>;
|
|
792
|
+
|
|
793
|
+
interface IOpeItem {
|
|
794
|
+
value: string | number;
|
|
795
|
+
label?: string | VNode | (() => string | VNode);
|
|
796
|
+
show?: boolean | (() => boolean);
|
|
797
|
+
disabled?: boolean | (() => boolean);
|
|
798
|
+
loading?: boolean | (() => boolean);
|
|
799
|
+
extraProps?: object | (() => Record<string, any>);
|
|
800
|
+
onClick?: (value: string | number | boolean) => void;
|
|
801
|
+
element?: (item?: Omit<IOpeItem, "show" | "disabled" | "opeProps" | "element"> & {
|
|
802
|
+
disabled?: boolean;
|
|
803
|
+
}) => VNode | null;
|
|
804
|
+
}
|
|
805
|
+
declare const proOperateProps: () => {
|
|
806
|
+
/**
|
|
807
|
+
* class名称
|
|
808
|
+
*/
|
|
809
|
+
clsName: {
|
|
810
|
+
type: StringConstructor;
|
|
811
|
+
default: string;
|
|
812
|
+
};
|
|
813
|
+
items: {
|
|
814
|
+
type: PropType<IOpeItem[]>;
|
|
815
|
+
};
|
|
816
|
+
itemState: {
|
|
817
|
+
type: PropType<Record<string, IOpeItem>>;
|
|
818
|
+
};
|
|
819
|
+
elementKey: {
|
|
820
|
+
type: StringConstructor;
|
|
821
|
+
default: string;
|
|
822
|
+
};
|
|
823
|
+
};
|
|
824
|
+
declare type ProOperateProps = Partial<ExtractPropTypes<ReturnType<typeof proOperateProps>>>;
|
|
825
|
+
declare const ProOperate: vue.DefineComponent<Partial<ExtractPropTypes<{
|
|
826
|
+
/**
|
|
827
|
+
* class名称
|
|
828
|
+
*/
|
|
829
|
+
clsName: {
|
|
830
|
+
type: StringConstructor;
|
|
831
|
+
default: string;
|
|
832
|
+
};
|
|
833
|
+
items: {
|
|
834
|
+
type: PropType<IOpeItem[]>;
|
|
835
|
+
};
|
|
836
|
+
itemState: {
|
|
837
|
+
type: PropType<Record<string, IOpeItem>>;
|
|
838
|
+
};
|
|
839
|
+
elementKey: {
|
|
840
|
+
type: StringConstructor;
|
|
841
|
+
default: string;
|
|
842
|
+
};
|
|
843
|
+
}>>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<Partial<ExtractPropTypes<{
|
|
844
|
+
/**
|
|
845
|
+
* class名称
|
|
846
|
+
*/
|
|
847
|
+
clsName: {
|
|
848
|
+
type: StringConstructor;
|
|
849
|
+
default: string;
|
|
850
|
+
};
|
|
851
|
+
items: {
|
|
852
|
+
type: PropType<IOpeItem[]>;
|
|
853
|
+
};
|
|
854
|
+
itemState: {
|
|
855
|
+
type: PropType<Record<string, IOpeItem>>;
|
|
856
|
+
};
|
|
857
|
+
elementKey: {
|
|
858
|
+
type: StringConstructor;
|
|
859
|
+
default: string;
|
|
860
|
+
};
|
|
861
|
+
}>>>, {}>;
|
|
862
|
+
|
|
863
|
+
interface IProTableProvideExtra extends Record<string, any> {
|
|
864
|
+
}
|
|
865
|
+
interface IProTableProvide extends IProTableProvideExtra {
|
|
866
|
+
columns: Ref<TTableColumns>;
|
|
867
|
+
originColumns: Ref<TTableColumns>;
|
|
868
|
+
state: UnwrapNestedRefs<{
|
|
869
|
+
selectIds: (string | number)[];
|
|
870
|
+
}>;
|
|
871
|
+
}
|
|
872
|
+
declare const useProTable: () => IProTableProvide;
|
|
873
|
+
declare type TTableColumn = {
|
|
874
|
+
children?: TTableColumn[];
|
|
875
|
+
customRender?: (opt: {
|
|
876
|
+
value: any;
|
|
877
|
+
text: any;
|
|
878
|
+
record: Record<string, any>;
|
|
879
|
+
index: number;
|
|
880
|
+
column: TTableColumn;
|
|
881
|
+
}) => VNode | string | number;
|
|
882
|
+
fixed?: boolean | string;
|
|
883
|
+
width?: number | string;
|
|
884
|
+
} & TColumn;
|
|
885
|
+
declare type TTableColumns = TTableColumn[];
|
|
886
|
+
/**
|
|
887
|
+
* 单个操作描述
|
|
888
|
+
*/
|
|
889
|
+
interface IOperateItem {
|
|
890
|
+
value: string | number;
|
|
891
|
+
label?: string | VNode;
|
|
892
|
+
show?: boolean | ((record: Record<string, any>) => boolean);
|
|
893
|
+
disabled?: boolean | ((record: Record<string, any>) => boolean);
|
|
894
|
+
loading?: boolean | ((record: Record<string, any>) => boolean);
|
|
895
|
+
extraProps?: object | ((record: Record<string, any>) => Record<string, any>);
|
|
896
|
+
onClick?: (record: Record<string, any>) => void;
|
|
897
|
+
sort?: number;
|
|
898
|
+
element?: (record: Record<string, any>, item: IOperateItem) => VNode;
|
|
899
|
+
}
|
|
900
|
+
/**
|
|
901
|
+
* 整个操作栏描述
|
|
902
|
+
*/
|
|
903
|
+
interface ITableOperate {
|
|
904
|
+
column?: TColumn;
|
|
905
|
+
items?: IOperateItem[];
|
|
906
|
+
itemState?: {
|
|
907
|
+
[key: string]: Omit<IOperateItem, "value">;
|
|
908
|
+
};
|
|
909
|
+
clsName?: ProOperateProps["clsName"];
|
|
910
|
+
elementKey?: ProOperateProps["elementKey"];
|
|
911
|
+
}
|
|
912
|
+
declare const proTableProps: () => {
|
|
913
|
+
/**
|
|
914
|
+
* class名称
|
|
915
|
+
*/
|
|
916
|
+
clsName: {
|
|
917
|
+
type: StringConstructor;
|
|
918
|
+
default: string;
|
|
919
|
+
};
|
|
920
|
+
operate: {
|
|
921
|
+
type: PropType<ITableOperate>;
|
|
922
|
+
};
|
|
923
|
+
columnEmptyText: {
|
|
924
|
+
type: StringConstructor;
|
|
925
|
+
};
|
|
926
|
+
/**
|
|
927
|
+
* 公共column,会merge到columns item中
|
|
928
|
+
*/
|
|
929
|
+
column: {
|
|
930
|
+
type: PropType<TTableColumn>;
|
|
931
|
+
};
|
|
932
|
+
/**
|
|
933
|
+
* 序号
|
|
934
|
+
*/
|
|
935
|
+
serialNumber: {
|
|
936
|
+
type: (BooleanConstructor | ObjectConstructor)[];
|
|
937
|
+
};
|
|
938
|
+
/**
|
|
939
|
+
* 分页
|
|
940
|
+
*/
|
|
941
|
+
paginationState: {
|
|
942
|
+
type: PropType<{
|
|
943
|
+
page?: number | undefined;
|
|
944
|
+
pageSize?: number | undefined;
|
|
945
|
+
}>;
|
|
946
|
+
};
|
|
947
|
+
/**
|
|
948
|
+
* 操作栏
|
|
949
|
+
*/
|
|
950
|
+
toolbar: {
|
|
951
|
+
type: PropType<{
|
|
952
|
+
columnSetting?: Partial<ExtractPropTypes<{
|
|
953
|
+
clsName: {
|
|
954
|
+
type: StringConstructor;
|
|
955
|
+
default: string;
|
|
956
|
+
};
|
|
957
|
+
signName: {
|
|
958
|
+
type: StringConstructor;
|
|
959
|
+
default: string;
|
|
960
|
+
};
|
|
961
|
+
popoverProps: ObjectConstructor;
|
|
962
|
+
}>> | undefined;
|
|
963
|
+
}>;
|
|
964
|
+
};
|
|
965
|
+
/**
|
|
966
|
+
* provide传递
|
|
967
|
+
*/
|
|
968
|
+
provideExtra: {
|
|
969
|
+
type: PropType<IProTableProvideExtra>;
|
|
970
|
+
};
|
|
971
|
+
/**
|
|
972
|
+
* ref 默认中转方法
|
|
973
|
+
*/
|
|
974
|
+
tableMethods: {
|
|
975
|
+
type: PropType<string[]>;
|
|
976
|
+
};
|
|
977
|
+
};
|
|
978
|
+
declare type ProTableProps = Partial<ExtractPropTypes<ReturnType<typeof proTableProps>>> & ProBaseProps & {
|
|
979
|
+
loading?: boolean;
|
|
980
|
+
dataSource?: Record<string, any>[];
|
|
981
|
+
};
|
|
982
|
+
declare const ProTable: vue.DefineComponent<ProTableProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProTableProps>, {}>;
|
|
983
|
+
|
|
984
|
+
declare const proPageHeaderProps: () => {
|
|
985
|
+
title: {
|
|
986
|
+
type: StringConstructor;
|
|
987
|
+
};
|
|
988
|
+
subTitle: {
|
|
989
|
+
type: StringConstructor;
|
|
990
|
+
};
|
|
991
|
+
showBack: BooleanConstructor;
|
|
992
|
+
hideWhileNoHistory: {
|
|
993
|
+
type: BooleanConstructor;
|
|
994
|
+
default: boolean;
|
|
995
|
+
};
|
|
996
|
+
};
|
|
997
|
+
declare type PageHeaderProps = Partial<ExtractPropTypes<ReturnType<typeof proPageHeaderProps>>>;
|
|
998
|
+
declare const PageHeader: vue.DefineComponent<{
|
|
999
|
+
title: {
|
|
1000
|
+
type: StringConstructor;
|
|
1001
|
+
};
|
|
1002
|
+
subTitle: {
|
|
1003
|
+
type: StringConstructor;
|
|
1004
|
+
};
|
|
1005
|
+
showBack: BooleanConstructor;
|
|
1006
|
+
hideWhileNoHistory: {
|
|
1007
|
+
type: BooleanConstructor;
|
|
1008
|
+
default: boolean;
|
|
1009
|
+
};
|
|
1010
|
+
}, () => JSX.Element, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
1011
|
+
title: {
|
|
1012
|
+
type: StringConstructor;
|
|
1013
|
+
};
|
|
1014
|
+
subTitle: {
|
|
1015
|
+
type: StringConstructor;
|
|
1016
|
+
};
|
|
1017
|
+
showBack: BooleanConstructor;
|
|
1018
|
+
hideWhileNoHistory: {
|
|
1019
|
+
type: BooleanConstructor;
|
|
1020
|
+
default: boolean;
|
|
1021
|
+
};
|
|
1022
|
+
}>>, {
|
|
1023
|
+
showBack: boolean;
|
|
1024
|
+
hideWhileNoHistory: boolean;
|
|
1025
|
+
}>;
|
|
1026
|
+
declare const proPageProps: () => {
|
|
1027
|
+
loading: {
|
|
1028
|
+
type: BooleanConstructor;
|
|
1029
|
+
default: boolean;
|
|
1030
|
+
};
|
|
1031
|
+
loadingOpts: ObjectConstructor;
|
|
1032
|
+
fillMode: {
|
|
1033
|
+
type: BooleanConstructor;
|
|
1034
|
+
default: boolean;
|
|
1035
|
+
};
|
|
1036
|
+
};
|
|
1037
|
+
declare type ProPageProps = Partial<ExtractPropTypes<ReturnType<typeof proPageProps>>> & PageHeaderProps;
|
|
1038
|
+
declare const ProPage: vue.DefineComponent<ProPageProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProPageProps>, {}>;
|
|
1039
|
+
|
|
1040
|
+
declare type TPageState = {
|
|
1041
|
+
page: number;
|
|
1042
|
+
pageSize: number;
|
|
1043
|
+
};
|
|
1044
|
+
declare const defaultPage: TPageState;
|
|
1045
|
+
declare const proListProps: () => {
|
|
1046
|
+
/**
|
|
1047
|
+
* class名称
|
|
1048
|
+
*/
|
|
1049
|
+
clsName: {
|
|
1050
|
+
type: StringConstructor;
|
|
1051
|
+
default: string;
|
|
1052
|
+
};
|
|
1053
|
+
searchProps: {
|
|
1054
|
+
type: PropType<Record<string, any>>;
|
|
1055
|
+
};
|
|
1056
|
+
tableProps: {
|
|
1057
|
+
type: PropType<Record<string, any>>;
|
|
1058
|
+
};
|
|
1059
|
+
paginationProps: {
|
|
1060
|
+
type: (PropType<Record<string, any>> | PropType<boolean>)[];
|
|
1061
|
+
};
|
|
1062
|
+
pageState: {
|
|
1063
|
+
type: PropType<TPageState>;
|
|
1064
|
+
};
|
|
1065
|
+
};
|
|
1066
|
+
declare type ProListProps = Partial<ExtractPropTypes<ReturnType<typeof proListProps>>>;
|
|
1067
|
+
declare type SearchSlotProps = {
|
|
1068
|
+
executeSearchWithResetPage: (values: Record<string, any>, page?: number) => void;
|
|
1069
|
+
pageState: TPageState;
|
|
1070
|
+
};
|
|
1071
|
+
declare type PaginationSlotProps = {
|
|
1072
|
+
executePageChange: (page: number, pageSize: number) => void;
|
|
1073
|
+
pageState: TPageState;
|
|
1074
|
+
};
|
|
1075
|
+
/**
|
|
1076
|
+
* 搜索框+表格+分页 三个组件组成
|
|
1077
|
+
* onSearch 方法:search改变、page改变触发
|
|
1078
|
+
*/
|
|
1079
|
+
declare const ProList: vue.DefineComponent<Partial<ExtractPropTypes<{
|
|
1080
|
+
/**
|
|
1081
|
+
* class名称
|
|
1082
|
+
*/
|
|
1083
|
+
clsName: {
|
|
1084
|
+
type: StringConstructor;
|
|
1085
|
+
default: string;
|
|
1086
|
+
};
|
|
1087
|
+
searchProps: {
|
|
1088
|
+
type: PropType<Record<string, any>>;
|
|
1089
|
+
};
|
|
1090
|
+
tableProps: {
|
|
1091
|
+
type: PropType<Record<string, any>>;
|
|
1092
|
+
};
|
|
1093
|
+
paginationProps: {
|
|
1094
|
+
type: (PropType<Record<string, any>> | PropType<boolean>)[];
|
|
1095
|
+
};
|
|
1096
|
+
pageState: {
|
|
1097
|
+
type: PropType<TPageState>;
|
|
1098
|
+
};
|
|
1099
|
+
}>>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<Partial<ExtractPropTypes<{
|
|
1100
|
+
/**
|
|
1101
|
+
* class名称
|
|
1102
|
+
*/
|
|
1103
|
+
clsName: {
|
|
1104
|
+
type: StringConstructor;
|
|
1105
|
+
default: string;
|
|
1106
|
+
};
|
|
1107
|
+
searchProps: {
|
|
1108
|
+
type: PropType<Record<string, any>>;
|
|
1109
|
+
};
|
|
1110
|
+
tableProps: {
|
|
1111
|
+
type: PropType<Record<string, any>>;
|
|
1112
|
+
};
|
|
1113
|
+
paginationProps: {
|
|
1114
|
+
type: (PropType<Record<string, any>> | PropType<boolean>)[];
|
|
1115
|
+
};
|
|
1116
|
+
pageState: {
|
|
1117
|
+
type: PropType<TPageState>;
|
|
1118
|
+
};
|
|
1119
|
+
}>>>, {}>;
|
|
1120
|
+
|
|
1121
|
+
declare const proDescProps: () => {
|
|
1122
|
+
/**
|
|
1123
|
+
* class名称
|
|
1124
|
+
*/
|
|
1125
|
+
clsName: {
|
|
1126
|
+
type: StringConstructor;
|
|
1127
|
+
default: string;
|
|
1128
|
+
};
|
|
1129
|
+
model: {
|
|
1130
|
+
type: PropType<any>;
|
|
1131
|
+
};
|
|
1132
|
+
};
|
|
1133
|
+
declare type ProDescProps = Partial<ExtractPropTypes<ReturnType<typeof proDescProps>>> & ProBaseProps;
|
|
1134
|
+
declare const ProDesc: vue.DefineComponent<ProDescProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProDescProps>, {
|
|
1135
|
+
model?: any;
|
|
1136
|
+
}>;
|
|
1137
|
+
|
|
1138
|
+
/******************************** 组件key ********************************/
|
|
1139
|
+
declare const ElementKeys: {
|
|
1140
|
+
LoadingKey: string;
|
|
1141
|
+
RowKey: string;
|
|
1142
|
+
ColKey: string;
|
|
1143
|
+
ButtonKey: string;
|
|
1144
|
+
DescriptionsKey: string;
|
|
1145
|
+
DescriptionsItemKey: string;
|
|
1146
|
+
PaginationKey: string;
|
|
1147
|
+
PopoverKey: string;
|
|
1148
|
+
CheckboxKey: string;
|
|
1149
|
+
ModalKey: string;
|
|
1150
|
+
FormKey: string;
|
|
1151
|
+
FormItemKey: string;
|
|
1152
|
+
TableKey: string;
|
|
1153
|
+
ProFormKey: string;
|
|
1154
|
+
ProSearchFormKey: string;
|
|
1155
|
+
ProTableKey: string;
|
|
1156
|
+
};
|
|
1157
|
+
/**
|
|
1158
|
+
* 根据elementKey获取组件
|
|
1159
|
+
*/
|
|
1160
|
+
declare const useGetCompByKey: () => (elementKey: string) => any;
|
|
1161
|
+
|
|
1162
|
+
interface IListData extends Record<string, any> {
|
|
1163
|
+
total: number;
|
|
1164
|
+
dataSource: Record<string, any>[];
|
|
1165
|
+
}
|
|
1166
|
+
interface ICurdState extends Record<string, any> {
|
|
1167
|
+
listLoading?: boolean;
|
|
1168
|
+
listData?: IListData;
|
|
1169
|
+
mode?: ICurdCurrentMode;
|
|
1170
|
+
detailLoading?: boolean;
|
|
1171
|
+
detailData?: Record<string, any>;
|
|
1172
|
+
operateLoading?: boolean;
|
|
1173
|
+
addAction?: ICurdAddAction;
|
|
1174
|
+
}
|
|
1175
|
+
/**
|
|
1176
|
+
* action:list,detail,add,edit,delete
|
|
1177
|
+
*/
|
|
1178
|
+
interface ICurdOperateOpts extends Omit<IRequestOpts, "actor" | "action">, Omit<IOperateItem, "value"> {
|
|
1179
|
+
action: ICurdAction;
|
|
1180
|
+
actor?: IRequestActor;
|
|
1181
|
+
tableOperate?: boolean;
|
|
1182
|
+
}
|
|
1183
|
+
declare type TCurdActionEvent = {
|
|
1184
|
+
action: ICurdAction;
|
|
1185
|
+
type: ICurdSubAction;
|
|
1186
|
+
record?: Record<string, any>;
|
|
1187
|
+
values?: Record<string, any>;
|
|
1188
|
+
source?: TActionEvent["source"];
|
|
1189
|
+
};
|
|
1190
|
+
declare const proCurdProps: () => {
|
|
1191
|
+
/**
|
|
1192
|
+
* 列表 或 详情 的唯一标识
|
|
1193
|
+
*/
|
|
1194
|
+
rowKey: {
|
|
1195
|
+
type: StringConstructor;
|
|
1196
|
+
default: string;
|
|
1197
|
+
};
|
|
1198
|
+
/**
|
|
1199
|
+
* operates
|
|
1200
|
+
*/
|
|
1201
|
+
operates: {
|
|
1202
|
+
type: PropType<ICurdOperateOpts[]>;
|
|
1203
|
+
};
|
|
1204
|
+
/************************* 子组件props *******************************/
|
|
1205
|
+
listProps: {
|
|
1206
|
+
type: PropType<Record<string, any>>;
|
|
1207
|
+
};
|
|
1208
|
+
formProps: {
|
|
1209
|
+
type: PropType<Record<string, any>>;
|
|
1210
|
+
};
|
|
1211
|
+
descProps: {
|
|
1212
|
+
type: PropType<Record<string, any>>;
|
|
1213
|
+
};
|
|
1214
|
+
modalProps: {
|
|
1215
|
+
type: PropType<Record<string, any>>;
|
|
1216
|
+
};
|
|
1217
|
+
};
|
|
1218
|
+
declare type CurdProps = Partial<ExtractPropTypes<ReturnType<typeof proCurdProps>>> & ProBaseProps;
|
|
1219
|
+
declare const CurdMethods: string[];
|
|
1220
|
+
declare type ProCurdProps = CurdProps & Omit<ProModuleProps, "state" | "requests"> & {
|
|
1221
|
+
curdState?: UnwrapNestedRefs<ICurdState>;
|
|
1222
|
+
};
|
|
1223
|
+
declare const ProCurd: vue.DefineComponent<ProCurdProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProCurdProps>, {}>;
|
|
1224
|
+
|
|
1225
|
+
interface IProCurdProvide {
|
|
1226
|
+
columns: Ref<TColumns>;
|
|
1227
|
+
getSignColumns: (signName: string) => TColumns;
|
|
1228
|
+
getFormItemVNode: (column: TColumn, needRules: boolean | undefined) => VNode | null;
|
|
1229
|
+
getItemVNode: (column: TColumn, value: any) => VNode | null;
|
|
1230
|
+
elementMap: TElementMap;
|
|
1231
|
+
formElementMap: TElementMap;
|
|
1232
|
+
rowKey: string;
|
|
1233
|
+
curdState: UnwrapNestedRefs<ICurdState>;
|
|
1234
|
+
formColumns: Ref<TColumns>;
|
|
1235
|
+
descColumns: Ref<TColumns>;
|
|
1236
|
+
tableColumns: Ref<TColumns>;
|
|
1237
|
+
searchColumns: Ref<TColumns>;
|
|
1238
|
+
sendCurdEvent: (event: TCurdActionEvent) => void;
|
|
1239
|
+
operates: ICurdOperateOpts[];
|
|
1240
|
+
getOperate: (action: ICurdAction) => ICurdOperateOpts | undefined;
|
|
1241
|
+
refreshList: (extra?: Record<string, any>) => void;
|
|
1242
|
+
/******************子组件参数*******************/
|
|
1243
|
+
listProps?: ComputedRef<Record<string, any> | undefined>;
|
|
1244
|
+
formProps?: ComputedRef<Record<string, any> | undefined>;
|
|
1245
|
+
descProps?: ComputedRef<Record<string, any> | undefined>;
|
|
1246
|
+
modalProps?: ComputedRef<Record<string, any> | undefined>;
|
|
1247
|
+
}
|
|
1248
|
+
declare const useProCurd: <T extends IProCurdProvide>() => T;
|
|
1249
|
+
declare const provideProCurd: (ctx: IProCurdProvide) => void;
|
|
1250
|
+
/************************************ 常量 *************************************/
|
|
1251
|
+
/**
|
|
1252
|
+
* curd 5种基础Action
|
|
1253
|
+
*/
|
|
1254
|
+
declare enum CurdAction {
|
|
1255
|
+
LIST = "LIST",
|
|
1256
|
+
DETAIL = "DETAIL",
|
|
1257
|
+
ADD = "ADD",
|
|
1258
|
+
EDIT = "EDIT",
|
|
1259
|
+
DELETE = "DELETE"
|
|
1260
|
+
}
|
|
1261
|
+
declare type ICurdAction = keyof typeof CurdAction | string;
|
|
1262
|
+
/**
|
|
1263
|
+
* CurdAction 的子事件
|
|
1264
|
+
*/
|
|
1265
|
+
declare enum CurdSubAction {
|
|
1266
|
+
EMIT = "EMIT",
|
|
1267
|
+
EXECUTE = "EXECUTE",
|
|
1268
|
+
PAGE = "PAGE",
|
|
1269
|
+
SUCCESS = "SUCCESS",
|
|
1270
|
+
FAIL = "FAIL"
|
|
1271
|
+
}
|
|
1272
|
+
declare type ICurdSubAction = keyof typeof CurdSubAction;
|
|
1273
|
+
/**
|
|
1274
|
+
* curd 操作模式
|
|
1275
|
+
*/
|
|
1276
|
+
declare enum CurdCurrentMode {
|
|
1277
|
+
ADD = "ADD",
|
|
1278
|
+
EDIT = "EDIT",
|
|
1279
|
+
DETAIL = "DETAIL"
|
|
1280
|
+
}
|
|
1281
|
+
declare type ICurdCurrentMode = keyof typeof CurdCurrentMode | string;
|
|
1282
|
+
/**
|
|
1283
|
+
* curd add 模式下 标记 "确定" "确定并继续" 触发
|
|
1284
|
+
*/
|
|
1285
|
+
declare enum CurdAddAction {
|
|
1286
|
+
NORMAL = "NORMAL",
|
|
1287
|
+
CONTINUE = "CONTINUE"
|
|
1288
|
+
}
|
|
1289
|
+
declare type ICurdAddAction = keyof typeof CurdAddAction;
|
|
1290
|
+
|
|
1291
|
+
declare const modalCurdProps: () => {
|
|
1292
|
+
defaultAddRecord: {
|
|
1293
|
+
type: PropType<Record<string, any>>;
|
|
1294
|
+
};
|
|
1295
|
+
};
|
|
1296
|
+
declare type ModalCurdProps = Partial<ExtractPropTypes<ReturnType<typeof modalCurdProps>>>;
|
|
1297
|
+
declare type ProModalCurdProps = ModalCurdProps & ProCurdProps;
|
|
1298
|
+
declare const ProModalCurd: vue.DefineComponent<ProModalCurdProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProModalCurdProps>, {}>;
|
|
1299
|
+
|
|
1300
|
+
declare const pageCurdProps: () => {
|
|
1301
|
+
defaultAddRecord: {
|
|
1302
|
+
type: PropType<Record<string, any>>;
|
|
1303
|
+
};
|
|
1304
|
+
routeBack: {
|
|
1305
|
+
type: PropType<(action: ICurdAction) => void>;
|
|
1306
|
+
};
|
|
1307
|
+
};
|
|
1308
|
+
declare type PageCurdProps = Partial<ExtractPropTypes<ReturnType<typeof pageCurdProps>>>;
|
|
1309
|
+
declare type ProPageCurdProps = PageCurdProps & ProCurdProps;
|
|
1310
|
+
declare const ProPageCurd: vue.DefineComponent<ProPageCurdProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProPageCurdProps>, {}>;
|
|
1311
|
+
|
|
1312
|
+
/**
|
|
1313
|
+
*
|
|
1314
|
+
*/
|
|
1315
|
+
declare const ProCurdList: vue.DefineComponent<Partial<vue.ExtractPropTypes<{
|
|
1316
|
+
clsName: {
|
|
1317
|
+
type: StringConstructor;
|
|
1318
|
+
default: string;
|
|
1319
|
+
};
|
|
1320
|
+
searchProps: {
|
|
1321
|
+
type: vue.PropType<Record<string, any>>;
|
|
1322
|
+
};
|
|
1323
|
+
tableProps: {
|
|
1324
|
+
type: vue.PropType<Record<string, any>>;
|
|
1325
|
+
};
|
|
1326
|
+
paginationProps: {
|
|
1327
|
+
type: (vue.PropType<Record<string, any>> | vue.PropType<boolean>)[];
|
|
1328
|
+
};
|
|
1329
|
+
pageState: {
|
|
1330
|
+
type: vue.PropType<TPageState>;
|
|
1331
|
+
};
|
|
1332
|
+
}>>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<Partial<vue.ExtractPropTypes<{
|
|
1333
|
+
clsName: {
|
|
1334
|
+
type: StringConstructor;
|
|
1335
|
+
default: string;
|
|
1336
|
+
};
|
|
1337
|
+
searchProps: {
|
|
1338
|
+
type: vue.PropType<Record<string, any>>;
|
|
1339
|
+
};
|
|
1340
|
+
tableProps: {
|
|
1341
|
+
type: vue.PropType<Record<string, any>>;
|
|
1342
|
+
};
|
|
1343
|
+
paginationProps: {
|
|
1344
|
+
type: (vue.PropType<Record<string, any>> | vue.PropType<boolean>)[];
|
|
1345
|
+
};
|
|
1346
|
+
pageState: {
|
|
1347
|
+
type: vue.PropType<TPageState>;
|
|
1348
|
+
};
|
|
1349
|
+
}>>>, {}>;
|
|
1350
|
+
declare const ProCurdListConnect: vue.DefineComponent<unknown, () => JSX.Element, {}, vue.ComputedOptions, vue.MethodOptions, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<unknown>, {}>;
|
|
1351
|
+
|
|
1352
|
+
declare const proCurdFormProps: () => {
|
|
1353
|
+
/**
|
|
1354
|
+
* class名称
|
|
1355
|
+
*/
|
|
1356
|
+
clsName: {
|
|
1357
|
+
type: StringConstructor;
|
|
1358
|
+
default: string;
|
|
1359
|
+
};
|
|
1360
|
+
signName: {
|
|
1361
|
+
type: StringConstructor;
|
|
1362
|
+
};
|
|
1363
|
+
};
|
|
1364
|
+
declare type ProCurdFormProps = Partial<ExtractPropTypes<ReturnType<typeof proCurdFormProps>>> & ProFormProps;
|
|
1365
|
+
declare const ProCurdForm: vue.DefineComponent<ProCurdFormProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProCurdFormProps>, {}>;
|
|
1366
|
+
declare const ProCurdFormConnect: vue.DefineComponent<unknown, () => JSX.Element, {}, vue.ComputedOptions, vue.MethodOptions, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<unknown>, {}>;
|
|
1367
|
+
|
|
1368
|
+
declare const proCurdDescProps: () => {
|
|
1369
|
+
/**
|
|
1370
|
+
* class名称
|
|
1371
|
+
*/
|
|
1372
|
+
clsName: {
|
|
1373
|
+
type: StringConstructor;
|
|
1374
|
+
default: string;
|
|
1375
|
+
};
|
|
1376
|
+
signName: {
|
|
1377
|
+
type: StringConstructor;
|
|
1378
|
+
};
|
|
1379
|
+
};
|
|
1380
|
+
declare type ProCurdDescProps = Partial<ExtractPropTypes<ReturnType<typeof proCurdDescProps>>> & ProBaseProps & ProDescProps;
|
|
1381
|
+
declare const ProCurdDesc: vue.DefineComponent<ProCurdDescProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProCurdDescProps>, {
|
|
1382
|
+
model?: any;
|
|
1383
|
+
}>;
|
|
1384
|
+
declare const ProCurdDescConnect: vue.DefineComponent<unknown, () => JSX.Element, {}, vue.ComputedOptions, vue.MethodOptions, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<unknown>, {}>;
|
|
1385
|
+
|
|
1386
|
+
declare const proCurdModalProps: () => {
|
|
1387
|
+
/**
|
|
1388
|
+
* class名称
|
|
1389
|
+
*/
|
|
1390
|
+
clsName: {
|
|
1391
|
+
type: StringConstructor;
|
|
1392
|
+
default: string;
|
|
1393
|
+
};
|
|
1394
|
+
validMode: {
|
|
1395
|
+
type: ArrayConstructor;
|
|
1396
|
+
default: CurdAction[];
|
|
1397
|
+
};
|
|
1398
|
+
};
|
|
1399
|
+
declare type ProCurdModalProps = Partial<ExtractPropTypes<ReturnType<typeof proCurdModalProps>>> & Record<string, any>;
|
|
1400
|
+
declare const ProCurdModal: vue.DefineComponent<ProCurdModalProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ExtractPropTypes<ProCurdModalProps>>, {
|
|
1401
|
+
[x: string]: any;
|
|
1402
|
+
}>;
|
|
1403
|
+
declare const ProCurdModalForm: vue.DefineComponent<{
|
|
1404
|
+
modalProps: ObjectConstructor;
|
|
1405
|
+
formProps: ObjectConstructor;
|
|
1406
|
+
}, () => JSX.Element, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
1407
|
+
modalProps: ObjectConstructor;
|
|
1408
|
+
formProps: ObjectConstructor;
|
|
1409
|
+
}>>, {}>;
|
|
1410
|
+
declare const ProCurdModalFormConnect: vue.DefineComponent<unknown, () => JSX.Element, {}, vue.ComputedOptions, vue.MethodOptions, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<unknown>, {}>;
|
|
1411
|
+
|
|
1412
|
+
/**
|
|
1413
|
+
* 剔除showState或showStateRules规则为!true的值
|
|
1414
|
+
* @param values
|
|
1415
|
+
* @param showState
|
|
1416
|
+
* @param showStateRules
|
|
1417
|
+
*/
|
|
938
1418
|
declare const getValidValues: (values: Record<string, any>, showState?: BooleanObjType, showStateRules?: BooleanRulesObjType) => Record<string, any>;
|
|
939
1419
|
/**
|
|
940
1420
|
* string类型的path转为arr
|
|
@@ -956,5 +1436,21 @@ declare const mergeStateToList: (list: Record<string, any>[], listState: Record<
|
|
|
956
1436
|
*/
|
|
957
1437
|
declare const createExpose: (methods: string[], targetRef: Ref$1) => Record<string, any>;
|
|
958
1438
|
declare const createExposeObj: (targetRef: Ref$1, methods?: string[], opts?: Record<string, any>) => Record<string, any>;
|
|
1439
|
+
/**
|
|
1440
|
+
* 从TColumn中查找标记值
|
|
1441
|
+
* @param item
|
|
1442
|
+
* @param signName
|
|
1443
|
+
*/
|
|
1444
|
+
declare const getSignValue: <T = any>(item: TColumn, signName: string) => T;
|
|
1445
|
+
/**
|
|
1446
|
+
* 从slots对象中找出`${prefix}`开头的属性组成一个对象
|
|
1447
|
+
* {
|
|
1448
|
+
* `${prefix}${slot name}}`: ()=>Function,
|
|
1449
|
+
* ...
|
|
1450
|
+
* }
|
|
1451
|
+
* @param slots
|
|
1452
|
+
* @param prefix
|
|
1453
|
+
*/
|
|
1454
|
+
declare const filterSlotsByPrefix: (slots: Record<string, any>, prefix: string) => lodash.Dictionary<any>;
|
|
959
1455
|
|
|
960
|
-
export { BooleanObjType, BooleanRulesObjType, CurdAction, CurdAddAction, CurdCurrentMode, CurdMethods, CurdSubAction, FieldNames, FormItemProps,
|
|
1456
|
+
export { BooleanObjType, BooleanRulesObjType, CurdAction, CurdAddAction, CurdCurrentMode, CurdMethods, CurdSubAction, ElementKeys, FieldNames, FormAction, FormItemProps, IAccess, ICurdAction, ICurdAddAction, ICurdCurrentMode, ICurdOperateOpts, ICurdState, ICurdSubAction, IElementConfig, IHighConfig, IListData, IOpeItem, IOperateItem, IProConfigProvide, IProCurdProvide, IProFormProvideExtra, IProModuleProvide, IProTableProvide, IProTableProvideExtra, IRequestOpts, ISearchMode, ITableOperate, IUser, InternalNamePath, LogonUser, LogonUserKey, MustLogon, NamePath, PageHeader, PageHeaderProps, PaginationSlotProps, ProBaseProps, ProConfig, ProConfigProps, ProCurd, ProCurdDesc, ProCurdDescConnect, ProCurdDescProps, ProCurdForm, ProCurdFormConnect, ProCurdFormProps, ProCurdList, ProCurdListConnect, ProCurdModal, ProCurdModalForm, ProCurdModalFormConnect, ProCurdModalProps, ProCurdProps, ProDesc, ProDescProps, ProDispatchRequestType, ProForm, ProFormItemProps, ProFormList, ProFormListProps, ProFormProps, ProGrid, ProGridProps, ProList, ProListProps, ProModalCurd, ProModalCurdProps, ProModule, ProModuleProps, ProOperate, ProOperateProps, ProPage, ProPageCurd, ProPageCurdProps, ProPageProps, ProSearchForm, ProSearchFormProps, ProTable, ProTableProps, RequestAction, SearchMode, SearchSlotProps, TAccess, TActionEvent, TActionState, TColumn, TColumns, TCurdActionEvent, TDefaultValueType, TElementMap, TInitialState, TLogonUserProvide, TMeta, TOption, TOptions, TPageState, TProFormOperate, TRegisterStore, TRegisterStoreMap, TTableColumn, TTableColumns, TValueType, TreeOption, TreeOptions, Wrapper, convertPathToList, convertResData, createExpose, createExposeObj, createFormItemCompFn, createProConfig, defaultPage, filterSlotsByPrefix, getColumnFormItemName, getColumnValueType, getFirstPropName, getFormItemEl, getItemEl, getSignValue, getValidValues, mergeStateToList, proBaseProps, provideProCurd, provideProFormList, provideProModule, renderElement, renderElements, useAccess, useAccessMgr, useComposeRequestActor, useDispatchMeta, useDispatchStore, useDoneRequestActor, useFailedRequestActor, useGetCompByKey, useLogonUser, useMetaRegister, useModuleEvent, useProConfig, useProCurd, useProForm, useProFormList, useProModule, useProTable, useReadStore };
|