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

Layout 布局中加入Affix图钉,折叠左侧导航,图钉计算宽度出错 #13358

Closed
1 task
llsldwy opened this issue Nov 29, 2018 · 4 comments
Closed
1 task
Assignees

Comments

@llsldwy
Copy link

llsldwy commented Nov 29, 2018

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

Version

3.10.9

Environment

antd 3.10.8 "react": "^16.6.3",

Reproduction link

https://codepen.io/llsldwy/pen/PxxKGV?&editors=001

Steps to reproduce

滚动滚动条至 图钉fixed,然后折叠左侧导航,图钉位置经过重新计算,但是width计算出错
image

What is expected?

滚动滚动条至 图钉fixed,然后折叠左侧导航,图钉位置经过重新计算,width计算正确

What is actually happening?

滚动滚动条至 图钉fixed,然后折叠左侧导航,图钉位置经过重新计算,但是width计算出错

@IssueHuntBot
Copy link

@issuehuntfest has funded $20.00 to this issue. See it on IssueHunt

@he-zhiyong
Copy link
Contributor

试了一下,给你提供几个解决方案:
1、setTimeout(()=>{
this.affix.updatePosition(new Event('resize'));
},200);
2、setTimeout(()=>{
window.dispatchEvent(new Event('resize'));
},200);

@llsldwy
Copy link
Author

llsldwy commented Jan 10, 2019

@he-zhiyong 谢谢,问题已经解决了,只不过是自己写的,如果左侧菜单收起,js 重新计算区域的宽度,不过您提供的两个方式,回去我看看,感觉比我的灵活不少,赞

@afc163 afc163 closed this as completed Jan 10, 2019
@IssueHuntBot
Copy link

@zombieJ has rewarded $14.00 to @zombieJ. See it on IssueHunt

  • 💰 Total deposit: $20.00
  • 🎉 Repository reward(20%): $4.00
  • 🔧 Service fee(10%): $2.00

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

No branches or pull requests

5 participants