When mounted focus on username input.
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
<input
|
||||
type="text"
|
||||
v-model="username"
|
||||
ref="username"
|
||||
placeholder="Brukernavn"
|
||||
autocapitalize="none"
|
||||
@keyup.enter="submit"
|
||||
@@ -34,6 +35,9 @@ export default {
|
||||
error: undefined
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.$refs.username.focus();
|
||||
},
|
||||
methods: {
|
||||
submit() {
|
||||
login(this.username, this.password)
|
||||
|
||||
Reference in New Issue
Block a user