diff --git a/src/components/select/dropdown.vue b/src/components/select/dropdown.vue index 00d2d466..62c91925 100644 --- a/src/components/select/dropdown.vue +++ b/src/components/select/dropdown.vue @@ -44,13 +44,11 @@ methods: { update () { if (isServer) return; - if (this.popper) { - this.$nextTick(() => { + this.$nextTick(() => { + if (this.popper) { this.popper.update(); this.popperStatus = true; - }); - } else { - this.$nextTick(() => { + } else { this.popper = new Popper(this.$parent.$refs.reference, this.$el, { eventsEnabled: false, placement: this.placement, @@ -70,13 +68,13 @@ this.resetTransformOrigin(); } }); - }); - } - // set a height for parent is Modal and Select's width is 100% - if (this.$parent.$options.name === 'iSelect') { - this.width = parseInt(getStyle(this.$parent.$el, 'width')); - } - this.tIndex = this.handleGetIndex(); + } + // set a height for parent is Modal and Select's width is 100% + if (this.$parent.$options.name === 'iSelect') { + this.width = parseInt(getStyle(this.$parent.$el, 'width')); + } + this.tIndex = this.handleGetIndex(); + }); }, destroy () { if (this.popper) {