⚡ 全面优化 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

+36 -18
View File
@@ -10,6 +10,7 @@ import { useSystemConfig } from '@/composables'
const isDarkMode = inject('isDarkMode')
const { t } = useI18n()
const showAdminPassword = ref(false)
const activeSection = ref('general')
const {
config,
isRefreshing,
@@ -25,19 +26,25 @@ const {
} = useSystemConfig()
const scrollToSection = (section: string) => {
activeSection.value = section
document.getElementById(`settings-${section}`)?.scrollIntoView({
behavior: window.matchMedia('(prefers-reduced-motion: reduce)').matches ? 'auto' : 'smooth',
block: 'start'
})
}
const discardChanges = () => {
if (!window.confirm(t('manage.settings.discardChangesConfirm'))) return
void refreshConfig()
}
onMounted(() => {
void refreshConfig()
})
</script>
<template>
<div class="p-4 pb-28 sm:p-6 sm:pb-28">
<div class="p-4 pb-36 sm:p-6 sm:pb-28">
<div
class="mb-6 flex flex-col gap-3 lg:flex-row lg:items-end lg:justify-between"
>
@@ -53,7 +60,7 @@ onMounted(() => {
</p>
</div>
<div class="flex flex-wrap items-center gap-2">
<div class="hidden flex-wrap items-center gap-2 sm:flex">
<BaseButton
variant="secondary"
:loading="isRefreshing"
@@ -77,7 +84,7 @@ onMounted(() => {
</div>
<nav
class="mb-4 flex gap-2 overflow-x-auto pb-2"
class="mb-4 grid grid-cols-2 gap-2 sm:flex sm:overflow-x-auto sm:pb-2"
:aria-label="t('manage.settings.sectionNavigation')"
>
<button
@@ -89,8 +96,13 @@ onMounted(() => {
]"
:key="section[0]"
type="button"
class="inline-flex min-h-11 shrink-0 items-center rounded-full border px-4 text-sm font-medium"
:class="isDarkMode ? 'border-[#40545c] bg-[#263941] text-[#d8e3e5]' : 'border-[#c8d8dc] bg-[#edf4f5] text-[#415d66]'"
class="inline-flex min-h-11 shrink-0 items-center justify-center rounded-full border px-3 text-center text-sm font-medium sm:px-4"
:class="activeSection === section[0]
? 'border-[#5f8796] bg-[#5f8796] text-white'
: isDarkMode
? 'border-[#40545c] bg-[#263941] text-[#d8e3e5]'
: 'border-[#c8d8dc] bg-[#edf4f5] text-[#415d66]'"
:aria-current="activeSection === section[0] ? 'true' : undefined"
@click="scrollToSection(section[0])"
>
{{ section[1] }}
@@ -773,29 +785,35 @@ onMounted(() => {
</div>
<div
class="fixed inset-x-0 bottom-0 z-40 border-t px-4 py-3 backdrop-blur-xl lg:left-64"
class="fixed inset-x-0 bottom-0 z-40 border-t px-4 pt-3 backdrop-blur-xl lg:left-64"
:class="isDarkMode ? 'border-[#31454d] bg-[#17252b]/95' : 'border-[#c8d7da] bg-[#f2f6f5]/95'"
role="status"
aria-live="polite"
>
<div class="mx-auto flex max-w-6xl flex-wrap items-center justify-between gap-3">
<p class="text-sm font-medium" :class="isDirty ? 'text-amber-600 dark:text-amber-300' : isDarkMode ? 'text-gray-300' : 'text-[#415d66]'">
{{ isDirty ? t('manage.settings.unsavedChanges') : t('manage.settings.allChangesSaved') }}
</p>
<div class="flex items-center gap-2">
<div
class="mx-auto grid max-w-6xl grid-cols-[minmax(0,1fr)_auto] items-center gap-3"
:style="{ paddingBottom: 'max(0.75rem, env(safe-area-inset-bottom))' }"
>
<div class="min-w-0">
<p class="truncate text-sm font-medium" :class="isDirty ? 'text-amber-600 dark:text-amber-300' : isDarkMode ? 'text-gray-300' : 'text-[#415d66]'">
{{ isDirty ? t('manage.settings.unsavedChanges') : t('manage.settings.allChangesSaved') }}
</p>
<BaseButton
v-if="isDirty"
variant="secondary"
size="sm"
class="mt-1 !min-h-9 !px-2 text-xs"
:loading="isRefreshing"
:disabled="isSaving || isDirty"
@click="refreshConfig"
:disabled="isSaving"
@click="discardChanges"
>
{{ t('manage.settings.reloadSaved') }}
</BaseButton>
<BaseButton :loading="isSaving" :disabled="!isDirty || isRefreshing" @click="submitConfig">
<template #icon><SaveIcon class="mr-2 h-4 w-4" /></template>
{{ isSaving ? t('manage.settings.saving') : t('manage.settings.saveChanges') }}
{{ t('manage.settings.discardChanges') }}
</BaseButton>
</div>
<BaseButton class="min-w-28" :loading="isSaving" :disabled="!isDirty || isRefreshing" @click="submitConfig">
<template #icon><SaveIcon class="mr-2 h-4 w-4" /></template>
{{ isSaving ? t('manage.settings.saving') : t('common.save') }}
</BaseButton>
</div>
</div>
</div>