@vue-start/pro 0.4.12 → 0.4.13

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 CHANGED
@@ -4,956 +4,957 @@ 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>>>;
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
24
  declare const createGrid: (Row: any, Col: any) => any;
25
25
 
26
- declare type TDefaultValueType = "text" | "textarea" | "password" | "digit" | "date" | "dateRange" | "time" | "timeRange" | "select" | "treeSelect" | "checkbox" | "radio" | "slider" | "switch" | "rate" | "cascader";
27
- declare type TValueType = TDefaultValueType | string;
28
- declare type TOption = {
29
- label?: string;
30
- value: string | number;
31
- disabled?: boolean;
32
- };
33
- declare type TOptions = TOption[];
34
- declare type TreeOption = {
35
- label?: string;
36
- value: string | number;
37
- disabled?: boolean;
38
- children?: TreeOption[];
39
- };
40
- declare type TreeOptions = TreeOption[];
41
- declare type TColumn = {
42
- title?: string | VNode;
43
- dataIndex?: string | number;
44
- valueType?: TValueType;
45
- formValueType?: TValueType;
46
- showProps?: Record<string, any>;
47
- formItemProps?: {
48
- name?: string;
49
- label?: string;
50
- };
51
- formFieldProps?: Record<string, any>;
52
- search?: boolean;
53
- extra?: {
54
- desc?: Record<string, any>;
55
- col?: Record<string, any>;
56
- } & Record<string, any>;
57
- };
58
- declare type TColumns = TColumn[];
59
- /**
60
- * 发送事件对象
61
- */
62
- declare type TActionEvent = {
63
- type: string;
64
- payload?: any;
65
- /**
66
- * 发送事件源
67
- * 公共组件(如:Curd)只处理source为undefined的事件
68
- * 业务组件可以传入该参数覆盖之前的默认行为
69
- */
70
- source?: string;
71
- extra?: Record<string, any>;
72
- };
73
- /**
74
- * 发送state对象
75
- */
76
- declare type TActionState = {
77
- type: string;
78
- payload: any;
79
- extra?: Record<string, any>;
80
- };
81
- /**
82
- * 组件Map
83
- */
84
- declare type TElementMap = Record<string, any>;
85
- declare type BooleanObjType = {
86
- [key: string]: boolean;
87
- };
88
- declare type BooleanRulesObjType = {
89
- [key: string]: (record: any) => boolean;
90
- };
91
- /**
92
- *
93
- */
94
- interface FieldNames {
95
- value?: string;
96
- label?: string;
97
- children?: string;
26
+ declare type TDefaultValueType = "text" | "textarea" | "password" | "digit" | "date" | "dateRange" | "time" | "timeRange" | "select" | "treeSelect" | "checkbox" | "radio" | "slider" | "switch" | "rate" | "cascader";
27
+ declare type TValueType = TDefaultValueType | string;
28
+ declare type TOption = {
29
+ label?: string;
30
+ value: string | number;
31
+ disabled?: boolean;
32
+ };
33
+ declare type TOptions = TOption[];
34
+ declare type TreeOption = {
35
+ label?: string;
36
+ value: string | number;
37
+ disabled?: boolean;
38
+ children?: TreeOption[];
39
+ };
40
+ declare type TreeOptions = TreeOption[];
41
+ declare type TColumn = {
42
+ title?: string | VNode;
43
+ dataIndex?: string | number;
44
+ valueType?: TValueType;
45
+ formValueType?: TValueType;
46
+ showProps?: Record<string, any>;
47
+ formItemProps?: {
48
+ name?: string;
49
+ label?: string;
50
+ };
51
+ formFieldProps?: Record<string, any>;
52
+ search?: boolean;
53
+ extra?: {
54
+ desc?: Record<string, any>;
55
+ col?: Record<string, any>;
56
+ } & Record<string, any>;
57
+ };
58
+ declare type TColumns = TColumn[];
59
+ /**
60
+ * 发送事件对象
61
+ */
62
+ declare type TActionEvent = {
63
+ type: string;
64
+ payload?: any;
65
+ /**
66
+ * 发送事件源
67
+ * 公共组件(如:Curd)只处理source为undefined的事件
68
+ * 业务组件可以传入该参数覆盖之前的默认行为
69
+ */
70
+ source?: string;
71
+ extra?: Record<string, any>;
72
+ };
73
+ /**
74
+ * 发送state对象
75
+ */
76
+ declare type TActionState = {
77
+ type: string;
78
+ payload: any;
79
+ extra?: Record<string, any>;
80
+ };
81
+ /**
82
+ * 组件Map
83
+ */
84
+ declare type TElementMap = Record<string, any>;
85
+ declare type BooleanObjType = {
86
+ [key: string]: boolean;
87
+ };
88
+ declare type BooleanRulesObjType = {
89
+ [key: string]: (record: any) => boolean;
90
+ };
91
+ /**
92
+ *
93
+ */
94
+ interface FieldNames {
95
+ value?: string;
96
+ label?: string;
97
+ children?: string;
98
98
  }
99
99
 
100
- /***************************************** curd模式 *****************************************/
101
- /**
102
- * 获取Column的valueType,默认"text"
103
- * @param column
104
- */
105
- declare const getColumnValueType: (column: TColumn) => TValueType;
106
- /**
107
- *获取Column的FormItem name
108
- * @param column
109
- */
110
- declare const getColumnFormItemName: (column: TColumn) => string | number | undefined;
111
- /**
112
- * 根据Column生成FormItem VNode
113
- * formFieldProps中的slots参数会以v-slots的形式传递到FormItem的录入组件(子组件)中
114
- * @param formElementMap
115
- * @param column
116
- * @param needRules
117
- */
118
- declare const getFormItemEl: (formElementMap: any, column: TColumn, needRules?: boolean | undefined) => VNode | null;
119
- /**
120
- * 根据Column生成Item VNode
121
- * @param elementMap
122
- * @param column
123
- * @param value
124
- */
125
- declare const getItemEl: <T extends TColumn>(elementMap: any, column: T, value: any) => VNode | null;
126
- /***************************************** 通用模式 *****************************************/
127
- declare type InternalNamePath = (string | number)[];
128
- declare type NamePath = string | number | InternalNamePath;
129
- interface IHighConfig {
130
- registerStateList?: {
131
- name: NamePath;
132
- mapName?: NamePath;
133
- }[];
134
- registerEventList?: {
135
- name: string;
136
- sendEventName?: TActionEvent["type"];
137
- }[];
138
- registerPropsTrans?: {
139
- name: NamePath;
140
- isFun?: boolean;
141
- needParams?: boolean;
142
- }[];
143
- }
144
- /**
145
- * 组件树描述
146
- */
147
- interface IElementConfig {
148
- elementType: string;
149
- elementId: string;
150
- elementProps?: Record<string, any>;
151
- slots?: {
152
- [name: string]: ((...params$: any[]) => any) | (IElementConfig & {
153
- needParams?: boolean;
154
- });
155
- };
156
- children?: IElementConfig[];
157
- childrenSlotName?: string;
158
- highConfig$?: IHighConfig;
159
- }
160
- declare const renderElements: (elementMap: TElementMap, elementConfigs: IElementConfig[]) => (VNode | null)[];
161
- /**
162
- *
163
- * @param elementMap
164
- * @param elementConfig
165
- */
166
- declare const renderElement: (elementMap: TElementMap, elementConfig: IElementConfig) => VNode<vue.RendererNode, vue.RendererElement, {
167
- [key: string]: any;
168
- }>;
169
- /**
170
- * 获取第一层级属性名
171
- * 如:['aaa','bbb',...] 中的 'aaa'
172
- * 如:"aaa.bbb.ccc..." 中的 'aaa'
173
- */
174
- declare const getFirstPropName: (name: NamePath) => string | number | undefined;
175
- /**
176
- * 处理highConfig$
177
- */
178
- declare const Wrapper: vue.DefineComponent<{
179
- elementMap: TElementMap;
180
- elementConfig: IElementConfig;
181
- }, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{
182
- elementMap: TElementMap;
183
- elementConfig: IElementConfig;
100
+ /***************************************** curd模式 *****************************************/
101
+ /**
102
+ * 获取Column的valueType,默认"text"
103
+ * @param column
104
+ */
105
+ declare const getColumnValueType: (column: TColumn) => TValueType;
106
+ /**
107
+ *获取Column的FormItem name
108
+ * @param column
109
+ */
110
+ declare const getColumnFormItemName: (column: TColumn) => string | number | undefined;
111
+ /**
112
+ * 根据Column生成FormItem VNode
113
+ * formFieldProps中的slots参数会以v-slots的形式传递到FormItem的录入组件(子组件)中
114
+ * @param formElementMap
115
+ * @param column
116
+ * @param needRules
117
+ */
118
+ declare const getFormItemEl: (formElementMap: any, column: TColumn, needRules?: boolean | undefined) => VNode | null;
119
+ /**
120
+ * 根据Column生成Item VNode
121
+ * @param elementMap
122
+ * @param column
123
+ * @param value
124
+ */
125
+ declare const getItemEl: <T extends TColumn>(elementMap: any, column: T, value: any) => VNode | null;
126
+ /***************************************** 通用模式 *****************************************/
127
+ declare type InternalNamePath = (string | number)[];
128
+ declare type NamePath = string | number | InternalNamePath;
129
+ interface IHighConfig {
130
+ registerStateList?: {
131
+ name: NamePath;
132
+ mapName?: NamePath;
133
+ }[];
134
+ registerEventList?: {
135
+ name: string;
136
+ sendEventName?: TActionEvent["type"];
137
+ }[];
138
+ registerPropsTrans?: {
139
+ name: NamePath;
140
+ isFun?: boolean;
141
+ needParams?: boolean;
142
+ }[];
143
+ }
144
+ /**
145
+ * 组件树描述
146
+ */
147
+ interface IElementConfig {
148
+ elementType: string;
149
+ elementId: string;
150
+ elementProps?: Record<string, any>;
151
+ slots?: {
152
+ [name: string]: ((...params$: any[]) => any) | (IElementConfig & {
153
+ needParams?: boolean;
154
+ });
155
+ };
156
+ children?: IElementConfig[];
157
+ childrenSlotName?: string;
158
+ highConfig$?: IHighConfig;
159
+ }
160
+ declare const renderElements: (elementMap: TElementMap, elementConfigs: IElementConfig[]) => (VNode | null)[];
161
+ /**
162
+ *
163
+ * @param elementMap
164
+ * @param elementConfig
165
+ */
166
+ declare const renderElement: (elementMap: TElementMap, elementConfig: IElementConfig) => VNode<vue.RendererNode, vue.RendererElement, {
167
+ [key: string]: any;
168
+ }>;
169
+ /**
170
+ * 获取第一层级属性名
171
+ * 如:['aaa','bbb',...] 中的 'aaa'
172
+ * 如:"aaa.bbb.ccc..." 中的 'aaa'
173
+ */
174
+ declare const getFirstPropName: (name: NamePath) => string | number | undefined;
175
+ /**
176
+ * 处理highConfig$
177
+ */
178
+ declare const Wrapper: vue.DefineComponent<{
179
+ elementMap: TElementMap;
180
+ elementConfig: IElementConfig;
181
+ }, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{
182
+ elementMap: TElementMap;
183
+ elementConfig: IElementConfig;
184
184
  }>, {}>;
185
185
 
186
- interface IProModuleProvide {
187
- elementMap: TElementMap;
188
- subject$: Subject<TActionEvent>;
189
- sendEvent: (action: TActionEvent) => void;
190
- state: UnwrapNestedRefs<Record<string, any>>;
191
- dispatch: (action: TActionState) => void;
192
- requests: IRequestOpts[];
193
- sendRequest: (requestNameOrAction: string, ...params: any[]) => void;
194
- }
195
- declare const useProModule: () => IProModuleProvide;
196
- declare const provideProModule: (ctx: IProModuleProvide) => void;
197
- interface IRequestOpts {
198
- actor: IRequestActor;
199
- /**
200
- * 如果设置action,可以使用该值发起请求 住:要保证唯一性
201
- * 设置该字段原因:因为actor中的name不友好,可以理解为一个备选方案
202
- */
203
- action?: string;
204
- stateName?: string;
205
- loadingName?: string;
206
- convertParams?: (...params: any[]) => Record<string, any>;
207
- convertData?: (actor: IRequestActor) => Record<string, any>;
208
- onSuccess?: (actor?: IRequestActor) => void;
209
- onFailed?: (actor?: IRequestActor) => void;
210
- }
211
- declare const RequestAction: {
212
- Success: string;
213
- Fail: string;
214
- };
215
- declare const proModuleProps: () => {
216
- /**
217
- * module状态
218
- */
219
- state: {
220
- type: PropType<Record<string, any>>;
221
- };
222
- /**
223
- * 组件集
224
- */
225
- elementMap: {
226
- type: PropType<TElementMap>;
227
- };
228
- /**
229
- * 组件描述(树)
230
- */
231
- elementConfigs: {
232
- type: PropType<IElementConfig[]>;
233
- };
234
- /**
235
- * requests
236
- */
237
- requests: {
238
- type: PropType<IRequestOpts[]>;
239
- };
240
- };
241
- declare type ProModuleProps = Partial<ExtractPropTypes<ReturnType<typeof proModuleProps>>>;
242
- declare const ProModule: vue.DefineComponent<Partial<ExtractPropTypes<{
243
- /**
244
- * module状态
245
- */
246
- state: {
247
- type: PropType<Record<string, any>>;
248
- };
249
- /**
250
- * 组件集
251
- */
252
- elementMap: {
253
- type: PropType<TElementMap>;
254
- };
255
- /**
256
- * 组件描述(树)
257
- */
258
- elementConfigs: {
259
- type: PropType<IElementConfig[]>;
260
- };
261
- /**
262
- * requests
263
- */
264
- requests: {
265
- type: PropType<IRequestOpts[]>;
266
- };
267
- }>>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<Partial<ExtractPropTypes<{
268
- /**
269
- * module状态
270
- */
271
- state: {
272
- type: PropType<Record<string, any>>;
273
- };
274
- /**
275
- * 组件集
276
- */
277
- elementMap: {
278
- type: PropType<TElementMap>;
279
- };
280
- /**
281
- * 组件描述(树)
282
- */
283
- elementConfigs: {
284
- type: PropType<IElementConfig[]>;
285
- };
286
- /**
287
- * requests
288
- */
289
- requests: {
290
- type: PropType<IRequestOpts[]>;
291
- };
186
+ interface IProModuleProvide {
187
+ elementMap: TElementMap;
188
+ subject$: Subject<TActionEvent>;
189
+ sendEvent: (action: TActionEvent) => void;
190
+ state: UnwrapNestedRefs<Record<string, any>>;
191
+ dispatch: (action: TActionState) => void;
192
+ requests: IRequestOpts[];
193
+ sendRequest: (requestNameOrAction: string, ...params: any[]) => void;
194
+ }
195
+ declare const useProModule: () => IProModuleProvide;
196
+ declare const provideProModule: (ctx: IProModuleProvide) => void;
197
+ interface IRequestOpts {
198
+ actor: IRequestActor;
199
+ /**
200
+ * 如果设置action,可以使用该值发起请求 住:要保证唯一性
201
+ * 设置该字段原因:因为actor中的name不友好,可以理解为一个备选方案
202
+ */
203
+ action?: string;
204
+ stateName?: string;
205
+ loadingName?: string;
206
+ convertParams?: (...params: any[]) => Record<string, any>;
207
+ convertData?: (actor: IRequestActor) => Record<string, any>;
208
+ onSuccess?: (actor?: IRequestActor) => void;
209
+ onFailed?: (actor?: IRequestActor) => void;
210
+ }
211
+ declare const RequestAction: {
212
+ Success: string;
213
+ Fail: string;
214
+ };
215
+ declare const proModuleProps: () => {
216
+ /**
217
+ * module状态
218
+ */
219
+ state: {
220
+ type: PropType<Record<string, any>>;
221
+ };
222
+ /**
223
+ * 组件集
224
+ */
225
+ elementMap: {
226
+ type: PropType<TElementMap>;
227
+ };
228
+ /**
229
+ * 组件描述(树)
230
+ */
231
+ elementConfigs: {
232
+ type: PropType<IElementConfig[]>;
233
+ };
234
+ /**
235
+ * requests
236
+ */
237
+ requests: {
238
+ type: PropType<IRequestOpts[]>;
239
+ };
240
+ };
241
+ declare type ProModuleProps = Partial<ExtractPropTypes<ReturnType<typeof proModuleProps>>>;
242
+ declare const ProModule: vue.DefineComponent<Partial<ExtractPropTypes<{
243
+ /**
244
+ * module状态
245
+ */
246
+ state: {
247
+ type: PropType<Record<string, any>>;
248
+ };
249
+ /**
250
+ * 组件集
251
+ */
252
+ elementMap: {
253
+ type: PropType<TElementMap>;
254
+ };
255
+ /**
256
+ * 组件描述(树)
257
+ */
258
+ elementConfigs: {
259
+ type: PropType<IElementConfig[]>;
260
+ };
261
+ /**
262
+ * requests
263
+ */
264
+ requests: {
265
+ type: PropType<IRequestOpts[]>;
266
+ };
267
+ }>>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<Partial<ExtractPropTypes<{
268
+ /**
269
+ * module状态
270
+ */
271
+ state: {
272
+ type: PropType<Record<string, any>>;
273
+ };
274
+ /**
275
+ * 组件集
276
+ */
277
+ elementMap: {
278
+ type: PropType<TElementMap>;
279
+ };
280
+ /**
281
+ * 组件描述(树)
282
+ */
283
+ elementConfigs: {
284
+ type: PropType<IElementConfig[]>;
285
+ };
286
+ /**
287
+ * requests
288
+ */
289
+ requests: {
290
+ type: PropType<IRequestOpts[]>;
291
+ };
292
292
  }>>>, {}>;
293
293
 
294
294
  declare const useModuleEvent: (cb: (action: TActionEvent) => void) => void;
295
295
 
296
- declare const useDoneRequestActor: (actors: (IRequestActor | string)[], callback: (actor: IRequestActor) => void) => void;
297
- declare const useFailedRequestActor: (actors: (IRequestActor | string)[], callback: (actor: IRequestActor) => void) => void;
298
- declare const useComposeRequestActor: (actors: (IRequestActor | string)[], options: {
299
- onSuccess?: ((actor: IRequestActor) => void) | undefined;
300
- onFailed?: ((actor: IRequestActor) => void) | undefined;
301
- onFinish?: ((actor: IRequestActor) => void) | undefined;
296
+ declare const useDoneRequestActor: (actors: (IRequestActor | string)[], callback: (actor: IRequestActor) => void) => void;
297
+ declare const useFailedRequestActor: (actors: (IRequestActor | string)[], callback: (actor: IRequestActor) => void) => void;
298
+ declare const useComposeRequestActor: (actors: (IRequestActor | string)[], options: {
299
+ onSuccess?: ((actor: IRequestActor) => void) | undefined;
300
+ onFailed?: ((actor: IRequestActor) => void) | undefined;
301
+ onFinish?: ((actor: IRequestActor) => void) | undefined;
302
302
  }, cancelWhileUnmount?: boolean) => void;
303
303
 
304
- declare const proBasePropsFn: () => {
305
- /**
306
- * 组件集
307
- */
308
- elementMap: {
309
- type: PropType<TElementMap>;
310
- };
311
- /**
312
- * form组件集(使用FormItem包裹的组件集合)
313
- * readonly模式下使用elementMap中的组件渲染
314
- */
315
- formElementMap: {
316
- type: PropType<TElementMap>;
317
- };
318
- /**
319
- * 基础项配置
320
- */
321
- columns: {
322
- type: PropType<TColumns>;
323
- };
324
- /**
325
- * 对 column 进行补充
326
- * 通常对columns为静态值时候使用
327
- */
328
- columnState: {
329
- type: PropType<Record<string, any>>;
330
- };
331
- };
332
- declare type ProBaseProps = Partial<ExtractPropTypes<ReturnType<typeof proBasePropsFn>>>;
333
- declare const proBaseProps: ProBaseProps;
334
- interface IProConfigProvide {
335
- /**
336
- * 组件集
337
- */
338
- elementMap?: TElementMap;
339
- /**
340
- * form组件集(使用FormItem包裹的组件集合)
341
- */
342
- formElementMap?: TElementMap;
343
- }
344
- declare const proConfigProps: () => {
345
- config: {
346
- type: PropType<IProConfigProvide>;
347
- default: {};
348
- };
349
- };
350
- declare const useProConfig: () => IProConfigProvide;
351
- declare type ProConfigProps = Partial<ExtractPropTypes<ReturnType<typeof proConfigProps>>>;
352
- /**
353
- * 组件方式注册
354
- */
355
- declare const ProConfig: vue.DefineComponent<Partial<ExtractPropTypes<{
356
- config: {
357
- type: PropType<IProConfigProvide>;
358
- default: {};
359
- };
360
- }>>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<Partial<ExtractPropTypes<{
361
- config: {
362
- type: PropType<IProConfigProvide>;
363
- default: {};
364
- };
365
- }>>>, {}>;
366
- /**
367
- * app.use 方式注册
368
- * @param config
369
- */
304
+ declare const proBasePropsFn: () => {
305
+ /**
306
+ * 组件集
307
+ */
308
+ elementMap: {
309
+ type: PropType<TElementMap>;
310
+ };
311
+ /**
312
+ * form组件集(使用FormItem包裹的组件集合)
313
+ * readonly模式下使用elementMap中的组件渲染
314
+ */
315
+ formElementMap: {
316
+ type: PropType<TElementMap>;
317
+ };
318
+ /**
319
+ * 基础项配置
320
+ */
321
+ columns: {
322
+ type: PropType<TColumns>;
323
+ };
324
+ /**
325
+ * 对 column 进行补充
326
+ * 通常对columns为静态值时候使用
327
+ */
328
+ columnState: {
329
+ type: PropType<Record<string, any>>;
330
+ };
331
+ };
332
+ declare type ProBaseProps = Partial<ExtractPropTypes<ReturnType<typeof proBasePropsFn>>>;
333
+ declare const proBaseProps: ProBaseProps;
334
+ interface IProConfigProvide {
335
+ /**
336
+ * 组件集
337
+ */
338
+ elementMap?: TElementMap;
339
+ /**
340
+ * form组件集(使用FormItem包裹的组件集合)
341
+ */
342
+ formElementMap?: TElementMap;
343
+ }
344
+ declare const proConfigProps: () => {
345
+ config: {
346
+ type: PropType<IProConfigProvide>;
347
+ default: {};
348
+ };
349
+ };
350
+ declare const useProConfig: () => IProConfigProvide;
351
+ declare type ProConfigProps = Partial<ExtractPropTypes<ReturnType<typeof proConfigProps>>>;
352
+ /**
353
+ * 组件方式注册
354
+ */
355
+ declare const ProConfig: vue.DefineComponent<Partial<ExtractPropTypes<{
356
+ config: {
357
+ type: PropType<IProConfigProvide>;
358
+ default: {};
359
+ };
360
+ }>>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<Partial<ExtractPropTypes<{
361
+ config: {
362
+ type: PropType<IProConfigProvide>;
363
+ default: {};
364
+ };
365
+ }>>>, {}>;
366
+ /**
367
+ * app.use 方式注册
368
+ * @param config
369
+ */
370
370
  declare const createProConfig: (config?: IProConfigProvide) => (app: App) => void;
371
371
 
372
- interface IProTableProvideExtra extends Record<string, any> {
373
- }
374
- interface IProTableProvide extends IProTableProvideExtra {
375
- columns: Ref<TTableColumns>;
376
- }
377
- declare const useProTable: () => IProTableProvide;
378
- declare type TTableColumn = {
379
- customRender?: (opt: {
380
- value: any;
381
- text: any;
382
- record: Record<string, any>;
383
- index: number;
384
- column: TTableColumn;
385
- }) => VNode | string | number;
386
- fixed?: boolean | string;
387
- width?: number | string;
388
- } & TColumn;
389
- declare type TTableColumns = TTableColumn[];
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;
401
- }
402
- /**
403
- * 整个操作栏描述
404
- */
405
- interface ITableOperate {
406
- column?: TColumn;
407
- items?: IOperateItem[];
408
- itemState?: {
409
- [key: string]: Omit<IOperateItem, "value">;
410
- };
411
- }
412
- declare const proTableProps: () => {
413
- operate: {
414
- type: PropType<ITableOperate>;
415
- };
416
- columnEmptyText: {
417
- type: StringConstructor;
418
- };
419
- /**
420
- * 公共column,会merge到columns item中
421
- */
422
- column: {
423
- type: PropType<TTableColumn>;
424
- };
425
- /**
426
- * 序号
427
- */
428
- serialNumber: {
429
- type: BooleanConstructor;
430
- };
431
- /**
432
- * 分页
433
- */
434
- paginationState: {
435
- type: PropType<{
436
- page?: number | undefined;
437
- pageSize?: number | undefined;
438
- }>;
439
- };
440
- /**
441
- * provide传递
442
- */
443
- provideExtra: {
444
- type: PropType<IProTableProvideExtra>;
445
- };
446
- };
447
- declare type ProTableProps = Partial<ExtractPropTypes<ReturnType<typeof proTableProps>>> & ProBaseProps;
372
+ interface IProTableProvideExtra extends Record<string, any> {
373
+ }
374
+ interface IProTableProvide extends IProTableProvideExtra {
375
+ columns: Ref<TTableColumns>;
376
+ }
377
+ declare const useProTable: () => IProTableProvide;
378
+ declare type TTableColumn = {
379
+ customRender?: (opt: {
380
+ value: any;
381
+ text: any;
382
+ record: Record<string, any>;
383
+ index: number;
384
+ column: TTableColumn;
385
+ }) => VNode | string | number;
386
+ fixed?: boolean | string;
387
+ width?: number | string;
388
+ } & TColumn;
389
+ declare type TTableColumns = TTableColumn[];
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;
401
+ }
402
+ /**
403
+ * 整个操作栏描述
404
+ */
405
+ interface ITableOperate {
406
+ column?: TColumn;
407
+ items?: IOperateItem[];
408
+ itemState?: {
409
+ [key: string]: Omit<IOperateItem, "value">;
410
+ };
411
+ }
412
+ declare const proTableProps: () => {
413
+ operate: {
414
+ type: PropType<ITableOperate>;
415
+ };
416
+ columnEmptyText: {
417
+ type: StringConstructor;
418
+ };
419
+ /**
420
+ * 公共column,会merge到columns item中
421
+ */
422
+ column: {
423
+ type: PropType<TTableColumn>;
424
+ };
425
+ /**
426
+ * 序号
427
+ */
428
+ serialNumber: {
429
+ type: BooleanConstructor;
430
+ };
431
+ /**
432
+ * 分页
433
+ */
434
+ paginationState: {
435
+ type: PropType<{
436
+ page?: number | undefined;
437
+ pageSize?: number | undefined;
438
+ }>;
439
+ };
440
+ /**
441
+ * provide传递
442
+ */
443
+ provideExtra: {
444
+ type: PropType<IProTableProvideExtra>;
445
+ };
446
+ };
447
+ declare type ProTableProps = Partial<ExtractPropTypes<ReturnType<typeof proTableProps>>> & ProBaseProps;
448
448
  declare const createTable: (Table: any, Props?: any, tableMethods?: string[]) => any;
449
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
- /**
485
- * 列表 或 详情 的唯一标识
486
- */
487
- rowKey: {
488
- type: StringConstructor;
489
- default: string;
490
- };
491
- /**
492
- * operates
493
- */
494
- operates: {
495
- type: PropType<ICurdOperateOpts[]>;
496
- };
497
- /************************* 子组件props *******************************/
498
- listProps: {
499
- type: PropType<Record<string, any>>;
500
- };
501
- formProps: {
502
- type: PropType<Record<string, any>>;
503
- };
504
- descProps: {
505
- type: PropType<Record<string, any>>;
506
- };
507
- modalProps: {
508
- type: PropType<Record<string, any>>;
509
- };
510
- };
511
- declare type CurdProps = Partial<ExtractPropTypes<ReturnType<typeof proCurdProps>>> & ProBaseProps;
512
- declare const CurdMethods: string[];
513
- declare type ProCurdProps = CurdProps & Omit<ProModuleProps, "state" | "requests"> & {
514
- curdState?: UnwrapNestedRefs<ICurdState>;
515
- };
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
+ /**
485
+ * 列表 或 详情 的唯一标识
486
+ */
487
+ rowKey: {
488
+ type: StringConstructor;
489
+ default: string;
490
+ };
491
+ /**
492
+ * operates
493
+ */
494
+ operates: {
495
+ type: PropType<ICurdOperateOpts[]>;
496
+ };
497
+ /************************* 子组件props *******************************/
498
+ listProps: {
499
+ type: PropType<Record<string, any>>;
500
+ };
501
+ formProps: {
502
+ type: PropType<Record<string, any>>;
503
+ };
504
+ descProps: {
505
+ type: PropType<Record<string, any>>;
506
+ };
507
+ modalProps: {
508
+ type: PropType<Record<string, any>>;
509
+ };
510
+ };
511
+ declare type CurdProps = Partial<ExtractPropTypes<ReturnType<typeof proCurdProps>>> & ProBaseProps;
512
+ declare const CurdMethods: string[];
513
+ declare type ProCurdProps = CurdProps & Omit<ProModuleProps, "state" | "requests"> & {
514
+ curdState?: UnwrapNestedRefs<ICurdState>;
515
+ };
516
516
  declare const ProCurd: vue.DefineComponent<ProCurdProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProCurdProps>, {}>;
517
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
- }
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
582
  declare type ICurdAddAction = keyof typeof CurdAddAction;
583
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;
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
591
  declare const ProModalCurd: vue.DefineComponent<ProModalCurdProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProModalCurdProps>, {}>;
592
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;
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
603
  declare const ProPageCurd: vue.DefineComponent<ProPageCurdProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProPageCurdProps>, {}>;
604
604
 
605
605
  declare const createCurdDesc: (Descriptions: any, DescriptionsItem: any) => any;
606
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>>>;
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
639
  declare const createCurdForm: (Form: any, Button: any, convertFormProps?: ((curdState: ICurdState) => Record<string, any>) | undefined, formMethods?: string[]) => any;
640
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
- };
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
715
  }>>>, {}>;
716
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;
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
787
  declare const createForm: (Form: any, Grid: any, formMethods: string[]) => any;
788
788
 
789
- declare enum SearchMode {
790
- AUTO = "AUTO",
791
- MANUAL = "MANUAL"
792
- }
793
- declare type ISearchMode = keyof typeof SearchMode;
794
- declare const proSearchFormProps: () => {
795
- /**
796
- * 初始化触发 onFinish
797
- */
798
- initEmit: {
799
- type: BooleanConstructor;
800
- default: boolean;
801
- };
802
- /**
803
- * 模式 自动触发或者手动触发 onFinish
804
- */
805
- searchMode: {
806
- type: PropType<"AUTO" | "MANUAL">;
807
- default: SearchMode;
808
- };
809
- /**
810
- * 需要debounce处理的字段
811
- */
812
- debounceKeys: {
813
- type: PropType<string[]>;
814
- };
815
- debounceTypes: {
816
- type: PropType<string[]>;
817
- default: string[];
818
- };
819
- debounceTime: {
820
- type: NumberConstructor;
821
- default: number;
822
- };
823
- };
824
- declare type ProSearchFormProps = Partial<ExtractPropTypes<ReturnType<typeof proSearchFormProps>>> & ProFormProps;
825
- /**
826
- * 该组件只是个模式,最终返回null,不做任何渲染,应配合着ProForm的包装类一起使用
827
- * 针对传入的model(监听对象)做相应的finish(回调)处理
828
- */
789
+ declare enum SearchMode {
790
+ AUTO = "AUTO",
791
+ MANUAL = "MANUAL"
792
+ }
793
+ declare type ISearchMode = keyof typeof SearchMode;
794
+ declare const proSearchFormProps: () => {
795
+ /**
796
+ * 初始化触发 onFinish
797
+ */
798
+ initEmit: {
799
+ type: BooleanConstructor;
800
+ default: boolean;
801
+ };
802
+ /**
803
+ * 模式 自动触发或者手动触发 onFinish
804
+ */
805
+ searchMode: {
806
+ type: PropType<"AUTO" | "MANUAL">;
807
+ default: SearchMode;
808
+ };
809
+ /**
810
+ * 需要debounce处理的字段
811
+ */
812
+ debounceKeys: {
813
+ type: PropType<string[]>;
814
+ };
815
+ debounceTypes: {
816
+ type: PropType<string[]>;
817
+ default: string[];
818
+ };
819
+ debounceTime: {
820
+ type: NumberConstructor;
821
+ default: number;
822
+ };
823
+ };
824
+ declare type ProSearchFormProps = Partial<ExtractPropTypes<ReturnType<typeof proSearchFormProps>>> & ProFormProps;
825
+ /**
826
+ * 该组件只是个模式,最终返回null,不做任何渲染,应配合着ProForm的包装类一起使用
827
+ * 针对传入的model(监听对象)做相应的finish(回调)处理
828
+ */
829
829
  declare const createSearchForm: (Form: any, Props: any, formMethods: string[]) => any;
830
830
 
831
- interface FormItemProps {
832
- name?: string | number | (string | number)[];
833
- }
834
- declare const proFormItemProps: () => {
835
- readonly: {
836
- type: BooleanConstructor;
837
- default: undefined;
838
- };
839
- fieldProps: {
840
- type: ObjectConstructor;
841
- };
842
- showProps: {
843
- type: ObjectConstructor;
844
- };
845
- slots: {
846
- type: ObjectConstructor;
847
- };
848
- };
849
- declare type ProFormItemProps = Partial<ExtractPropTypes<ReturnType<typeof proFormItemProps>>> & Record<string, any>;
850
- declare const createFormItemCompFn: <T extends FormItemProps>(FormItem: any, convertInputCompProps: (value: any, setValue: (v: any) => void, disabled: boolean | undefined) => Record<string, any>) => ({ InputComp, valueType, name }: {
851
- InputComp: any;
852
- valueType: TValueType;
853
- name?: string | undefined;
854
- }) => vue.DefineComponent<T & Partial<ExtractPropTypes<{
855
- readonly: {
856
- type: BooleanConstructor;
857
- default: undefined;
858
- };
859
- fieldProps: {
860
- type: ObjectConstructor;
861
- };
862
- showProps: {
863
- type: ObjectConstructor;
864
- };
865
- slots: {
866
- type: ObjectConstructor;
867
- };
868
- }>> & Record<string, any>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<T & Partial<ExtractPropTypes<{
869
- readonly: {
870
- type: BooleanConstructor;
871
- default: undefined;
872
- };
873
- fieldProps: {
874
- type: ObjectConstructor;
875
- };
876
- showProps: {
877
- type: ObjectConstructor;
878
- };
879
- slots: {
880
- type: ObjectConstructor;
881
- };
882
- }>> & Record<string, any> extends infer T_1 ? T_1 extends T & Partial<ExtractPropTypes<{
883
- readonly: {
884
- type: BooleanConstructor;
885
- default: undefined;
886
- };
887
- fieldProps: {
888
- type: ObjectConstructor;
889
- };
890
- showProps: {
891
- type: ObjectConstructor;
892
- };
893
- slots: {
894
- type: ObjectConstructor;
895
- };
896
- }>> & Record<string, any> ? T_1 extends vue.ComponentPropsOptions<{
897
- [x: string]: unknown;
898
- }> ? ExtractPropTypes<T_1> : T_1 : never : never>, vue.ExtractDefaultPropTypes<T & Partial<ExtractPropTypes<{
899
- readonly: {
900
- type: BooleanConstructor;
901
- default: undefined;
902
- };
903
- fieldProps: {
904
- type: ObjectConstructor;
905
- };
906
- showProps: {
907
- type: ObjectConstructor;
908
- };
909
- slots: {
910
- type: ObjectConstructor;
911
- };
831
+ interface FormItemProps {
832
+ name?: string | number | (string | number)[];
833
+ }
834
+ declare const proFormItemProps: () => {
835
+ readonly: {
836
+ type: BooleanConstructor;
837
+ default: undefined;
838
+ };
839
+ fieldProps: {
840
+ type: ObjectConstructor;
841
+ };
842
+ showProps: {
843
+ type: ObjectConstructor;
844
+ };
845
+ slots: {
846
+ type: ObjectConstructor;
847
+ };
848
+ };
849
+ declare type ProFormItemProps = Partial<ExtractPropTypes<ReturnType<typeof proFormItemProps>>> & Record<string, any>;
850
+ declare const createFormItemCompFn: <T extends FormItemProps>(FormItem: any, convertInputCompProps: (value: any, setValue: (v: any) => void, disabled: boolean | undefined) => Record<string, any>) => ({ InputComp, valueType, name }: {
851
+ InputComp: any;
852
+ valueType: TValueType;
853
+ name?: string | undefined;
854
+ }) => vue.DefineComponent<T & Partial<ExtractPropTypes<{
855
+ readonly: {
856
+ type: BooleanConstructor;
857
+ default: undefined;
858
+ };
859
+ fieldProps: {
860
+ type: ObjectConstructor;
861
+ };
862
+ showProps: {
863
+ type: ObjectConstructor;
864
+ };
865
+ slots: {
866
+ type: ObjectConstructor;
867
+ };
868
+ }>> & Record<string, any>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<T & Partial<ExtractPropTypes<{
869
+ readonly: {
870
+ type: BooleanConstructor;
871
+ default: undefined;
872
+ };
873
+ fieldProps: {
874
+ type: ObjectConstructor;
875
+ };
876
+ showProps: {
877
+ type: ObjectConstructor;
878
+ };
879
+ slots: {
880
+ type: ObjectConstructor;
881
+ };
882
+ }>> & Record<string, any> extends infer T_1 ? T_1 extends T & Partial<ExtractPropTypes<{
883
+ readonly: {
884
+ type: BooleanConstructor;
885
+ default: undefined;
886
+ };
887
+ fieldProps: {
888
+ type: ObjectConstructor;
889
+ };
890
+ showProps: {
891
+ type: ObjectConstructor;
892
+ };
893
+ slots: {
894
+ type: ObjectConstructor;
895
+ };
896
+ }>> & Record<string, any> ? T_1 extends vue.ComponentPropsOptions<{
897
+ [x: string]: unknown;
898
+ }> ? ExtractPropTypes<T_1> : T_1 : never : never>, vue.ExtractDefaultPropTypes<T & Partial<ExtractPropTypes<{
899
+ readonly: {
900
+ type: BooleanConstructor;
901
+ default: undefined;
902
+ };
903
+ fieldProps: {
904
+ type: ObjectConstructor;
905
+ };
906
+ showProps: {
907
+ type: ObjectConstructor;
908
+ };
909
+ slots: {
910
+ type: ObjectConstructor;
911
+ };
912
912
  }>> & Record<string, any>>>;
913
913
 
914
- interface IProFormListProvide {
915
- pathList: (string | number)[];
916
- }
917
- declare const useProFormList: () => IProFormListProvide;
918
- declare const provideProFormList: (ctx: IProFormListProvide) => void;
919
- declare const proFormListProps: () => {
920
- rowKey: {
921
- type: StringConstructor;
922
- default: string;
923
- };
924
- name: {
925
- type: PropType<string | number | (string | number)[]>;
926
- required: boolean;
927
- };
928
- };
929
- declare type ProFormListProps = Partial<ExtractPropTypes<ReturnType<typeof proFormListProps>>>;
914
+ interface IProFormListProvide {
915
+ pathList: (string | number)[];
916
+ }
917
+ declare const useProFormList: () => IProFormListProvide;
918
+ declare const provideProFormList: (ctx: IProFormListProvide) => void;
919
+ declare const proFormListProps: () => {
920
+ rowKey: {
921
+ type: StringConstructor;
922
+ default: string;
923
+ };
924
+ name: {
925
+ type: PropType<string | number | (string | number)[]>;
926
+ required: boolean;
927
+ };
928
+ };
929
+ declare type ProFormListProps = Partial<ExtractPropTypes<ReturnType<typeof proFormListProps>>>;
930
930
  declare const createFormList: (FormItem: any) => any;
931
931
 
932
- /**
933
- * 剔除showState或showStateRules规则为!true的值
934
- * @param values
935
- * @param showState
936
- * @param showStateRules
937
- */
938
- declare const getValidValues: (values: Record<string, any>, showState?: BooleanObjType, showStateRules?: BooleanRulesObjType) => Record<string, any>;
939
- /**
940
- * string类型的path转为arr
941
- * @param path
942
- */
943
- declare const convertPathToList: (path: undefined | string | number | (string | number)[]) => undefined | (string | number)[];
944
- /**
945
- * 将listState 中的数据通过id merge到 list item中
946
- * ps:数组会替换
947
- * 注意:mergeWith 会改变原始对象
948
- * @param list
949
- * @param listState
950
- * @param id
951
- */
932
+ /**
933
+ * 剔除showState或showStateRules规则为!true的值
934
+ * @param values
935
+ * @param showState
936
+ * @param showStateRules
937
+ */
938
+ declare const getValidValues: (values: Record<string, any>, showState?: BooleanObjType, showStateRules?: BooleanRulesObjType) => Record<string, any>;
939
+ /**
940
+ * string类型的path转为arr
941
+ * @param path
942
+ */
943
+ declare const convertPathToList: (path: undefined | string | number | (string | number)[]) => undefined | (string | number)[];
944
+ /**
945
+ * 将listState 中的数据通过id merge到 list item中
946
+ * ps:数组会替换
947
+ * 注意:mergeWith 会改变原始对象
948
+ * @param list
949
+ * @param listState
950
+ * @param id
951
+ */
952
952
  declare const mergeStateToList: (list: Record<string, any>[], listState: Record<string, any>, id: string | number | ((item: Record<string, any>) => string | number)) => Record<string, any>[];
953
953
 
954
- /**
955
- * ref 传递
956
- */
957
- declare const createExpose: (methods: string[], targetRef: Ref$1) => {};
954
+ /**
955
+ * ref 传递
956
+ */
957
+ declare const createExpose: (methods: string[], targetRef: Ref$1) => Record<string, any>;
958
+ declare const createExposeObj: (targetRef: Ref$1, methods?: string[], opts?: Record<string, any>) => Record<string, any>;
958
959
 
959
- export { BooleanObjType, BooleanRulesObjType, CurdAction, CurdAddAction, CurdCurrentMode, CurdMethods, CurdSubAction, FieldNames, FormItemProps, GridProps, ICurdAction, ICurdAddAction, ICurdCurrentMode, ICurdOperateOpts, ICurdState, ICurdSubAction, IElementConfig, IHighConfig, IListData, IOperateItem, IProConfigProvide, IProCurdProvide, IProFormProvideExtra, IProModuleProvide, IProTableProvide, IProTableProvideExtra, IRequestOpts, ISearchMode, ITableOperate, InternalNamePath, NamePath, ProBaseProps, ProConfig, ProConfigProps, ProCurd, ProCurdAddOrEditProps, ProCurdListProps, ProCurdProps, ProFormItemProps, ProFormListProps, ProFormProps, ProModalCurd, ProModalCurdProps, ProModule, ProModuleProps, ProPageCurd, ProPageCurdProps, ProSearchFormProps, ProTableProps, RequestAction, SearchMode, TActionEvent, TActionState, TColumn, TColumns, TCurdActionEvent, TDefaultValueType, TElementMap, TOption, TOptions, TPageState, TTableColumn, TTableColumns, TValueType, TreeOption, TreeOptions, Wrapper, convertPathToList, createCurdDesc, createCurdForm, createCurdList, createExpose, createForm, createFormItemCompFn, createFormList, createGrid, createProConfig, createSearchForm, createTable, defaultPage, getColumnFormItemName, getColumnValueType, getFirstPropName, getFormItemEl, getItemEl, getValidValues, mergeStateToList, proBaseProps, provideProCurd, provideProFormList, provideProModule, renderElement, renderElements, useComposeRequestActor, useDoneRequestActor, useFailedRequestActor, useModuleEvent, useProConfig, useProCurd, useProForm, useProFormList, useProModule, useProTable };
960
+ export { BooleanObjType, BooleanRulesObjType, CurdAction, CurdAddAction, CurdCurrentMode, CurdMethods, CurdSubAction, FieldNames, FormItemProps, GridProps, ICurdAction, ICurdAddAction, ICurdCurrentMode, ICurdOperateOpts, ICurdState, ICurdSubAction, IElementConfig, IHighConfig, IListData, IOperateItem, IProConfigProvide, IProCurdProvide, IProFormProvideExtra, IProModuleProvide, IProTableProvide, IProTableProvideExtra, IRequestOpts, ISearchMode, ITableOperate, InternalNamePath, NamePath, ProBaseProps, ProConfig, ProConfigProps, ProCurd, ProCurdAddOrEditProps, ProCurdListProps, ProCurdProps, ProFormItemProps, ProFormListProps, ProFormProps, ProModalCurd, ProModalCurdProps, ProModule, ProModuleProps, ProPageCurd, ProPageCurdProps, ProSearchFormProps, ProTableProps, RequestAction, SearchMode, TActionEvent, TActionState, TColumn, TColumns, TCurdActionEvent, TDefaultValueType, TElementMap, TOption, TOptions, TPageState, TTableColumn, TTableColumns, TValueType, TreeOption, TreeOptions, Wrapper, convertPathToList, createCurdDesc, createCurdForm, createCurdList, createExpose, createExposeObj, createForm, createFormItemCompFn, createFormList, createGrid, createProConfig, createSearchForm, createTable, defaultPage, getColumnFormItemName, getColumnValueType, getFirstPropName, getFormItemEl, getItemEl, getValidValues, mergeStateToList, proBaseProps, provideProCurd, provideProFormList, provideProModule, renderElement, renderElements, useComposeRequestActor, useDoneRequestActor, useFailedRequestActor, useModuleEvent, useProConfig, useProCurd, useProForm, useProFormList, useProModule, useProTable };