npm i --save @nativescript-use/nativescript-keyboard
- 版本:0.0.1
- GitHub: https://github.com/NativeScript/plugins
- NPM: https://npmjs.net.cn/package/%40nativescript-use%2Fnativescript-keyboard
- 下载量
- 昨日: 0
- 上周: 0
- 上月: 0
@nativescript-use/nativescript-keyboard
npm install @nativescript-use/nativescript-keyboard
使用情况
import { Keyboard } from "@nativescript-use/nativescript-keyboard"
const keyboard = new Keyboard();
// Open keyboard with focus
keyboard.keyboard(myView);
// Close keyboard
keyboard.close();
// Add listener
keyboard.onChangeVisibility((isOpen: boolean) =>{
console.log(isOpen)
});
// Remove listener
keyboard.offChangeVisibility();
类型声明
export declare class Keyboard {
onChangeVisibility(callback: (isOpen: boolean) => void): void
offChangeVisibility(): void
isOpen(): boolean
open(view: View): void
close(): void
}
许可证
Apache 许可证第 2 版