Commit f25b8b1e authored by kingwl's avatar kingwl Committed by baiyaaaaa

AutoComplete: fix key enter (#2672)

parent abb24bba
......@@ -19,7 +19,7 @@
</template>
<template slot="append" v-if="$slots.append">
<slot name="append"></slot>
</template>
</template>
</el-input>
<el-autocomplete-suggestions
:class="[popperClass ? popperClass : '']"
......@@ -113,7 +113,7 @@
}, 100);
},
handleKeyEnter() {
if (this.suggestionVisible) {
if (this.suggestionVisible && this.highlightedIndex >= 0 && this.highlightedIndex < this.suggestions.length) {
this.select(this.suggestions[this.highlightedIndex]);
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment