The problem of better-scroll scrolling to the bottom in vue

the exception that vue better-scroll rolls to the bottom when a new message is loaded.
let disY=60; scrolls normally
let disY= el [el.length-1] .clientHeight; this makes scrolling unusual. See the picture below for details.

    RequestAxios(comment,function(){ 
    //
      _this._intervalLoad(function(){
          _this.$nextTick(()=>{
              let el=_this.$refs.recordWrap.childNodes;
              //let disY=60; 
              //
              let disY=el[el.length-1].clientHeight;
              if(el){
                  _this.chatScroll.scrollBy(0, _this.lastScrollY-disY,500);
                  setTimeout(()=>{
                    _this.lastScrollY= _this.chatScroll.y;
                  },50);
              }
          });
      }); 
    }); 
  },

Mar.14,2021

because the better-scroll calculation height does not include margin, you can use margin in the wrapper layer. Padding is recommended internally.

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-1e599c1-4554b.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-1e599c1-4554b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?