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

feat(PortaWrapper): add switchScrollingEffect func #65

Merged
merged 4 commits into from
Dec 9, 2019

Conversation

shaodahong
Copy link
Member

@coveralls
Copy link

coveralls commented Nov 29, 2019

Coverage Status

Coverage increased (+4.1%) to 21.311% when pulling ad011be on enhance-portal into ee9d61c on master.

@shaodahong
Copy link
Member Author

@jljsj33

  1. Dialog DrawerswitchScrollingEffect 都抽出来,这样不需要上层组件来控制,直接调用就行
  2. close 的时候改了下判断下,如果是 close 就代表关闭,不需要一定有滚动高度

@shaodahong
Copy link
Member Author

close 的时机是由 openCount 来控制,和加个 flag 感觉没什么区别

src/PortalWrapper.js Outdated Show resolved Hide resolved
@shaodahong
Copy link
Member Author

@jljsj33 看下还有问题没

@jljsj33
Copy link
Member

jljsj33 commented Dec 9, 2019

没有,多测测,,,你合下吧,,,能发不???

@shaodahong
Copy link
Member Author

不能……

@shaodahong
Copy link
Member Author

理解错了,可以发,我合下你帮忙发下版吧

@shaodahong shaodahong merged commit 85c296b into master Dec 9, 2019
@delete-merged-branch delete-merged-branch bot deleted the enhance-portal branch December 9, 2019 12:44
@jljsj33
Copy link
Member

jljsj33 commented Dec 9, 2019

我发 4.16, ,你呆会写下 changelog

@shaodahong
Copy link
Member Author

这个 changelog 感觉就可以了

image

@jljsj33
Copy link
Member

jljsj33 commented Dec 9, 2019

@shaodahong
Copy link
Member Author

嗯,等到家了写下,写好我直接合,明天我调下 dialog 和 drawer

@jljsj33
Copy link
Member

jljsj33 commented Dec 9, 2019

4.16.1,, 4.16.0 发挂了

@shaodahong shaodahong mentioned this pull request Dec 9, 2019
@miroku-y
Copy link

miroku-y commented Jan 6, 2020

switchScrollingEffect.js 中的isBodyOverflowing方法,在下面一种场景中有点欠缺:

  在全局的body的样式上增加了overflow-y:scroll,至于为什么要加,原因是想解决左侧菜单栏切换,右侧对应的内容有无溢出不会出现页面抖动的问题。
  例如:https://preview.pro.ant.design/dashboard/analysis
  从分析页面到异常页403,右侧内容就会因为滚动条的原因抖动。

  如果把这个样式设置到html 上,虽然没上述问题,但是在结合弹框Modal 使用时,就会出现弹框的遮罩层遮不住滚动条,也有点不合适。

  在上面这种场景下,isBodyOverflowing期望是被返回true 的。

@shaodahong
Copy link
Member Author

是个优化的点,需要增强一下 isBodyOverflowing,这个函数是判断页面高度是否超出可视高度来得到结果的,像你所描述的写死成滚动,但是实际没有超出,确实会

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

Successfully merging this pull request may close these issues.

None yet

4 participants