perf(加载): 排名、看板、班级 PK、智能分析第一次打开少下两百多 KB
这几页的 Markdown 只在点开抽屉 / 弹层、或 AI 报告出来时才用得上, 却连着整套代码高亮(CodeMirror 和三种语言的解析器)一起静态打进了页面。 改成用到才加载:排名 356→133KB、看板 380→157KB、PK 311→88KB、 智能分析 308→86KB(gzip 后)。 网站图标原来塞了 16 到 256 像素九张图共 192KB,只留标签页用得上的 16 到 48 像素四张(原图像素不变),17KB。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a814776fb9
commit
3bb74171c3
6 files changed
+15
-5
No files matched your search
@@ -3,7 +3,6 @@ import { Icon } from "@iconify/vue"
|
||||
import PageHeader from "admin/components/PageHeader.vue"
|
||||
import { useThemeVars } from "naive-ui"
|
||||
import { classLabel } from "oj/submission/utils"
|
||||
import Markdown from "shared/components/Markdown.vue"
|
||||
import { useBackClose } from "shared/composables/backClose"
|
||||
import { useBreakpoints } from "shared/composables/breakpoints"
|
||||
import Pagination from "shared/components/Pagination.vue"
|
||||
@@ -12,6 +11,9 @@ import { parseTime } from "utils/functions"
|
||||
import type { AdminAiReport, AdminAiReportListItem } from "utils/types"
|
||||
import { getAIReportDetail, getAIReportList, pinAIReport } from "../api"
|
||||
|
||||
// Markdown 连着整套代码高亮(两百多 KB),这里要等点开 / AI 写完才用得上,别让它拖慢页面
|
||||
const Markdown = defineAsyncComponent(() => import("shared/components/Markdown.vue"))
|
||||
|
||||
/**
|
||||
* 后台 AI 报告(设计稿「智能分析重设计」AiAdmin):左边一份一行(用户名、班级、时间、
|
||||
* 两行摘要),点哪份右边就是全文。原来是表格 + 弹框,看一份要点「查看」、关框、再点下一份。
|
||||
|
||||
Reference in new issue
Block a user