瀏覽代碼

Chore: declare focus method in form component types (#10221)

杨奕 7 年之前
父節點
當前提交
3997df08fc
共有 7 個文件被更改,包括 35 次插入0 次删除
  1. 5 0
      types/autocomplete.d.ts
  2. 5 0
      types/date-picker.d.ts
  3. 5 0
      types/input-number.d.ts
  4. 5 0
      types/input.d.ts
  5. 5 0
      types/select.d.ts
  6. 5 0
      types/time-picker.d.ts
  7. 5 0
      types/time-select.d.ts

+ 5 - 0
types/autocomplete.d.ts

@@ -50,4 +50,9 @@ export declare class ElAutocomplete extends ElementUIComponent {
 
   /** Whether show suggestions when input focus */
   triggerOnFocus: boolean
+
+  /**
+   * Focus the Input component
+   */
+  focus (): void
 }

+ 5 - 0
types/date-picker.d.ts

@@ -116,4 +116,9 @@ export declare class ElDatePicker extends ElementUIComponent {
 
   /** name for the inner native input */
   name: string
+
+  /**
+   * Focus the Input component
+   */
+  focus (): void
 }

+ 5 - 0
types/input-number.d.ts

@@ -33,4 +33,9 @@ export declare class ElInputNumber extends ElementUIComponent {
 
   /** Same as name in native input */
   name: string
+
+  /**
+   * Focus the Input component
+   */
+  focus (): void
 }

+ 5 - 0
types/input.d.ts

@@ -74,4 +74,9 @@ export declare class ElInput extends ElementUIComponent {
 
   /** Same as form in native input */
   form: string
+
+  /**
+   * Focus the Input component
+   */
+  focus (): void
 }

+ 5 - 0
types/select.d.ts

@@ -68,4 +68,9 @@ export declare class ElSelect extends ElementUIComponent {
 
   /** Select first matching option on enter key. Use with filterable or remote */
   defaultFirstOption: boolean
+
+  /**
+   * Focus the Input component
+   */
+  focus (): void
 }

+ 5 - 0
types/time-picker.d.ts

@@ -55,4 +55,9 @@ export declare class ElTimePicker extends ElementUIComponent {
 
   /** Range separator */
   rangeSeparator: string
+
+  /**
+   * Focus the Input component
+   */
+  focus (): void
 }

+ 5 - 0
types/time-select.d.ts

@@ -48,4 +48,9 @@ export declare class ElTimeSelect extends ElementUIComponent {
 
   /** Additional options, check the table below */
   pickerOptions: TimeSelectOptions
+
+  /**
+   * Focus the Input component
+   */
+  focus (): void
 }