/** * 监听键盘是否弹出 * @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) }