We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
防抖是为了避免把一次事件误认为是多次,重在清零(clearTimeout),单位时间内事件重复触的话计时器会被重置。
节流是控制事件发生的频率,比如控制事件发生频率为 1s,那么即使在 1s 内多次触发了事件,我们都当作它只发生了 1 次,单位时间内事件重复触发的话也只会被处理一次。
scroll
input
The text was updated successfully, but these errors were encountered:
No branches or pull requests
防抖
防抖是为了避免把一次事件误认为是多次,重在清零(clearTimeout),单位时间内事件重复触的话计时器会被重置。
节流
节流是控制事件发生的频率,比如控制事件发生频率为 1s,那么即使在 1s 内多次触发了事件,我们都当作它只发生了 1 次,单位时间内事件重复触发的话也只会被处理一次。
scroll
事件,使用节流每隔 1 s 才计算位置信息之类的input
框实时搜索并发送请求展示下拉列表,每隔 1 s 发送一次请求(也可以做防抖)The text was updated successfully, but these errors were encountered: