1.0.1 • Published 7 months ago
jy-throttle v1.0.1
安装
npm i jy-throttle --save
引入方式
import { throttle } from 'jy-throttle'
功能说明
节流
使用示例
import { throttle } from 'jy-throttle' // 节流
function task() {
console.log('run task')
}
const throttleTask = throttle(task, 1500)
window.addEventListener('scroll', throttleTask)