111117.29
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
const throttle = function(fn, wait = 1e3) {
|
||||
var flag = true;
|
||||
return function() {
|
||||
if (flag) {
|
||||
fn.apply(this, arguments);
|
||||
flag = false;
|
||||
setTimeout(() => {
|
||||
flag = true;
|
||||
}, wait);
|
||||
}
|
||||
};
|
||||
};
|
||||
exports.throttle = throttle;
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/utils/throttle.js.map
|
||||
Reference in New Issue
Block a user