fix
Some checks failed
Deploy / deploy (build, debian, 22, /root/OJDeploy/data/clientnext) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822, /root/OJ/data/dist) (push) Has been cancelled

This commit is contained in:
2026-05-07 01:46:43 -06:00
parent 67a44d7637
commit 7d8eff4ee8
14 changed files with 238 additions and 290 deletions

View File

@@ -54,7 +54,7 @@ async function submit() {
const api = {
"admin announcement create": createAnnouncement,
"admin announcement edit": editAnnouncement,
}[<string>route.name]
}[route.name as string]
try {
await api!(announcement)
if (route.name === "admin announcement create") {

View File

@@ -97,7 +97,7 @@ async function submit() {
const api = {
"admin contest create": createContest,
"admin contest edit": editContest,
}[<string>route.name]
}[route.name as string]
try {
await api!(contest)
if (route.name === "admin contest create") {

View File

@@ -33,7 +33,7 @@ const columns: DataTableColumn<AdminProblemFiltered>[] = [
render: (row) =>
h(AddButton, {
problemID: row.id,
contestID: <string>route.params.contestID,
contestID: route.params.contestID as string,
onAdded: () => emit("change"),
}),
width: 60,

View File

@@ -44,7 +44,7 @@ const title = computed(
"admin problem edit": "编辑题目",
"admin contest problem create": "新建比赛题目",
"admin contest problem edit": "编辑比赛题目",
})[<string>route.name],
})[route.name as string],
)
const isAIGenerating = ref(false)
@@ -358,7 +358,7 @@ async function submit() {
"admin problem edit": editProblem,
"admin contest problem create": createContestProblem,
"admin contest problem edit": editContestProblem,
}[<string>route.name]
}[route.name as string]
if (
route.name === "admin contest problem create" ||
route.name === "admin contest problem edit"

View File

@@ -23,7 +23,7 @@ const title = computed(
({
"admin problem list": "题目列表",
"admin contest problem list": "比赛题目列表",
})[<string>route.name],
})[route.name as string],
)
const isContestProblemList = computed(
() => route.name === "admin contest problem list",