您好,看了代码以后这一处地方不是很理解: //绑定事件 bindEvent(){ ... this.onmousemove = window.onmousemove; window.onmousemove = e => { this.current.x = e.clientX - this.el.offsetLeft + document.scrollingElement.scrollLeft; this.current.y = e.clientY - this.el.offsetTop + document.scrollingElement.scrollTop; this.onmousemove && this.onmousemove(e); }; ... } 为什么要在这里调用一下 this.onmousemove 方法? 我的疑惑是: 第一次调用bindEvent,这里的 window.onmousemove是 null,那么这一句不会执行;而如果第二次执行(不先destroy的情况下),会造成死循环。望指教 ^_^