auto focus pin code input when open desktop unlock page
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
:ref="`pin-code-input-${index}`"
|
||||
:value="codes[index].value"
|
||||
:type="codes[index].inputType"
|
||||
:autofocus="autofocus && index === 0 ? 'autofocus' : undefined"
|
||||
@focus="codes[index].focused = true"
|
||||
@blur="codes[index].focused = false"
|
||||
@keydown="onKeydown(index, $event)"
|
||||
@@ -21,6 +22,7 @@
|
||||
export default {
|
||||
props: [
|
||||
'modelValue',
|
||||
'autofocus',
|
||||
'secure',
|
||||
'length'
|
||||
],
|
||||
|
||||
@@ -19,7 +19,8 @@
|
||||
<v-form>
|
||||
<v-row>
|
||||
<v-col cols="12">
|
||||
<pin-code-input :secure="true" :length="6" v-model="pinCode" @pincode:confirm="unlockByPin" />
|
||||
<pin-code-input :autofocus="true" :secure="true" :length="6"
|
||||
v-model="pinCode" @pincode:confirm="unlockByPin" />
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12">
|
||||
|
||||
Reference in New Issue
Block a user