From e6edc172ff7a66c435bc76d3420bcf5c87f680da Mon Sep 17 00:00:00 2001 From: miomio-xiao Date: Thu, 29 Mar 2018 17:35:56 +0800 Subject: [PATCH] fix select dropdown position --- src/components/select/dropdown.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/select/dropdown.vue b/src/components/select/dropdown.vue index 289c82b..4915fae 100644 --- a/src/components/select/dropdown.vue +++ b/src/components/select/dropdown.vue @@ -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); } }, -- libgit2 0.21.4