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 下拉框偏移错误 #20367

Closed
ShenganLee opened this issue Dec 20, 2019 · 7 comments
Closed

select 下拉框偏移错误 #20367

ShenganLee opened this issue Dec 20, 2019 · 7 comments
Labels

Comments

@ShenganLee
Copy link

在 transform: scale 缩放后 select 下拉菜单偏移位置错误。地址https://stackblitz.com/edit/react-fidsr8
select

@ant-design-bot
Copy link
Contributor

Hello @ShenganLee, your issue has been closed because it does not conform to our issue requirements. Please use the Issue Helper to create an issue, thank you!

你好 @ShenganLee,为了能够进行高效沟通,我们对 issue 有一定的格式要求,你的 issue 因为不符合要求而被自动关闭。你可以通过 issue 助手 来创建 issue 以方便我们定位错误。谢谢配合!

@AideyTry
Copy link

AideyTry commented Aug 3, 2020

我也遇到同样的问题,弄了好久,通过看官方文档,最终解决了,用getPopupContainer,希望能有帮助@ShenganLee
image
代码参考如下:
image
image

@ShenganLee
Copy link
Author

ShenganLee commented Aug 3, 2020 via email

@jing-wu
Copy link

jing-wu commented Aug 12, 2020

是不是通过这种方式,能较好地让 antd 支持 scale 了?

@RITAWONG
Copy link

RITAWONG commented Jan 6, 2021

我的做法是 getPopupContainer 结合一个反缩放的 dom。这样就不用写具体的css去调整偏移量了

@Flourad
Copy link

Flourad commented Jan 25, 2021

我的做法是 getPopupContainer 结合一个反缩放的 dom。这样就不用写具体的css去调整偏移量了

反缩放的dom,是怎么写的,请问有例子么?

@RITAWONG
Copy link

RITAWONG commented Feb 1, 2021

我的做法是 getPopupContainer 结合一个反缩放的 dom。这样就不用写具体的css去调整偏移量了

反缩放的dom,是怎么写的,请问有例子么?

大致思路是:
在被缩放后的dom下生成一个反向缩放的dom,所有的modal、tooltip等都通过全局的getPopupContainer生成到这个反向缩放的dom下。简单的例子没有,我是用在两三个复合项目中做解决方案时顺带写的这个。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants