When mounted focus on username input.

This commit is contained in:
2021-02-18 21:35:32 +01:00
parent b2755add12
commit eb9e7d4b43

View File

@@ -7,6 +7,7 @@
<input <input
type="text" type="text"
v-model="username" v-model="username"
ref="username"
placeholder="Brukernavn" placeholder="Brukernavn"
autocapitalize="none" autocapitalize="none"
@keyup.enter="submit" @keyup.enter="submit"
@@ -34,6 +35,9 @@ export default {
error: undefined error: undefined
}; };
}, },
mounted() {
this.$refs.username.focus();
},
methods: { methods: {
submit() { submit() {
login(this.username, this.password) login(this.username, this.password)