Input: add blur method (#10356)

pull/10358/head
杨奕 2018-03-26 10:51:18 +08:00 committed by GitHub
parent 0b330126c7
commit 5d6fe5eb2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 0 deletions

View File

@ -689,6 +689,7 @@ Search data from server-side.
| Method | Description | Parameters |
|------|--------|-------|
| focus | focus the input element | — |
| blur | blur the input element | — |
| select | select the text in input element | — |
### Autocomplete Attributes

View File

@ -668,6 +668,7 @@ Búsqueda de datos desde el servidor.
| Metodo | Descripción | Parametros |
| ------ | ----------------------------- | ---------- |
| focus | coloca el foco en el elemento | — |
| blur | blur the input element | — |
| select | select the text in input element | — |
### Autocomplete Atributos

View File

@ -842,6 +842,7 @@ export default {
| 方法名 | 说明 | 参数 |
| ---- | ---- | ---- |
| focus | 使 input 获取焦点 | — |
| blur | 使 input 失去焦点 | — |
| select | 选中 input 中的文字 | — |
### Autocomplete Attributes

View File

@ -211,6 +211,9 @@
focus() {
(this.$refs.input || this.$refs.textarea).focus();
},
blur() {
(this.$refs.input || this.$refs.textarea).blur();
},
getMigratingConfig() {
return {
props: {

5
types/input.d.ts vendored
View File

@ -80,6 +80,11 @@ export declare class ElInput extends ElementUIComponent {
*/
focus (): void
/**
* Blur the Input component
*/
blur (): void
/**
* Select the text in input element
*/