...
|
...
|
@@ -13,12 +13,10 @@ export const getImgUrl = function(src, width = 300, height = 300, mode = 2) { |
|
|
}).replace(/https?:/, '') + '/interlace/1' : '';
|
|
|
};
|
|
|
|
|
|
|
|
|
export const replaceHttp = function(src) {
|
|
|
return src.replace(/https?:/, '');
|
|
|
};
|
|
|
|
|
|
|
|
|
export const debounce = (idle, action) => { // 函数去抖动,超过一定时间才会执行,如果周期内触发,充值计时器
|
|
|
let last;
|
|
|
|
...
|
...
|
@@ -34,7 +32,6 @@ export const debounce = (idle, action) => { // 函数去抖动,超过一定时 |
|
|
};
|
|
|
};
|
|
|
|
|
|
|
|
|
export const throttle = (delay, action) => { // 函数节流器,定义函数执行间隔,按频率触发函数
|
|
|
let last = 0;
|
|
|
|
...
|
...
|
|