perf: 收敛前端按需加载与图标导入

- 延迟加载第三方登录组件并使用按需 SVG 图标入口

- 修复 CardList 图标依赖并整理组件格式
This commit is contained in:
2026-07-27 19:42:03 +08:00
parent 908eb5583d
commit 24b1142738
8 changed files with 38 additions and 35 deletions

View File

@@ -1,7 +1,7 @@
<script setup lang="ts">
import { useRoute } from 'vue-router';
import { SvgDingDingIcon } from '@easyflow/icons';
import { SvgDingDingIcon } from '@easyflow/icons/svg';
import { $t } from '@easyflow/locales';
import { alert, useEasyFlowModal } from '@easyflow-core/popup-ui';

View File

@@ -5,7 +5,7 @@ import type { EasyFlowFormSchema } from '@easyflow-core/form-ui';
import type { AuthenticationProps } from './types';
import { computed, onMounted, reactive, ref } from 'vue';
import { computed, defineAsyncComponent, onMounted, reactive, ref } from 'vue';
import { useRouter } from 'vue-router';
import { $t } from '@easyflow/locales';
@@ -14,7 +14,6 @@ import { useEasyFlowForm } from '@easyflow-core/form-ui';
import { EasyFlowButton, EasyFlowCheckbox } from '@easyflow-core/shadcn-ui';
import Title from './auth-title.vue';
import ThirdPartyLogin from './third-party-login.vue';
interface Props extends AuthenticationProps {
formSchema?: EasyFlowFormSchema[];
@@ -47,6 +46,10 @@ const emit = defineEmits<{
submit: [Recordable<any>];
}>();
const ThirdPartyLogin = defineAsyncComponent(
() => import('./third-party-login.vue'),
);
const [Form, formApi] = useEasyFlowForm(
reactive({
commonConfig: {

View File

@@ -5,7 +5,7 @@ import {
SvgGoogleIcon,
SvgQQChatIcon,
SvgWeChatIcon,
} from '@easyflow/icons';
} from '@easyflow/icons/svg';
import { $t } from '@easyflow/locales';
import { EasyFlowIconButton } from '@easyflow-core/shadcn-ui';