Vue determines an event after all page elements (images, audio, etc.) have been loaded

export default { data () { return { timer: null, // timer}}} mounted () {const that = this. Timer = setInterval(function () {console.log(document.readystate) if (document.readyState === 'complete') {that._scrolltobottom () // Pull the chat wheel to the bottom window.clearInterval(that.timer)}}, 1000)}.Copy the code

The above code application scenario, H5 chat page, was created because only nodes of page elements were loaded in, and resources such as pictures and audio were not fully loaded, so the scroll wheel could not be pulled to the bottom

This.$nextTick also doesn’t work