From 00fa4024833f52b7c78c51d141a47e0b290f6822 Mon Sep 17 00:00:00 2001 From: MaysWind Date: Tue, 10 Nov 2020 00:02:20 +0800 Subject: [PATCH] trigger login when press enter in password textbox --- src/views/mobile/Login.vue | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/views/mobile/Login.vue b/src/views/mobile/Login.vue index 5e1e8dbc..35f25455 100644 --- a/src/views/mobile/Login.vue +++ b/src/views/mobile/Login.vue @@ -17,6 +17,7 @@ :placeholder="$t('Your password')" :value="password" @input="password = $event.target.value; tempToken = ''" + @keyup.enter.native="loginByPressEnter" > @@ -201,6 +202,16 @@ export default { } }); }, + loginByPressEnter() { + const app = this.$f7; + const $$ = app.$; + + if ($$('.modal-in').length) { + return; + } + + return this.login(); + }, verify() { const self = this; const router = self.$f7router;