From 2fa83db1de4f8c02f9129f57d03468606783fe79 Mon Sep 17 00:00:00 2001 From: yJs Date: Fri, 7 Dec 2018 10:11:06 +0800 Subject: [PATCH] fix: dropdown位置自动调整后,选项列表的长度发生改变后,dropdown位置不会自动计算 --- src/components/select/select.vue | 4 ++++ 1 file changed, 4 insertions(+), 0 deletions(-) diff --git a/src/components/select/select.vue b/src/components/select/select.vue index 8aaca7d..d398fe3 100644 --- a/src/components/select/select.vue +++ b/src/components/select/select.vue @@ -750,6 +750,10 @@ if (this.slotOptions && this.slotOptions.length === 0){ this.query = ''; } + + // 当 dropdown 一开始在控件下部显示,而滚动页面后变成在上部显示,如果选项列表的长度由内部动态变更了(搜索情况) + // dropdown 的位置不会重新计算,需要重新计算 + this.broadcast('Drop', 'on-update-popper'); }, visible(state){ this.$emit('on-open-change', state); -- libgit2 0.21.4