Commit bd0c559007c2dabdc8e726fbd5e2aa0e87ff6728

Authored by Aresn
Committed by GitHub
2 parents 67033d3b e6edc172

Merge pull request #3272 from miomio-xiao/2.0

fix select dropdown position
Showing 1 changed file with 5 additions and 2 deletions   Show diff stats
src/components/select/dropdown.vue
... ... @@ -21,7 +21,8 @@
21 21 data () {
22 22 return {
23 23 popper: null,
24   - width: ''
  24 + width: '',
  25 + popperStatus: false
25 26 };
26 27 },
27 28 computed: {
... ... @@ -37,6 +38,7 @@
37 38 if (this.popper) {
38 39 this.$nextTick(() => {
39 40 this.popper.update();
  41 + this.popperStatus = true;
40 42 });
41 43 } else {
42 44 this.$nextTick(() => {
... ... @@ -65,10 +67,11 @@
65 67 destroy () {
66 68 if (this.popper) {
67 69 setTimeout(() => {
68   - if (this.popper) {
  70 + if (this.popper && !this.popperStatus) {
69 71 this.popper.destroy();
70 72 this.popper = null;
71 73 }
  74 + this.popperStatus = false;
72 75 }, 300);
73 76 }
74 77 },
... ...