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", () => {
// ==================== 状态 ====================
const problem = ref<Problem | null>(null)
const route = useRoute()
// ==================== 计算属性 ====================
const languages = computed<LANGUAGE[]>(() => {
if (problem.value?.allow_flowchart) {
if (route.name === "problem" && problem.value?.allow_flowchart) {
return ["Flowchart", ...problem.value?.languages]
}
return problem.value?.languages ?? []