@vue-start/pro 0.3.1 → 0.4.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/CHANGELOG.md +21 -0
- package/dist/index.d.ts +250 -433
- package/dist/index.es.js +1284 -535
- package/dist/index.js +1297 -536
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,28 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { ExtractPropTypes, PropType, VNode, Ref as Ref$1 } from 'vue';
|
|
3
|
+
import { UnwrapNestedRefs, Ref, ComputedRef } from '@vue/reactivity';
|
|
4
4
|
import { Subject } from 'rxjs';
|
|
5
5
|
import { IRequestActor } from '@vue-start/request';
|
|
6
6
|
|
|
7
|
+
declare const proGridProps: () => {
|
|
8
|
+
row: {
|
|
9
|
+
type: PropType<Record<string, any>>;
|
|
10
|
+
default: undefined;
|
|
11
|
+
};
|
|
12
|
+
col: {
|
|
13
|
+
type: PropType<Record<string, any>>;
|
|
14
|
+
};
|
|
15
|
+
items: {
|
|
16
|
+
type: PropType<{
|
|
17
|
+
vNode: VNode;
|
|
18
|
+
rowKey?: string | number | undefined;
|
|
19
|
+
col?: Record<string, any> | undefined;
|
|
20
|
+
}[]>;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
declare type GridProps = Partial<ExtractPropTypes<ReturnType<typeof proGridProps>>>;
|
|
24
|
+
declare const createGrid: (Row: any, Col: any) => any;
|
|
25
|
+
|
|
7
26
|
declare type TDefaultValueType = "text" | "textarea" | "password" | "digit" | "date" | "dateRange" | "time" | "timeRange" | "select" | "treeSelect" | "checkbox" | "radio" | "slider" | "switch" | "rate" | "cascader";
|
|
8
27
|
declare type TValueType = TDefaultValueType | string;
|
|
9
28
|
declare type TOption = {
|
|
@@ -24,16 +43,9 @@ declare type TColumn = {
|
|
|
24
43
|
};
|
|
25
44
|
formFieldProps?: Record<string, any>;
|
|
26
45
|
search?: boolean;
|
|
27
|
-
hideInTable?: boolean;
|
|
28
|
-
hideInForm?: boolean;
|
|
29
|
-
hideInDetail?: boolean;
|
|
30
|
-
searchSort?: boolean;
|
|
31
|
-
tableSort?: boolean;
|
|
32
|
-
formSort?: boolean;
|
|
33
|
-
descSort?: boolean;
|
|
34
46
|
extra?: {
|
|
35
47
|
desc?: any;
|
|
36
|
-
}
|
|
48
|
+
} & Record<string, any>;
|
|
37
49
|
};
|
|
38
50
|
declare type TColumns = TColumn[];
|
|
39
51
|
/**
|
|
@@ -67,8 +79,17 @@ declare type BooleanObjType = {
|
|
|
67
79
|
};
|
|
68
80
|
declare type BooleanRulesObjType = {
|
|
69
81
|
[key: string]: (record: any) => boolean;
|
|
70
|
-
};
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
85
|
+
*/
|
|
86
|
+
interface FieldNames {
|
|
87
|
+
value?: string;
|
|
88
|
+
label?: string;
|
|
89
|
+
children?: string;
|
|
90
|
+
}
|
|
71
91
|
|
|
92
|
+
/***************************************** curd模式 *****************************************/
|
|
72
93
|
/**
|
|
73
94
|
* 获取Column的valueType,默认"text"
|
|
74
95
|
* @param column
|
|
@@ -94,16 +115,68 @@ declare const getFormItemEl: (formElementMap: any, column: TColumn, needRules?:
|
|
|
94
115
|
* @param value
|
|
95
116
|
*/
|
|
96
117
|
declare const getItemEl: <T extends TColumn>(elementMap: any, column: T, value: any) => VNode | null;
|
|
118
|
+
/***************************************** 通用模式 *****************************************/
|
|
119
|
+
declare type InternalNamePath = (string | number)[];
|
|
120
|
+
declare type NamePath = string | number | InternalNamePath;
|
|
121
|
+
interface IHighConfig {
|
|
122
|
+
registerStateList?: {
|
|
123
|
+
name: NamePath;
|
|
124
|
+
mapName?: NamePath;
|
|
125
|
+
}[];
|
|
126
|
+
registerEventList?: {
|
|
127
|
+
name: string;
|
|
128
|
+
sendEventName?: TActionEvent["type"];
|
|
129
|
+
}[];
|
|
130
|
+
registerPropsTrans?: {
|
|
131
|
+
name: NamePath;
|
|
132
|
+
isFun?: boolean;
|
|
133
|
+
needParams?: boolean;
|
|
134
|
+
}[];
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* 组件树描述
|
|
138
|
+
*/
|
|
139
|
+
interface IElementConfig {
|
|
140
|
+
elementType: string;
|
|
141
|
+
elementId: string;
|
|
142
|
+
elementProps?: Record<string, any>;
|
|
143
|
+
slots?: {
|
|
144
|
+
[name: string]: ((...params$: any[]) => any) | (IElementConfig & {
|
|
145
|
+
needParams?: boolean;
|
|
146
|
+
});
|
|
147
|
+
};
|
|
148
|
+
children?: IElementConfig[];
|
|
149
|
+
childrenSlotName?: string;
|
|
150
|
+
highConfig$?: IHighConfig;
|
|
151
|
+
}
|
|
152
|
+
declare const renderElements: (elementMap: TElementMap, elementConfigs: IElementConfig[]) => (VNode | null)[];
|
|
153
|
+
/**
|
|
154
|
+
*
|
|
155
|
+
* @param elementMap
|
|
156
|
+
* @param elementConfig
|
|
157
|
+
*/
|
|
158
|
+
declare const renderElement: (elementMap: TElementMap, elementConfig: IElementConfig) => VNode<vue.RendererNode, vue.RendererElement, {
|
|
159
|
+
[key: string]: any;
|
|
160
|
+
}>;
|
|
161
|
+
/**
|
|
162
|
+
* 获取第一层级属性名
|
|
163
|
+
* 如:['aaa','bbb',...] 中的 'aaa'
|
|
164
|
+
* 如:"aaa.bbb.ccc..." 中的 'aaa'
|
|
165
|
+
*/
|
|
166
|
+
declare const getFirstPropName: (name: NamePath) => string | number | undefined;
|
|
167
|
+
/**
|
|
168
|
+
* 处理highConfig$
|
|
169
|
+
*/
|
|
170
|
+
declare const Wrapper: vue.DefineComponent<{
|
|
171
|
+
elementMap: TElementMap;
|
|
172
|
+
elementConfig: IElementConfig;
|
|
173
|
+
}, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{
|
|
174
|
+
elementMap: TElementMap;
|
|
175
|
+
elementConfig: IElementConfig;
|
|
176
|
+
}>, {}>;
|
|
177
|
+
|
|
97
178
|
interface IProModuleProvide {
|
|
98
|
-
|
|
99
|
-
getFormItemVNode: (column: TColumn, needRules: boolean | undefined) => VNode | null;
|
|
100
|
-
getItemVNode: (column: TColumn, value: any) => VNode | null;
|
|
101
|
-
elementMap: {
|
|
102
|
-
[key: string]: any;
|
|
103
|
-
};
|
|
104
|
-
formElementMap: {
|
|
105
|
-
[key: string]: any;
|
|
106
|
-
};
|
|
179
|
+
elementMap: TElementMap;
|
|
107
180
|
subject$: Subject<TActionEvent>;
|
|
108
181
|
sendEvent: (action: TActionEvent) => void;
|
|
109
182
|
state: UnwrapNestedRefs<Record<string, any>>;
|
|
@@ -139,29 +212,16 @@ declare const proModuleProps: () => {
|
|
|
139
212
|
type: PropType<Record<string, any>>;
|
|
140
213
|
};
|
|
141
214
|
/**
|
|
142
|
-
*
|
|
143
|
-
*/
|
|
144
|
-
columns: {
|
|
145
|
-
type: PropType<TColumns>;
|
|
146
|
-
};
|
|
147
|
-
/**
|
|
148
|
-
* 配置(动态)
|
|
149
|
-
* columns动态属性兼容
|
|
150
|
-
*/
|
|
151
|
-
columnState: {
|
|
152
|
-
type: PropType<Record<string, any>>;
|
|
153
|
-
};
|
|
154
|
-
/**
|
|
155
|
-
* 展示组件集
|
|
215
|
+
* 组件集
|
|
156
216
|
*/
|
|
157
217
|
elementMap: {
|
|
158
218
|
type: PropType<TElementMap>;
|
|
159
219
|
};
|
|
160
220
|
/**
|
|
161
|
-
*
|
|
221
|
+
* 组件描述(树)
|
|
162
222
|
*/
|
|
163
|
-
|
|
164
|
-
type: PropType<
|
|
223
|
+
elementConfigs: {
|
|
224
|
+
type: PropType<IElementConfig[]>;
|
|
165
225
|
};
|
|
166
226
|
/**
|
|
167
227
|
* requests
|
|
@@ -179,29 +239,16 @@ declare const ProModule: vue.DefineComponent<Partial<ExtractPropTypes<{
|
|
|
179
239
|
type: PropType<Record<string, any>>;
|
|
180
240
|
};
|
|
181
241
|
/**
|
|
182
|
-
*
|
|
183
|
-
*/
|
|
184
|
-
columns: {
|
|
185
|
-
type: PropType<TColumns>;
|
|
186
|
-
};
|
|
187
|
-
/**
|
|
188
|
-
* 配置(动态)
|
|
189
|
-
* columns动态属性兼容
|
|
190
|
-
*/
|
|
191
|
-
columnState: {
|
|
192
|
-
type: PropType<Record<string, any>>;
|
|
193
|
-
};
|
|
194
|
-
/**
|
|
195
|
-
* 展示组件集
|
|
242
|
+
* 组件集
|
|
196
243
|
*/
|
|
197
244
|
elementMap: {
|
|
198
245
|
type: PropType<TElementMap>;
|
|
199
246
|
};
|
|
200
247
|
/**
|
|
201
|
-
*
|
|
248
|
+
* 组件描述(树)
|
|
202
249
|
*/
|
|
203
|
-
|
|
204
|
-
type: PropType<
|
|
250
|
+
elementConfigs: {
|
|
251
|
+
type: PropType<IElementConfig[]>;
|
|
205
252
|
};
|
|
206
253
|
/**
|
|
207
254
|
* requests
|
|
@@ -217,29 +264,16 @@ declare const ProModule: vue.DefineComponent<Partial<ExtractPropTypes<{
|
|
|
217
264
|
type: PropType<Record<string, any>>;
|
|
218
265
|
};
|
|
219
266
|
/**
|
|
220
|
-
*
|
|
221
|
-
*/
|
|
222
|
-
columns: {
|
|
223
|
-
type: PropType<TColumns>;
|
|
224
|
-
};
|
|
225
|
-
/**
|
|
226
|
-
* 配置(动态)
|
|
227
|
-
* columns动态属性兼容
|
|
228
|
-
*/
|
|
229
|
-
columnState: {
|
|
230
|
-
type: PropType<Record<string, any>>;
|
|
231
|
-
};
|
|
232
|
-
/**
|
|
233
|
-
* 展示组件集
|
|
267
|
+
* 组件集
|
|
234
268
|
*/
|
|
235
269
|
elementMap: {
|
|
236
270
|
type: PropType<TElementMap>;
|
|
237
271
|
};
|
|
238
272
|
/**
|
|
239
|
-
*
|
|
273
|
+
* 组件描述(树)
|
|
240
274
|
*/
|
|
241
|
-
|
|
242
|
-
type: PropType<
|
|
275
|
+
elementConfigs: {
|
|
276
|
+
type: PropType<IElementConfig[]>;
|
|
243
277
|
};
|
|
244
278
|
/**
|
|
245
279
|
* requests
|
|
@@ -273,8 +307,9 @@ declare type TTableColumn = {
|
|
|
273
307
|
record: Record<string, any>;
|
|
274
308
|
index: number;
|
|
275
309
|
column: TTableColumn;
|
|
276
|
-
}) => VNode;
|
|
310
|
+
}) => VNode | string | number;
|
|
277
311
|
fixed?: boolean | string;
|
|
312
|
+
width?: number | string;
|
|
278
313
|
} & TColumn;
|
|
279
314
|
declare type TTableColumns = TTableColumn[];
|
|
280
315
|
/**
|
|
@@ -324,12 +359,6 @@ declare const proTableProps: () => {
|
|
|
324
359
|
elementMap: {
|
|
325
360
|
type: PropType<TElementMap>;
|
|
326
361
|
};
|
|
327
|
-
/**
|
|
328
|
-
* loading
|
|
329
|
-
*/
|
|
330
|
-
loading: {
|
|
331
|
-
type: BooleanConstructor;
|
|
332
|
-
};
|
|
333
362
|
/**
|
|
334
363
|
* 序号
|
|
335
364
|
*/
|
|
@@ -339,7 +368,7 @@ declare const proTableProps: () => {
|
|
|
339
368
|
/**
|
|
340
369
|
* 分页
|
|
341
370
|
*/
|
|
342
|
-
|
|
371
|
+
paginationState: {
|
|
343
372
|
type: PropType<{
|
|
344
373
|
page?: number | undefined;
|
|
345
374
|
pageSize?: number | undefined;
|
|
@@ -353,116 +382,13 @@ declare const proTableProps: () => {
|
|
|
353
382
|
};
|
|
354
383
|
};
|
|
355
384
|
declare type ProTableProps = Partial<ExtractPropTypes<ReturnType<typeof proTableProps>>>;
|
|
356
|
-
declare const
|
|
357
|
-
operate: {
|
|
358
|
-
type: PropType<ITableOperate>;
|
|
359
|
-
};
|
|
360
|
-
columnEmptyText: {
|
|
361
|
-
type: StringConstructor;
|
|
362
|
-
};
|
|
363
|
-
/**
|
|
364
|
-
* 公共column,会merge到columns item中
|
|
365
|
-
*/
|
|
366
|
-
column: {
|
|
367
|
-
type: PropType<TTableColumn>;
|
|
368
|
-
};
|
|
369
|
-
columns: {
|
|
370
|
-
type: PropType<TTableColumns>;
|
|
371
|
-
};
|
|
372
|
-
columnState: {
|
|
373
|
-
type: PropType<Record<string, any>>;
|
|
374
|
-
};
|
|
375
|
-
/**
|
|
376
|
-
* 展示控件集合,readonly模式下使用这些组件渲染
|
|
377
|
-
*/
|
|
378
|
-
elementMap: {
|
|
379
|
-
type: PropType<TElementMap>;
|
|
380
|
-
};
|
|
381
|
-
/**
|
|
382
|
-
* loading
|
|
383
|
-
*/
|
|
384
|
-
loading: {
|
|
385
|
-
type: BooleanConstructor;
|
|
386
|
-
};
|
|
387
|
-
/**
|
|
388
|
-
* 序号
|
|
389
|
-
*/
|
|
390
|
-
serialNumber: {
|
|
391
|
-
type: BooleanConstructor;
|
|
392
|
-
};
|
|
393
|
-
/**
|
|
394
|
-
* 分页
|
|
395
|
-
*/
|
|
396
|
-
pagination: {
|
|
397
|
-
type: PropType<{
|
|
398
|
-
page?: number | undefined;
|
|
399
|
-
pageSize?: number | undefined;
|
|
400
|
-
}>;
|
|
401
|
-
};
|
|
402
|
-
/**
|
|
403
|
-
* provide传递
|
|
404
|
-
*/
|
|
405
|
-
provideExtra: {
|
|
406
|
-
type: PropType<IProTableProvideExtra>;
|
|
407
|
-
};
|
|
408
|
-
}>>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<Partial<ExtractPropTypes<{
|
|
409
|
-
operate: {
|
|
410
|
-
type: PropType<ITableOperate>;
|
|
411
|
-
};
|
|
412
|
-
columnEmptyText: {
|
|
413
|
-
type: StringConstructor;
|
|
414
|
-
};
|
|
415
|
-
/**
|
|
416
|
-
* 公共column,会merge到columns item中
|
|
417
|
-
*/
|
|
418
|
-
column: {
|
|
419
|
-
type: PropType<TTableColumn>;
|
|
420
|
-
};
|
|
421
|
-
columns: {
|
|
422
|
-
type: PropType<TTableColumns>;
|
|
423
|
-
};
|
|
424
|
-
columnState: {
|
|
425
|
-
type: PropType<Record<string, any>>;
|
|
426
|
-
};
|
|
427
|
-
/**
|
|
428
|
-
* 展示控件集合,readonly模式下使用这些组件渲染
|
|
429
|
-
*/
|
|
430
|
-
elementMap: {
|
|
431
|
-
type: PropType<TElementMap>;
|
|
432
|
-
};
|
|
433
|
-
/**
|
|
434
|
-
* loading
|
|
435
|
-
*/
|
|
436
|
-
loading: {
|
|
437
|
-
type: BooleanConstructor;
|
|
438
|
-
};
|
|
439
|
-
/**
|
|
440
|
-
* 序号
|
|
441
|
-
*/
|
|
442
|
-
serialNumber: {
|
|
443
|
-
type: BooleanConstructor;
|
|
444
|
-
};
|
|
445
|
-
/**
|
|
446
|
-
* 分页
|
|
447
|
-
*/
|
|
448
|
-
pagination: {
|
|
449
|
-
type: PropType<{
|
|
450
|
-
page?: number | undefined;
|
|
451
|
-
pageSize?: number | undefined;
|
|
452
|
-
}>;
|
|
453
|
-
};
|
|
454
|
-
/**
|
|
455
|
-
* provide传递
|
|
456
|
-
*/
|
|
457
|
-
provideExtra: {
|
|
458
|
-
type: PropType<IProTableProvideExtra>;
|
|
459
|
-
};
|
|
460
|
-
}>>>, {}>;
|
|
385
|
+
declare const createTable: (Table: any, Props?: any) => any;
|
|
461
386
|
|
|
462
|
-
declare
|
|
387
|
+
declare type TPageState = {
|
|
463
388
|
page: number;
|
|
464
389
|
pageSize: number;
|
|
465
390
|
};
|
|
391
|
+
declare const defaultPage: TPageState;
|
|
466
392
|
interface IListData extends Record<string, any> {
|
|
467
393
|
total: number;
|
|
468
394
|
dataSource: Record<string, any>[];
|
|
@@ -491,6 +417,25 @@ declare type TCurdActionEvent = {
|
|
|
491
417
|
source?: TActionEvent["source"];
|
|
492
418
|
};
|
|
493
419
|
declare const proCurdProps: () => {
|
|
420
|
+
/**
|
|
421
|
+
* 配置(静态)
|
|
422
|
+
*/
|
|
423
|
+
columns: {
|
|
424
|
+
type: PropType<TColumns>;
|
|
425
|
+
};
|
|
426
|
+
/**
|
|
427
|
+
* 配置(动态)
|
|
428
|
+
* columns动态属性兼容
|
|
429
|
+
*/
|
|
430
|
+
columnState: {
|
|
431
|
+
type: PropType<Record<string, any>>;
|
|
432
|
+
};
|
|
433
|
+
/**
|
|
434
|
+
* 录入组件集
|
|
435
|
+
*/
|
|
436
|
+
formElementMap: {
|
|
437
|
+
type: PropType<TElementMap>;
|
|
438
|
+
};
|
|
494
439
|
/**
|
|
495
440
|
* 列表 或 详情 的唯一标识
|
|
496
441
|
*/
|
|
@@ -525,6 +470,12 @@ declare type ProCurdProps = CurdProps & Omit<ProModuleProps, "state" | "requests
|
|
|
525
470
|
declare const ProCurd: vue.DefineComponent<ProCurdProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProCurdProps>, {}>;
|
|
526
471
|
|
|
527
472
|
interface IProCurdProvide {
|
|
473
|
+
columns: Ref<TColumns>;
|
|
474
|
+
getSignColumns: (signName: string) => TColumns;
|
|
475
|
+
getFormItemVNode: (column: TColumn, needRules: boolean | undefined) => VNode | null;
|
|
476
|
+
getItemVNode: (column: TColumn, value: any) => VNode | null;
|
|
477
|
+
elementMap: TElementMap;
|
|
478
|
+
formElementMap: TElementMap;
|
|
528
479
|
rowKey: string;
|
|
529
480
|
curdState: UnwrapNestedRefs<ICurdState>;
|
|
530
481
|
formColumns: Ref<TColumns>;
|
|
@@ -604,176 +555,104 @@ declare type PageCurdProps = Partial<ExtractPropTypes<ReturnType<typeof pageCurd
|
|
|
604
555
|
declare type ProPageCurdProps = PageCurdProps & ProCurdProps;
|
|
605
556
|
declare const ProPageCurd: vue.DefineComponent<ProPageCurdProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProPageCurdProps>, {}>;
|
|
606
557
|
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
showState: UnwrapNestedRefs<Record<string, any>>;
|
|
612
|
-
readonlyState: UnwrapNestedRefs<Record<string, any>>;
|
|
613
|
-
disableState: UnwrapNestedRefs<Record<string, any>>;
|
|
614
|
-
readonly: Ref<boolean | undefined>;
|
|
615
|
-
elementMap?: TElementMap;
|
|
616
|
-
formElementMap?: TElementMap;
|
|
617
|
-
columns: Ref<TColumns>;
|
|
618
|
-
}
|
|
619
|
-
declare const useProForm: () => IProFormProvide;
|
|
620
|
-
declare const proFormProps: () => {
|
|
621
|
-
/**
|
|
622
|
-
* 同 antd 或 element form中的model
|
|
623
|
-
*/
|
|
624
|
-
model: {
|
|
625
|
-
type: PropType<Record<string, any>>;
|
|
626
|
-
};
|
|
627
|
-
/**
|
|
628
|
-
* 子组件是否只读样式
|
|
629
|
-
*/
|
|
630
|
-
readonly: {
|
|
558
|
+
declare const createCurdDesc: (Descriptions: any, DescriptionsItem: any) => any;
|
|
559
|
+
|
|
560
|
+
declare const proCurdAddOrEditProps: () => {
|
|
561
|
+
operateBar: {
|
|
631
562
|
type: BooleanConstructor;
|
|
632
|
-
default:
|
|
633
|
-
};
|
|
634
|
-
/**
|
|
635
|
-
* FormComponent 根据此项来确定组件是否显示
|
|
636
|
-
* rules 根据rules中方法生成showState对象
|
|
637
|
-
*/
|
|
638
|
-
showState: {
|
|
639
|
-
type: PropType<BooleanObjType>;
|
|
640
|
-
};
|
|
641
|
-
showStateRules: {
|
|
642
|
-
type: PropType<BooleanRulesObjType>;
|
|
643
|
-
};
|
|
644
|
-
/**
|
|
645
|
-
* 是否只读
|
|
646
|
-
*/
|
|
647
|
-
readonlyState: {
|
|
648
|
-
type: PropType<BooleanObjType>;
|
|
649
|
-
};
|
|
650
|
-
readonlyStateRules: {
|
|
651
|
-
type: PropType<BooleanRulesObjType>;
|
|
652
|
-
};
|
|
653
|
-
/**
|
|
654
|
-
* 是否disabled
|
|
655
|
-
*/
|
|
656
|
-
disableState: {
|
|
657
|
-
type: PropType<BooleanObjType>;
|
|
563
|
+
default: boolean;
|
|
658
564
|
};
|
|
659
|
-
|
|
660
|
-
type:
|
|
565
|
+
showContinueAdd: {
|
|
566
|
+
type: BooleanConstructor;
|
|
567
|
+
default: boolean;
|
|
661
568
|
};
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
columns: {
|
|
666
|
-
type: PropType<TColumns>;
|
|
569
|
+
okText: {
|
|
570
|
+
type: StringConstructor;
|
|
571
|
+
default: string;
|
|
667
572
|
};
|
|
668
|
-
|
|
573
|
+
okButtonProps: {
|
|
669
574
|
type: PropType<Record<string, any>>;
|
|
670
575
|
};
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
elementMap: {
|
|
675
|
-
type: PropType<TElementMap>;
|
|
576
|
+
continueText: {
|
|
577
|
+
type: StringConstructor;
|
|
578
|
+
default: string;
|
|
676
579
|
};
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
*/
|
|
680
|
-
formElementMap: {
|
|
681
|
-
type: PropType<TElementMap>;
|
|
580
|
+
continueButtonProps: {
|
|
581
|
+
type: PropType<Record<string, any>>;
|
|
682
582
|
};
|
|
583
|
+
};
|
|
584
|
+
declare type ProCurdAddOrEditProps = Partial<ExtractPropTypes<ReturnType<typeof proCurdAddOrEditProps>>>;
|
|
585
|
+
declare const createCurdForm: (Form: any, Button: any, convertFormProps?: ((curdState: ICurdState) => Record<string, any>) | undefined) => any;
|
|
586
|
+
|
|
587
|
+
declare const proCurdListProps: () => {
|
|
683
588
|
/**
|
|
684
|
-
*
|
|
589
|
+
* extra 是否放到SearchForm中
|
|
685
590
|
*/
|
|
686
|
-
|
|
591
|
+
extraInSearch: {
|
|
687
592
|
type: BooleanConstructor;
|
|
688
|
-
default:
|
|
593
|
+
default: undefined;
|
|
689
594
|
};
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
*/
|
|
693
|
-
provideExtra: {
|
|
694
|
-
type: PropType<IProFormProvideExtra>;
|
|
595
|
+
searchProps: {
|
|
596
|
+
type: PropType<Record<string, any>>;
|
|
695
597
|
};
|
|
696
|
-
|
|
697
|
-
declare type ProFormProps = Partial<ExtractPropTypes<ReturnType<typeof proFormProps>>>;
|
|
698
|
-
declare const ProForm: vue.DefineComponent<{
|
|
699
|
-
/**
|
|
700
|
-
* 同 antd 或 element form中的model
|
|
701
|
-
*/
|
|
702
|
-
model: {
|
|
598
|
+
tableProps: {
|
|
703
599
|
type: PropType<Record<string, any>>;
|
|
704
600
|
};
|
|
601
|
+
pageState: {
|
|
602
|
+
type: PropType<TPageState>;
|
|
603
|
+
};
|
|
604
|
+
};
|
|
605
|
+
declare type ProCurdListProps = Partial<ExtractPropTypes<ReturnType<typeof proCurdListProps>>>;
|
|
606
|
+
declare const createCurdList: (SearchForm: any, Table: any) => vue.DefineComponent<Partial<ExtractPropTypes<{
|
|
705
607
|
/**
|
|
706
|
-
*
|
|
608
|
+
* extra 是否放到SearchForm中
|
|
707
609
|
*/
|
|
708
|
-
|
|
610
|
+
extraInSearch: {
|
|
709
611
|
type: BooleanConstructor;
|
|
710
612
|
default: undefined;
|
|
711
613
|
};
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
* rules 根据rules中方法生成showState对象
|
|
715
|
-
*/
|
|
716
|
-
showState: {
|
|
717
|
-
type: PropType<BooleanObjType>;
|
|
718
|
-
};
|
|
719
|
-
showStateRules: {
|
|
720
|
-
type: PropType<BooleanRulesObjType>;
|
|
721
|
-
};
|
|
722
|
-
/**
|
|
723
|
-
* 是否只读
|
|
724
|
-
*/
|
|
725
|
-
readonlyState: {
|
|
726
|
-
type: PropType<BooleanObjType>;
|
|
727
|
-
};
|
|
728
|
-
readonlyStateRules: {
|
|
729
|
-
type: PropType<BooleanRulesObjType>;
|
|
614
|
+
searchProps: {
|
|
615
|
+
type: PropType<Record<string, any>>;
|
|
730
616
|
};
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
*/
|
|
734
|
-
disableState: {
|
|
735
|
-
type: PropType<BooleanObjType>;
|
|
617
|
+
tableProps: {
|
|
618
|
+
type: PropType<Record<string, any>>;
|
|
736
619
|
};
|
|
737
|
-
|
|
738
|
-
type: PropType<
|
|
620
|
+
pageState: {
|
|
621
|
+
type: PropType<TPageState>;
|
|
739
622
|
};
|
|
623
|
+
}>>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<Partial<ExtractPropTypes<{
|
|
740
624
|
/**
|
|
741
|
-
*
|
|
625
|
+
* extra 是否放到SearchForm中
|
|
742
626
|
*/
|
|
743
|
-
|
|
744
|
-
type:
|
|
627
|
+
extraInSearch: {
|
|
628
|
+
type: BooleanConstructor;
|
|
629
|
+
default: undefined;
|
|
745
630
|
};
|
|
746
|
-
|
|
631
|
+
searchProps: {
|
|
747
632
|
type: PropType<Record<string, any>>;
|
|
748
633
|
};
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
*/
|
|
752
|
-
elementMap: {
|
|
753
|
-
type: PropType<TElementMap>;
|
|
754
|
-
};
|
|
755
|
-
/**
|
|
756
|
-
* 录入控件集合
|
|
757
|
-
*/
|
|
758
|
-
formElementMap: {
|
|
759
|
-
type: PropType<TElementMap>;
|
|
634
|
+
tableProps: {
|
|
635
|
+
type: PropType<Record<string, any>>;
|
|
760
636
|
};
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
*/
|
|
764
|
-
needRules: {
|
|
765
|
-
type: BooleanConstructor;
|
|
766
|
-
default: boolean;
|
|
637
|
+
pageState: {
|
|
638
|
+
type: PropType<TPageState>;
|
|
767
639
|
};
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
640
|
+
}>>>, {}>;
|
|
641
|
+
|
|
642
|
+
interface IProFormProvideExtra extends Record<string, any> {
|
|
643
|
+
}
|
|
644
|
+
interface IProFormProvide extends IProFormProvideExtra {
|
|
645
|
+
formState: UnwrapNestedRefs<Record<string, any>>;
|
|
646
|
+
showState: UnwrapNestedRefs<Record<string, any>>;
|
|
647
|
+
readonlyState: UnwrapNestedRefs<Record<string, any>>;
|
|
648
|
+
disableState: UnwrapNestedRefs<Record<string, any>>;
|
|
649
|
+
readonly: Ref<boolean | undefined>;
|
|
650
|
+
elementMap?: TElementMap;
|
|
651
|
+
formElementMap?: TElementMap;
|
|
652
|
+
columns: Ref<TColumns>;
|
|
653
|
+
}
|
|
654
|
+
declare const useProForm: () => IProFormProvide;
|
|
655
|
+
declare const proFormProps: () => {
|
|
777
656
|
/**
|
|
778
657
|
* 同 antd 或 element form中的model
|
|
779
658
|
*/
|
|
@@ -849,10 +728,9 @@ declare const ProForm: vue.DefineComponent<{
|
|
|
849
728
|
provideExtra: {
|
|
850
729
|
type: PropType<IProFormProvideExtra>;
|
|
851
730
|
};
|
|
852
|
-
}
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
}>;
|
|
731
|
+
};
|
|
732
|
+
declare type ProFormProps = Partial<ExtractPropTypes<ReturnType<typeof proFormProps>>>;
|
|
733
|
+
declare const createForm: (Form: any, Grid: any) => any;
|
|
856
734
|
|
|
857
735
|
declare enum SearchMode {
|
|
858
736
|
AUTO = "AUTO",
|
|
@@ -865,7 +743,6 @@ declare const proSearchFormProps: () => {
|
|
|
865
743
|
*/
|
|
866
744
|
model: {
|
|
867
745
|
type: PropType<Record<string, any>>;
|
|
868
|
-
required: boolean;
|
|
869
746
|
};
|
|
870
747
|
/**
|
|
871
748
|
* 初始化触发 onFinish
|
|
@@ -894,6 +771,10 @@ declare const proSearchFormProps: () => {
|
|
|
894
771
|
debounceKeys: {
|
|
895
772
|
type: PropType<string[]>;
|
|
896
773
|
};
|
|
774
|
+
debounceTypes: {
|
|
775
|
+
type: PropType<string[]>;
|
|
776
|
+
default: string[];
|
|
777
|
+
};
|
|
897
778
|
debounceTime: {
|
|
898
779
|
type: NumberConstructor;
|
|
899
780
|
default: number;
|
|
@@ -904,85 +785,7 @@ declare type ProSearchFormProps = Partial<ExtractPropTypes<ReturnType<typeof pro
|
|
|
904
785
|
* 该组件只是个模式,最终返回null,不做任何渲染,应配合着ProForm的包装类一起使用
|
|
905
786
|
* 针对传入的model(监听对象)做相应的finish(回调)处理
|
|
906
787
|
*/
|
|
907
|
-
declare const
|
|
908
|
-
/**
|
|
909
|
-
* 需要监听的对象
|
|
910
|
-
*/
|
|
911
|
-
model: {
|
|
912
|
-
type: PropType<Record<string, any>>;
|
|
913
|
-
required: boolean;
|
|
914
|
-
};
|
|
915
|
-
/**
|
|
916
|
-
* 初始化触发 onFinish
|
|
917
|
-
*/
|
|
918
|
-
initEmit: {
|
|
919
|
-
type: BooleanConstructor;
|
|
920
|
-
default: boolean;
|
|
921
|
-
};
|
|
922
|
-
/**
|
|
923
|
-
* 模式 自动触发或者手动触发 onFinish
|
|
924
|
-
*/
|
|
925
|
-
searchMode: {
|
|
926
|
-
type: PropType<"AUTO" | "MANUAL">;
|
|
927
|
-
default: SearchMode;
|
|
928
|
-
};
|
|
929
|
-
/**
|
|
930
|
-
* 配置 同ProForm中的columns
|
|
931
|
-
* 可以根据column中valueType计算出默认的debounceKeys
|
|
932
|
-
*/
|
|
933
|
-
columns: {
|
|
934
|
-
type: PropType<TColumns>;
|
|
935
|
-
};
|
|
936
|
-
/**
|
|
937
|
-
* 需要debounce处理的字段
|
|
938
|
-
*/
|
|
939
|
-
debounceKeys: {
|
|
940
|
-
type: PropType<string[]>;
|
|
941
|
-
};
|
|
942
|
-
debounceTime: {
|
|
943
|
-
type: NumberConstructor;
|
|
944
|
-
default: number;
|
|
945
|
-
};
|
|
946
|
-
}>>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<Partial<ExtractPropTypes<{
|
|
947
|
-
/**
|
|
948
|
-
* 需要监听的对象
|
|
949
|
-
*/
|
|
950
|
-
model: {
|
|
951
|
-
type: PropType<Record<string, any>>;
|
|
952
|
-
required: boolean;
|
|
953
|
-
};
|
|
954
|
-
/**
|
|
955
|
-
* 初始化触发 onFinish
|
|
956
|
-
*/
|
|
957
|
-
initEmit: {
|
|
958
|
-
type: BooleanConstructor;
|
|
959
|
-
default: boolean;
|
|
960
|
-
};
|
|
961
|
-
/**
|
|
962
|
-
* 模式 自动触发或者手动触发 onFinish
|
|
963
|
-
*/
|
|
964
|
-
searchMode: {
|
|
965
|
-
type: PropType<"AUTO" | "MANUAL">;
|
|
966
|
-
default: SearchMode;
|
|
967
|
-
};
|
|
968
|
-
/**
|
|
969
|
-
* 配置 同ProForm中的columns
|
|
970
|
-
* 可以根据column中valueType计算出默认的debounceKeys
|
|
971
|
-
*/
|
|
972
|
-
columns: {
|
|
973
|
-
type: PropType<TColumns>;
|
|
974
|
-
};
|
|
975
|
-
/**
|
|
976
|
-
* 需要debounce处理的字段
|
|
977
|
-
*/
|
|
978
|
-
debounceKeys: {
|
|
979
|
-
type: PropType<string[]>;
|
|
980
|
-
};
|
|
981
|
-
debounceTime: {
|
|
982
|
-
type: NumberConstructor;
|
|
983
|
-
default: number;
|
|
984
|
-
};
|
|
985
|
-
}>>>, {}>;
|
|
788
|
+
declare const createSearchForm: (Form: any, Props: any) => any;
|
|
986
789
|
|
|
987
790
|
interface FormItemProps {
|
|
988
791
|
name?: string | number | (string | number)[];
|
|
@@ -1085,6 +888,7 @@ interface IProFormListProvide {
|
|
|
1085
888
|
pathList: (string | number)[];
|
|
1086
889
|
}
|
|
1087
890
|
declare const useProFormList: () => IProFormListProvide;
|
|
891
|
+
declare const provideProFormList: (ctx: IProFormListProvide) => void;
|
|
1088
892
|
declare const proFormListProps: () => {
|
|
1089
893
|
rowKey: {
|
|
1090
894
|
type: StringConstructor;
|
|
@@ -1096,25 +900,32 @@ declare const proFormListProps: () => {
|
|
|
1096
900
|
};
|
|
1097
901
|
};
|
|
1098
902
|
declare type ProFormListProps = Partial<ExtractPropTypes<ReturnType<typeof proFormListProps>>>;
|
|
1099
|
-
declare const
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
903
|
+
declare const createFormList: (FormItem: any) => any;
|
|
904
|
+
|
|
905
|
+
declare type TData = Record<string, any>;
|
|
906
|
+
/**
|
|
907
|
+
* 根据value从treeData中找到对象
|
|
908
|
+
* @param data
|
|
909
|
+
* @param value
|
|
910
|
+
* @param fieldNames
|
|
911
|
+
* @param cb 对象:同步 方法:回调,可以理解为异步
|
|
912
|
+
*/
|
|
913
|
+
declare const findTargetInTree: (data: TData[], value: TOption["value"], fieldNames: FieldNames, cb: {
|
|
914
|
+
target?: TData | undefined;
|
|
915
|
+
index?: number | undefined;
|
|
916
|
+
list?: TData[] | undefined;
|
|
917
|
+
} | ((index: number, target: TData, list: TData[]) => void)) => void;
|
|
918
|
+
/**
|
|
919
|
+
* 根据value从treeData中找出对象及父列表
|
|
920
|
+
* @param data
|
|
921
|
+
* @param value
|
|
922
|
+
* @param fieldNames
|
|
923
|
+
* @param cb
|
|
924
|
+
* @param parent
|
|
925
|
+
*/
|
|
926
|
+
declare const findTargetListInTree: (data: TData[], value: TOption["value"], fieldNames: FieldNames, cb: {
|
|
927
|
+
list?: TData[] | undefined;
|
|
928
|
+
} | ((list?: TData[] | undefined) => void), parent?: TData[]) => void;
|
|
1118
929
|
|
|
1119
930
|
/**
|
|
1120
931
|
* 剔除showState或showStateRules规则为!true的值
|
|
@@ -1128,17 +939,23 @@ declare const getValidValues: (values: Record<string, any>, showState?: BooleanO
|
|
|
1128
939
|
* @param path
|
|
1129
940
|
*/
|
|
1130
941
|
declare const convertPathToList: (path: undefined | string | number | (string | number)[]) => undefined | (string | number)[];
|
|
1131
|
-
/**
|
|
1132
|
-
* 唯一id
|
|
1133
|
-
*/
|
|
1134
|
-
declare const generateId: () => string;
|
|
1135
942
|
/**
|
|
1136
943
|
* 将listState 中的数据通过id merge到 list item中
|
|
1137
944
|
* ps:数组会替换
|
|
945
|
+
* 注意:mergeWith 会改变原始对象
|
|
1138
946
|
* @param list
|
|
1139
947
|
* @param listState
|
|
1140
948
|
* @param id
|
|
1141
949
|
*/
|
|
1142
950
|
declare const mergeStateToList: (list: Record<string, any>[], listState: Record<string, any>, id: string | number | ((item: Record<string, any>) => string | number)) => Record<string, any>[];
|
|
1143
951
|
|
|
1144
|
-
|
|
952
|
+
/**
|
|
953
|
+
* 唯一id
|
|
954
|
+
*/
|
|
955
|
+
declare const generateId: () => string;
|
|
956
|
+
/**
|
|
957
|
+
* ref 传递
|
|
958
|
+
*/
|
|
959
|
+
declare const createExpose: (methods: string[], targetRef: Ref$1) => {};
|
|
960
|
+
|
|
961
|
+
export { BooleanObjType, BooleanRulesObjType, CurdAction, CurdAddAction, CurdCurrentMode, CurdSubAction, FieldNames, FormItemProps, GridProps, ICurdAction, ICurdAddAction, ICurdCurrentMode, ICurdOperateOpts, ICurdState, ICurdSubAction, IElementConfig, IHighConfig, IListData, IOperateItem, IProCurdProvide, IProFormProvideExtra, IProModuleProvide, IProTableProvide, IProTableProvideExtra, IRequestOpts, ISearchMode, ITableOperate, InternalNamePath, NamePath, ProCurd, ProCurdAddOrEditProps, ProCurdListProps, ProCurdProps, ProFormItemProps, ProFormListProps, ProFormProps, ProModalCurd, ProModalCurdProps, ProModule, ProModuleProps, ProPageCurd, ProPageCurdProps, ProSearchFormProps, ProTableProps, RequestAction, SearchMode, TActionEvent, TActionState, TColumn, TColumns, TCurdActionEvent, TData, TDefaultValueType, TElementMap, TOption, TOptions, TPageState, TTableColumn, TTableColumns, TValueType, Wrapper, convertPathToList, createCurdDesc, createCurdForm, createCurdList, createExpose, createForm, createFormItemCompFn, createFormList, createGrid, createSearchForm, createTable, defaultPage, findTargetInTree, findTargetListInTree, generateId, getColumnFormItemName, getColumnValueType, getFirstPropName, getFormItemEl, getItemEl, getValidValues, mergeStateToList, provideProCurd, provideProFormList, provideProModule, renderElement, renderElements, useComposeRequestActor, useDoneRequestActor, useFailedRequestActor, useModuleEvent, useProCurd, useProForm, useProFormList, useProModule, useProTable };
|