android 自定义键盘高度不对,NVUE 容器一旦设置了position且容器高度不能超过整屏,在安卓端就会被键盘遮挡...

譬如WEEX的这个input的例子,如果把input删的不足以撑满整个界面,在安卓端,不会自动的整页往上浮动,导致input被键盘遮挡,这个问题应该怎么解决啊?IOS正常

http://dotwe.org/vue/e10071e8a419a235ed6002050de07779

oninput: {{txtInput}}

onchange: {{txtChange}}

onreturntype: {{txtReturnType}}

selection: {{txtSelection}}

input type = text

input type = password

input type = url

input type = email

.input {

font-size: 60px;

height: 80px;

width: 750px;

}

.scroller{

position: absolute;

top:200px;

}

.button {

font-size: 36;

width: 200;

color: #41B883;

text-align: center;

padding-top: 10;

padding-bottom: 10;

border-width: 2;

border-style: solid;

margin-right: 20;

border-color: rgb(162, 217, 192);

background-color: rgba(162, 217, 192, 0.2);

}

module.exports = {

data: function () {

return {

txtInput: '',

txtChange: '',

txtReturnType: '',

txtSelection:'',

autofocus: false

};

},

methods: {

ready: function () {

var self = this;

setTimeout(function () {

self.autofocus = true;

}, 1000);

},

onchange: function (event) {

this.txtChange = event.value;

console.log('onchange', event.value);

},

onreturn: function (event) {

this.txtReturnType = event.returnKeyType;

console.log('onreturn', event.type);

},

oninput: function (event) {

this.txtInput = event.value;

console.log('oninput', event.value);

},

focus: function () {

this.$refs['input1'].focus();

},

blur: function () {

this.$refs['input1'].blur();

},

setRange: function() {

console.log(this.$refs["inputselection"]);

this.$refs["inputselection"].setSelectionRange(2, 6);

},

getSelectionRange: function() {

console.log(this.$refs["inputselection"]);

var self = this;

this.$refs["inputselection"].getSelectionRange(function(e) {

self.txtSelection = e.selectionStart +'-' + e.selectionEnd;

});

}

}

};

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值