赞
踩
- // 监听键盘高度变化
- uni.onKeyboardHeightChange((obj)=>{
- // 获取系统信息
- let _sysInfo = uni.getSystemInfoSync();
- let _heightDiff = _sysInfo.screenHeight - _sysInfo.windowHeight
- let _diff = obj.height - _heightDiff
- // 键盘高度
- height = (_diff > 0 ? _diff : 0) - 2 + "px";
- })
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。