Vue3 防抖和节流(throttle-debounce)
一:安装npm install throttle-debounce --save二: 使用 (throttle-debounce)throttle :节流import { throttle } from "throttle-debounce"throttleCallback: throttle(1000, false, () => {//业务}),debounce :防抖import { d
·
一:安装
npm install throttle-debounce --save
二: 使用 (throttle-debounce)
throttle :节流
import { throttle } from "throttle-debounce"
throttleCallback: throttle(1000, false, () => {
//业务
}),
debounce :防抖
import { debounce } from "throttle-debounce"
debounceCallback: debounce(1000, false, () => {
//业务
}),
更多推荐
已为社区贡献1条内容
所有评论(0)