diff --git a/src/components/select/select.vue b/src/components/select/select.vue index 0acc3b6..8aaca7d 100644 --- a/src/components/select/select.vue +++ b/src/components/select/select.vue @@ -753,7 +753,14 @@ }, visible(state){ this.$emit('on-open-change', state); - } + }, + slotOptions(options, old){ + // 当 dropdown 在控件上部显示时,如果选项列表的长度由外部动态变更了, + // dropdown 的位置会有点问题,需要重新计算 + if (options && old && options.length !== old.length) { + this.broadcast('Drop', 'on-update-popper'); + } + }, } }; -- libgit2 0.21.4