How to achieve the height of the Vue page window at the specified height?

how to achieve the window height of the Vue page at the specified height?

if I want to enter the page now, how can the height of the page be realized in the position of 300px?

because every time I click to see the details, I want to save the height of the current page, and then when I return to the list, I go directly to this height,

console.log(document.documentElement.scrollTop || document.body.scrollTop)//

in this way, I know where the page is, and when I want to return it now, it is directly in this location (the value I have saved in localStorage)

Aug.13,2021

try this

window.scrollTo (x, y)


mounted () {
    window.scrollTo(0, 300);
}

take it out in mounted and scroll to that position

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