Skip to content

Commit 5449593

Browse files
committed
fix: UPDATE key-combination Readme.md
1 parent 4f63fed commit 5449593

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

key-combination/Readme.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,40 +30,43 @@ default Object
3030

3131
#### 构造函数返回对象API
3232

33-
bindEvent(keyCode, callback)
33+
##### bindEvent(keyCode, callback)
3434

3535
> description: 添加回调函数进事件集
36+
3637
> eg: bindEvent('ctrl 5', function () { // do some things})
3738
3839
---
3940

40-
removeListeners(keyCode, callback)
41+
##### removeListeners(keyCode, callback)
4142

4243
> description: 从事件集中删除
44+
4345
> eg: removeListeners('ctrl 5', function () {})
4446
4547
这里你需要注意,这个回调函数的引用应该与bindEvent一致。
4648

4749
---
4850

49-
detach
51+
##### detach
5052

5153
> 彻底解绑事件
54+
5255
> eg: new keyCombination({}).detach()
5356
5457
解绑事件
5558

5659
---
5760

58-
init
61+
##### init
5962

6063
> eg: new keyCombination({}).init()
6164
6265
你可以重新初始化一些参数.用于复用对象
6366

6467
---
6568

66-
subscribeAction
69+
##### subscribeAction
6770

6871
> eg: new keyCombination({}).subscribeAction()
6972

0 commit comments

Comments
 (0)