求助啊,我需要浏览器中监听onscroll事件,我用的mac,上下滚动网页的话一直触发不了scroll事件,如果再触摸板上用俩手指对网页进行缩放就触发scroll事件了,进入handleScroll了。我是这么写的,谁知道为什么啊
componentDidMount: function () { window.addEventListener('scroll', this.handleScroll); }, componentWillUnmount: function () { window.removeEventListener('scroll', this.handleScroll); }, handleScroll: function (e) { console.log('浏览器滚动事件') },