When I use vue-scroller, on this page, I can't listen to scrollTop when I use native monitoring. The boss can give me some advice and call for help.

handleScroll () {

          this.scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop
           console.log(this.scrollTop)
    },

above is the listening method

created () {

        let _this = this;
        window.addEventListener("scroll", _this.handleScroll)
    },

I called it in created,

Nov.11,2021

one is scrolling controlled by the browser kernel, and the other is scrolling displacement through transform, which is definitely different. Change to vue-scroller exposed api to listen

Menu