uni-app底部绝对定位后随键盘弹起解决方法
<view v-if="tabbar">底部悬浮</view>data(){return{tabbar: true,windowHeight: ''}},onLoad() {uni.getSystemInfo({success: (res)=> {this.windowHeight = res.windowHeight;.
·
<view v-if="tabbar">底部悬浮</view>
data(){
return{
tabbar: true,
windowHeight: ''
}
},
onLoad() {
uni.getSystemInfo({
success: (res)=> {
this.windowHeight = res.windowHeight;
}
});
uni.onWindowResize((res) => {
if(res.size.windowHeight < this.windowHeight){
this.tabbar = false
}else{
this.tabbar = true
}
})
}
更多推荐
已为社区贡献7条内容
所有评论(0)