提交 | 用户 | 时间
|
820397
|
1 |
<template> |
H |
2 |
<h2 class="enter-x mb-3 text-center text-2xl font-bold xl:text-center xl:text-3xl"> |
|
3 |
{{ getFormTitle }} |
|
4 |
</h2> |
|
5 |
</template> |
|
6 |
<script lang="ts" setup> |
|
7 |
import { LoginStateEnum, useLoginState } from './useLogin' |
|
8 |
|
|
9 |
defineOptions({ name: 'LoginFormTitle' }) |
|
10 |
|
|
11 |
const { t } = useI18n() |
|
12 |
|
|
13 |
const { getLoginState } = useLoginState() |
|
14 |
|
|
15 |
const getFormTitle = computed(() => { |
|
16 |
const titleObj = { |
|
17 |
[LoginStateEnum.RESET_PASSWORD]: t('sys.login.forgetFormTitle'), |
|
18 |
[LoginStateEnum.LOGIN]: t('sys.login.signInFormTitle'), |
|
19 |
[LoginStateEnum.REGISTER]: t('sys.login.signUpFormTitle'), |
|
20 |
[LoginStateEnum.MOBILE]: t('sys.login.mobileSignInFormTitle'), |
|
21 |
[LoginStateEnum.QR_CODE]: t('sys.login.qrSignInFormTitle'), |
|
22 |
[LoginStateEnum.SSO]: t('sys.login.ssoFormTitle') |
|
23 |
} |
|
24 |
return titleObj[unref(getLoginState)] |
|
25 |
}) |
|
26 |
</script> |