vue渲染完页面后div滚动条定位在底部

//每次页面渲染完之后滚动条在最底部
  updated:function(){
    this.$nextTick(function(){
      var div = document.getElementById('scrolldIV');
      div.scrollTop = div.scrollHeight;
    })
  },
//第一次页面渲染完之后滚动条在最底部
methods:function(){
    this.$nextTick(function(){
      var div = document.getElementById('scrolldIV');
      div.scrollTop = div.scrollHeight;
    })
 }
原文地址:https://www.cnblogs.com/miny-simp/p/9856571.html