Skip to content

Instantly share code, notes, and snippets.

@hirokiky
Created June 17, 2016 05:46
Show Gist options
  • Save hirokiky/1282c7dee63241a7b7e6e81d44224796 to your computer and use it in GitHub Desktop.
Save hirokiky/1282c7dee63241a7b7e6e81d44224796 to your computer and use it in GitHub Desktop.
Vue.js directive to scroll bottom when the applied value updated.
module.exports = function(Vue) {
Vue.directive('auto-bottom', {
update: function() {
this.el.scrollTop = this.el.scrollHeight;
}
})
};
@kingname
Copy link

you should write down, where this module can be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment