better-keyboard
v0.0.2
Published
A js keyboard component for mobile.
Downloads
2
Readme
jkeyboard
A js keyboard component for mobile.
立即使用
<body>
<script type="text/javascript" src="jkeyboard.js"></script>
<script type="text/javascript">
var keyboard = new JKeyboard({
onInput: function (key, rs) {
// do something
},
onClose: function () {
// do something
},
onShow: function () {
// do something
},
onDelete: function (rs) {
// do something
}
});
</script>
</body>
测试demo页
npm run dev
打开浏览器访问如下地址, 查看效果
localhost:9090
Options 参数
- defaultResult:
[]
默认值 - containEl:
body
父级容器 - closeTitle:
完成
关闭按钮文本 - max:
6
最大长度
Events 事件
- onInput 点击数字按钮
- onClose 键盘关闭
- onClosed 关闭动画结束后
- onShow 键盘打开
- onDelete 点击删除按钮