input固定在底部

时间:2023-03-08 16:42:58
// input固定在底部
//isFocusing获取焦点:true 失去焦点:false
_onTouchInput(isFocusing){
this.phone_width = screen.width;
let Boxbottom = this.refs['InputBoxBottom'];
let bottom_top = this.refs['bottom_top'];
if(Boxbottom) {
if (isFocusing) {
Boxbottom.style.position = 'static';
Boxbottom.style.width = (this.phone_width - 20) + 'px';
Boxbottom.style.bottom = 0;
bottom_top.style.paddingBottom = 0; } else {
Boxbottom.style.position = 'fixed';
bottom_top.style.paddingBottom = 64 + 'px';
Boxbottom.style.width = (this.phone_width - 20) + 'px';
}
}
}