Extends
Methods
# fire(type, params)
执行事件
Parameters:
| Name | Type | Description |
|---|---|---|
type |
string
|
事件类型 |
params |
Object
|
事件携带参数 |
- Overrides:
# off(type, callback, context) → {ModelEvent}
取消事件
Parameters:
| Name | Type | Description |
|---|---|---|
type |
string
|
事件类型,请参考ModelEventType |
callback |
function
|
回调函数 |
context |
Context
|
上下文 |
- Overrides:
- See:
-
- ModelEventType
- 当前对象
# on(type, callback, context) → {ModelEvent}
事件
Parameters:
| Name | Type | Description |
|---|---|---|
type |
string
|
事件类型,请参考ModelEventType |
callback |
function
|
回调函数 |
context |
Context
|
上下文 |
- Overrides:
- See:
-
- ModelEventType
- 当前对象
# once(type, fn, context)
订阅一次事件
Parameters:
| Name | Type | Description |
|---|---|---|
type |
string
|
事件类型 |
fn |
function
|
事件回调 |
context |
Context
|
生效范围 |
- Overrides: