自定了一个自动聚焦的指令
Vue.directive('focus', {
inserted(el, binding, vnode) {
el.focus()
}
});
<input type="text" v-focus>
<input type="text" v-focus>
<input type="text" v-focus>
三个input标签不能一起生效,只有最后一个会生效是什么原因
焦点只有一个,一个页面不能多个元素focus