-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(EN): Modal.prompt keyboard avoid view
close #1489
- Loading branch information
1 parent
b4bf59a
commit 610008c
Showing
1 changed file
with
4 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
610008c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
此处没有判断android平台,在android平台KeyboardAvoidingView不适用,会出现偏离特别远。
我在自定义部分一般都这么判断:<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'padding' : 'height'}>
610008c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@linhanyang 这两种模式有什么区别?我手边没有 android 测试机
610008c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
height属性默认属性,不做任何处理,官方没有做相应的说明,在android平台上,不需要设置KeyboardAvoidingView也能自适应,所以我就在这个地方判断了以下。
610008c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@linhanyang 来个 Pull Request 帮忙修复一下吧 😄
610008c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
嗯,我测试下。
610008c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@linhanyang antd-mobile react-native develop 文档
610008c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/ant-design/ant-design-mobile/issues/2421