How does el-scrollbar do scrolling events

you can implement

with the browser"s own scroll bar.
this.$nextTick(() => {
                        var div = document.getElementById("message-container")
                        div.scrollTop = div.scrollHeight
                })
                

but I can"t scroll with el-scrollbar, so it has no effect

<el-scrollbar style="height:100%" id="message-container">
Mar.22,2021


<el-scrollbar style="height:100%" ref="elscrollbar">
var div = this.$refs['elscrollbar'].$refs['wrap'];
        this.$nextTick(() => {
            div.scrollTop = div.scrollHeight
        })
        

read the source code of element, so you can scroll to the bottom

.
Menu