you can use vue directive like 'v-autofocus'
<input v-autofocus/>
import Vue from 'vue'
import autofocus from 'vue-v-autofocus'
Vue.use(autofocus)
new Vue({
el:'#app'
})
const Vue=require('vue');
const autofocus=require('vue-v-autofocus')
Vue.use(autofocus)
new Vue({
el:'#app'
})