perf: 登录界面重做

This commit is contained in:
2026-03-11 20:28:42 +08:00
parent 99f792f6de
commit 0a8a7c8046
13 changed files with 726 additions and 383 deletions

View File

@@ -1,14 +1,11 @@
<script lang="ts" setup>
import type { EasyFlowFormSchema } from '@easyflow/common-ui';
import type {EasyFlowFormSchema} from '@easyflow/common-ui';
import {AuthenticationLogin, z} from '@easyflow/common-ui';
import { computed, onMounted } from 'vue';
import { AuthenticationLogin, z } from '@easyflow/common-ui';
import { useAppConfig } from '@easyflow/hooks';
import { $t } from '@easyflow/locales';
import { preferences } from '@easyflow/preferences';
import { useAuthStore } from '#/store';
import {computed, onMounted} from 'vue';
import {useAppConfig} from '@easyflow/hooks';
import {$t} from '@easyflow/locales';
import {useAuthStore} from '#/store';
defineOptions({ name: 'Login' });
onMounted(() => {});
@@ -17,8 +14,6 @@ const authStore = useAuthStore();
const { apiURL } = useAppConfig(import.meta.env, import.meta.env.PROD);
const title = computed(() => preferences.auth.welcomeBack);
const subTitle = computed(() => preferences.auth.loginSubtitle);
const formSchema = computed((): EasyFlowFormSchema[] => {
return [
{
@@ -91,23 +86,38 @@ function onSubmit(values: any) {
</script>
<template>
<div>
<div class="login-view">
<AuthenticationLogin
:form-schema="formSchema"
:loading="authStore.loginLoading"
:title="title"
:sub-title="subTitle"
:show-header="false"
@submit="onSubmit"
/>
<div id="captcha-box" class="captcha-div"></div>
>
<template #overlay>
<div id="captcha-box" class="captcha-anchor"></div>
</template>
</AuthenticationLogin>
</div>
</template>
<style scoped>
.captcha-div {
.login-view {
position: relative;
}
.captcha-anchor {
inset: 0;
pointer-events: none;
position: absolute;
top: 30vh;
left: 21vh;
z-index: 30;
}
.captcha-anchor:empty {
display: none;
}
.captcha-anchor :deep(*) {
pointer-events: auto;
}
.platform-icon {