@qin-ui/antd-vue-pro 1.1.21 → 1.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -7
- package/es/form/{index-ef98f1fd.js → index-1cdda7ac.js} +50 -445
- package/es/form/index.js +5 -13
- package/es/index.d.ts +33 -287
- package/es/index.js +6 -14
- package/es/style.css +5 -5
- package/es/table/index.js +13 -14
- package/package.json +1 -1
package/es/form/index.js
CHANGED
|
@@ -1,28 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { B, d, C, b, f, F, e, h, U, _, i, u, j, k } from "./index-1cdda7ac.js";
|
|
2
2
|
import "vue";
|
|
3
3
|
import "ant-design-vue";
|
|
4
4
|
import "../component-provider/index.js";
|
|
5
5
|
export {
|
|
6
|
-
k as ArrowFunctionRegexp,
|
|
7
6
|
B as BaseField,
|
|
8
7
|
d as BaseFormItem,
|
|
9
|
-
h as COMMAND,
|
|
10
8
|
C as COMPONENT_MAP,
|
|
11
9
|
b as ContainerFragment,
|
|
12
10
|
f as FORM_DATA,
|
|
13
11
|
F as FORM_ITEM_SLOT_KEYS,
|
|
14
|
-
j as FunctionRegexp,
|
|
15
|
-
R as RULE_TYPE_MAP,
|
|
16
12
|
e as SlotComponent,
|
|
17
|
-
|
|
13
|
+
h as UPDATE_ACTIVE_PATH,
|
|
18
14
|
U as UPDATE_FORM_DATA,
|
|
19
15
|
_ as default,
|
|
20
|
-
|
|
21
|
-
n as jsonParseReviver,
|
|
22
|
-
m as jsonStringifyReplacer,
|
|
23
|
-
r as useCommand,
|
|
24
|
-
p as useFields,
|
|
16
|
+
i as useFields,
|
|
25
17
|
u as useForm,
|
|
26
|
-
|
|
27
|
-
|
|
18
|
+
j as useFormData,
|
|
19
|
+
k as useInitProps
|
|
28
20
|
};
|
package/es/index.d.ts
CHANGED
|
@@ -205,50 +205,12 @@ declare type __VLS_WithTemplateSlots_3<T, S> = T & {
|
|
|
205
205
|
};
|
|
206
206
|
};
|
|
207
207
|
|
|
208
|
-
/**
|
|
209
|
-
* @type {object} Action - 逻辑运行规则
|
|
210
|
-
* @property {string} path - 字段路径
|
|
211
|
-
* @property {ActionType} type - 逻辑规则类型
|
|
212
|
-
* @property {Expression} expression - 表达式对象
|
|
213
|
-
* @property {boolean} [disabled] - 是否禁用
|
|
214
|
-
*/
|
|
215
|
-
export declare type Action = {
|
|
216
|
-
path: string;
|
|
217
|
-
type: ActionType;
|
|
218
|
-
expression: Expression;
|
|
219
|
-
disabled?: boolean;
|
|
220
|
-
};
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
* @type {string} ActionType - 逻辑规则类型
|
|
224
|
-
* @ setValue - 字段赋值
|
|
225
|
-
* @ setHidden - 字段隐藏/显示
|
|
226
|
-
* @ setDisabled - 字段禁用/启用
|
|
227
|
-
* @ setOptions - 字段选项枚举变更
|
|
228
|
-
* @ setRules - 字段校验规则变更
|
|
229
|
-
* @ setField - 字段配置变更
|
|
230
|
-
* @ triggerValidate - 触发字段校验
|
|
231
|
-
* @ triggerClearValidate - 触发清除字段校验
|
|
232
|
-
* @ triggerMessage - 触发字段提示
|
|
233
|
-
*/
|
|
234
|
-
export declare type ActionType = 'setValue' | 'setHidden' | 'setDisabled' | 'setOptions' | 'setRules' | 'setField' | 'triggerValidate' | 'triggerClearValidate' | 'triggerMessage';
|
|
235
|
-
|
|
236
208
|
declare type AllowKey<D extends FormData_2> = FlattenKeys<D> | (string & Record<never, never>);
|
|
237
209
|
|
|
238
210
|
declare type AnyProps<T extends Record<string, any>> = Record<keyof T, any> & Common;
|
|
239
211
|
|
|
240
212
|
export declare type AppendField<D extends FormData_2 = FormData_2> = (path: Path<D> | undefined, field: Field<D>) => void;
|
|
241
213
|
|
|
242
|
-
/**
|
|
243
|
-
* @description js箭头函数字符串正则
|
|
244
|
-
*/
|
|
245
|
-
export declare const ArrowFunctionRegexp: RegExp;
|
|
246
|
-
|
|
247
|
-
/**
|
|
248
|
-
* @type {Object<CommandTrigger, Commands>} AutoCommand - 自动化指令
|
|
249
|
-
*/
|
|
250
|
-
export declare type AutoCommand = Record<CommandTrigger, Commands>;
|
|
251
|
-
|
|
252
214
|
export declare type BaseComponentStringName = Exclude<Field['component'], RenderComponentType | undefined>;
|
|
253
215
|
|
|
254
216
|
export declare const BaseField: DefineComponent<ExtractPropTypes<__VLS_WithDefaults_3<__VLS_TypePropsToRuntimeProps_3<Props_3>, {
|
|
@@ -256,8 +218,6 @@ export declare const BaseField: DefineComponent<ExtractPropTypes<__VLS_WithDefau
|
|
|
256
218
|
[key: string]: any;
|
|
257
219
|
}>;
|
|
258
220
|
path: string;
|
|
259
|
-
label: string;
|
|
260
|
-
getFormItemRef: undefined;
|
|
261
221
|
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
262
222
|
setComponentRef: (el: any) => void;
|
|
263
223
|
fieldChange: () => void;
|
|
@@ -267,14 +227,11 @@ export declare const BaseField: DefineComponent<ExtractPropTypes<__VLS_WithDefau
|
|
|
267
227
|
[key: string]: any;
|
|
268
228
|
}>;
|
|
269
229
|
path: string;
|
|
270
|
-
label: string;
|
|
271
|
-
getFormItemRef: undefined;
|
|
272
230
|
}>>> & Readonly<{
|
|
273
231
|
onSetComponentRef?: ((el: any) => any) | undefined;
|
|
274
232
|
onFieldChange?: (() => any) | undefined;
|
|
275
233
|
onFieldBlur?: (() => any) | undefined;
|
|
276
234
|
}>, {
|
|
277
|
-
label: SlotComponentType;
|
|
278
235
|
component: "input" | "textarea" | "input-password" | "input-search" | "input-number" | "select" | "cascader" | "date-picker" | "range-picker" | "time-picker" | "checkbox-group" | "radio-group" | "switch" | "slider" | "tree-select" | "transfer" | RenderComponentType | Raw<RenderComponentType>;
|
|
279
236
|
path: string;
|
|
280
237
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
@@ -303,35 +260,6 @@ declare interface Column<D extends Data = Data> extends Omit<ColumnType, 'dataIn
|
|
|
303
260
|
|
|
304
261
|
export declare type Columns<D extends Data = Data> = Array<Column<D>>;
|
|
305
262
|
|
|
306
|
-
export declare const COMMAND: InjectionKey<Ref<{
|
|
307
|
-
run: (path: string, trigger: CommandTrigger) => void;
|
|
308
|
-
} | null, {
|
|
309
|
-
run: (path: string, trigger: CommandTrigger) => void;
|
|
310
|
-
} | null>>;
|
|
311
|
-
|
|
312
|
-
/**
|
|
313
|
-
* @type {object} Command - 指令
|
|
314
|
-
*/
|
|
315
|
-
export declare type Command = {
|
|
316
|
-
/** 指令编号 */
|
|
317
|
-
no: number;
|
|
318
|
-
/** 指令名称 */
|
|
319
|
-
name: string;
|
|
320
|
-
/** 指令描述 */
|
|
321
|
-
description: string;
|
|
322
|
-
/** 指令逻辑 */
|
|
323
|
-
logics: Logics;
|
|
324
|
-
/** 是否禁用 */
|
|
325
|
-
disabled?: boolean;
|
|
326
|
-
};
|
|
327
|
-
|
|
328
|
-
export declare type Commands = Array<Command>;
|
|
329
|
-
|
|
330
|
-
/**
|
|
331
|
-
* @type {string} CommandTrigger - 指令触发方式
|
|
332
|
-
*/
|
|
333
|
-
export declare type CommandTrigger = 'onWatch' | 'onUpdateValue' | 'onBlur' | 'onFocus';
|
|
334
|
-
|
|
335
263
|
/**
|
|
336
264
|
* @type {Object} Common - 公共字段类型
|
|
337
265
|
*/
|
|
@@ -348,8 +276,6 @@ export declare interface Common<D extends FormData_2 = FormData_2> {
|
|
|
348
276
|
fields?: Fields<D>;
|
|
349
277
|
/** 是否隐藏 */
|
|
350
278
|
hidden?: boolean;
|
|
351
|
-
/** 自动化指令 */
|
|
352
|
-
autoCommand?: AutoCommand;
|
|
353
279
|
/** formItem样式属性 */
|
|
354
280
|
style?: CSSProperties;
|
|
355
281
|
/** formItem样式类名 */
|
|
@@ -404,18 +330,6 @@ export declare type ComponentVars = Partial<{
|
|
|
404
330
|
'transfer': Partial<AnyProps<TransferProps>>;
|
|
405
331
|
}>;
|
|
406
332
|
|
|
407
|
-
/**
|
|
408
|
-
* @type {object} Condition - 逻辑执行条件
|
|
409
|
-
*/
|
|
410
|
-
export declare type Condition = {
|
|
411
|
-
/** 条件关系 与 | 或 */
|
|
412
|
-
type: 'AND' | 'OR';
|
|
413
|
-
/** 表达式 */
|
|
414
|
-
expression: Expression;
|
|
415
|
-
/** 是否禁用 */
|
|
416
|
-
disabled?: boolean;
|
|
417
|
-
};
|
|
418
|
-
|
|
419
333
|
export declare type ContainerComponent = Component<DefaultProps> | null;
|
|
420
334
|
|
|
421
335
|
export declare const ContainerFragment: __VLS_WithTemplateSlots_2<DefineComponent<ExtractPropTypes<__VLS_TypePropsToRuntimeProps_4<Props_4>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps_4<Props_4>>> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
|
|
@@ -440,12 +354,8 @@ declare const _default: {
|
|
|
440
354
|
export default _default;
|
|
441
355
|
|
|
442
356
|
declare const _default_2: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
443
|
-
form:
|
|
444
|
-
formData: () => {};
|
|
445
|
-
fields: () => never[];
|
|
357
|
+
form: () => {};
|
|
446
358
|
grid: boolean;
|
|
447
|
-
autoCommandDisabled: boolean;
|
|
448
|
-
activePath: undefined;
|
|
449
359
|
}>>, {
|
|
450
360
|
resetFields: (name?: NamePath | undefined) => void;
|
|
451
361
|
clearValidate: (name?: NamePath | undefined) => void;
|
|
@@ -459,26 +369,12 @@ declare const _default_2: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTyp
|
|
|
459
369
|
[key: string]: any;
|
|
460
370
|
}>;
|
|
461
371
|
scrollToField: (name: NamePath, options?: {} | undefined) => void;
|
|
462
|
-
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
463
|
-
|
|
464
|
-
"update:activePath": (val: string | undefined) => void;
|
|
465
|
-
}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
466
|
-
form: undefined;
|
|
467
|
-
formData: () => {};
|
|
468
|
-
fields: () => never[];
|
|
372
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
373
|
+
form: () => {};
|
|
469
374
|
grid: boolean;
|
|
470
|
-
|
|
471
|
-
activePath: undefined;
|
|
472
|
-
}>>> & Readonly<{
|
|
473
|
-
"onUpdate:formData"?: ((val: FormData_2) => any) | undefined;
|
|
474
|
-
"onUpdate:activePath"?: ((val: string | undefined) => any) | undefined;
|
|
475
|
-
}>, {
|
|
476
|
-
formData: FormData_2;
|
|
375
|
+
}>>> & Readonly<{}>, {
|
|
477
376
|
grid: Grid;
|
|
478
|
-
|
|
479
|
-
form: Form;
|
|
480
|
-
autoCommandDisabled: boolean;
|
|
481
|
-
activePath: string;
|
|
377
|
+
form: Partial<Form>;
|
|
482
378
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
|
|
483
379
|
default?(_: {}): any;
|
|
484
380
|
}>;
|
|
@@ -1148,11 +1044,6 @@ declare type DefaultProps = {
|
|
|
1148
1044
|
|
|
1149
1045
|
export declare type DeleteField<D extends FormData_2 = FormData_2> = (path: Path<D>, options?: UpdateFieldOptions) => void;
|
|
1150
1046
|
|
|
1151
|
-
/**
|
|
1152
|
-
* @type {string} Expression - 表达式字符串 需要是一个js表达式字符串或者一个函数字符串,表达式的执行结果或者函数的返回值将作为结果返回
|
|
1153
|
-
*/
|
|
1154
|
-
export declare type Expression = string;
|
|
1155
|
-
|
|
1156
1047
|
declare type ExtendWithAny<D> = D extends object ? {
|
|
1157
1048
|
[K in keyof D]: ExtendWithAny<D[K]>;
|
|
1158
1049
|
} & {
|
|
@@ -1162,7 +1053,7 @@ declare type ExtendWithAny<D> = D extends object ? {
|
|
|
1162
1053
|
export declare type Field<D extends FormData_2 = FormData_2> = FieldType[keyof FieldType] & Omit<FormItemProps, 'label'> & ColProps & Common<D>;
|
|
1163
1054
|
|
|
1164
1055
|
declare type FieldAttrsType = {
|
|
1165
|
-
[key in keyof FieldType]: FieldType[key] & Pick<Common, 'slots' | 'componentStyle' | 'componentClassName' | 'componentContainer'
|
|
1056
|
+
[key in keyof FieldType]: FieldType[key] & Pick<Common, 'slots' | 'componentStyle' | 'componentClassName' | 'componentContainer'>;
|
|
1166
1057
|
};
|
|
1167
1058
|
|
|
1168
1059
|
export declare type Fields<D extends FormData_2 = FormData_2> = Array<Field<D>>;
|
|
@@ -1279,11 +1170,6 @@ declare interface FormProps extends FormProps_2 {
|
|
|
1279
1170
|
scrollToFirstError?: boolean | Record<string, any>;
|
|
1280
1171
|
}
|
|
1281
1172
|
|
|
1282
|
-
/**
|
|
1283
|
-
* @description js函数声明字符串正则
|
|
1284
|
-
*/
|
|
1285
|
-
export declare const FunctionRegexp: RegExp;
|
|
1286
|
-
|
|
1287
1173
|
export declare type GetField<D extends FormData_2 = FormData_2> = (path?: Path<D>) => Readonly<WithRefGetter<Field<D>>> | undefined;
|
|
1288
1174
|
|
|
1289
1175
|
export declare type GetFieldPath<D extends FormData_2 = FormData_2> = (path: Path<D>) => string | undefined;
|
|
@@ -1365,35 +1251,10 @@ declare type InputNumberSlots = FieldSlot<'addonAfter' | 'addonBefore' | 'prefix
|
|
|
1365
1251
|
|
|
1366
1252
|
declare type InputSlots = FieldSlot<'addonAfter' | 'addonBefore' | 'clearIcon' | 'prefix' | 'suffix'>;
|
|
1367
1253
|
|
|
1368
|
-
/**
|
|
1369
|
-
* @description 判断是否是函数字符串
|
|
1370
|
-
* @param {string} param
|
|
1371
|
-
* @returns {boolean}
|
|
1372
|
-
*/
|
|
1373
|
-
export declare const isFunctionString: (param: string) => boolean;
|
|
1374
|
-
|
|
1375
|
-
export declare const jsonParseReviver: (k: string, v: any) => any;
|
|
1376
|
-
|
|
1377
|
-
export declare const jsonStringifyReplacer: (k: string, v: any) => any;
|
|
1378
|
-
|
|
1379
1254
|
declare type KnownKeys<T> = {
|
|
1380
1255
|
[K in keyof T as string extends K ? never : number extends K ? never : K]: T[K];
|
|
1381
1256
|
};
|
|
1382
1257
|
|
|
1383
|
-
/**
|
|
1384
|
-
* @type {object} Logic - 逻辑运行规则
|
|
1385
|
-
*/
|
|
1386
|
-
export declare type Logic = {
|
|
1387
|
-
/** 逻辑执行条件 */
|
|
1388
|
-
conditions: Array<Condition>;
|
|
1389
|
-
/** 逻辑规则集合 */
|
|
1390
|
-
actions: Array<Action>;
|
|
1391
|
-
/** 是否禁用 */
|
|
1392
|
-
disabled?: boolean;
|
|
1393
|
-
};
|
|
1394
|
-
|
|
1395
|
-
export declare type Logics = Array<Logic>;
|
|
1396
|
-
|
|
1397
1258
|
declare type Option_2 = {
|
|
1398
1259
|
label: string;
|
|
1399
1260
|
value: any;
|
|
@@ -2179,17 +2040,11 @@ export declare const ProComponentProvider: SFCWithInstall<{
|
|
|
2179
2040
|
}>>, "current" | "pageSize">) => any) | undefined;
|
|
2180
2041
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps, "table" | "addIndexColumn" | "showControl" | "searchContainer" | "controlContainer" | "tableContainer" | "paramCache" | "immediateSearch" | "searchFormConfig">, "showControl" | "paramCache" | "searchFormConfig">>;
|
|
2181
2042
|
'pro-form': Partial<Partial<{
|
|
2182
|
-
formData: FormData_2;
|
|
2183
2043
|
grid: Grid;
|
|
2184
|
-
|
|
2185
|
-
form: Form;
|
|
2186
|
-
autoCommandDisabled: boolean;
|
|
2187
|
-
activePath: string;
|
|
2044
|
+
form: Partial<Form>;
|
|
2188
2045
|
}> & Omit<{
|
|
2189
|
-
readonly formData: FormData_2;
|
|
2190
2046
|
readonly grid: Grid;
|
|
2191
|
-
readonly
|
|
2192
|
-
readonly autoCommandDisabled: boolean;
|
|
2047
|
+
readonly form: Partial<Form>;
|
|
2193
2048
|
readonly name?: string | undefined;
|
|
2194
2049
|
readonly size?: "small" | "middle" | "large" | undefined;
|
|
2195
2050
|
readonly prefixCls?: string | undefined;
|
|
@@ -2282,11 +2137,7 @@ export declare const ProComponentProvider: SFCWithInstall<{
|
|
|
2282
2137
|
readonly onFinish?: ((values: any) => void) | undefined;
|
|
2283
2138
|
readonly onFinishFailed?: ((errorInfo: ValidateErrorEntity<any>) => void) | undefined;
|
|
2284
2139
|
readonly onValidate?: ((name: string | number | string[] | number[], status: boolean, errors: string[]) => void) | undefined;
|
|
2285
|
-
|
|
2286
|
-
readonly activePath?: string | undefined;
|
|
2287
|
-
readonly "onUpdate:formData"?: ((val: FormData_2) => any) | undefined;
|
|
2288
|
-
readonly "onUpdate:activePath"?: ((val: string | undefined) => any) | undefined;
|
|
2289
|
-
} & VNodeProps & AllowedComponentProps & ComponentCustomProps, "formData" | "grid" | "fields" | "form" | "autoCommandDisabled" | "activePath">>;
|
|
2140
|
+
} & VNodeProps & AllowedComponentProps & ComponentCustomProps, "grid" | "form">>;
|
|
2290
2141
|
'pro-form-item': Partial<Partial<{
|
|
2291
2142
|
disabled: boolean;
|
|
2292
2143
|
path: string;
|
|
@@ -3095,17 +2946,11 @@ export declare const ProComponentProvider: SFCWithInstall<{
|
|
|
3095
2946
|
}>>, "current" | "pageSize">) => any) | undefined;
|
|
3096
2947
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps, "table" | "addIndexColumn" | "showControl" | "searchContainer" | "controlContainer" | "tableContainer" | "paramCache" | "immediateSearch" | "searchFormConfig">, "showControl" | "paramCache" | "searchFormConfig">>;
|
|
3097
2948
|
'pro-form': Partial<Partial<{
|
|
3098
|
-
formData: FormData_2;
|
|
3099
2949
|
grid: Grid;
|
|
3100
|
-
|
|
3101
|
-
form: Form;
|
|
3102
|
-
autoCommandDisabled: boolean;
|
|
3103
|
-
activePath: string;
|
|
2950
|
+
form: Partial<Form>;
|
|
3104
2951
|
}> & Omit<{
|
|
3105
|
-
readonly formData: FormData_2;
|
|
3106
2952
|
readonly grid: Grid;
|
|
3107
|
-
readonly
|
|
3108
|
-
readonly autoCommandDisabled: boolean;
|
|
2953
|
+
readonly form: Partial<Form>;
|
|
3109
2954
|
readonly name?: string | undefined;
|
|
3110
2955
|
readonly size?: "small" | "middle" | "large" | undefined;
|
|
3111
2956
|
readonly prefixCls?: string | undefined;
|
|
@@ -3198,11 +3043,7 @@ export declare const ProComponentProvider: SFCWithInstall<{
|
|
|
3198
3043
|
readonly onFinish?: ((values: any) => void) | undefined;
|
|
3199
3044
|
readonly onFinishFailed?: ((errorInfo: ValidateErrorEntity<any>) => void) | undefined;
|
|
3200
3045
|
readonly onValidate?: ((name: string | number | string[] | number[], status: boolean, errors: string[]) => void) | undefined;
|
|
3201
|
-
|
|
3202
|
-
readonly activePath?: string | undefined;
|
|
3203
|
-
readonly "onUpdate:formData"?: ((val: FormData_2) => any) | undefined;
|
|
3204
|
-
readonly "onUpdate:activePath"?: ((val: string | undefined) => any) | undefined;
|
|
3205
|
-
} & VNodeProps & AllowedComponentProps & ComponentCustomProps, "formData" | "grid" | "fields" | "form" | "autoCommandDisabled" | "activePath">>;
|
|
3046
|
+
} & VNodeProps & AllowedComponentProps & ComponentCustomProps, "grid" | "form">>;
|
|
3206
3047
|
'pro-form-item': Partial<Partial<{
|
|
3207
3048
|
disabled: boolean;
|
|
3208
3049
|
path: string;
|
|
@@ -4008,17 +3849,11 @@ export declare const ProComponentProvider: SFCWithInstall<{
|
|
|
4008
3849
|
}>>, "current" | "pageSize">) => any) | undefined;
|
|
4009
3850
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps, "table" | "addIndexColumn" | "showControl" | "searchContainer" | "controlContainer" | "tableContainer" | "paramCache" | "immediateSearch" | "searchFormConfig">, "showControl" | "paramCache" | "searchFormConfig">>;
|
|
4010
3851
|
'pro-form': Partial<Partial<{
|
|
4011
|
-
formData: FormData_2;
|
|
4012
3852
|
grid: Grid;
|
|
4013
|
-
|
|
4014
|
-
form: Form;
|
|
4015
|
-
autoCommandDisabled: boolean;
|
|
4016
|
-
activePath: string;
|
|
3853
|
+
form: Partial<Form>;
|
|
4017
3854
|
}> & Omit<{
|
|
4018
|
-
readonly formData: FormData_2;
|
|
4019
3855
|
readonly grid: Grid;
|
|
4020
|
-
readonly
|
|
4021
|
-
readonly autoCommandDisabled: boolean;
|
|
3856
|
+
readonly form: Partial<Form>;
|
|
4022
3857
|
readonly name?: string | undefined;
|
|
4023
3858
|
readonly size?: "small" | "middle" | "large" | undefined;
|
|
4024
3859
|
readonly prefixCls?: string | undefined;
|
|
@@ -4111,11 +3946,7 @@ export declare const ProComponentProvider: SFCWithInstall<{
|
|
|
4111
3946
|
readonly onFinish?: ((values: any) => void) | undefined;
|
|
4112
3947
|
readonly onFinishFailed?: ((errorInfo: ValidateErrorEntity<any>) => void) | undefined;
|
|
4113
3948
|
readonly onValidate?: ((name: string | number | string[] | number[], status: boolean, errors: string[]) => void) | undefined;
|
|
4114
|
-
|
|
4115
|
-
readonly activePath?: string | undefined;
|
|
4116
|
-
readonly "onUpdate:formData"?: ((val: FormData_2) => any) | undefined;
|
|
4117
|
-
readonly "onUpdate:activePath"?: ((val: string | undefined) => any) | undefined;
|
|
4118
|
-
} & VNodeProps & AllowedComponentProps & ComponentCustomProps, "formData" | "grid" | "fields" | "form" | "autoCommandDisabled" | "activePath">>;
|
|
3949
|
+
} & VNodeProps & AllowedComponentProps & ComponentCustomProps, "grid" | "form">>;
|
|
4119
3950
|
'pro-form-item': Partial<Partial<{
|
|
4120
3951
|
disabled: boolean;
|
|
4121
3952
|
path: string;
|
|
@@ -4257,18 +4088,10 @@ export declare const ProForm: SFCWithInstall<{
|
|
|
4257
4088
|
onSubmit: {
|
|
4258
4089
|
type: PropType<(e: Event) => void>;
|
|
4259
4090
|
};
|
|
4260
|
-
formData: {
|
|
4261
|
-
type: PropType<FormData_2>;
|
|
4262
|
-
default: () => {};
|
|
4263
|
-
};
|
|
4264
4091
|
grid: {
|
|
4265
4092
|
type: PropType<Grid>;
|
|
4266
4093
|
default: boolean;
|
|
4267
4094
|
};
|
|
4268
|
-
fields: {
|
|
4269
|
-
type: PropType<Fields>;
|
|
4270
|
-
default: () => never[];
|
|
4271
|
-
};
|
|
4272
4095
|
layout: {
|
|
4273
4096
|
type: PropType<string>;
|
|
4274
4097
|
};
|
|
@@ -4311,21 +4134,11 @@ export declare const ProForm: SFCWithInstall<{
|
|
|
4311
4134
|
type: PropType<(name: string | number | string[] | number[], status: boolean, errors: string[]) => void>;
|
|
4312
4135
|
};
|
|
4313
4136
|
form: {
|
|
4314
|
-
type: PropType<Form
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
autoCommandDisabled: {
|
|
4318
|
-
type: PropType<boolean>;
|
|
4319
|
-
default: boolean;
|
|
4320
|
-
};
|
|
4321
|
-
activePath: {
|
|
4322
|
-
type: PropType<string>;
|
|
4323
|
-
default: undefined;
|
|
4137
|
+
type: PropType<Partial<Form>>;
|
|
4138
|
+
required: true;
|
|
4139
|
+
default: () => {};
|
|
4324
4140
|
};
|
|
4325
|
-
}>> & Readonly<{
|
|
4326
|
-
"onUpdate:formData"?: ((val: FormData_2) => any) | undefined;
|
|
4327
|
-
"onUpdate:activePath"?: ((val: string | undefined) => any) | undefined;
|
|
4328
|
-
}>, {
|
|
4141
|
+
}>> & Readonly<{}>, {
|
|
4329
4142
|
resetFields: (name?: NamePath | undefined) => void;
|
|
4330
4143
|
clearValidate: (name?: NamePath | undefined) => void;
|
|
4331
4144
|
validateFields: (nameList?: string | NamePath[] | undefined, options?: ValidateOptions | undefined) => Promise<{
|
|
@@ -4338,16 +4151,9 @@ export declare const ProForm: SFCWithInstall<{
|
|
|
4338
4151
|
[key: string]: any;
|
|
4339
4152
|
}>;
|
|
4340
4153
|
scrollToField: (name: NamePath, options?: {} | undefined) => void;
|
|
4341
|
-
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
4342
|
-
"update:formData": (val: FormData_2) => void;
|
|
4343
|
-
"update:activePath": (val: string | undefined) => void;
|
|
4344
|
-
}, PublicProps, {
|
|
4345
|
-
formData: FormData_2;
|
|
4154
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
|
|
4346
4155
|
grid: Grid;
|
|
4347
|
-
|
|
4348
|
-
form: Form;
|
|
4349
|
-
autoCommandDisabled: boolean;
|
|
4350
|
-
activePath: string;
|
|
4156
|
+
form: Partial<Form>;
|
|
4351
4157
|
}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
|
|
4352
4158
|
P: {};
|
|
4353
4159
|
B: {};
|
|
@@ -4455,18 +4261,10 @@ export declare const ProForm: SFCWithInstall<{
|
|
|
4455
4261
|
onSubmit: {
|
|
4456
4262
|
type: PropType<(e: Event) => void>;
|
|
4457
4263
|
};
|
|
4458
|
-
formData: {
|
|
4459
|
-
type: PropType<FormData_2>;
|
|
4460
|
-
default: () => {};
|
|
4461
|
-
};
|
|
4462
4264
|
grid: {
|
|
4463
4265
|
type: PropType<Grid>;
|
|
4464
4266
|
default: boolean;
|
|
4465
4267
|
};
|
|
4466
|
-
fields: {
|
|
4467
|
-
type: PropType<Fields>;
|
|
4468
|
-
default: () => never[];
|
|
4469
|
-
};
|
|
4470
4268
|
layout: {
|
|
4471
4269
|
type: PropType<string>;
|
|
4472
4270
|
};
|
|
@@ -4509,21 +4307,11 @@ export declare const ProForm: SFCWithInstall<{
|
|
|
4509
4307
|
type: PropType<(name: string | number | string[] | number[], status: boolean, errors: string[]) => void>;
|
|
4510
4308
|
};
|
|
4511
4309
|
form: {
|
|
4512
|
-
type: PropType<Form
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
autoCommandDisabled: {
|
|
4516
|
-
type: PropType<boolean>;
|
|
4517
|
-
default: boolean;
|
|
4518
|
-
};
|
|
4519
|
-
activePath: {
|
|
4520
|
-
type: PropType<string>;
|
|
4521
|
-
default: undefined;
|
|
4310
|
+
type: PropType<Partial<Form>>;
|
|
4311
|
+
required: true;
|
|
4312
|
+
default: () => {};
|
|
4522
4313
|
};
|
|
4523
|
-
}>> & Readonly<{
|
|
4524
|
-
"onUpdate:formData"?: ((val: FormData_2) => any) | undefined;
|
|
4525
|
-
"onUpdate:activePath"?: ((val: string | undefined) => any) | undefined;
|
|
4526
|
-
}>, {
|
|
4314
|
+
}>> & Readonly<{}>, {
|
|
4527
4315
|
resetFields: (name?: NamePath | undefined) => void;
|
|
4528
4316
|
clearValidate: (name?: NamePath | undefined) => void;
|
|
4529
4317
|
validateFields: (nameList?: string | NamePath[] | undefined, options?: ValidateOptions | undefined) => Promise<{
|
|
@@ -4537,12 +4325,8 @@ export declare const ProForm: SFCWithInstall<{
|
|
|
4537
4325
|
}>;
|
|
4538
4326
|
scrollToField: (name: NamePath, options?: {} | undefined) => void;
|
|
4539
4327
|
}, {}, {}, {}, {
|
|
4540
|
-
formData: FormData_2;
|
|
4541
4328
|
grid: Grid;
|
|
4542
|
-
|
|
4543
|
-
form: Form;
|
|
4544
|
-
autoCommandDisabled: boolean;
|
|
4545
|
-
activePath: string;
|
|
4329
|
+
form: Partial<Form>;
|
|
4546
4330
|
}>;
|
|
4547
4331
|
__isFragment?: undefined;
|
|
4548
4332
|
__isTeleport?: undefined;
|
|
@@ -4647,18 +4431,10 @@ export declare const ProForm: SFCWithInstall<{
|
|
|
4647
4431
|
onSubmit: {
|
|
4648
4432
|
type: PropType<(e: Event) => void>;
|
|
4649
4433
|
};
|
|
4650
|
-
formData: {
|
|
4651
|
-
type: PropType<FormData_2>;
|
|
4652
|
-
default: () => {};
|
|
4653
|
-
};
|
|
4654
4434
|
grid: {
|
|
4655
4435
|
type: PropType<Grid>;
|
|
4656
4436
|
default: boolean;
|
|
4657
4437
|
};
|
|
4658
|
-
fields: {
|
|
4659
|
-
type: PropType<Fields>;
|
|
4660
|
-
default: () => never[];
|
|
4661
|
-
};
|
|
4662
4438
|
layout: {
|
|
4663
4439
|
type: PropType<string>;
|
|
4664
4440
|
};
|
|
@@ -4701,21 +4477,11 @@ export declare const ProForm: SFCWithInstall<{
|
|
|
4701
4477
|
type: PropType<(name: string | number | string[] | number[], status: boolean, errors: string[]) => void>;
|
|
4702
4478
|
};
|
|
4703
4479
|
form: {
|
|
4704
|
-
type: PropType<Form
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
autoCommandDisabled: {
|
|
4708
|
-
type: PropType<boolean>;
|
|
4709
|
-
default: boolean;
|
|
4710
|
-
};
|
|
4711
|
-
activePath: {
|
|
4712
|
-
type: PropType<string>;
|
|
4713
|
-
default: undefined;
|
|
4480
|
+
type: PropType<Partial<Form>>;
|
|
4481
|
+
required: true;
|
|
4482
|
+
default: () => {};
|
|
4714
4483
|
};
|
|
4715
|
-
}>> & Readonly<{
|
|
4716
|
-
"onUpdate:formData"?: ((val: FormData_2) => any) | undefined;
|
|
4717
|
-
"onUpdate:activePath"?: ((val: string | undefined) => any) | undefined;
|
|
4718
|
-
}>, {
|
|
4484
|
+
}>> & Readonly<{}>, {
|
|
4719
4485
|
resetFields: (name?: NamePath | undefined) => void;
|
|
4720
4486
|
clearValidate: (name?: NamePath | undefined) => void;
|
|
4721
4487
|
validateFields: (nameList?: string | NamePath[] | undefined, options?: ValidateOptions | undefined) => Promise<{
|
|
@@ -4728,16 +4494,9 @@ export declare const ProForm: SFCWithInstall<{
|
|
|
4728
4494
|
[key: string]: any;
|
|
4729
4495
|
}>;
|
|
4730
4496
|
scrollToField: (name: NamePath, options?: {} | undefined) => void;
|
|
4731
|
-
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
4732
|
-
"update:formData": (val: FormData_2) => void;
|
|
4733
|
-
"update:activePath": (val: string | undefined) => void;
|
|
4734
|
-
}, string, {
|
|
4735
|
-
formData: FormData_2;
|
|
4497
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
|
|
4736
4498
|
grid: Grid;
|
|
4737
|
-
|
|
4738
|
-
form: Form;
|
|
4739
|
-
autoCommandDisabled: boolean;
|
|
4740
|
-
activePath: string;
|
|
4499
|
+
form: Partial<Form>;
|
|
4741
4500
|
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
4742
4501
|
$slots: {
|
|
4743
4502
|
default?(_: {}): any;
|
|
@@ -4751,12 +4510,8 @@ export declare type ProFormItemProps = InstanceType<typeof BaseFormItem>['$props
|
|
|
4751
4510
|
export declare type ProFormProps = ProFormInstance['$props'];
|
|
4752
4511
|
|
|
4753
4512
|
declare interface Props extends /* @vue-ignore */ FormProps {
|
|
4754
|
-
form?: Form;
|
|
4755
|
-
formData?: FormData_2;
|
|
4756
|
-
fields?: Fields;
|
|
4757
4513
|
grid?: Grid;
|
|
4758
|
-
|
|
4759
|
-
activePath?: string;
|
|
4514
|
+
form: Partial<Form>;
|
|
4760
4515
|
}
|
|
4761
4516
|
|
|
4762
4517
|
declare type Props_2 = {
|
|
@@ -4769,7 +4524,6 @@ declare type Props_2 = {
|
|
|
4769
4524
|
declare type Props_3 = {
|
|
4770
4525
|
component?: Field['component'];
|
|
4771
4526
|
path?: string;
|
|
4772
|
-
label?: Field['label'];
|
|
4773
4527
|
};
|
|
4774
4528
|
|
|
4775
4529
|
declare type Props_4 = {
|
|
@@ -7846,8 +7600,6 @@ declare type RangePickerSlots = FieldSlot<'dateRender' | 'renderExtraFooter' | '
|
|
|
7846
7600
|
*/
|
|
7847
7601
|
export declare type RenderComponentType = Component<VModelProps & DefaultProps>;
|
|
7848
7602
|
|
|
7849
|
-
export declare const RULE_TYPE_MAP: Map<ActionType, string>;
|
|
7850
|
-
|
|
7851
7603
|
declare type SelectSlots = FieldSlot<keyof InstanceType<typeof Select>['$slots']>;
|
|
7852
7604
|
|
|
7853
7605
|
export declare type SetActivePath<D extends FormData_2 = FormData_2> = (path: Path<D> | undefined) => void;
|
|
@@ -7911,12 +7663,6 @@ export declare type UpdateFieldOptions = {
|
|
|
7911
7663
|
|
|
7912
7664
|
export declare type UpdateFormData = (path: string, value: any) => void;
|
|
7913
7665
|
|
|
7914
|
-
export declare type UseCommand = (form: Form) => {
|
|
7915
|
-
run: (path: string, trigger: CommandTrigger) => void;
|
|
7916
|
-
};
|
|
7917
|
-
|
|
7918
|
-
export declare const useCommand: UseCommand;
|
|
7919
|
-
|
|
7920
7666
|
/**
|
|
7921
7667
|
* @description useFields hook
|
|
7922
7668
|
* @param {Fields} initFields - 初始化表单字段
|
package/es/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import { _ as _sfc_main } from "./form/index-
|
|
3
|
-
import {
|
|
2
|
+
import { _ as _sfc_main } from "./form/index-1cdda7ac.js";
|
|
3
|
+
import { B, d, C, b, f, F, e, h, U, i, u, j, k } from "./form/index-1cdda7ac.js";
|
|
4
4
|
import BaseTable from "./table/index.js";
|
|
5
5
|
import { useTable } from "./table/index.js";
|
|
6
6
|
import _sfc_main$1 from "./component-provider/index.js";
|
|
@@ -25,33 +25,25 @@ const index = {
|
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
27
|
export {
|
|
28
|
-
k as ArrowFunctionRegexp,
|
|
29
28
|
B as BaseField,
|
|
30
29
|
d as BaseFormItem,
|
|
31
|
-
h as COMMAND,
|
|
32
30
|
C as COMPONENT_MAP,
|
|
33
31
|
b as ContainerFragment,
|
|
34
32
|
f as FORM_DATA,
|
|
35
33
|
F as FORM_ITEM_SLOT_KEYS,
|
|
36
|
-
j as FunctionRegexp,
|
|
37
34
|
INIT_PROPS_MAP,
|
|
38
35
|
INJECT_KEYS,
|
|
39
36
|
ProComponentProvider,
|
|
40
37
|
ProForm,
|
|
41
38
|
ProTable,
|
|
42
|
-
R as RULE_TYPE_MAP,
|
|
43
39
|
e as SlotComponent,
|
|
44
|
-
|
|
40
|
+
h as UPDATE_ACTIVE_PATH,
|
|
45
41
|
U as UPDATE_FORM_DATA,
|
|
46
42
|
index as default,
|
|
47
|
-
|
|
48
|
-
n as jsonParseReviver,
|
|
49
|
-
m as jsonStringifyReplacer,
|
|
50
|
-
r as useCommand,
|
|
51
|
-
p as useFields,
|
|
43
|
+
i as useFields,
|
|
52
44
|
u as useForm,
|
|
53
|
-
|
|
54
|
-
|
|
45
|
+
j as useFormData,
|
|
46
|
+
k as useInitProps,
|
|
55
47
|
useInjectProps,
|
|
56
48
|
useProviderProps,
|
|
57
49
|
useTable
|