@dazhicheng/ui 1.5.144 → 1.5.147
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.
|
@@ -2,13 +2,14 @@ import { PropType } from 'vue';
|
|
|
2
2
|
import { Recordable } from '../../../../../../utils/src';
|
|
3
3
|
import { FieldEntry } from '../types/forms';
|
|
4
4
|
import { FormSchema } from '../types';
|
|
5
|
+
type ArraySchemaProp = FormSchema[] | ((entry: FieldEntry<Recordable>, currentIndex: number) => FormSchema[]);
|
|
5
6
|
declare const FormArrayRegister: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
6
7
|
fieldName: {
|
|
7
8
|
type: PropType<string>;
|
|
8
9
|
required: true;
|
|
9
10
|
};
|
|
10
11
|
arraySchema: {
|
|
11
|
-
type: PropType<
|
|
12
|
+
type: PropType<ArraySchemaProp>;
|
|
12
13
|
default: () => FormSchema[];
|
|
13
14
|
};
|
|
14
15
|
formItemClass: {
|
|
@@ -31,7 +32,7 @@ declare const FormArrayRegister: import('vue').DefineComponent<import('vue').Ext
|
|
|
31
32
|
required: true;
|
|
32
33
|
};
|
|
33
34
|
arraySchema: {
|
|
34
|
-
type: PropType<
|
|
35
|
+
type: PropType<ArraySchemaProp>;
|
|
35
36
|
default: () => FormSchema[];
|
|
36
37
|
};
|
|
37
38
|
formItemClass: {
|
|
@@ -48,7 +49,7 @@ declare const FormArrayRegister: import('vue').DefineComponent<import('vue').Ext
|
|
|
48
49
|
};
|
|
49
50
|
}>> & Readonly<{}>, {
|
|
50
51
|
rules: import('../types').FormSchemaRuleType | undefined;
|
|
51
|
-
arraySchema:
|
|
52
|
+
arraySchema: ArraySchemaProp;
|
|
52
53
|
formItemClass: NonNullable<string | (() => string) | undefined>;
|
|
53
54
|
virtual: boolean;
|
|
54
55
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { FormItemDependencies, FormSchemaRuleType, MaybeComponentProps } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* 解析Nested Objects对应的字段值
|
|
4
|
+
* @param values 表单值
|
|
5
|
+
* @param fieldName 字段名
|
|
6
|
+
*/
|
|
7
|
+
export declare function resolveValueByFieldName(values: Record<string, any>, fieldName: string): any;
|
|
2
8
|
export default function useDependencies(getDependencies: () => FormItemDependencies | undefined): {
|
|
3
9
|
dynamicComponentProps: import('vue').Ref<{
|
|
4
10
|
[x: Record<never, never> & string]: any;
|
|
@@ -470,6 +470,10 @@ export type ExtendedFormApi = Omit<FormApi, "getValues" | "validate" | "setState
|
|
|
470
470
|
* @param {string[]} fieldNames - 要移除的字段名列表
|
|
471
471
|
*/
|
|
472
472
|
removeFields?: (fieldNames: string[]) => void;
|
|
473
|
+
/**
|
|
474
|
+
* @description 分组表单 reset 时递增(仅 GroupFormApi / useGroupForm)
|
|
475
|
+
*/
|
|
476
|
+
resetSignal?: Ref<number>;
|
|
473
477
|
};
|
|
474
478
|
export interface TtFormAdapterOptions<T extends BaseFormComponentType = BaseFormComponentType> {
|
|
475
479
|
config?: {
|