key_borad_change
v1.0.0
Published
键盘改变事件监听
Downloads
1
Readme
使用说明
通用方法
const keyboardEvents = new KeyboardEvents();
keyboardEvents.on(KeyboardEvents.EVENTS.KEYBOARDCHANGE,(dir)=>{
///do something
//KeyboardEvents.EVENTS.KEYBOARDCHANGE==“keboardChange”
//dir说明
//up表示键盘弹出
//down表示键盘收起
}
})
只针对与android
const keyboardEvents = new KeyboardEvents();
keyboardEvents.onKeyboardAndroidChange(()=>{
})
只针对于ios
const keyboardEvents = new KeyboardEvents();
keyboardEvents.onKeyboardIosChange(()=>{
})
API总览
| 名称 |类型| 说明 | | ---- |----| ---- | | on | FUNCTION(evname,callback) | 通用监听键盘改变方法| | onKeyboardAndroidChange| Function | 只兼容android键盘改变方法简写 | | onKeyboardIosChange | Function | 只兼容ios键盘改变方法简写 | | EVENTS | static类型 | 改对象下的KEYBOARDCHANGE事件表示键盘改变