File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -30,40 +30,43 @@ default Object
30
30
31
31
#### 构造函数返回对象API
32
32
33
- bindEvent(keyCode, callback)
33
+ ##### bindEvent(keyCode, callback)
34
34
35
35
> description: 添加回调函数进事件集
36
+
36
37
> eg: bindEvent('ctrl 5', function () { // do some things})
37
38
38
39
---
39
40
40
- removeListeners(keyCode, callback)
41
+ ##### removeListeners(keyCode, callback)
41
42
42
43
> description: 从事件集中删除
44
+
43
45
> eg: removeListeners('ctrl 5', function () {})
44
46
45
47
这里你需要注意,这个回调函数的引用应该与bindEvent一致。
46
48
47
49
---
48
50
49
- detach
51
+ ##### detach
50
52
51
53
> 彻底解绑事件
54
+
52
55
> eg: new keyCombination({}).detach()
53
56
54
57
解绑事件
55
58
56
59
---
57
60
58
- init
61
+ ##### init
59
62
60
63
> eg: new keyCombination({}).init()
61
64
62
65
你可以重新初始化一些参数.用于复用对象
63
66
64
67
---
65
68
66
- subscribeAction
69
+ ##### subscribeAction
67
70
68
71
> eg: new keyCombination({}).subscribeAction()
69
72
You can’t perform that action at this time.
0 commit comments