Select: focus input in setSoftFocus when available (#10801)

pull/10804/head
杨奕 2018-04-20 14:10:16 +08:00 committed by GitHub
parent e8e2fc425b
commit 9a1afc3b33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -683,7 +683,10 @@
setSoftFocus() {
this.softFocus = true;
(this.$refs.input || this.$refs.reference).focus();
const input = this.$refs.input || this.$refs.reference;
if (input) {
input.focus();
}
},
getValueIndex(arr = [], value) {