Merge pull request #3272 from miomio-xiao/2.0

fix select dropdown position
This commit is contained in:
Aresn 2018-04-02 10:41:24 +08:00 committed by GitHub
commit bd0c559007
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,7 +21,8 @@
data () {
return {
popper: null,
width: ''
width: '',
popperStatus: false
};
},
computed: {
@ -37,6 +38,7 @@
if (this.popper) {
this.$nextTick(() => {
this.popper.update();
this.popperStatus = true;
});
} else {
this.$nextTick(() => {
@ -65,10 +67,11 @@
destroy () {
if (this.popper) {
setTimeout(() => {
if (this.popper) {
if (this.popper && !this.popperStatus) {
this.popper.destroy();
this.popper = null;
}
this.popperStatus = false;
}, 300);
}
},