mirror of
https://github.com/certd/certd.git
synced 2026-04-24 12:27:25 +08:00
perf: 支持回车键触发登录
This commit is contained in:
@@ -117,7 +117,6 @@ onUnmounted(() => {
|
|||||||
:confirm-text="$t('common.refresh')"
|
:confirm-text="$t('common.refresh')"
|
||||||
:fullscreen-button="false"
|
:fullscreen-button="false"
|
||||||
:title="$t('ui.widgets.checkUpdatesTitle')"
|
:title="$t('ui.widgets.checkUpdatesTitle')"
|
||||||
centered
|
|
||||||
content-class="px-8 min-h-10"
|
content-class="px-8 min-h-10"
|
||||||
footer-class="border-none mb-3 mr-3"
|
footer-class="border-none mb-3 mr-3"
|
||||||
header-class="border-none"
|
header-class="border-none"
|
||||||
|
|||||||
@@ -156,7 +156,6 @@ if (enableShortcutKey.value) {
|
|||||||
:confirm-text="$t('common.confirm')"
|
:confirm-text="$t('common.confirm')"
|
||||||
:fullscreen-button="false"
|
:fullscreen-button="false"
|
||||||
:title="$t('common.prompt')"
|
:title="$t('common.prompt')"
|
||||||
centered
|
|
||||||
content-class="px-8 min-h-10"
|
content-class="px-8 min-h-10"
|
||||||
footer-class="border-none mb-3 mr-3"
|
footer-class="border-none mb-3 mr-3"
|
||||||
header-class="border-none"
|
header-class="border-none"
|
||||||
|
|||||||
@@ -7,14 +7,14 @@
|
|||||||
<template v-if="formState.loginType === 'password'">
|
<template v-if="formState.loginType === 'password'">
|
||||||
<!-- <div class="login-title">登录</div>-->
|
<!-- <div class="login-title">登录</div>-->
|
||||||
<a-form-item required has-feedback name="username" :rules="rules.username">
|
<a-form-item required has-feedback name="username" :rules="rules.username">
|
||||||
<a-input v-model:value="formState.username" :placeholder="t('authentication.usernamePlaceholder')" autocomplete="off">
|
<a-input v-model:value="formState.username" :placeholder="t('authentication.usernamePlaceholder')" autocomplete="off" @keydown.enter="handleFinish">
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<fs-icon icon="ion:phone-portrait-outline"></fs-icon>
|
<fs-icon icon="ion:phone-portrait-outline"></fs-icon>
|
||||||
</template>
|
</template>
|
||||||
</a-input>
|
</a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item has-feedback name="password" :rules="rules.password">
|
<a-form-item has-feedback name="password" :rules="rules.password">
|
||||||
<a-input-password v-model:value="formState.password" :placeholder="t('authentication.passwordPlaceholder')" autocomplete="off">
|
<a-input-password v-model:value="formState.password" :placeholder="t('authentication.passwordPlaceholder')" autocomplete="off" @keyup.enter="handleFinish">
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<fs-icon icon="ion:lock-closed-outline"></fs-icon>
|
<fs-icon icon="ion:lock-closed-outline"></fs-icon>
|
||||||
</template>
|
</template>
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<a-form-item v-if="settingStore.sysPublic.captchaEnabled" has-feedback required name="captcha" :rules="rules.captcha">
|
<a-form-item v-if="settingStore.sysPublic.captchaEnabled" has-feedback required name="captcha" :rules="rules.captcha">
|
||||||
<CaptchaInput v-model:model-value="formState.captcha"></CaptchaInput>
|
<CaptchaInput v-model:model-value="formState.captcha" @keydown.enter="handleFinish"></CaptchaInput>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</template>
|
</template>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<a-form-item has-feedback name="smsCaptcha">
|
<a-form-item has-feedback name="smsCaptcha">
|
||||||
<CaptchaInput v-model:model-value="formState.smsCaptcha"></CaptchaInput>
|
<CaptchaInput v-model:model-value="formState.smsCaptcha" @keydown.enter="handleFinish"></CaptchaInput>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<a-form-item name="smsCode" :rules="rules.smsCode">
|
<a-form-item name="smsCode" :rules="rules.smsCode">
|
||||||
@@ -169,7 +169,7 @@ export default defineComponent({
|
|||||||
await userStore.loginByTwoFactor(twoFactor);
|
await userStore.loginByTwoFactor(twoFactor);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleFinish = async (values: any) => {
|
const handleFinish = async () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
try {
|
try {
|
||||||
// formState.captcha = await doCaptchaValidate();
|
// formState.captcha = await doCaptchaValidate();
|
||||||
|
|||||||
Reference in New Issue
Block a user