Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
// Register a global custom directive called `v-focus`
Vue.directive('focus', {
// When the bound element is inserted into the DOM...
inserted: function (el) {
// Focus the element
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment