The scrolling distance of the listening page in vue always shows 0.

the scrolling distance of the listening page in

vue always shows 0

.
Mar.19,2021

whether there is an overflow: scroll/auto.


attach a code. Thank you


recently while doing vue, the monitoring page scrolling found that the document.body.scrollTop has been 0
, but found that the document.body.scrollTop has been 0.
check the data and find that it is the problem with DTD. Document.documentElement is used when the
page specifies DTD, that is, when DOCTYPE is specified. Document.body is used when the
page does not have DTD, that is, no DOCTYPE is specified.
this is true for both IE and Firefox.


landlord, have you solved your problem?


mounted () {
     window.addEventListener('scroll', this.handleScroll);
   },
methods: {
 // 
  handleScroll () {
    let scrollY = window.scrollY;
    if (scrollY > 100) {
      dosometing...
    } else {
      dosometing...
    }
   },
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3801b-2c0e2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3801b-2c0e2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?