When mounted focus on username input.
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user