<view class='commentInputView inputBottom' style='bottom:{{inputBottom}}px'>
<view style=" display: flex;justify-content: space-between;">
<input adjust-position='{{false}}' class='input' maxlength='-1' value="{{value}}" bindfocus="inputFocus" bindblur="inputBlur"></input>
<button class='send' bindtap="send">评论</button>
</view>
</view>
inputFocus(e) {
this.setData({
inputBottom: e.detail.height
})
},
inputBlur(e) {
var that = this;
this.setData({
content: e.detail.value,
inputBottom: 0
})
},
微信小程序中点击input框唤起键盘,动态获取键盘高度
最新推荐文章于 2024-04-16 16:33:11 发布