vue 中滚动div至最底部

scrollToBottom: function () {
this.$nextTick(() => {
var container = this.$el.querySelector("#new_message");
container.scrollTop = container.scrollHeight;
});
}


调用此方法即可
posted @ 2019-01-06 17:15  花泪哲  阅读(15933)  评论(1编辑  收藏  举报