1.下载依赖
cnpm i --save lodash.throttle
2.使用
import _ from 'lodash'
export default{
methods:{
click:_.throttle(function(){
console.log('hello')
console.log(this)
},1000)
}
}
1.下载依赖
cnpm i --save lodash.throttle
2.使用
import _ from 'lodash'
export default{
methods:{
click:_.throttle(function(){
console.log('hello')
console.log(this)
},1000)
}
}