mounted(){ this.getBanner() window.onscroll = this.getScrolldata }, 解决办法: beforeDestroy(){ window.onscroll = null }