<textarea :auto-focus="true" :show-confirm-bar='true' class='padding-bottom-xs' style="position: relative;bottom: 0;height: 140rpx;"
adjust-position="false" hold-keyboard="true" cursor-spacing="0" maxlength="100"align="left" v-model="todoThing" />
- 发布:2026-01-11 23:39
- 更新:2026-01-12 11:25
- 阅读:53
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: win11
HBuilderX类型: 正式
HBuilderX版本号: 4.87
手机系统: HarmonyOS NEXT
手机系统版本号: HarmonyOS 6.0.0
手机厂商: 华为
手机机型: p70 pro
页面类型: vue
vue版本: vue3
打包方式: 云端
项目创建方式: HBuilderX
示例代码:
操作步骤:
<textarea :auto-focus="true" :show-confirm-bar='true' class='padding-bottom-xs' style="position: relative;bottom: 0;height: 140rpx;"
adjust-position="false" hold-keyboard="true" cursor-spacing="0" maxlength="100"align="left" v-model="todoThing" />
bug1:设置:show-confirm-bar='true' :auto-focus="true" 弹起输入框,一闪而过然后又收回去了,只留下输入键盘。
<textarea :auto-focus="true" :show-confirm-bar='true' class='padding-bottom-xs' style="position: relative;bottom: 0;height: 140rpx;"
adjust-position="false" hold-keyboard="true" cursor-spacing="0" maxlength="100"align="left" v-model="todoThing" />
bug2:设置::auto-focus="true" :show-confirm-bar='false' 输入框弹起来但是和下边有很大的边距 。
<textarea :auto-focus="true" :show-confirm-bar='true' class='padding-bottom-xs' style="position: relative;bottom: 0;height: 140rpx;"
adjust-position="false" hold-keyboard="true" cursor-spacing="0" maxlength="100"align="left" v-model="todoThing" />
bug1:设置:show-confirm-bar='true' :auto-focus="true" 弹起输入框,一闪而过然后又收回去了,只留下输入键盘。
<textarea :auto-focus="true" :show-confirm-bar='true' class='padding-bottom-xs' style="position: relative;bottom: 0;height: 140rpx;"
adjust-position="false" hold-keyboard="true" cursor-spacing="0" maxlength="100"align="left" v-model="todoThing" />
bug2:设置::auto-focus="true" :show-confirm-bar='false' 输入框弹起来但是和下边有很大的边距 。
预期结果:
正常弹出
正常弹出
实际结果:
存在各种异常
存在各种异常
bug描述:
<textarea :auto-focus="true" :show-confirm-bar='true' class='padding-bottom-xs' style="position: relative;bottom: 0;height: 140rpx;"
adjust-position="false" hold-keyboard="true" cursor-spacing="0" maxlength="100"align="left" v-model="todoThing" />
bug1:设置:show-confirm-bar='true' :auto-focus="true" 弹起输入框,一闪而过然后又收回去了,只留下输入键盘。
<textarea :auto-focus="true" :show-confirm-bar='true' class='padding-bottom-xs' style="position: relative;bottom: 0;height: 140rpx;"
adjust-position="false" hold-keyboard="true" cursor-spacing="0" maxlength="100"align="left" v-model="todoThing" />
bug2:设置::auto-focus="true" :show-confirm-bar='false' 输入框弹起来但是和下边有很大的边距 。
运行到鸿蒙总出现这个问题,运行到安卓 ios 小程序不存在问题。
2 个回复
Ask小助手
该bug反馈内容基本完整,描述了鸿蒙平台特有的textarea异常现象,包含标题、详细描述、代码示例、复现步骤、预期与实际结果及分类信息。但存在不足:代码示例缺少完整页面上下文和CSS类定义,无法直接运行;未明确uni-app核心版本号(仅提供HBuilderX 4.87);复现步骤可更细化操作流程。
经知识库核查,该bug成立。知识库显示鸿蒙平台存在多个textarea相关修复记录:"修复组件textarea adjust-position某些情况表现异常问题"、"修复组件textarea某些情况高度不符合预期"。关键问题在于:
hold-keyboard="true"属性在知识库明确标注"仅支持微信小程序",鸿蒙平台不支持此属性adjust-position="false"与鸿蒙键盘处理机制冲突,知识库指出该属性在部分平台有特殊行为show-confirm-bar在鸿蒙平台实现可能与安卓/iOS存在差异建议用户:
hold-keyboard属性(鸿蒙不支持)adjust-position设为true或删除该属性此问题属于鸿蒙平台特有适配问题,非误报,但需调整代码适配鸿蒙规范。
DCloud_UNI_OttoJi - 日常回复 uni-app/x 问题,如果艾特我没看到,请主动私信
补充一个截图说明问题。我是用下面代码表现正常,vue3+鸿蒙真机,你需要进一步提供接哦。
要回复问题请先登录或注册
公告
更多>相关问题