/** * 监听键盘是否弹出 * @param show * @param hide */ export const addEventKeyboardStatus = (show,hide)=>{ window.addEventListener('native.keyboardshow',(ev)=>{ show(ev) },false) window.addEventListener('native.keyboardhide',(ev)=>{ hide(ev) },false) } /** * 移除监听键盘的事件 * @param show * @param hide */ export const removeKeyboardStatus = (show,hide)=>{ window.removeEventListener('native.keyboardshow',(ev)=>{ show(ev) },false) window.removeEventListener('native.keyboardhide',(ev)=>{ hide(ev) },false) }
标签:hide,show,APP,param,键盘,false,ev,监听,native From: https://www.cnblogs.com/dandanyajin/p/16707899.html