fix
Some checks failed
Deploy / deploy (push) Has been cancelled

This commit is contained in:
2026-01-05 14:43:03 +08:00
parent 9d1896125e
commit ff81567007
2 changed files with 7 additions and 1 deletions

View File

@@ -8,10 +8,11 @@ import { LANGUAGE, Problem } from "utils/types"
export const useProblemStore = defineStore("problem", () => { export const useProblemStore = defineStore("problem", () => {
// ==================== 状态 ==================== // ==================== 状态 ====================
const problem = ref<Problem | null>(null) const problem = ref<Problem | null>(null)
const route = useRoute()
// ==================== 计算属性 ==================== // ==================== 计算属性 ====================
const languages = computed<LANGUAGE[]>(() => { const languages = computed<LANGUAGE[]>(() => {
if (problem.value?.allow_flowchart) { if (route.name === "problem" && problem.value?.allow_flowchart) {
return ["Flowchart", ...problem.value?.languages] return ["Flowchart", ...problem.value?.languages]
} }
return problem.value?.languages ?? [] return problem.value?.languages ?? []

View File

@@ -64,14 +64,17 @@ export const ojs: RouteRecordRaw = {
}, },
{ {
path: "rank", path: "rank",
name: "rank",
component: () => import("oj/rank/list.vue"), component: () => import("oj/rank/list.vue"),
}, },
{ {
path: "class", path: "class",
name: "class",
component: () => import("oj/class/pk.vue"), component: () => import("oj/class/pk.vue"),
}, },
{ {
path: "announcement", path: "announcement",
name: "announcements",
component: () => import("oj/announcement/list.vue"), component: () => import("oj/announcement/list.vue"),
}, },
{ {
@@ -97,11 +100,13 @@ export const ojs: RouteRecordRaw = {
}, },
{ {
path: "ai-analysis", path: "ai-analysis",
name: "ai",
component: () => import("oj/ai/analysis.vue"), component: () => import("oj/ai/analysis.vue"),
meta: { requiresAuth: true }, meta: { requiresAuth: true },
}, },
{ {
path: "flowchart", path: "flowchart",
name: "flowchart",
component: () => import("oj/flowchart/index.vue"), component: () => import("oj/flowchart/index.vue"),
}, },
{ {