Vue implements the chat interface, and the message reaches the bottom and the content of the message rolls up.

clipboard.png
as shown in the figure above, the message has now reached the bottom, but when I send the message again, the content of the message rolls up or goes up to the top, asking for confession. Thank you here.

Mar.02,2021

I also did a chat before, and I told you my solution. I put an empty div,id under messagbox assuming that every time a new message arrives, execute
document.getElementByID ('bottom'). ScrollIntoView () is fine


your messageBox.scrollTop = 10000 (try to set a larger value if you don't confirm the length of the list). (messageBox is the message list)

Menu