⚡ 全面优化 2026 前端响应式体验与加载性能

完成 FileCodeBox 2026 全站桌面端、平板和移动端的视觉交互复核,补齐文件选择后的批量操作闭环,并降低公共首屏的字体与低频依赖成本。

- 为移动文件列表增加全选、已选数量、批量编辑、策略与删除固定栏,并补充详情删除和空筛选重置
- 优化设置保存栏、分区导航、发送过期控件、仪表盘日期与图表操作、分页和记录抽屉
- 为后台侧栏增加遮罩、滚动锁定、Escape 关闭和焦点返回,完善登录密码可见性与国际化
- 移除全站强制 DingTalk 字体,按需加载 JSZip、Marked 和 DOMPurify,并停止空闲提示定时器
- 已通过架构检查、Vue 类型检查、ESLint、生产构建、48 组多视口明暗模式矩阵及核心流程回归
This commit is contained in:
orion committed 2026-07-21 16:44:45 +08:00
1 parent fa6b484d17
commit aa3743b42d
26 files changed
+488 -441

No files matched your search

+18 -13
View File
@@ -1,6 +1,6 @@
<template>
<div class="p-4 sm:p-6">
<div class="mb-6 flex flex-col gap-2 sm:flex-row sm:items-end sm:justify-between">
<div class="mb-6 flex items-end justify-between gap-3">
<div>
<p class="text-sm" :class="[mutedTextClass]">{{ t('admin.dashboard.adminLabel') }}</p>
<h2 class="text-2xl font-bold" :class="[primaryTextClass]">
@@ -10,13 +10,18 @@
{{ t('admin.dashboard.lastUpdated', { time: lastUpdatedText }) }}
</p>
</div>
<BaseButton variant="secondary" :loading="isDashboardRefreshing" @click="refreshDashboardPage">
<BaseButton
variant="secondary"
:loading="isDashboardRefreshing"
:title="t('admin.dashboard.refresh')"
:aria-label="t('admin.dashboard.refresh')"
class="shrink-0 max-sm:h-11 max-sm:w-11 max-sm:!px-0"
@click="refreshDashboardPage"
>
<template #icon>
<RefreshCwIcon class="mr-2 h-4 w-4" />
</template>
{{
isDashboardRefreshing ? t('admin.dashboard.refreshing') : t('admin.dashboard.refresh')
}}
<span class="max-sm:sr-only">{{ isDashboardRefreshing ? t('admin.dashboard.refreshing') : t('admin.dashboard.refresh') }}</span>
</BaseButton>
</div>
@@ -98,7 +103,7 @@
/>
</div>
<div class="grid grid-cols-3 gap-2 sm:gap-4">
<div class="grid grid-cols-1 gap-2 sm:grid-cols-3 sm:gap-4">
<MetricProgress
:label="t('admin.dashboard.activeFileRatio')"
:value="dashboardData.activeRatio"
@@ -263,11 +268,11 @@
@change="fetchAnalyticsData"
/>
</div>
<div class="hidden grid-cols-3 gap-2 sm:flex sm:justify-end">
<div class="grid w-full grid-cols-3 gap-2 sm:flex sm:w-auto sm:justify-end">
<BaseButton
variant="outline"
size="sm"
class="h-9 min-w-16"
class="min-h-11 min-w-16 lg:!min-h-9"
@click="trendCanvas?.zoom(0.75)"
>
{{ t('admin.dashboard.trend.zoomIn') }}
@@ -275,7 +280,7 @@
<BaseButton
variant="outline"
size="sm"
class="h-9 min-w-16"
class="min-h-11 min-w-16 lg:!min-h-9"
@click="trendCanvas?.zoom(1.33)"
>
{{ t('admin.dashboard.trend.zoomOut') }}
@@ -283,7 +288,7 @@
<BaseButton
variant="outline"
size="sm"
class="h-9 min-w-16"
class="min-h-11 min-w-16 lg:!min-h-9"
@click="trendCanvas?.resetWindow()"
>
{{ t('admin.dashboard.trend.reset') }}
@@ -638,8 +643,8 @@ const MetricProgress = defineComponent({
'theme-2026-card-hover rounded-[18px] border border-[#d4e0e3] bg-[#f6faf9] p-2.5 shadow-sm transition-all duration-200 hover:-translate-y-0.5 hover:border-[#8fb2bf] hover:shadow-md sm:rounded-[30px] sm:p-4 sm:shadow-md dark:border-[#40545c] dark:bg-[#17252c]/50 dark:hover:border-[#7199a8] dark:hover:bg-[#263941] dark:hover:shadow-black/25'
},
[
h('div', { class: 'mb-2 flex flex-col gap-0.5 text-xs sm:flex-row sm:items-center sm:justify-between sm:text-sm' }, [
h('span', { class: 'line-clamp-1 text-gray-500 dark:text-gray-400' }, props.label),
h('div', { class: 'mb-2 flex items-center justify-between gap-3 text-sm' }, [
h('span', { class: 'min-w-0 font-medium text-gray-600 dark:text-gray-300' }, props.label),
h('span', { class: 'font-medium tabular-nums text-gray-900 dark:text-white' }, `${props.value}%`)
]),
h('div', {
@@ -655,7 +660,7 @@ const MetricProgress = defineComponent({
style: { width: `${Math.max(0, Math.min(100, props.value))}%` }
})
]),
h('p', { class: 'mt-2 hidden text-sm text-gray-500 sm:block dark:text-gray-400' }, props.detail)
h('p', { class: 'mt-2 text-xs text-gray-500 dark:text-gray-400 sm:text-sm' }, props.detail)
]
)
}