@hi-ui/form 4.0.0-alpha.16 → 4.0.0-alpha.17
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/lib/types/types.d.ts +7 -7
- package/package.json +2 -2
package/lib/types/types.d.ts
CHANGED
|
@@ -88,19 +88,19 @@ export interface FormHelpers<T = any> {
|
|
|
88
88
|
/**
|
|
89
89
|
* 重置整个表单的验证,对应 Form.Reset中的 API
|
|
90
90
|
*/
|
|
91
|
-
reset: (fields?:
|
|
91
|
+
reset: (fields?: FormFieldPath, toDefault?: boolean) => Promise<T>;
|
|
92
92
|
/**
|
|
93
93
|
* 对指定表单字段进行校验
|
|
94
94
|
*/
|
|
95
|
-
validateField: (fields?:
|
|
95
|
+
validateField: (fields?: FormFieldPath) => Promise<T>;
|
|
96
96
|
/**
|
|
97
97
|
* 对指定表单字段进行校验
|
|
98
98
|
*/
|
|
99
|
-
validateFields: (fields?:
|
|
99
|
+
validateFields: (fields?: FormFieldPath) => Promise<T>;
|
|
100
100
|
/**
|
|
101
101
|
* 设置表单的值,在异步获取的数据回显的时候,使用该方法
|
|
102
102
|
*/
|
|
103
|
-
setFieldValue: (field:
|
|
103
|
+
setFieldValue: (field: FormFieldPath, value: any) => void;
|
|
104
104
|
/**
|
|
105
105
|
* 设置多个表单的值,在异步获取的数据回显的时候,使用该方法
|
|
106
106
|
*/
|
|
@@ -108,7 +108,7 @@ export interface FormHelpers<T = any> {
|
|
|
108
108
|
/**
|
|
109
109
|
* 获取一个字段名对应的 Values 返回为数组形式, 不传入 fields;默认返回全部信息, 不会触发表单校验
|
|
110
110
|
*/
|
|
111
|
-
getFieldValue: (field:
|
|
111
|
+
getFieldValue: (field: FormFieldPath) => any;
|
|
112
112
|
/**
|
|
113
113
|
* 获取所有字段名对应的 Values 返回为数组形式, 不传入 fields;默认返回全部信息, 不会触发表单校验
|
|
114
114
|
*/
|
|
@@ -116,7 +116,7 @@ export interface FormHelpers<T = any> {
|
|
|
116
116
|
/**
|
|
117
117
|
* 获取一组字段名对应的错误信息,返回为数组形式, 不传入 fields;默认返回全部信息
|
|
118
118
|
*/
|
|
119
|
-
getFieldError: (field:
|
|
119
|
+
getFieldError: (field: FormFieldPath) => any;
|
|
120
120
|
/**
|
|
121
121
|
* 获取所有字段名对应的错误信息,返回为数组形式, 不传入 fields;默认返回全部信息
|
|
122
122
|
*/
|
|
@@ -128,7 +128,7 @@ export interface FormHelpers<T = any> {
|
|
|
128
128
|
/**
|
|
129
129
|
* 移除表单项的校验结果,传入待移除的表单项的 field 属性组成的数组
|
|
130
130
|
*/
|
|
131
|
-
clearFieldsValidates: (fields:
|
|
131
|
+
clearFieldsValidates: (fields: FormFieldPath) => void;
|
|
132
132
|
}
|
|
133
133
|
export declare type FormFieldPath = (string | number)[] | string | number;
|
|
134
134
|
export declare type FormErrorMessage = string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hi-ui/form",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.17",
|
|
4
4
|
"description": "A sub-package for @hi-ui/hiui.",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "HIUI <mi-hiui@xiaomi.com>",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"react": "^17.0.1",
|
|
66
66
|
"react-dom": "^17.0.1"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "49ad10d0c3a2394fc6f8f21ce54be97e5eb9c259"
|
|
69
69
|
}
|