fix select dropdown position

This commit is contained in:
miomio-xiao 2018-03-29 17:35:56 +08:00
parent 320fba546b
commit e6edc172ff

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);
}
},