handleScroll: throttle(
function () {
let Dom = document.querySelector('#businessSummary');
console.log(Dom.scrollTop);
console.log(this)
},500
),
1.这里的this打印的是undefined
2.如果改成箭头函数
```
handleScroll: throttle(
() => {
let Dom = document.querySelector('#businessSummary');
console.log(Dom.scrollTop);
console.log(this)
},500
),
```
取到的`this` **并不是我想要的** ,因为是
`{a:{data:fn,methods:xxx}}`的类似这种
自己写的话要用
call
或者apply
处理this
例子: