无霸哥
无霸哥
  • 发布:2024-02-22 11:53
  • 更新:2024-02-22 14:09
  • 阅读:80

uniapp发行的H5版本 软键盘会把底部tabbar顶起来

分类:uni-app

用 了"softinputMode": "adjustResize" 没有效果 通过 input 的focus 来uni.hideTabBar() 后 会有一个空白 hx最新版

2024-02-22 11:53 负责人:无 分享
已邀请:
喜欢技术的前端

喜欢技术的前端 - QQ---445849201

这个demo 采用的focus 来uni.hideTabBar() ,没有发现空白,附件有视频,可以看看你的效果

<template>  
    <view class="box">  
        <view v-for="(item,index) in 10" :key="index" class="view" >  
            haha {{item}}  
        </view>  
        <input type="text" placeholder="请输入" @focus="focus" @blur="blur">  
    </view>  
</template>  

<script>  
    export default {  
        methods:{  
            focus(){  
                console.log('focus')  
                uni.hideTabBar()  
            },  
            blur(){  
                console.log('blur')  
                uni.showTabBar()  
            }  
        }  
    }  
</script>  
<style>  
    .box{  
        padding:30rpx;  
    }  
    .view{  
        padding: 20rpx 0;  
    }  
</style>

要回复问题请先登录注册