uni.onKeyboardHeightChange(res => {
console.log(res)
if (res.height == 0) {
this.keyboardHeight = res.height
}
});

- 发布:2024-09-27 20:34
- 更新:2025-06-23 11:37
- 阅读:316
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: 11
HBuilderX类型: Alpha
HBuilderX版本号: 4.28
手机系统: Android
手机系统版本号: Android 15
手机厂商: 小米
手机机型: hongmi
页面类型: vue
vue版本: vue3
打包方式: 云端
项目创建方式: HBuilderX
示例代码:
操作步骤:
uni.onKeyboardHeightChange(res => {
console.log(res)
if (res.height == 0) {
this.keyboardHeight = res.height
}
});
uni.onKeyboardHeightChange(res => {
console.log(res)
if (res.height == 0) {
this.keyboardHeight = res.height
}
});
预期结果:
{“height”:348}
{“height”:348}
实际结果:
无
无
bug描述:
安卓 uni.onKeyboardHeightChange() 自定义基座 不触发
4***@qq.com
哪个版本能监测到? 我下了好几个 全都不触发
2025-06-23 11:38