import {useDebounceFn} from 'ahook';
const {run: handleClick} = useDebounceFn(() => {
// 防抖事件
}, {leading: true, trailing: false});
useDebounceFn防抖用法
最新推荐文章于 2024-04-22 22:26:22 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)
import {useDebounceFn} from 'ahook';
const {run: handleClick} = useDebounceFn(() => {
// 防抖事件
}, {leading: true, trailing: false});