mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-17 00:12:11 +08:00
pin code input supports pressing enter to confirm and pressing tab to switch to the next component
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
<v-row>
|
||||
<v-col cols="12">
|
||||
<pin-code-input :disabled="verifyingByWebAuthn" :autofocus="true"
|
||||
:secure="true" :length="6"
|
||||
:secure="true" :length="6" :auto-confirm="true"
|
||||
v-model="pinCode" @pincode:confirm="unlockByPin" />
|
||||
</v-col>
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<v-row class="mb-3">
|
||||
<v-col cols="12" md="12">
|
||||
<div style="max-width: 428px">
|
||||
<pin-code-input :secure="true" :length="6" v-model="pinCode" />
|
||||
<pin-code-input :secure="true" :length="6" v-model="pinCode" @pincode:confirm="confirm" />
|
||||
</div>
|
||||
</v-col>
|
||||
</v-row>
|
||||
@@ -147,6 +147,13 @@ export default {
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
confirm() {
|
||||
if (this.isEnableApplicationLock) {
|
||||
this.disable();
|
||||
} else {
|
||||
this.enable();
|
||||
}
|
||||
},
|
||||
enable() {
|
||||
if (this.settingsStore.appSettings.applicationLock) {
|
||||
this.$refs.snackbar.showMessage('Application lock has been enabled');
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</template>
|
||||
</f7-list-item>
|
||||
<f7-list-item class="list-item-pincode-input padding-horizontal margin-horizontal">
|
||||
<pin-code-input :secure="true" :length="6" v-model="pinCode" @pincode:confirm="unlockByPin" />
|
||||
<pin-code-input :secure="true" :length="6" :auto-confirm="true" v-model="pinCode" @pincode:confirm="unlockByPin" />
|
||||
</f7-list-item>
|
||||
</f7-list>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user