Class Ext.util.DelayedTask
|
Defined In:
|
DelayedTask.js
|
|
Class:
|
Ext.util.DelayedTask
|
|
Extends:
|
Object
|
提供快捷的方法执行setTimeout,新的超时时限会取消旧的超时时限.
例如验证表单的时候,键盘按下(keypress)那一瞬,就可用上该类(不会立即验证表单,稍作延时)。
keypress事件会稍作停顿之后(某个时间)才继续执行
配置项
这个类没有配置项。
公告属性
这个类没有公告属性。
公共方法
|
|
DelayedTask
(
Function fn,
Object scope,
Array args
)
: Ext.util.DelayedTask
构造器
构造器
参数项:
-
fn
: Function
(optional) 默认超时的函数。
-
scope
: Object
(optional) 默认超时的作用域
-
args
: Array
(optional) 默认参数数组
返回:
|
DelayedTask
|
|
|
delay
(
Number delay,
Function newFn,
Object newScope,
Array newArgs
)
取消所有待定的超时(any pending timeout),并重新...
取消所有待定的超时(any pending timeout),并重新排列(queues)。
参数项:
-
delay
: Number
延迟毫秒数
-
newFn
: Function
(optional) 重写传入到构建器的函数
-
newScope
: Object
(optional) 重写传入到构建器的作用域
-
newArgs
: Array
(optional) 重写传入到构建器的参数
返回:
|
DelayedTask
|
|
|
cancel
(
)
|
DelayedTask
|
公告事件
这个类没公共的事件。