实现防抖功能
export function debounce(fun, time=200) {//防抖let Time = nullreturn function (...args) {//Time不為null 清空Timeif(Time){clearTimeout(Time)} Time = setTimeout(() => {fun.apply(this, args)},time)}
}
總結
- 上一篇: 网络安全常用的主流数据库(DBMS)✍
- 下一篇: 2018招商银行暑期实习笔试-编程题