diff --git a/components/form/FormItem.tsx b/components/form/FormItem.tsx index e237aa98a..c0405b04c 100644 --- a/components/form/FormItem.tsx +++ b/components/form/FormItem.tsx @@ -84,8 +84,8 @@ export const formItemProps = { hasFeedback: PropTypes.looseBool.def(false), colon: PropTypes.looseBool, labelAlign: PropTypes.oneOf(tuple('left', 'right')), - prop: { type: [String, Number, Array] as PropType }, - name: { type: [String, Number, Array] as PropType }, + prop: { type: [String, Number, Array] as PropType> }, + name: { type: [String, Number, Array] as PropType> }, rules: PropTypes.oneOfType([Array, Object]), autoLink: PropTypes.looseBool.def(true), required: PropTypes.looseBool, diff --git a/components/form/context.ts b/components/form/context.ts index 35edc91fb..ce4d0e25c 100644 --- a/components/form/context.ts +++ b/components/form/context.ts @@ -20,7 +20,7 @@ export interface FormContextProps { validateTrigger?: ComputedRef; rules?: ComputedRef<{ [k: string]: ValidationRule[] | ValidationRule }>; onValidate: ( - name: string | number | string[] | number[], + name: string | number | Array, status: boolean, errors: string[] | null, ) => void;