textarea 设置了如下属性 获取到的高度是266 实际不止 目测少算了 【完成按钮】那一栏的高度 大约52px,加上这个高度输入框就能显示了,希望尽快处理下,现在只能判断是华为手机大概加上这个高度,代码片段就是下面这段,左边的没加52px,右边的加了52px
onReady: function () {
wx.onKeyboardHeightChange(function () {
let height = res.height
let sys = wx.getSystemInfoSync()
if (height > 0 && sys.brand === 'HUAWEI') {
height += 52
}
this.setData({
keyboardheight: height
})
})
}
<view wx:if="{{focus}}" class="kl-footer-fixed vux-1px-t flex flex-end" style="padding-bottom: {{keyboardheight}}px;padding-bottom: calc({{keyboardheight}}px + {{focus? '0px':'env(safe-area-inset-bottom)'}});">
<view class="kl-comment-input-box flex-one">
<textarea wx:if="{{focus}}" placeholder="{{placeholder}}" maxlength="2000" fixed value="{{content}}" bindconfirm="submitComment" adjust-position="{{false}}" bindinput="contentChange"
bindblur="commentBlur" focus="{{focus}}" hold-keyboard auto-height class="kl-comment-input"/>
<view class="kl-img-wrap" wx:if="{{file}}">
<image-fade width="160rpx" height="160rpx" color="#eee" src="{{file}}"/>
<view class="iconfont iconclose_window_btn" catch:tap="delImage"></view>
</view>
</view>
<view bind:tap="chooseImg" class="iconfont icontupian kl-mrb24" style="font-size:40rpx;"></view>
</view>
你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)