<template>
<view>
<view class="box">
<u-navbar :border-bottom="false" :is-fixed="false" :background="background" :is-back="false" back-text="返回" title="剑未配妥,出门已是江湖"></u-navbar>
<view class="main">
123
<button type="default" @click="close">回复</button>
</view>
<view class="bottom">
<input @focus="onfoucs" type="text" placeholder="请输入" :focus="show" @blur="open" />
</view>
</view>
</view>
</template>
<script>
let systemInfo = uni.getSystemInfoSync();
export default {
data() {
return {
height: systemInfo.safeArea.bottom,
show: false,
background: {
backgroundColor: '#000000',
},
}
},
onResize(e) {
console.log(e)
},
onLoad() {
let that = this
},
methods: {
onfoucs(e) {
uni.hideTabBar()
},
open() {
let that = this
uni.hideKeyboard();
uni.showTabBar({
success() {
that.show = false
}
})
},
close() {
let that = this
uni.hideTabBar({
success() {
that.show = true
}
})
}
}
}
</script>
<style lang="scss">
.box {
width: 750rpx;
height: 100vh;
display: flex;
flex-direction: column;
.main {
flex: 1;
}
.bottom {
height: 60rpx;
}
}
</style>

- 发布:2020-05-17 14:12
- 更新:2020-05-17 14:12
- 阅读:663
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: win10
HBuilderX类型: 正式
HBuilderX版本号: 2.7.3
手机系统: Android
手机系统版本号: Android 9.0
手机厂商: 华为
手机机型: 荣耀v20
页面类型: vue
打包方式: 云端
项目创建方式: HBuilderX
示例代码:
操作步骤:
无
无
预期结果:
点击回复按钮,输入框在软键盘上面
点击回复按钮,输入框在软键盘上面
实际结果:
第一次时位置不变,往后正常,根据监听第一次软键盘弹出时页面高度未变
开发工具退回上一版本使用正常
第一次时位置不变,往后正常,根据监听第一次软键盘弹出时页面高度未变
开发工具退回上一版本使用正常
bug描述:
软键盘弹第一次弹出时webview高度不减少,经测试上一版本正常
键盘弹出方式为
···
"app-plus": {
"softinputMode": "adjustResize"
}
···
0 个回复