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
@@ -1,10 +1,12 @@
|
||||
<script setup lang="ts">
|
||||
import { isSqlProblem } from "@oj2/contract"
|
||||
import { getProblem } from "oj/api"
|
||||
import Markdown from "shared/components/Markdown.vue"
|
||||
import { errorMessage } from "utils/api"
|
||||
import type { ProblemDetail } from "utils/types"
|
||||
|
||||
// Markdown 连着整套代码高亮(两百多 KB),这里要等点开 / AI 写完才用得上,别让它拖慢页面
|
||||
const Markdown = defineAsyncComponent(() => import("shared/components/Markdown.vue"))
|
||||
|
||||
/**
|
||||
* 「讲错误」弹层左边的题目(用户要的:演示学生的错误时题目和代码要并排)。
|
||||
* 只摆讲题用得上的:描述、输入、输出、例子 —— 题目页的状态标签、流程图、相似题都不要。
|
||||
|
||||
Reference in new issue
Block a user