uni-app 4.08 android 云打包后uni.onKeyboardHeightChange不触发,官方回复下
uni-app 4.08 android 云打包后uni.onKeyboardHeightChange不触发,官方回复下
开发环境 | 版本号 | 项目创建方式 |
---|---|---|
PC开发环境操作系统 | Windows | HBuilderX |
PC开发环境操作系统版本号 | win11 | - |
手机系统 | Android | - |
手机系统版本号 | Android 14 | - |
手机厂商 | 小米 | - |
手机机型 | 所有android | - |
页面类型 | vue | - |
vue版本 | vue2 | - |
打包方式 | 云端 | - |
示例代码:
uni.onKeyboardHeightChange(this.keyboardChange);
keyboardChange(res) {
uni.showToast({
title: res.height,
icon: 'none',
});
},
```
### 操作步骤:
uniappx 4.08 android 云打包后uni.onKeyboardHeightChange不触发
### 预期结果:
uniappx 4.08 android 云打包后uni.onKeyboardHeightChange触发
### 实际结果:
uniappx 4.08 android 云打包后uni.onKeyboardHeightChange不触发
### bug描述:
uniappx 4.08 android 云打包后uni.onKeyboardHeightChange不触发
本地运行到android端是好的,打包后会不触发
ios两边都是好的
更多关于uni-app 4.08 android 云打包后uni.onKeyboardHeightChange不触发,官方回复下的实战教程也可以访问 https://www.itying.com/category-93-b0.html
1 回复
更多关于uni-app 4.08 android 云打包后uni.onKeyboardHeightChange不触发,官方回复下的实战教程也可以访问 https://www.itying.com/category-93-b0.html
在 uni-app 4.08 版本中,uni.onKeyboardHeightChange
在 Android 云打包后不触发的问题,可能是由于以下原因之一:
- 兼容性问题:某些 Android 设备或系统版本可能存在兼容性问题,导致该 API 无法正常触发。
- 云打包配置问题:云打包过程中可能存在某些配置问题,导致该 API 无法正常工作。
- API 使用问题:可能是由于代码中的某些问题,导致
uni.onKeyboardHeightChange
无法正确注册或触发。
解决方法
- 检查代码:确保
uni.onKeyboardHeightChange
的注册和使用方式正确。例如:uni.onKeyboardHeightChange(res => { console.log('键盘高度变化:', res.height); });