Commit 2fa83db1de4f8c02f9129f57d03468606783fe79
Committed by
GitHub

1 parent
e2ac3e07
fix: dropdown位置自动调整后,选项列表的长度发生改变后,dropdown位置不会自动计算
Showing
1 changed file
with
4 additions
and
0 deletions
Show diff stats
src/components/select/select.vue
... | ... | @@ -750,6 +750,10 @@ |
750 | 750 | if (this.slotOptions && this.slotOptions.length === 0){ |
751 | 751 | this.query = ''; |
752 | 752 | } |
753 | + | |
754 | + // 当 dropdown 一开始在控件下部显示,而滚动页面后变成在上部显示,如果选项列表的长度由内部动态变更了(搜索情况) | |
755 | + // dropdown 的位置不会重新计算,需要重新计算 | |
756 | + this.broadcast('Drop', 'on-update-popper'); | |
753 | 757 | }, |
754 | 758 | visible(state){ |
755 | 759 | this.$emit('on-open-change', state); | ... | ... |