Invalid scrollTop assignment in vue component. Many methods have been tried.

.vue

   mounted(){
        this.scrollToBottom()
    },
    methods:{
        scrollToBottom: function () {
            this.$nextTick(() => {
                var container = this.$el.querySelector(".chatContent");
                container.scrollTop = container.scrollHeight;
            })
        }
    },
    updated:function () {
        this.scrollToBottom();
    }
    

it"s so hard to keep the div scroll bar at the bottom all the time.
add: the current debugging is aimed at the responsive type, when the div is highly elongated and the scroll bar is at the bottom

May.15,2022

updated () {
    this.$nextTick(function () {
        container.scrollTop = container.scrollHeight;
    });
},

container.scrollTo = container.scrollHeight;

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