<template>
<input v-focus/>
</template>
<script>
export default {
directives: {
focus: {
// Directive definition
mounted(el) {
el.focus(); // Focus the element when it is inserted into the DOM
}
}
}
}
</script>