<input :adjust-position="false" v-model="input" :style="'bottom:'+keyBoard+'px'">

//配合修改input高度(单位px):
data:{
    input:'',
    keyBoard:0,
},
onLoad() {
    uni.onKeyboardHeightChange((res)=>{
        this.keyBoard = res.height;
    })
},

 

//方案2:
在page.json中添加:
{
    "path": "pages/index/edit",
    "style": {
        "navigationStyle": "custom",
        "app-plus":{
            "softinputMode":"adjustResize"
        }
    }
},

 

 posted on 2022-04-19 09:00  laremehpe  阅读(376)  评论(0编辑  收藏  举报