Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

select组件在modal中使用时,下拉菜单的位置异常 #1724

Closed
1 task
useryechen opened this issue Jan 14, 2020 · 3 comments
Closed
1 task

select组件在modal中使用时,下拉菜单的位置异常 #1724

useryechen opened this issue Jan 14, 2020 · 3 comments
Labels

Comments

@useryechen
Copy link

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

1.4.4

Environment

OS: windown7 Browser: chrome 77

Reproduction link

Edit on CodeSandbox

Steps to reproduce

打开modal,点击下拉框,鼠标滚动页面

What is expected?

期望modal打开的时候,下拉框展开,滚动页面时,下拉框位置正常

What is actually happening?

modal打开的时候,下拉框展开,滚动页面时,下拉框位置跟随页面滚动

@sendya
Copy link
Member

sendya commented Jan 14, 2020

getPopupContainer 菜单渲染父节点。默认渲染到 body 上,如果你遇到菜单滚动定位问题,试试修改为滚动的区域,并相对其定位。 Function(triggerNode) () => document.body

https://www.antdv.com/docs/vue/faq-cn/#Select-Dropdown-DatePicker-TimePicker-Popover-Popconfirm-%E4%BC%9A%E8%B7%9F%E9%9A%8F%E6%BB%9A%E5%8A%A8%E6%9D%A1%E4%B8%8A%E4%B8%8B%E7%A7%BB%E5%8A%A8%EF%BC%9F

image

https://codesandbox.io/s/mystifying-turing-gqus6

@useryechen
Copy link
Author

getPopupContainer 菜单渲染父节点。默认渲染到 body 上,如果你遇到菜单滚动定位问题,试试修改为滚动的区域,并相对其定位。 Function(triggerNode) () => document.body
https://www.antdv.com/docs/vue/faq-cn/#Select-Dropdown-DatePicker-TimePicker-Popover-Popconfirm-%E4%BC%9A%E8%B7%9F%E9%9A%8F%E6%BB%9A%E5%8A%A8%E6%9D%A1%E4%B8%8A%E4%B8%8B%E7%A7%BB%E5%8A%A8%EF%BC%9F

image

https://codesandbox.io/s/mystifying-turing-gqus6

多谢回复

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants