@@ -32,12 +32,11 @@ import useConfigInject from '../_util/hooks/useConfigInject';
32
32
import { useInjectForm } from './context' ;
33
33
import FormItemLabel from './FormItemLabel' ;
34
34
import FormItemInput from './FormItemInput' ;
35
- import type { ValidationRule } from './Form' ;
36
35
import { useProvideFormItemContext } from './FormItemContext' ;
37
36
import useDebounce from './utils/useDebounce' ;
38
37
39
38
const ValidateStatuses = tuple ( 'success' , 'warning' , 'error' , 'validating' , '' ) ;
40
- export type ValidateStatus = typeof ValidateStatuses [ number ] ;
39
+ export type ValidateStatus = ( typeof ValidateStatuses ) [ number ] ;
41
40
42
41
export interface FieldExpose {
43
42
fieldValue : Ref < any > ;
@@ -46,7 +45,7 @@ export interface FieldExpose {
46
45
resetField : ( ) => void ;
47
46
clearValidate : ( ) => void ;
48
47
namePath : ComputedRef < InternalNamePath > ;
49
- rules ?: ComputedRef < ValidationRule [ ] > ;
48
+ rules ?: ComputedRef < Rule [ ] > ;
50
49
validateRules : ( options : ValidateOptions ) => Promise < void > | Promise < RuleError [ ] > ;
51
50
}
52
51
@@ -169,7 +168,7 @@ export default defineComponent({
169
168
validateTrigger = validateTrigger === undefined ? 'change' : validateTrigger ;
170
169
return toArray ( validateTrigger ) ;
171
170
} ) ;
172
- const rulesRef = computed < ValidationRule [ ] > ( ( ) => {
171
+ const rulesRef = computed < Rule [ ] > ( ( ) => {
173
172
let formRules = formContext . rules . value ;
174
173
const selfRules = props . rules ;
175
174
const requiredRule =
0 commit comments