mirror of https://github.com/ElemeFE/element
fix autocomplete dropdown reference element (#2092)
parent
593acacdfa
commit
a2fd24e0f5
|
@ -55,7 +55,7 @@
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.popperElm = this.$el;
|
this.popperElm = this.$el;
|
||||||
this.referenceElm = this.$parent.$el;
|
this.referenceElm = this.$parent.$refs.input.$refs.input;
|
||||||
},
|
},
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="el-autocomplete" v-clickoutside="handleBlur">
|
<div class="el-autocomplete" v-clickoutside="handleBlur">
|
||||||
<el-input
|
<el-input
|
||||||
|
ref="input"
|
||||||
:value="value"
|
:value="value"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:placeholder="placeholder"
|
:placeholder="placeholder"
|
||||||
|
@ -69,7 +70,7 @@
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
suggestionVisible(val) {
|
suggestionVisible(val) {
|
||||||
this.broadcast('ElAutocompleteSuggestions', 'visible', [val, this.$el.offsetWidth]);
|
this.broadcast('ElAutocompleteSuggestions', 'visible', [val, this.$refs.input.$refs.input.offsetWidth]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
Loading…
Reference in New Issue