Focus TFA input on mounted

This commit is contained in:
Spitap
2023-06-30 16:28:10 +02:00
parent 30fd755492
commit 09b3b12537
+4
View File
@@ -20,6 +20,7 @@
<v-col cols="6" offset="3">
<label class="m-label"><translate>Two-factor authentication code</translate></label>
<v-otp-input
ref="otpInput"
v-model="code"
length="6"
:error-messages="errors"
@@ -52,6 +53,9 @@ export default {
loading: false
}
},
mounted: function () {
this.$refs.otpInput.focus()
},
methods: {
async verifyCode () {
const isValid = await this.$refs.observer.validate()