mounted () {
   this.scrollToBottom();
},


//每次页面渲染完之后滚动条在最底部
updated:function(){
   this.scrollToBottom();
},


 methods: {
// 
     scrollToBottom() {
     this.$nextTick(() => {
	    var container = this.$el.querySelector(" 需要滚动条处于底部的容器 ");
        container.scrollTop = container.scrollHeight;
     })}

}

 

Logo

前往低代码交流专区

更多推荐