<script>
console.clear();
const focus = {
mounted(el) {
el.focus();
},
};
export default {
directives: { focus },
};
</script>
<template>
<input v-focus />
</template>
<style>
body {
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
overflow: hidden;
}
</style>
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.