fix select dropdown position
This commit is contained in:
parent
320fba546b
commit
e6edc172ff
1 changed files with 5 additions and 2 deletions
|
@ -21,7 +21,8 @@
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
popper: null,
|
popper: null,
|
||||||
width: ''
|
width: '',
|
||||||
|
popperStatus: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -37,6 +38,7 @@
|
||||||
if (this.popper) {
|
if (this.popper) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.popper.update();
|
this.popper.update();
|
||||||
|
this.popperStatus = true;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
@ -65,10 +67,11 @@
|
||||||
destroy () {
|
destroy () {
|
||||||
if (this.popper) {
|
if (this.popper) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (this.popper) {
|
if (this.popper && !this.popperStatus) {
|
||||||
this.popper.destroy();
|
this.popper.destroy();
|
||||||
this.popper = null;
|
this.popper = null;
|
||||||
}
|
}
|
||||||
|
this.popperStatus = false;
|
||||||
}, 300);
|
}, 300);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue