H5 page cannot get scroll bar height

when the vue page jumps to the page, the scroll bar is always in the middle (only ios will be in the middle),

clipboard.png

0

clipboard.png,

there are great gods who encounter the same problems, please show us the way

Mar.20,2021

because the for loop first gets the height of the scroll bar and then loads the data, the scroll bar defaults to the bottom.
watch: {
chatlog () {

 console.log("chatlog change");
 this.$nextTick(() => {
   var container = this.$el.querySelector("-sharpchatContainer");
   console.log(container);
   container.scrollTop = container.scrollHeight;
 })
 //  document.getElementById('chatContainer').scrollTop = document.getElementById('chatContainer').scrollHeight+150;

}
}

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