Skip to content

mpx.onKeyboardHeightChange(function listener) ​

监听键盘高度变化事件

支持情况: 微信、RN

参考文档

参数 ​

function listener
键盘高度变化事件的监听函数

参数

Object res

属性类型说明
heightnumber键盘高度

示例代码 ​

js
mpx.onKeyboardHeightChange(res => {
  console.log(res.height)
})