Constructor
new Keyboard(params)
关于OnTouchEventResponse,具体如下:
| Name | Type | Description |
|---|---|---|
| type | string | (readonly) 事件类型,可选择 touchstart 、touchend 、touchcancel |
| key | string | (readonly) 按键对应的 key |
| code | string | (readonly) 按键对应的 code |
Example
new Keyboard({});
Parameters:
| Name | Type | Description | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object |
Properties
|
Methods
show() → {void}
显示虚拟键盘
Returns:
- Type
- void
hide() → {void}
隐藏虚拟键盘
Returns:
- Type
- void
destroy() → {void}
销毁虚拟键盘,删除对应节点(如要再次使用需要重新创建)
Returns:
- Type
- void