mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-18 16:54:25 +08:00
auto focus pin code input when open desktop unlock page
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
:ref="`pin-code-input-${index}`"
|
:ref="`pin-code-input-${index}`"
|
||||||
:value="codes[index].value"
|
:value="codes[index].value"
|
||||||
:type="codes[index].inputType"
|
:type="codes[index].inputType"
|
||||||
|
:autofocus="autofocus && index === 0 ? 'autofocus' : undefined"
|
||||||
@focus="codes[index].focused = true"
|
@focus="codes[index].focused = true"
|
||||||
@blur="codes[index].focused = false"
|
@blur="codes[index].focused = false"
|
||||||
@keydown="onKeydown(index, $event)"
|
@keydown="onKeydown(index, $event)"
|
||||||
@@ -21,6 +22,7 @@
|
|||||||
export default {
|
export default {
|
||||||
props: [
|
props: [
|
||||||
'modelValue',
|
'modelValue',
|
||||||
|
'autofocus',
|
||||||
'secure',
|
'secure',
|
||||||
'length'
|
'length'
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -19,7 +19,8 @@
|
|||||||
<v-form>
|
<v-form>
|
||||||
<v-row>
|
<v-row>
|
||||||
<v-col cols="12">
|
<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>
|
||||||
|
|
||||||
<v-col cols="12">
|
<v-col cols="12">
|
||||||
|
|||||||
Reference in New Issue
Block a user