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,5 +1,5 @@
<script setup lang="ts">
import type {AiChatMessage, AiToolApprovalPayload} from './types';
import type { AiChatMessage, AiToolApprovalPayload } from './types';
import AiErrorNotice from './AiErrorNotice.vue';
import AiKnowledgeCard from './AiKnowledgeCard.vue';

View File

@@ -4,6 +4,7 @@ import type { TagProps } from 'element-plus';
import { computed } from 'vue';
import { useAccess } from '@easyflow/access';
import { IconifyIcon } from '@easyflow/icons';
import { Loading, MoreFilled } from '@element-plus/icons-vue';
import {
@@ -243,10 +244,7 @@ function resolveMetaItems(item: any) {
</ElTag>
</slot>
</div>
<div
v-if="resolveMetaItems(item).length > 0"
class="card-meta-row"
>
<div v-if="resolveMetaItems(item).length > 0" class="card-meta-row">
<span
v-for="meta in resolveMetaItems(item)"
:key="meta.label"
@@ -274,11 +272,7 @@ function resolveMetaItems(item: any) {
</div>
</div>
<div
v-if="hasVisibleActions(item)"
class="card-actions"
@click.stop
>
<div v-if="hasVisibleActions(item)" class="card-actions" @click.stop>
<ElButton
v-for="(action, actionIndex) in resolveInlineActions(item)"
:key="`${item.id ?? index}-inline-${actionIndex}`"

View File

@@ -127,11 +127,12 @@ const strategyOptions = [
},
];
const fileExt = computed(() =>
String(props.documentTitle || '')
.split('.')
.pop()
?.toLowerCase() || '',
const fileExt = computed(
() =>
String(props.documentTitle || '')
.split('.')
.pop()
?.toLowerCase() || '',
);
const isPptx = computed(() => fileExt.value === 'pptx');

View File

@@ -12,7 +12,7 @@ import {
SvgCakeIcon,
SvgCardIcon,
SvgDownloadIcon,
} from '@easyflow/icons';
} from '@easyflow/icons/svg';
import AnalyticsTrends from './analytics-trends.vue';
import AnalyticsVisitsData from './analytics-visits-data.vue';