dingyong0214 / ThorUI-uniapp

ThorUI组件库,轻量、简洁的移动端组件库。组件文档地址:https://thorui.cn/doc
MIT License
2.64k stars 396 forks source link

苹果x的聊天输入有bug,现在解决不了,楼主回复一下下 #50

Closed baozai6795 closed 4 years ago

baozai6795 commented 4 years ago

微信图片_20200604193044

baozai6795 commented 4 years ago

iPhone x 输入法和输入框被挤开,其他版本没什么问题 created() { //键盘高度监听 this.faceList = emoji.en; uni.onKeyboardHeightChange(res => { this.keyboardHeight = res.height; //去除 完成那一栏高度影响 setTimeout(() => { if (this.showIndex == 1 && this.keyboardHeight != 0) { this.replyContainerH = this.keyboardHeight;

            }
        }, 100);
    });
},

this.keyboardHeight = res.height-34刚刚好给iPhonex;但是离开输入法,输入框下不来

dingyong0214 commented 4 years ago

-34的时候判断是否大于0,res.height-34>0?res.height-34:0

baozai6795 commented 4 years ago

给了之后输入框下不来,如果你测试成功的话你上传你新的代码,图是源代码的,iPhonex才有这种

baozai6795 commented 4 years ago

给了之后输入框下不来,如果你测试成功的话你上传你新的代码,图是源代码的,iPhonex才有这种