This commit is contained in:
@@ -97,7 +97,9 @@ export function debounce(fn: Function, delay: number = 500) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// 节流函数
|
/* @param fn 节流函数
|
||||||
|
* @param delay 节流时间
|
||||||
|
*/
|
||||||
export function throttle(fn: Function, delay: number) {
|
export function throttle(fn: Function, delay: number) {
|
||||||
let timer: any = null;
|
let timer: any = null;
|
||||||
return function (...args: any[]) {
|
return function (...args: any[]) {
|
||||||
|
|||||||
Reference in New Issue
Block a user