Extends
Methods
# fire(type, params)
执行事件
Parameters:
| Name | Type | Description |
|---|---|---|
type |
string
|
事件类型 |
params |
Object
|
事件携带参数 |
- Overrides:
# off(type, fn, context) → {object}
事件取消订阅
Parameters:
| Name | Type | Description |
|---|---|---|
type |
string
|
事件类型 |
fn |
function
|
事件回调 |
context |
Context
|
生效范围 |
- Overrides:
- 当前事件
object
# on(type, fn, context) → {Object}
事件监听
Parameters:
| Name | Type | Description |
|---|---|---|
type |
*
|
|
fn |
*
|
|
context |
*
|
- Overrides:
- 事件对象
Object
# once(type, fn, context)
订阅一次事件
Parameters:
| Name | Type | Description |
|---|---|---|
type |
string
|
事件类型 |
fn |
function
|
事件回调 |
context |
Context
|
生效范围 |
- Overrides: