Open
Conversation
Contributor
|
改下版本号 |
SoloJiang
reviewed
Feb 23, 2022
| scrollerStyle.overflow = 'hidden'; | ||
| } else { | ||
| scrollerStyle.overflow = 'scroll'; | ||
| } |
Contributor
There was a problem hiding this comment.
这里逻辑有覆盖问题吧,上面设置的 overflowX/overflowY 都会被覆盖掉
Contributor
There was a problem hiding this comment.
这个覆盖关系还是有问题吧,disableScroll 没生效了吧
Author
There was a problem hiding this comment.
复现场景:disableScroll先设置为true,再设置为false,不生效;
更改逻辑:原有代码缺少disableScroll为false的处理,因为直接加处理会覆盖horizontal,所以先判断disableScroll再判断horizontal
Contributor
There was a problem hiding this comment.
原有逻辑是:
首次设置 disableScroll=true 后,
scrollerStyle 的值为: {overflow:'hidden'}
再次设置 disableScroll=false 后,scrollerStyle 的值分两种场景
- 如果 horizontal 为true 值为 {overflowX: 'scroll', overflowY:' hidden'}
- 如果 horizontal 为false 值为 {overflowX: 'hidden', overflowY:'scroll'}
这个结果有什么问题吗?期望是怎么样的?
Author
There was a problem hiding this comment.
我这边看到了问题,我第二次重置为false,组件上并没有设置overflow,因为overflow的默认值是visible,所以滚动不生效了
chenjun1011
reviewed
Feb 28, 2022
| scrollerStyle.overflowY = horizontal ? 'hidden' : 'scroll'; | ||
| } | ||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.