fix: fix login page
This commit is contained in:
@@ -14,6 +14,8 @@
|
|||||||
|
|
||||||
**安装依赖**
|
**安装依赖**
|
||||||
|
|
||||||
|
npm install -g pnpm
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pnpm i
|
pnpm i
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { $t } from '@/locales';
|
import { $t } from '@/locales';
|
||||||
|
import { loginModuleRecord } from '@/constants/app';
|
||||||
|
import { useRouterPush } from '@/hooks/common/router';
|
||||||
import { useAntdForm, useFormRules } from '@/hooks/common/form';
|
import { useAntdForm, useFormRules } from '@/hooks/common/form';
|
||||||
import { useAuthStore } from '@/store/modules/auth';
|
import { useAuthStore } from '@/store/modules/auth';
|
||||||
|
|
||||||
@@ -8,6 +10,7 @@ defineOptions({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const authStore = useAuthStore();
|
const authStore = useAuthStore();
|
||||||
|
const { toggleLoginModule } = useRouterPush();
|
||||||
const { formRef, validate } = useAntdForm();
|
const { formRef, validate } = useAntdForm();
|
||||||
const { patternRules } = useFormRules();
|
const { patternRules } = useFormRules();
|
||||||
const codeImg = ref('');
|
const codeImg = ref('');
|
||||||
@@ -69,11 +72,20 @@ async function getCheckCode() {
|
|||||||
<ASpace direction="vertical" size="large" class="w-full">
|
<ASpace direction="vertical" size="large" class="w-full">
|
||||||
<div class="flex-y-center justify-between">
|
<div class="flex-y-center justify-between">
|
||||||
<ACheckbox>{{ $t('page.login.pwdLogin.rememberMe') }}</ACheckbox>
|
<ACheckbox>{{ $t('page.login.pwdLogin.rememberMe') }}</ACheckbox>
|
||||||
<AButton type="text">{{ $t('page.login.pwdLogin.forgetPassword') }}</AButton>
|
<AButton type="text" @click="toggleLoginModule('reset-pwd')">{{ $t('page.login.pwdLogin.forgetPassword') }}</AButton>
|
||||||
</div>
|
</div>
|
||||||
<AButton type="primary" block size="large" shape="round" :loading="authStore.loginLoading" @click="handleSubmit">
|
<AButton type="primary" block size="large" shape="round" :loading="authStore.loginLoading" @click="handleSubmit">
|
||||||
{{ $t('common.confirm') }}
|
{{ $t('common.confirm') }}
|
||||||
</AButton>
|
</AButton>
|
||||||
|
<div class="flex-y-center justify-between">
|
||||||
|
<AButton class="h-34px flex-1" block @click="toggleLoginModule('code-login')">
|
||||||
|
{{ $t(loginModuleRecord['code-login']) }}
|
||||||
|
</AButton>
|
||||||
|
<div class="w-12px"></div>
|
||||||
|
<AButton class="h-34px flex-1" block @click="toggleLoginModule('register')">
|
||||||
|
{{ $t(loginModuleRecord.register) }}
|
||||||
|
</AButton>
|
||||||
|
</div>
|
||||||
</ASpace>
|
</ASpace>
|
||||||
</AForm>
|
</AForm>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user