Skip to content
Snippets Groups Projects
Forked from websites / monnaie-libre-fr
1576 commits behind the upstream repository.
directives.client.js 220 B
import Vue from 'vue'

// v-focus
Vue.directive('focus', {
  // When the bound element is inserted into the DOM...
  inserted(el, binding) {
    if (!('value' in binding) || binding.value) el.children[0].focus()
  },
})