fix autocomplete dropdown reference element (#2092)

pull/2089/head
baiyaaaaa 2016-12-30 11:13:15 +08:00 committed by cinwell.li
parent 593acacdfa
commit a2fd24e0f5
2 changed files with 3 additions and 2 deletions

View File

@ -55,7 +55,7 @@
mounted() {
this.popperElm = this.$el;
this.referenceElm = this.$parent.$el;
this.referenceElm = this.$parent.$refs.input.$refs.input;
},
created() {

View File

@ -1,6 +1,7 @@
<template>
<div class="el-autocomplete" v-clickoutside="handleBlur">
<el-input
ref="input"
:value="value"
:disabled="disabled"
:placeholder="placeholder"
@ -69,7 +70,7 @@
},
watch: {
suggestionVisible(val) {
this.broadcast('ElAutocompleteSuggestions', 'visible', [val, this.$el.offsetWidth]);
this.broadcast('ElAutocompleteSuggestions', 'visible', [val, this.$refs.input.$refs.input.offsetWidth]);
}
},
methods: {