Constructor
new Debounce()
- Source:
Example
const db = new Debounce()
db.debounce(fn,300,params1,params*)
Methods
debounce(argFn, argWait, …args) → {function}
- Description:
函数抖动,在等待n毫秒无点击后触发
- Source:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
argFn |
function | 回调函数 |
||
argWait |
number |
300
|
等待时间,默认0.3秒 |
|
args |
any |
<repeatable> |
...arg 回调函数的参数 |
Returns:
- Type
- function