Forráskód Böngészése

Form: callback of validateField should be optional (#17314)

Carter Li 5 éve
szülő
commit
5558398411
1 módosított fájl, 2 hozzáadás és 2 törlés
  1. 2 2
      types/form.d.ts

+ 2 - 2
types/form.d.ts

@@ -72,11 +72,11 @@ export declare class ElForm extends ElementUIComponent {
    * @param props The property of `model` or array of prop which is going to validate
    * @param callback A callback to tell the field validation result
    */
-  validateField (props: string | string[], callback: ValidateFieldCallback): void
+  validateField (props: string | string[], callback?: ValidateFieldCallback): void
 
   /** reset all the fields and remove validation result */
   resetFields (): void
-  
+
   /** clear validation message for certain fields */
   clearValidate (props?: string | string[]): void
 }